Learning to Rank with Ordinal Regression Guided with Conditional Probabilities

The conditional probability approach in ordinal regression generates a CDF and uses pairwise and listwise losses to optimize label order ranking, addressing inefficiencies in existing methods and enhancing ranking accuracy and complexity reduction.

US20260377754A1Pending Publication Date: 2026-11-26GOOGLE LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
US19/142565
Authority / Receiving Office
US · United States
Patent Type
Applications(United States)
Current Assignee / Owner
Filing Date
2022-12-22
Publication Date
2026-11-26

AI Technical Summary

Technical Problem

Existing ordinal regression methods struggle with learning the probability mass function (PMF) of label distributions, leading to inefficiencies in ranking and optimization, especially when subjective human ratings are involved, and can result in negative probabilities and complex gradient updates.

Method used

Employing a conditional probability approach that generates a Cumulative Distribution Function (CDF) and uses pairwise and listwise ranking losses to optimize label order ranking, allowing for nonnegative probabilities and reduced computational complexity.

Benefits of technology

The solution provides a model that avoids negative probabilities and enhances control over probability updates, improving ranking accuracy and reducing computational complexity, particularly in multi-label graded label problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US20260377754A1-D00000_ABST
    Figure US20260377754A1-D00000_ABST
Patent Text Reader

Abstract

The embodiments are directed towards multi-label ordinal regression, via conditional probabilities. The conditional probabilities are employed to generate a Cumulative Distribution Function (CDF) of the ordered labels. An ordinal regression formulation that employs conditional probabilities over the label CDF introduces pairwise ranking losses that encourage (or enhance) the label order ranking differences among items with different labels. The pairwise methods are extended to listwise methods. Listwise methods reduce the complexity of computing the losses and applying gradient updates. A pairwise loss in the binary case optimizes the conditional probabilities that one item has a better label than the other, conditioned on the event that the two items have different labels. Listwise losses applied on all items co-recommended for the same query are extensions to the conditional probability view. These views are extended to graded-label setting, where conditioning on the event of an item taking a smaller probability allows expressing the graded-label problem as a sequence of binary problems, where ranking losses can be expressed in terms of conditional probabilities.
Need to check novelty before this filing date? Find Prior Art

Description

FIELD

[0001] The present disclosure relates generally to machine learning. More particularly, the present disclosure relates to learning to rank via ordinal regression guided with conditional probabilities.BACKGROUND

[0002] Ordinal regression may be used for multi-label graded label (multi-class) problems in which the order of the labels is important. There are multiple ways in which ordinal regression can be learned, but one common trait of these methods is that instead of learning the probability mass function (PMF) of the label distribution, a variant of the cumulative distribution function (CDF) is learned at each of the discrete label points. This allows smoothing the predicted label distribution in cases where subjective human ratings are provided. It also allows for better optimization for ranking among items which are co-recommended for a single query. Such ranking losses emphasize the relations between items with different engagement or relevance labels, as opposed to individual pointwise losses that learn individual relevance scores for each item, implicitly marginalizing the interaction effects of items over each other. Ranking losses that apply a loss on pairs of labels are common and relatively intuitive to derive for the binary label case.SUMMARY

[0003] Aspects and advantages of embodiments of the present disclosure will be set forth in part in the following description, or can be learned from the description, or can be learned through practice of the embodiments.

[0004] One example aspect of the present disclosure is directed to a computer-implemented method to perform learning of a ranking model. A set of training data may be employed to learn (or train) the ranking model. The training data may encode a set of items. The training data may additionally encode an associated for each item of the set of items with a ground-truth label of the set of labels. The set of labels may be an ordered set of labels. The method includes, for each item of the set of items, determining, by a computing device, a predicted label for the item based on the ranking model. The computing device may determine an item score vector for each item of the set of items. Each component of the item score vector for an item may correspond to a separate label of the set of labels. Each component of the item score vector for the item may indicate a conditional probability for the item based on the corresponding label and the predicted label for the item. The computing device may generate a probability distribution over the set labels for each item of the set of items. Generating the probability distribution for an item of the set of items may be based on the item score vector for the item. The computing device may evaluate a ranking loss function. Evaluating the ranking loss function may be based on a comparison between the ground-truth label and the probability distribution of the set of labels for each item of the set of items. The computing device may train the ranking model based on the evaluation of the ranking loss function. The trained ranking model may rank the set of items based on the probability distribution over the set of labels for each item of the set of items.

[0005] Other aspects of the present disclosure are directed to various systems, apparatuses, non-transitory computer-readable media, user interfaces, and electronic devices.

[0006] These and other features, aspects, and advantages of various embodiments of the present disclosure will become better understood with reference to the following description and appended claims. The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate example embodiments of the present disclosure and, together with the description, serve to explain the related principles.BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Detailed discussion of embodiments directed to one of ordinary skill in the art is set forth in the specification, which makes reference to the appended figures, in which:

[0008] FIG. 1A depicts a block diagram of an example computing system that performs ordinal regression via conditional probabilities, according to example embodiments of the present disclosure.

[0009] FIG. 1B depicts a block diagram of an example computing device that performs ordinal regression via conditional probabilities, according to example embodiments of the present disclosure.

[0010] FIG. 1C depicts a block diagram of an example computing device that performs ordinal regression via conditional probabilities, according to example embodiments of the present disclosure.

[0011] FIG. 2-3 depict flowchart diagrams of an example methods for training a ranking model, according to example embodiments of the present disclosure.

[0012] Reference numerals that are repeated across plural figures are intended to identify the same features in various implementations.DETAILED DESCRIPTIONOverview

[0013] The embodiments are directed towards methods and systems that enhance multi-label ordinal regression, via a conditional probability approach. In the ordinal regression-based embodiments, the order of the labels matters. The conditional probabilities are employed to generate a Cumulative Distribution Function (CDF) of the ordered labels. Some embodiments leverage an ordinal regression formulation that employs conditional probabilities over the label CDF to introduce pairwise ranking losses that encourage (or enhance) the label order ranking differences among items with different labels. The pairwise-based embodiments may be extended to listwise methods. These listwise-based embodiments may reduce the complexity of computing the losses and applying gradient updates. More specifically, a pairwise loss in the binary case may be viewed as optimizing the conditional probabilities that one item has a better label than the other, conditioned on the event that the two items have different labels. Listwise losses applied on all items co-recommended for the same query can be viewed as extensions to the conditional probability view.

[0014] These loss formulations (e.g., pairwise and listwise methods) may result in nonnegative probabilities. Specifically for the ranking loss, they also provide the directions of updates of predicted probabilities of all (or at least most) label values between the values of the labels of a pair or a list of items. These formulations can be applied to unconstrained ordinal regression. Such unconstrained ordinal regression models may not constrain the mathematical form of the predicted label Probability Mass Function (PMF).

[0015] Deriving ranking losses for the multi-label case can lead to different reasonable loss formulations, each of which performs a different optimization. Each of these variations on the formulation of ordinal regression may be coupled with a specific formulation of a ranking loss. Pairwise and listwise ranking losses may be configured to fit with a method that learns label predictions by applying multiple binary logistic regression losses, one for each learned CDF point for each label. In some embodiments, each of the CDF labels of each of the L−1 learned CDF points (one for each label value, except for the last one, where there is a total of L ordered labels) is viewed as an independent binary logistic regression. Then, for the pairwise loss embodiments, for each of the CDF points, a binary pairwise loss can be applied if the CDF binary labels of the two items are unequal, or in an alternate formulation, if the original multi-class graded labels are unequal. An extension for listwise embodiments relies on similar concepts.

[0016] The unconstrained ordinal regression models of some embodiments can be relaxed (or constrained) to depend on fewer parameters than the L−1 parameters required to uniquely determine any general PMF with L labels. The embodiments may employ a conditional probability view for both direct pointwise learning of individual labels and for ranking via ordinal regression.

[0017] Aspects of the present disclosure provide a number of technical effects and benefits. For instance, the embodiments provide a model that cannot generate negative probabilities for both direct and ranking loss. Additionally, the embodiments provide enhanced control of the update direction of probabilities of labels between those of the pair on which the loss is applied, which is in contrast to alternative ordinal regression ranking losses. Unlike some alternative models, the approach of various embodiments is suitable in the general case, where the solution does not restrict the model of the CDF (and thereby that of the learned PMF).Example Devices and Systems

[0018] FIG. 1A depicts a block diagram of an example computing system 100 that performs ordinal regression via conditional probabilities, according to example embodiments of the present disclosure. The system 100 includes a user computing device 102, a server computing system 130, and a training computing system 150 that are communicatively coupled over a network 180.

[0019] The user computing device 102 can be any type of computing device, such as, for example, a personal computing device (e.g., laptop or desktop), a mobile computing device (e.g., smartphone or tablet), a gaming console or controller, a wearable computing device, an embedded computing device, or any other type of computing device.

[0020] The user computing device 102 includes one or more processors 112 and a memory 114. The one or more processors 112 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. The memory 114 can include one or more non-transitory computer-readable storage media, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 114 can store data 116 and instructions 118 which are executed by the processor 112 to cause the user computing device 102 to perform operations.

[0021] In some implementations, the user computing device 102 can store or include one or more ordinal regression models 120. For example, the ordinal regression models 120 can be or can otherwise include various machine-learned models such as neural networks (e.g., deep neural networks) or other types of machine-learned models, including non-linear models and / or linear models. Neural networks can include feed-forward neural networks, recurrent neural networks (e.g., long short-term memory recurrent neural networks), convolutional neural networks or other forms of neural networks. Some example machine-learned models can leverage an attention mechanism such as self-attention. For example, some example machine-learned models can include multi-headed self-attention models (e.g., transformer models). Example ordinal regression models 120 are discussed with reference to FIGS. 2-3.

[0022] In some implementations, the one or more ordinal regression models 120 can be received from the server computing system 130 over network 180, stored in the user computing device memory 114, and then used or otherwise implemented by the one or more processors 112. In some implementations, the user computing device 102 can implement multiple parallel instances of a single ordinal regression model 120

[0023] More particularly, an ordinal regression model may be a ranking model. Ordinal regression models (or ranking models) may be used for multi-label graded labels (multi-class) problems in which the order of the labels is important. There are multiple ways in which ordinal regression can be learned, but one common trait of these methods is that instead of learning the probability mass function (PMF) of the label distribution, a variant of the cumulative distribution function (CDF) is learned at each of the discrete label points. This allows smoothing the predicted label distribution in cases where subjective human ratings are provided. It also allows for better optimization for ranking among items which are co-recommended for a single query. Such ranking losses emphasize the relations between items with different engagement or relevance labels, as opposed to individual pointwise losses that learn individual relevance scores for each item, implicitly marginalizing the interaction effects of items over each other. Ranking losses that apply a loss on pairs of labels are common and relatively intuitive to derive for the binary label case.

[0024] Additionally or alternatively, one or more ordinal regression models 140 can be included in or otherwise stored and implemented by the server computing system 130 that communicates with the user computing device 102 according to a client-server relationship. For example, the ordinal regression models 140 can be implemented by the server computing system 140 as a portion of a web service. Thus, one or more models 120 can be stored and implemented at the user computing device 102 and / or one or more models 140 can be stored and implemented at the server computing system 130.

[0025] The user computing device 102 can also include one or more user input components 122 that receives user input. For example, the user input component 122 can be a touch-sensitive component (e.g., a touch-sensitive display screen or a touch pad) that is sensitive to the touch of a user input object (e.g., a finger or a stylus). The touch-sensitive component can serve to implement a virtual keyboard. Other example user input components include a microphone, a traditional keyboard, or other means by which a user can provide user input.

[0026] The server computing system 130 includes one or more processors 132 and a memory 134. The one or more processors 132 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. The memory 134 can include one or more non-transitory computer-readable storage media, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 134 can store data 136 and instructions 138 which are executed by the processor 132 to cause the server computing system 130 to perform operations.

[0027] In some implementations, the server computing system 130 includes or is otherwise implemented by one or more server computing devices. In instances in which the server computing system 130 includes plural server computing devices, such server computing devices can operate according to sequential computing architectures, parallel computing architectures, or some combination thereof.

[0028] As described above, the server computing system 130 can store or otherwise include one or more ordinal regression models 140. For example, the models 140 can be or can otherwise include various machine-learned models. Example machine-learned models include neural networks or other multi-layer non-linear models. Example neural networks include feed forward neural networks, deep neural networks, recurrent neural networks, and convolutional neural networks. Some example machine-learned models can leverage an attention mechanism such as self-attention. For example, some example machine-learned models can include multi-headed self-attention models (e.g., transformer models). Example models 140 are discussed with reference to FIGS. 2-3

[0029] The user computing device 102 and / or the server computing system 130 can train the models 120 and / or 140 via interaction with the training computing system 150 that is communicatively coupled over the network 180. The training computing system 150 can be separate from the server computing system 130 or can be a portion of the server computing system 130.

[0030] The training computing system 150 includes one or more processors 152 and a memory 154. The one or more processors 152 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. The memory 154 can include one or more non-transitory computer-readable storage media, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 154 can store data 156 and instructions 158 which are executed by the processor 152 to cause the training computing system 150 to perform operations. In some implementations, the training computing system 150 includes or is otherwise implemented by one or more server computing devices.

[0031] The training computing system 150 can include a model trainer 160 that trains the machine-learned models 120 and / or 140 stored at the user computing device 102 and / or the server computing system 130 using various training or learning techniques, such as, for example, backwards propagation of errors. For example, a loss function can be backpropagated through the model(s) to update one or more parameters of the model(s) (e.g., based on a gradient of the loss function). Various loss functions can be used such as mean squared error, likelihood loss, cross entropy loss, hinge loss, and / or various other loss functions. Gradient descent techniques can be used to iteratively update the parameters over a number of training iterations.

[0032] In some implementations, performing backwards propagation of errors can include performing truncated backpropagation through time. The model trainer 160 can perform a number of generalization techniques (e.g., weight decays, dropouts, etc.) to improve the generalization capability of the models being trained.

[0033] In particular, the model trainer 160 can train the ordinal regression models 120 and / or 140 based on a set of training data 162. The training data 162 can include, for example, encode a set of items. Each item of the set of items may be associated with one or more ground-truth label of a set of ordered labels.

[0034] In some implementations, if the user has provided consent, the training examples can be provided by the user computing device 102. Thus, in such implementations, the model 120 provided to the user computing device 102 can be trained by the training computing system 150 on user-specific data received from the user computing device 102. In some instances, this process can be referred to as personalizing the model.

[0035] The model trainer 160 includes computer logic utilized to provide desired functionality. The model trainer 160 can be implemented in hardware, firmware, and / or software controlling a general-purpose processor. For example, in some implementations, the model trainer 160 includes program files stored on a storage device, loaded into a memory and executed by one or more processors. In other implementations, the model trainer 160 includes one or more sets of computer-executable instructions that are stored in a tangible computer-readable storage medium such as RAM, hard disk, or optical or magnetic media.

[0036] The network 180 can be any type of communications network, such as a local area network (e.g., intranet), wide area network (e.g., Internet), or some combination thereof and can include any number of wired or wireless links. In general, communication over the network 180 can be carried via any type of wired and / or wireless connection, using a wide variety of communication protocols (e.g., TCP / IP, HTTP, SMTP, FTP), encodings or formats (e.g., HTML, XML), and / or protection schemes (e.g., VPN, secure HTTP, SSL).

[0037] FIG. 1A illustrates one example computing system that can be used to implement the present disclosure. Other computing systems can be used as well. For example, in some implementations, the user computing device 102 can include the model trainer 160 and the training dataset 162. In such implementations, the models 120 can be both trained and used locally at the user computing device 102. In some of such implementations, the user computing device 102 can implement the model trainer 160 to personalize the models 120 based on user-specific data.

[0038] FIG. 1B depicts a block diagram of an example computing device 10 that performs according to example embodiments of the present disclosure. The computing device 10 can be a user computing device or a server computing device.

[0039] The computing device 10 includes a number of applications (e.g., applications 1 through N). Each application contains its own machine learning library and machine-learned model(s). For example, each application can include a machine-learned model. Example applications include a text messaging application, an email application, a dictation application, a virtual keyboard application, a browser application, etc.

[0040] As illustrated in FIG. 1B, each application can communicate with a number of other components of the computing device, such as, for example, one or more sensors, a context manager, a device state component, and / or additional components. In some implementations, each application can communicate with each device component using an API (e.g., a public API). In some implementations, the API used by each application is specific to that application.

[0041] FIG. 1C depicts a block diagram of an example computing device 50 that performs according to example embodiments of the present disclosure. The computing device 50 can be a user computing device or a server computing device.

[0042] The computing device 50 includes a number of applications (e.g., applications 1 through N). Each application is in communication with a central intelligence layer. Example applications include a text messaging application, an email application, a dictation application, a virtual keyboard application, a browser application, etc. In some implementations, each application can communicate with the central intelligence layer (and model(s) stored therein) using an API (e.g., a common API across all applications).

[0043] The central intelligence layer includes a number of machine-learned models. For example, as illustrated in FIG. 1C, a respective machine-learned model can be provided for each application and managed by the central intelligence layer. In other implementations, two or more applications can share a single machine-learned model. For example, in some implementations, the central intelligence layer can provide a single model for all of the applications. In some implementations, the central intelligence layer is included within or otherwise implemented by an operating system of the computing device 50.

[0044] The central intelligence layer can communicate with a central device data layer. The central device data layer can be a centralized repository of data for the computing device 50. As illustrated in FIG. 1C, the central device data layer can communicate with a number of other components of the computing device, such as, for example, one or more sensors, a context manager, a device state component, and / or additional components. In some implementations, the central device data layer can communicate with each device component using an API (e.g., a private API).Conditional Implementation of Ordinal Regression

[0045] Let yi∈{0, 1, 2, . . . , L−1} be the label of item i in a set of N items (e.g., a set of co-recommended items). The model trains on T such sets (e.g., search results from T search queries). Instead of defining prediction and logits to predict either the PMF or the CDF, an “incremental conditional prediction” is defined over functions of the CDF. For any label value l∈{0, 1, 2, . . . , L−2}, the embodiments consider the probabilities that yi>l, conditioned on yi>l−1. The logit score to be learned by a model may be defined as:si⁢ℓ=log⁢Pr⁡(yi>ℓ|yi>ℓ-1)Pr⁡(yi=ℓ|yi>ℓ-1).(1)

[0046] The logits scores for an item may be encoded in an item score vector (e.g., sil). Each component of the item score vector may correspond to a separate label (e.g., indexed via l) of the set of labels. Each component of the item score vector for the item may indicate a conditional probability for the item based on the corresponding label and the predicted label for the item. Then, the conditional probability that yi takes label greater than conditioned on the event that its label is (already) greater than −1 (e.g., yi>≥l−1) is given byPr⁡(yi>ℓ|yi>ℓ-1)=σ⁡(si⁢ℓ)=Δ11+e-si⁢ℓ(2)where σ(sil) denotes the logistic (Sigmoid) function. The probability that yi takes label conditioned on it being greater than −1 is given byPr⁡(yi=ℓ|yi>ℓ-1)=11+esi⁢ℓ.(3)The probability that a model assigns to the event (or item) that yi takes some value k may be expressed as:Pr⁡(yi=k)=Pr⁡(yi=k|yi>k-1)·∏ℓ=0k-1Pr⁡(yi>ℓ|yi>ℓ-1)=[1-σ⁡(sik)]·∏ℓ=0k-1σ⁡(si⁢ℓ),(4)where⁢ Pr⁡(yi>0|yi>-1)=Pr⁡(yi>0),Pr⁡(yi>L-1|yi>L-2)=0,and⁢ si,L-1=-∞.A model may learn L−1 binary regressions for l∈{0, 1, 2, . . . , L−2}. However, losses for yi=k may not be applied on sil for l>k. The loss for the label of example i is then given byLi=∑k=0L-1I⁡(yi=k)·{log⁡(1+esik)+∑ℓ=0k-1log⁡(1+e-si⁢ℓ)}(5)where I(·) is the indicator function. In some embodiments, the loss shown in equation (5) may be applied only for the element yi=k, in the sum and is 0 for any other element. Because the loss is separable among the sil values, it can be implemented as k separate updates of separate losses. Losses for labels greater than k need not be updated.Unlike methods that explicitly learn CDF points, this conditional format may enable learning a nonnegative probability for each label value, and each CDF point may be learned independently of other CDF points.Pairwise Ranking Losses: An Initial VersionUsing a conditional view of ranking losses and equations (1)-(4), a logit ratio of the events can be defined. In the logit ratio, item i takes label k and item j takes label m, such that m<k. This ratio is given by:zij(yi=k,yj=m<k)=Δlog⁢Pr⁡(yi=k,yj=m|yi,yj>m-1)Pr⁡(yi=m,yj=k|yi,yj>m-1)=log⁢[1-σ⁡(sjm)]·σ⁡(sim)·[∏ℓ=m+1k-1σ⁡(si⁢ℓ)]·[1-σ⁡(sik)]σ⁡(sjm)·[1-σ⁡(sim)]·[∏ℓ=m+1k-1σ⁡(sj⁢ℓ)]·[1-σ⁡(sjk)]=sim-sjm+∑ℓ=m+1k-1[log⁡(1+e-sj⁢ℓ)-log⁡(1+e-si⁢ℓ)]+log⁡(1+esjk)-log⁡(1+esik)(6)Note that all the terms σ(sil)·σ(sjl) preceding label value m (for l<m) are canceled in the ratio because they appear in both the numerator and the denominator. A ranking loss for the pair yi=k>yj=m can be defined as:Lijℛ=I⁡(yi=k>yj=m)⁢log⁢{1+exp(-(zij(yi,yj))]}(7)Without loss of generality, the loss expressed in equation (7) may be applied to any pair for which the labels are not equal, where the item with the greater label is chosen as item i:By observing equations (6) and (7) and taking a (negative) gradient on the loss in equation (7), the logit coefficients may be updated in the direction of the signs on the right-hand side of equation (6). Thus, for item i, with the greater label, the logits for all label values l:m≤l<k are increased, thus increasing the probability that the model assigns to the event that item i has a greater label than any l:m≤l<k. This may be an advantageous update, as item i has label k, which is greater than m and also greater than any label less than k. The probability that item i has a label greater than k is decreased, because the label of item i is k, and thus the probability of having a label k is increased.

[0054] In a similar manner, the conditional logits and thus the probabilities of item j having greater labels than any l:m≤l<k are decreased because item j has a label m, which is smaller than any of these labels. The conditional probability of item j having label greater than k (the larger label in the pair, which item i has) is increased. This is because it offsets the decrease in the conditioning probability of item j having a label greater than k−1. By decreasing the conditional probabilities of item j having labels greater than any l:m≤l<k, the probability of the conditioning event of item j having label greater than k, i.e., the event that item j has probability greater than k−1, decreases. Because the loss cannot indicate anything with respect to labels greater than k, the conditional probability of j having a label greater than k has to increase by conditioning on an event whose probability decreases.Pairwise Ranking Losses: A Revised Version

[0055] Moving the logit scores sik and sjk for the larger label in the pair k for the loss in equations (6)-(7) opposite to the movements of all logits may still be a concern. For item j with the lower label m, this movements increases Pr(yj>k|yj>k−1). Because Pr(y_j>k−1) is likely decreased by all other logit negative movements, it is possible that Pr(yj>k) will not increase despite this upward movement of Pr(yj>k|yj>k−1)._However, this may not be guaranteed. To guarantee that all conditional probabilities move in the intuitively correct direction, the pairwise ratio in equation (6) may be defined a bit differently aszij(yi=k,yj=m<k)=Δlog⁢Pr⁡(yi>k-1,yj=m|yi,yj>m-1)Pr⁡(yi=m,yj=k-1|yi,yj>m-1)=log⁢[1-σ⁡(sjm)]·σ⁡(sim)·[∏ℓ=m+1k-1σ⁡(si⁢ℓ)]σ⁡(sjm)·[1-σ⁡(sim)]·[∏ℓ=m+1k-1σ⁡(sj⁢ℓ)]=sim-sjm+∑ℓ=m+1k-1[log⁡(1+e-sj⁢ℓ)-log⁡(1+e-si⁢ℓ)](8)

[0056] Instead of applying the log odds ratio for the joint probability that yi is assigned label k and yij is assigned label m relative to the opposite event, the ratio of the joint probability that yi>k−1 and yj=m relative to the opposite event is taken. This may be a better choice for a ranking loss, because the ranking information is already in the event that yi>k−1. The events where yi=k do not give additional ranking information relative to yj that has a smaller label.

[0057] Plugging the logit of equation (8) in the loss of equation (7), gives a gradient update rule with the signs of the logits in equation (8). These increase the conditional probabilities for all label values l:m≤l<k for item i, and decrease them for item j. Thus, the conditional probabilities that item i has labels greater than m, m+1, . . . , k−1 are increased. This is exactly the desired behavior for item i. Similarly, these probabilities for item j are all decreased, because item j has the smaller label m. Thus, the loss pushes the probability that item j has label m up, and the probability it has a label greater than m down. The label of item i, k>m, pushes down the probabilities that item j has greater probabilities than m+1, . . . , k−1.

[0058] The loss in equation (8) simplifies to a pairwise binary ranking loss if L=2. Equation (8) may be an appropriate extension of the binary case to the multi-label ordinal regression setting.Listwise Ranking Losses

[0059] A listwise loss for the multi-label problem may substantially reduce complexity of updating ranking in training, especially if the number of items N in the list is large. The complexity O(N2L) of a pairwise loss can be reduced to O(NL) This is also important as L grows larger. Although some conventional methods for ranking with ordinal regression propose a listwise loss, these conventional methods have the disadvantage that negative label probabilities can be learned. The conditional approach of the embodiments avoids this problem.

[0060] Instead of taking individual logits, the pairwise loss may be extended to a listwise loss, by making an approximation of an independence assumption among all pairs ranked by the pairwise loss. A listwise score may be defined as:Z=Δlog⁢∏i=1N·∏j=1yj<yiNPr⁡(Yi>yi-1,Yj=yj|Yi,Yj>yj-1)Pr⁡(Yi=yj,Yj>yi-1|Yi,Yj>yj-1)=∑i=1N·∑j=1yi<yjNlog⁢[1-σ⁡(sjyj)]·σ⁡(siyj)·[∏ℓ=yj+1yi-1σ⁡(si⁢ℓ)]σ⁡(sjyj)·[1-σ⁡(siyj)]·[∏ℓ=yj+1yi-1σ⁡(sj⁢ℓ)]=∑i=1N·∑j=1yj<yiN{siyj-sjyj+∑ℓ=yj+1yi-1[log⁡(1+e-sj⁢ℓ)-log⁡(1+e-si⁢ℓ)]}(9)where we use capital letters to denote random variables, describing the learned labels, and lowercase letters to denote the observed true labels. A loss can now be applied on the score Z for the whole query set list of objects by using Z as a logit score.=I[∃i>1:i≠1]·log(1+e−Z)  (10)where I(·) is the indicator function, which is true if not all labels in the list are equal. The loss need not be applied if all labels in the list are equal. The double sum in equation (9) may be empty in that case, so there may not be a need for the indicator function. The total ranking loss aggregates equation (10) on all lists in the training dataset.Because the independence assumption is an approximation, the effect of the lack of real independence may be tuned down by a hyper-parameter v:0<v<1 to which the elements of the product in the first equality of (9) are exponentiated. This scales down the score Z in the expression of the loss, giving a loss=I[∃i>1:i≠1]·log(1+e−vZ)  (10a)Computing equation (9) in its current form still may require the complexity O(N2L). However, the terms of equation (9) can be aggregated per each item v of the N items on the list and for each label b for each item. The aggregation follows the following rules. Let yv be the ground-truth label of item v and consider the logit score syb. The logit score svb appears in the right-hand side of equation (9) in one of the following four cases.1: As svb if there is another item u:∀yu=b<yv.2: As −svp for another item u: ∀yu>b=yv.3: As −log(1+e−s<sub2>vb< / sub2>) for another item u:∀yu<b<yv.4: As log(1+e−s<sub2>vb< / sub2>) for another item u:∀yu>b>yv.

[0066] Thus, the occurrences for the different cases may be counted as follows. Let Cb, C<b and C>p denote the label counts of how many of the N items have label b, how many have labels less than b, and how many items have labels greater than b, respectively. These counts can be computed with complexity O(N+L), by first scanning through all N items, and updating Cb when observing label b, and then applying two cumulative sums (from the left and the right), each of O(L) operations, to compute C<b and C>p. The score Z can now be rewritten as:Z=∑v=1N{∑b=0yv-1[Cb·svb-C<b·log⁡(1+e-svb)]-C>b·[svyv-∑b=yv+1L-2log⁡(1+e-svb)]}.(11)The expression in equation (11) reduces the computation cost of the loss in equation (10) to O(NL), which also carries over to the gradient updates.As in extensions of the binary pairwise losses to listwise losses, because the independence assumption may be an over-estimation, we can normalize and or exponentially scale the C coefficients in equation (11), replacing them by C / N, Cα for some hyperparameter α: 0≤α≤1, or by (C / N)α. As in equation (10a), Z can be scaled by an hyper-parameter v, when applied to the loss.

[0068] The gradients of the loss in equation (10) with the score in equation (11) relative to the logits svb may be the same (probability) factor scaled by some superposition of the coefficients C (or their normalized or exponentiated values). A correctly ranked strong logit may reduce the effectiveness of the update on other logits. As can be done for listwise losses, the exponent of the negative sum of logits may be exchanged by a sum of negative exponents of logits when applying substituting equation (11) into equation (10), giving a loss of:Lℛ=log⁢{1+∑v=1N{∑b=0yv-1[Cb·e-svb-C<b·(1+e-svb)-1]-C>b·[e-svyv-∑b=yv+1L-2(1+e-svb)-1]}}(12)

[0069] Where we recall that the indicator function in equation (10) is dropped because it is unnecessary. To simplify the loss (with some loss of accuracy), we can further replace (1+e−x)−1 by ex, giving the loss:Lℛ=log⁢{1+∑v=1N{∑b=0yv-1[Cb·e-svb-C<b·+e-svb]-C>b·[e-svyv-∑b=yv+1L-2e-svb]]}}.(13)

[0070] Because equation (12) is already some approximation, there may not be much harm in using the simpler approximation in equation (13). The internal sums in (12) and (13) can be scaled by a hyper-parameter v:0<v<1. All listwise losses from equations (10)-(13) may still guarantee movements of the logit scores in the same directions as the movements of the pairwise loss. Multiple pairs may cancel each other out, but that is also attained with the pairwise loss.Recommendation Sets and Queries

[0071] The methods described are usually applicable for training models that predict engagements but are aware of ranking among recommendation items that are shown to a user in a recommendation set in response to a query. When deployed, models generate a ranked list of recommended items in response to a query. A natural use of the ranking loss in training is among items co-recommended in a recommendation set. However, the ranking loss can also be applied in training among selected sets of items from a training batch that may contain multiple recommendation sets. The use of the ranking loss can enhance ranking differences among different examples (recommendations) at possibly the cost of less accurate engagement predictions. The importance of improving ranking accuracy is that it can allow recommendations served to the user to be better ranked among themselvesDistillation

[0072] The proposed methods may also benefit a distillation and ranking distillation setup where a more complex teacher model trains on larger training datasets and conveys the information to a simpler student model that is to be deployed, and trains much faster on smaller datasets. Regular distillation losses such as square (L2 or MSE) loss on the logit scores can be applied from the teacher to the student, where both train with the losses described in this document. In addition, such losses can be applied on the ranking logits, as defined in equations (6) and (8) or on the listwise score in equation (9) to improve the student's ranking performance from the teacher's knowledge. Distilling the teacher's learned logit scores (whether those of equation (1) or the ranking ones) to the student allows the student to benefit from the information that the teacher learned on also with the methods described in this document, and specifically when distillation pairwise or listwise ranking scores.Methods

[0073] FIG. 2-3 depict flowchart diagrams of an example method for training a ranking model, according to example embodiments of the present disclosure. Method 200 of FIG. 2, begins at block 202, where a set of items is received. The set of items may be included in a set of training data. Each item of the set of items may be associated with one or more ground-truth label of a set of ordered labels. At block 204, a set of predicted probabilities for the item is determined. The set of predicted probabilities for the item may include one or more predicted probabilities (e.g., Pr(yi)) for one or more labels (e.g., yi) of the set of ordered labels. Determining the set of predicted probabilities for the item may be based on a ranking model.

[0074] At block 206, a set of conditional probabilities is determined for each item of the set of items (e.g., see equations (1)-(3)). The set of conditional probabilities for an item may include one or more conditional probabilities for one or more labels of the set of ordered labels. The set of conditional probabilities for an item may be based on the set of predicted probabilities for the item. At block 208, a conditional cumulative distribution function (CDF) is generated for each item of the set of items. (The conditional CDF can determine the probability of some label conditioned on the event that the label value equals this label value or greater.) The CDF for an item may be based on the set of conditional probabilities for the item. At block 210, a set of logit scores (e.g., a logit ratio, see equations (6), (8), and / or (9)) is determined for each item, pair of items or list of items. The set of logit scores for an item may be based on the set of conditional CDFs for each item of the set of items. At block 212, a loss function (e.g., see equations (5), (7), (10), and / or (12)-(13)) may be evaluated based on the set of logit scores and the ground-truth label for each item of the set of items.

[0075] At block 214, the set of predicted probabilities for each item of the set of items may be updated based on the evaluated loss function. In some embodiments, the set of conditional probabilities for each item of the set of items may be updated based on the evaluated loss function. At block 216, the ranking model may be updated based on the updated set of predicted and / or conditional probabilities for each item of the set of items. At decision block 218, it is determined whether the ranking model has converged based on the evaluated loss function. In some implementations, training terminates if all training data examples have been exhausted or if a budget of training iterations has been used. If the ranking model has converged, then method 200 may flow to block 220, where the training of the ranking model may be terminated. If the ranking model has not converged, then method 200 may return to block 204, where the updated model may be employed to determine an updated set of predicted probabilities for each item of the set of items.

[0076] Method 300 of FIG. 3, begins at block 302, where a set of training data is received. The set of training data may encode (or include) a set of items. Each item of the set of items may be associated with a ground-truth label of a set of labels. The set of labels may be an ordered set of labels. At block 304, one or more predicted labels (e.g., yi) are determined, at a computing device, for each item of the set of items. Determining one or more predicted labels for an item may be based on a ranking model. Determining one or more predicted labels for an item may include determining one or more probabilities (e.g., Pr(yi)) for each of the one or more predicted labels.

[0077] At block 306, an item score vector (e.g., sil, see equation (1)) may be determined for each item of the set of items. The item score vector for an item may be determined at and / or by the computing device. Each component of the item score vector for the item corresponds to a separate label of the set of labels. Each component of the item score vector for the item may indicate a conditional probability (e.g., see equations (1)-(4)) for the item based on the corresponding label and the predicted label for the item. For instance, each component of the item score vector may indicate one or more conditional probabilities of a set of conditional probabilities for the item.

[0078] At block 308, a probability distribution (e.g., expressed by a CDF) of the set labels may be generated for each item of the set of items, at the computing device. Generating the probability distribution for the item may be based on the item score vector for the item. In one embodiment, generating the probability distribution for the item may be based on the set of conditional probabilities for the item. At block 310, the computing device may evaluate a ranking loss function (e.g., see equations (5), (7), (10), and / or (12)-(13)). Evaluating the ranking loss function may be based on a comparison between the ground-truth label and the probability distribution of each item of the set of items. At block 312, the ranking model may be trained at the computing device. Training the ranking model may be based on the ranking loss function. The trained ranking model may rank the set of items based on the probability distribution of the set of labels for each item of the set of items.

[0079] The technology discussed herein makes reference to servers, databases, software applications, and other computer-based systems, as well as actions taken, and information sent to and from such systems. The inherent flexibility of computer-based systems allows for a great variety of possible configurations, combinations, and divisions of tasks and functionality between and among components. For instance, processes discussed herein can be implemented using a single device or component or multiple devices or components working in combination. Databases and applications can be implemented on a single system or distributed across multiple systems. Distributed components can operate sequentially or in parallel.

[0080] While the present subject matter has been described in detail with respect to various specific example embodiments thereof, each example is provided by way of explanation, not limitation of the disclosure. Those skilled in the art, upon attaining an understanding of the foregoing, can readily produce alterations to, variations of, and equivalents to such embodiments. Accordingly, the subject disclosure does not preclude inclusion of such modifications, variations and / or additions to the present subject matter as would be readily apparent to one of ordinary skill in the art. For instance, features illustrated or described as part of one embodiment can be used with another embodiment to yield a still further embodiment. Thus, it is intended that the present disclosure cover such alterations, variations, and equivalents.

Claims

1. A computer-implemented method to perform learning of a ranking model, wherein a set of training data encodes an associated for each item of a set of items with a ground-truth label of an ordered set of labels, and the set of labels, the method comprising:for each item of the set of items, determining, by a computing device, a predicted label for the item based on the ranking model;for each item of the set of items, determining, by the computing device, an item score vector, wherein each component of the item score vector corresponds to a separate label of the set of labels and indicates a conditional probability for the item based on the corresponding label and the predicted label score for the item;for each item of the set of items, generating, by the computing device, a probability distribution over the set labels based on the item score vector for the item;evaluating, by the computing device, a ranking loss function based on a comparison between the ground-truth label and the probability distribution of the set of labels for each item of the set of items; andtraining, by the computing device, the ranking model based on the ranking loss function, wherein the trained ranking model ranks the set of items based on the probability distribution over the set of labels for each item of the set of items.

2. The computer-implemented method of claim 1, wherein the probability distribution of the set of labels for the item includes a Cumulative Distribution Function (CDF).

3. The computer implemented method of claim 1, wherein the conditional probability for the item indicates a probability that the predicted label for the item is greater than the corresponding label conditioned on the predicted label being greater than a threshold label based on the corresponding label.

4. The computer-implemented method of claim 3, wherein the threshold label corresponds to a label that is consecutive to the corresponding label in an ordering of the set of labels.

5. The computer-implemented method of claim 3, wherein the threshold label corresponds to a label that is below the corresponding label in an ordering of the set of labels.

6. The computer-implemented method of claim 1, wherein the ranking loss function is based on a pairwise comparison of the set of items.

7. The computer-implemented method of claim 1, further comprising:for each possible pair of items of the set of items, generating, by the computing device, a combined score vector for the possible pair of items, wherein the possible pair of items includes a first item of the set of items and a second item of the set of items.

8. The computer-implemented method of claim 7, wherein the combined score vector for the possible pair of items comprises a difference vector between the item score vector for the first item and the item score vector for the second item.

9. The computer-implemented method of claim 8, wherein the combined pairwise score vector for the possible pair of items comprises of the log ratio of the probability the one item takes one label value and the other takes a greater label value than the first item.

10. The computer-implemented method of claim 9, wherein the probability of a label or a range of labels in the pairwise score comprises of a product of conditional probabilities defined in any of the preceding claims.

11. The computer-implemented method of claim 8, wherein the combined pairwise score vector comprises of the log ratio of probability of one item taking one label value and the other taking another label value which is greater than the first.

12. The computer-implemented method of claim 1, wherein the ranking loss function is based on a listwise comparison of the set of items.

13. The computer-implemented method of claim 12, wherein the listwise ranking loss function is an approximation of the aggregation of pairwise losses for all pairs in the list.

14. The computer-implemented method of any claim 1, further comprising:generating a set of distilled training data based on a teacher model;providing the set of distilled training data to a student model; andtraining the ranking model via the student model and the set of distilled training data.

15. The computer-implemented method of claim 1, wherein a first item and a second item of the set of items may comprise responses to a shared query.

16. The computer-implemented method of claim 1, wherein the ranking loss function is based on a pairwise comparison of the set of items.

17. (canceled)18. (canceled)19. (canceled)20. The computer-implemented item of any of claim 1, wherein the list of items consists of some subset of training examples from an aggregation of lists of training examples.

21. A computer-implemented method to perform learning of a ranking model, the method comprising:receiving, at a computing device, a set of items, wherein each item of the set of items is associated with a ground-truth label of a set of ordered labels;for each item of the set of items, determine, at the computing device, a set of predicted probabilities for the set of ordered labels based on the ranking model;for each item of the set of items, determining, at the computing device, a set of conditional probabilities for each label of the set of ordered labels based on the set of predicted probabilities for the item;for each item of the set of items, generating, at the computing device, a cumulative distribution function (CDF) for the set of ordered labels based on the set of conditional probabilities for the item;determining, at the computing device, a set of logit scores for the set of items based on the CDF for each item of the set of items;evaluating, at the computing device, a loss function based on the set of logit scores for the set of items and the ground-truth label for each item of the set of items;updating, at the computing device, the set of predicted probabilities for each item of set of items based on the evaluated loss function; andupdating, at the computer device, the ranking model based on the updated set of predicted probabilities for each item of the set of items.

22. The computer-implemented method of claim 21, wherein the loss function is based on a pairwise comparison of the set of items.

23. (canceled)24. (canceled)25. (canceled)