DATA SUBSAMPLING FOR RECOMMENDATION SYSTEMS

The present disclosure describes techniques for improving data subsampling for recommendation systems. A user-item graph associated with training data may be constructed. An importance of user-item interactions may be estimated via graph conductance based on the user-item graph. An importance of the training data may be measured via sample hardness using a pre-trained pilot model. A subsampling rate may be generated based on the importance estimated from the user-item graph and the importance measured by the pre-trained pilot model.

BACKGROUND

Machine learning models are increasingly being used across a variety of industries to perform a variety of different tasks. Such tasks may include making predictions or recommendations about data. Improved techniques for utilizing machine learning models are desirable.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

Recommendation systems may learn user preferences through user-item interactions (e.g., user clicks on various items). For example, a user click may be considered as a positive sample that indicates the user's interest in the clicked item. Conversely, if a user does not click on an item, such as a no-click may be considered as a negative sample. Clickthrough rate (CTR) prediction models may be configured to output click probabilities of user-item pairs, and such probabilities may be used to rank recommended items for a user in response to a user request. Such CTR models may be trained using data collected from online platforms, where “no-click” user-item pairs dominate. Due to this imbalance of the training dataset, negative sampling may be performed. Negative sampling may down-samples negative samples. Down-sampling negative samples may significantly reduce model training costs.

In embodiments, instead of treating all data points as equally important, non-uniform data subsampling aims to retain more informative samples (and ignore less informative samples). Previous techniques for non-uniform data subsampling utilize a pilot model to assess the importance of data. When the pilot model is correctly pre-trained, one can achieve an optimal sampling rate. Such pilot-model techniques may be configured to measure the importance of data using pilot prediction scores together with first and second-order derivatives of a loss function. As optimal negative sampling rates are proportional to the pilot model's prediction score, a high sampling rate may indicate an inaccurate model prediction. The sampling strategy may be interpreted as using hard negative samples (HNS).

Model-based sampling algorithms may not be applicable in real-life scenarios. A real-life recommendation system may deploy data subsampling in response to a user initiating a request to an online serving model. The user may receive recommendations returned by a server. If the user clicks a particular recommended item, then a positive instance associated with that recommended item may be collected. Otherwise, if the user does not click a particular recommended item within a period of time, a negative instance associated with that recommended item may be collected. A pilot prediction score and other statistics may be recorded in each instance to calculate a sampling rate for the data subsampling. All instances may be filtered by a data subsampling module before input/output (I/O) to reduce the I/O and network bandwidth bottleneck. One or more offline models may be trained with historical data before being deployed online. However, for model-based methods, because subsampling rates are determined by online models, such subsampling rates may be sub-optimal for offline training purposes. When the model trained offline using such subsampling rates is deployed online, data subsampling is affected. As a result, inconsistent subsampling rates may be produced.

In these real-life scenarios, two unavoidable obstacles to the application of model-based sampling exist. First, offline model training is vulnerable to model misspecification. Model misspecification may cause inferior results. Unfortunately, model misspecification is persistent due to an online-offline discrepancy, especially in continuous integration and deployment (Cl/CD) in real systems. Second, the coupling of data subsampling and model training introduces extra dependencies across system modules. Such extra dependencies may increase system maintenance cost and cause extra technical debt. Thus, techniques for improving data subsampling of recommendation systems are needed.

Described here are techniques for improving data subsampling of recommendation systems using model-agnostic data subsampling methods. The topology of a user-item graph may be used to estimate the importance of each user-item interaction (an edge in the user-item graph), such as via graph conductance. After the importance of each user-item interaction is estimated, a propagation step may be performed to smooth out the estimated importance values. As the techniques described herein are model agnostic, the merits of both model agnostic and model-based subsampling methods may be combined in certain embodiments.

FIG.1illustrates an example data subsampling system100that may be used in accordance with the present disclosure. The system100may comprise a user-item graph sub-system104, a pilot model sub-system106, a smoothing sub-system108, and an ensemble sub-system110. The system100may be configured to generate a subsampling rate that may be used to sample a set of training data for training an offline recommendation model.

The user-item graph sub-system104may be configured to receive a set of training data102. The set of training data102may be associated with user-item interactions. The set of training data102may comprise a plurality of positive instances and a plurality of negative instances. For example, if a user interacted with (e.g., clicked) a particular item, then a positive instance associated with that item may be collected. Otherwise, if the user did not click a particular item within a period of time, a negative instance associated with that item may be collected.

For example, the system100may be configured to solve a binary classification problem, where D={(xn, yn)}n=1Nis a training set (e.g., set of training data102) of size N, and xnand ynare the feature vector and label of instance n, respectively. The generalized logistic regression (GLM) model, where the target model corresponds to the offline model (before deployment) may be represented as

where the log-odd g(x; θ) is implemented by a predictive model. N0may denote the number of negative instances and N1=N−N0may denote the number of positive instances in the set of training data102. The set of training data102may be imbalanced, in that the number of negative instances may greatly outnumber the number of positive instances (e.g., N0>>N1).

FIG.2shows the set of training data102in more detail. As shown in the example ofFIG.2, the set of training data102comprises five instances. The first three instances in the set of training data102are positive instances. For example, the first instance indicates that the user u1clicked on the item v1. The second instance indicates that the user u2clicked on item v1. The third instance indicates that the user u1clicked on item v2. The last two instances in the set of training data102are negative instances. For example, the fourth instance indicates that the user u2clicked on the item v2. The fifth instance indicates that the user u3clicked on item v2. While the set of training data102shown in the example ofFIG.2only includes five instances, it should be appreciated that the number of instances in the set of training data102may include a much larger number of instances, such as hundreds, thousands, or millions of instances. The number of negative instances in the set of training data102may greatly outnumber the number of positive instances in the set of training data102.

Referring back toFIG.1, as information is sparsely distributed over a large number of negative instances, negative sampling may be used to reduce the dataset size and to boost training efficiency. A negative sampling algorithm may be configured to weigh each negative instance with some measurement of its importance. For example, the measure of importance for a negative instance x may be represented as π(x). The importance for a negative instance may be used as the negative sampling rate of the negative instance.

In embodiments, the measure of importance may be assigned to a negative instance by exploiting “hard negative samples.” Sampling rates may be proportional to non-negative hardness scores h(⋅):

where α ∈ (0, 1] is a pre-set average subsampling rate of negative instances. An online pilot model {tilde over (f)}(⋅) may equal f(⋅; θ*). For example, the online pilot model may have the same functional form as the target model, and θ* may be the true parameter. Thus, a model-based hardness score hb(xn)={tilde over (f)}(xn)=f(xn; θ*) may be set to get a near-optimal sampling rate π(xn) by Equation 1. A negative instance predicted with a higher score by the pilot model {tilde over (f)}(⋅) is more “surprising” and thus is harder for the target model f(⋅; θ). For a positive instance, π(x) may be used to denote its counterfactual negative sampling rate. The hard negative sampling procedure may be demonstrated as follows:

Since data distribution shifts after subsampling, the log odds may be corrected to get an unbiased estimation:

where δn∈ {0, 1} is the subsampling indicator and ln:=log π(xn). Log odds correction may be more efficient than the inverse probability weighting estimator. However, when the pilot model is misspecified, optimal negative sampling with pilot models may not be achieved. As described above, deploying model-based hard negative sampling methods may be error prone, as model misspecification problems persistently exist due to online-offline model discrepancy and continuous integration and deployment.

Thus, a model-agnostic hardness score ha(⋅) may be utilized to maintain a scalable and sustainable data subsampling service. In the binary classification problem described above, each feature xn=(uin, vjn, cn), where cnrepresents context features and the label of instance n is yn. The model-agnostic hardness score ha(⋅) of negative samples may be determined without referring to a pilot model.

To determine the model-agnostic hardness ha(⋅) of negative samples without referring to a pilot model, sample hardness may be related to graph topology. The user-item graph sub-system104may be configured to generate a user-item bipartite graph based on the set of training data102. The user-item bipartite graph may comprise two sets of nodes. One of the two sets of nodes may represent users and the other of the two sets of nodes may represent items. The user-item bipartite graph may comprise edges, with each edge representing interactions between a user node and an item node. For example, the user-item bipartite graph may be represented as (U, V, E), where the node set U={ui}i=1Mrepresents M users, the node set V={vj}j=1Qrepresents Q items, and the edge set E={(uin, vjn)}n=1Nrepresents N user-item pairs. For each node pair n, yn∈ {0, 1} represents whether there is a positive interaction between uinand vjn.

In embodiments, the user-item graph sub-system104may be configured to determine an effective conductance associated with the edges in the user-item bipartite graph. The edges of the user-item bipartite graph may be treated as instances for subsampling. In the context of the bipartite graph, hard negative sampling may be performed using the concept of effective conductance.

For example, the user-item bipartite graph may be imagined as an electricity network, where each edge (uin, vjn) is a conductor with conductance G(uin, vjn). The conductance measures the edge's ability to transfer “electrical current.” G(uin, vjn) may be large when a user uinexpresses direct preference of item vjn. In particular, G(uin, vjn) may be set to equal yn. Thus, the conductance may be equal to one if there is a direct preference, and the conductance may be equal to zero if there is not a direct preference expressed. The effective conductance Geff(uin, vjn) between uinand vjnmay represent the network's ability to transfer “current” from uinto vjn(or vice versa). The effective conductance Geff(uin, vjn) is the reciprocal of effective resistance Reff(uin, vjn). Geff(uin, vjn) and Reff(uin, vjn) may be defined as follows:

where e[⋅] ∈ {0, 1}M+Qis the one-hot encoding of a node in the user-item bipartite graph, and L+is the pseudo inverse of the Laplacian of the user-item bipartite graph. If there are many conductible paths between uinand vjn, then the effective conductance Geff(uin, vjn) may be large.

FIG.3shows an example framework300for interpreting effective conductance on a bipartite graph302. The bipartite graph302may comprise two sets of nodes. One set of nodes {u1, u2, u3} may represent users and the other set of nodes {v1, v2} may represent items. The user-item bipartite graph may comprise edges (labeled 1-5), with each of the five edges representing interactions between a user node and an item node. For example, the edge labeled 1 represents an interaction between user node u1and item node v1. The edge labeled 2 represents an interaction between user node u2and item node v1. The edge labeled 3 represents an interaction between user node u1and item node v2. The edge labeled 4 represents an interaction between user node u2and item node v2. The edge labeled 5 represents an interaction between user node u3and item node v1. The positive edges (labeled 1-3) may indicate that the corresponding user clicked on the corresponding item, while the negative edges (labeled 4-5) may indicate that the corresponding user did not click on the corresponding item (such as within a certain time frame).

The effective conductance associated with each edge in the user-item bipartite graph302may be determined. The table304ofFIG.3shows the effective conductance associated with each of the five edges in the user-item bipartite graph302. For example, the table304shows that the edge labeled 1 has an effective conductance of 0.18. The edge labeled 2 has an effective conductance of 0.21. The edge labeled 3 has an effective conductance of 0.68. The edge labeled 4 has an effective conductance of 0.39. The edge labeled 5 has an effective conductance of 0.12.

For example, each of the positive edges may be assigned a conductance G=1, and all negative edges may be assigned a conductance G=0. The user-item pair (u2, v2) may have an effective conductance Geff(u2, v1)=⅓ and the user-item pair (u3, v2) may have an effective conductance Geff(u3, v2)=0. Effective conductance may demonstrate user preference. A 3-hop path exists between u2and v2(u2→v1→u1→v2), but no path exists between u3and v2. Thus, u3may prefer v2more than u2prefers v2. The user item pair (u2, v2), which is represented by a negative edge, may correspond to a harder negative sample than (u3, v2), which is also represented by a negative edge.

Referring back toFIG.1, sample hardness may be estimated via effective conductance. Effective conductance positively relates to sample hardness. The hardness score may be defined as:

for a negative sample, G(uin, vjn)=0. The effective conductance Geff(uin, vjn) may be high when there are multiple high-conductance paths from uinto vjn, demonstrating a user's indirect preference to the item. When the indirect preference is high but (uin, vjn) turns out to be negative, the instance may be identified as a hard negative sample. For a positive sample, ha(xn) denotes its counterfactual hardness score by subtracting the direct conductor G(uin, vjn) from Geff(uin, vjn) to eliminate the prior information given by the label. The hardness score may be used to calculate the counterfactual negative sampling rate for log odds correction in Equation 2. Positive samples may not be dropped.

In embodiments, the direct calculation of effective conductance may be time-consuming. Instead of directly calculating effective conductance, the commute time distance comm(u, v) may first be approximated through random walk using scientific computing tools. Then the transformation Geff(u, v)=2|E|/comm(u, v) may be used to convert the commute time into effective conductance.

Some hard instances may be overlooked by model-agnostic methods. For example, estimating sample hardness via effective conductance in the manner described above (e.g., a model-agnostic method) may cause some hard instances to be overlooked. The hard instances that may be overlooked by model-agnostic methods may be captured by model-based methods, such as by a pre-trained pilot model. In embodiments, the pilot model sub-system106may be configured to determine a pilot prediction as a hardness score. In the example framework400depicted inFIG.4, the pilot model sub-system106may cause a pre-trained pilot model402to generate a pilot prediction as a hardness score for each user-item pair. The table404ofFIG.4shows the pilot prediction as a hardness score for each user-item pair in the set of training data102. For example, the table404shows that the user-item pair (u1, v1) has a pilot hardness score of 0.24. The user-item pair (u2, v1) has a pilot hardness score of 0.96. The user-item pair (u1, v2) has a pilot hardness score of 0.41. The user-item pair (u2, v2) has a pilot hardness score of 0.18. The user-item pair (u3, v2) has a pilot hardness score of 0.29.

Referring back toFIG.1, in embodiments, the smoothing subsystem108may be configured to smooth hardness scores. The smoothing subsystem108may be configured to smooth hardness scores associated with both model-agnostic and model-based methods. The smoothing subsystem108may be configured to smooth hardness scores associated with both model-agnostic and model-based methods based on a line graph transformation of the user-item bipartite graph and graph propagation.

In embodiments, smoothing the hardness scores associated with the model-agnostic methods may comprise smoothing the hardness score associated with each of the negative instances. Smoothing the hardness score associated with each of the negative instances may comprise determining an average effective conductance associated with neighboring negative edges of each negative edge. Then, for each negative edge, a weighted sum of the average effective conductance and a corresponding effective conductance may be calculated. The weighted sum may be equal to the final model-agnostic hardness score for that negative edge.

As shown in the example framework500ofFIG.5, the smoothing subsystem108may generate a line-graph transformation502of the user-item bipartite graph (e.g., the graph302). The smoothing subsystem108may use the line-graph transformation502of the user-item bipartite graph to smooth the model-agnostic hardness scores (e.g., the effective conductance scores shown in the table304ofFIG.3). The table504shows the smoothed model-agnostic hardness scores (e.g., final model-agnostic hardness scores) generated by the smoothing subsystem108. Likewise, the smoothing subsystem108may use the line-graph transformation502of the user-item bipartite graph to smooth the model-based hardness scores (e.g., the pilot prediction as hardness scores shown in the table404ofFIG.4). The table506shows the smoothed model-based hardness scores (e.g., final model-based hardness scores) generated by the smoothing subsystem108.

To smooth the hardness scores associated with both model-agnostic and model-based methods, the smoothing subsystem108may utilize graph propagation techniques. The edge effective conductance derived from the graph may be noisy, thus leading to an inaccurate estimation of hardness scores. Graph propagation may be used to smooth the hardness score. Edge propagation may be reduced to node propagation by transforming the user-item bipartite graph (U, V, E) into its corresponding line graph L(U, V, E)=(VL,EL), where VL=E and ELis the collection of edge pairs that share the same node.

In embodiments, the model-agnostic hardness scores may be smoothed by propagating uncertainty. Geff:=Geff(uin, vjn)n=1N∈ RNand Y:=(yn)n=1N∈ {0,1}Nmay be denoted as the vector of the effective conductance scores and edge labels, respectively. The effective conductance Geffmay be normalized as the estimated score Z and the uncertainty score B may be calculated as the absolute residual between Z and Y:

The min-max normalization may be used to restrict the hardness score to be within the range [0, 1]. It may be denoted that S=DL−½ALDL−½, where ALand DLare the adjacency matrix and the degree matrix of the line graph, respectively. The uncertainty may be smoothed by solving the following optimization problem:

The first term in Equation 6 restricts the difference of uncertainties in neighboring nodes. The second term in Equation 6 constrains the smoothed uncertainty to be close to the initial uncertainty, with the coefficient μ controlling the strength of the constraint. With the smoothed uncertainty vector {circumflex over (B)}, the hardness estimation may be corrected by reversing Equation 5.

An iterative approximation approach may be used. If γ=1/(1+μ) and Bt+1=(1−γ)B+γSBt, B0=B, then Bt→{circumflex over (B)} when t→∞. However, this iterative approach is not scalable as the transformed line graph has |EL|=(Σui∈UDeg(ui)2+Σvj∈VDeg(vj)2)/2−N edges in total, where Deg(⋅) represents node degree. Alternatively, edge uncertainty may be directly propagated along the original graph (U, V, E), which only contains |E|=(Σui∈UDeg(ui)+Σvj∈VDeg(vj)/2−N edges in total. The propagation rule over edges is as follows:

Using message passing mechanisms, the aggregated uncertainty mt(u) may be stored in u and then the uncertainty Bt+1may be updated by applying the rule above.

In embodiments, the hardness scores associated with both model-agnostic and model-based methods may be smoothed by propagating scores. Instead of propagating uncertainty, we can directly propagate the scores {circumflex over (Z)} by iterating Zt+1=(1−γ) {circumflex over (Z)}+γSZt, Z0={circumflex over (Z)} until convergence. After obtaining the final hardness scores, the final hardness scores may be rescaled to match the average subsampling rates α.

In embodiments, the ensemble sub-system110may be configured to generate a subsampling rate based on the importance estimated from the user-item graph and the importance measured by the pre-trained pilot model. For example, the ensemble sub-system110may use both the final model-agnostic hardness scores and the final model-based hardness scores to determine a final subsampling rate. As shown in the example framework600ofFIG.6, the ensemble sub-system110may be configured to determine a maximum between the final model-agnostic hardness scores shown in the table504and the final model-based hardness scores shown in the table506. For example, for each instance, the ensemble sub-system110may be configured to determine whether the final model-agnostic hardness score or the final model-based hardness score is greater. For the instance labeled “1,” the ensemble sub-system110may be configured to determine whether the final model-agnostic hardness score of 0.21 or the final model-based hardness score of 0.29 is greater. As the final model-based hardness score of 0.29 is greater, the final hardness score of 0.29 may be used to calculate the subsampling rate associated with the instance labeled “1.” The ensemble sub-system110may be configured to make such a determination for each instance. The ensemble sub-system110may be configured to generate the subsampling rate based on the final hardness score associated with each instance.

In embodiments, the final subsampling rate may be determined based on the importance estimated from the user-item graph and the importance measured by the pre-trained pilot model. For example, given a sample x, both model-agnostic and model-based subsampling methods may be used to calculate their corresponding sampling rate πD(x) and πϕ(x) respectively. Particularly πϕ(x) is the subsampling rate for x by using a pre-trained pilot model hb(⋅):=({tilde over (f)}(⋅; ϕ), such as the pre-trained pilot model402. πD(x) may be the subsampling rate using model agnostic hardness score ha(⋅) in Equation 4:

where (εϕ, εD) is the minimum sampling rate and (pϕ, pD) tunable linear scaling parameters to meet the average subsampling rate α.

In embodiments, three simple yet effective heuristic strategies may be used to combine the model-agnostic and model-based subsampling methods to generate a final sampling rate: maximum, mean, and product.

where εprodis an extra hyperparameter used when applying product combination, and pmaxand pprodare tuned to normalize the average sample rate to α. After subsampling rate combination, each x may be sampled with probability in Equation 8. Each of the sampled instances may follow the normal training protocol to optimize the training objective as shown in Equation 2, which guarantees the final result to be well-calibrated.

In embodiments, the final sampling rate may be used to subsample the negative instances in the training data102. The negative instances in the training data102may be subsampled based on the final sampling rate. The subsampled negative instances and all of the positive instances in the training data102may collectively make up the final subsampled training set112.FIG.7shows an example subsampled training set112. As shown in the example ofFIG.7, the negative instance labeled “5” in the training data102is no longer present in the subsampled training set112. Thus, the negative instance labeled “5” in the training data102was not selected during the subsampling process. The negative instance labeled “4” in the training data102and the positive instances labeled “1-3” in the training data102are still present in the subsampled training set112.

In embodiments, an offline recommendation model may be trained using positive instances in the training data102and the subsampled negative instances. For example, the offline recommendation model102may be trained using the subsampled training set112. The trained offline recommendation model may be deployed. The deployed offline recommendation model may be configured to recommend items to users.

FIG.8illustrates an example process800of improving data subsampling for recommendation systems. For example, the system100may perform the process800. Although depicted as a sequence of operations inFIG.8, those of ordinary skill in the art will appreciate that various embodiments may add, remove, reorder, or modify the depicted operations.

A set of training data may be associated with user-item interactions. The set of training data may comprise a plurality of positive instances and a plurality of negative instances. For example, if a user interacted with (e.g., clicked) a particular item, then a positive instance associated with that item may be collected. Otherwise, if the user did not click a particular item within a period of time, a negative instance associated with that item may be collected. The set of training data may be imbalanced, in that the number of negative instances may greatly outnumber the number of positive instances.

At802, a user-item graph associated with the training data may be constructed. The user-item bipartite graph may comprise two sets of nodes. One of the two sets of nodes may represent users and the other of the two sets of nodes may represent items. The user-item bipartite graph may comprise edges, with each edge representing interactions between a user node and an item node. The positive edges may indicate that the corresponding user clicked on the corresponding item, while the negative edges may indicate that the corresponding user did not click on the corresponding item (such as within a certain time frame).

As information is sparsely distributed over the large number of negative instances, negative sampling may be used to reduce the dataset size and to boost training efficiency. A negative sampling algorithm may be configured to weigh each negative instance with some measurement of its importance. For example, the measure of importance for a negative instance x may be represented as π(x). The importance for a negative instance may be used as the negative sampling rate of the negative instance. At804, the importance of user-item interactions may be estimated via graph conductance based on the user-item graph. Some hard instances may be overlooked by model-agnostic methods. The hard instances that may be overlooked by model-agnostic methods may be captured by model-based methods, such as by a pre-trained pilot model. At806, the importance of the training data may be measured via sample hardness using a pre-trained pilot model. The pre-trained pilot model may generate a pilot prediction as a hardness score for each user-item pair in the training data.

In embodiments, the final subsampling rate may be determined based on the importance estimated from the user-item graph and the importance measured by the pre-trained pilot model. At808, a subsampling rate may be generated based on the importance estimated from the user-item graph and the importance measured by the pre-trained pilot model. For example, given a sample x, both model-agnostic and model-based subsampling methods may be used to calculate their corresponding sampling rate πD(x) and πϕ(x) respectively. In embodiments, three simple yet effective heuristic strategies may be used to combine the model-agnostic and model-based subsampling methods to generate a final sampling rate: maximum, mean, and product. After subsampling rate combination, each x may be sampled with probability in Equation 8. Each of the sampled instances may follow the normal training protocol to optimize the training objective as shown in Equation 2, which guarantees the final result to be well-calibrated.

FIG.9illustrates an example process900of improving data subsampling for recommendation systems. For example, the system100may perform the process900. Although depicted as a sequence of operations inFIG.9, those of ordinary skill in the art will appreciate that various embodiments may add, remove, reorder, or modify the depicted operations.

In embodiments, the final subsampling rate may be determined based on an importance estimated from the user-item graph and an importance measured by the pre-trained pilot model. At902, a subsampling rate may be generated based on the importance estimated from the user-item graph and the importance measured by the pre-trained pilot model. For example, given a sample x, both model-agnostic and model-based subsampling methods may be used to calculate their corresponding sampling rate πD(x) and πϕ(x) respectively. In embodiments, three simple yet effective heuristic strategies may be used to combine the model-agnostic and model-based subsampling methods to generate a final sampling rate: maximum, mean, and product. After subsampling rate combination, each x may be sampled with probability in Equation 8. Each of the sampled instances may follow the normal training protocol to optimize the training objective as shown in Equation 2, which guarantees the final result to be well-calibrated.

The final sampling rate may be used to subsample the negative instances in training data. At904, negative instances in training data may be subsampled based on the final subsampling rate. The subsampled negative instances and all of the positive instances in the training data may collectively make up the final subsampled training set. An offline recommendation model may be trained using positive instances in the training data and the subsampled negative instances. At906, an an offline recommendation model may be trained using positive instances in the training data and the subsampled negative instances. For example, the offline recommendation model may be trained using the subsampled training set. The trained offline recommendation model may be deployed. The deployed offline recommendation model may be configured to recommend items to users.

FIG.10illustrates an example process1000of improving data subsampling for recommendation systems. For example, the system100may perform the process1000. Although depicted as a sequence of operations inFIG.10, those of ordinary skill in the art will appreciate that various embodiments may add, remove, reorder, or modify the depicted operations.

A set of training data may be associated with user-item interactions. The set of training data may comprise a plurality of positive instances and a plurality of negative instances. For example, if a user interacted with (e.g., clicked) a particular item, then a positive instance associated with that item may be collected. Otherwise, if the user did not click a particular item within a period of time, a negative instance associated with that item may be collected. The set of training data may be imbalanced, in that the number of negative instances may greatly outnumber the number of positive instances.

At1002, a user-item graph associated with the training data may be constructed. The user-item bipartite graph may comprise two sets of nodes. One of the two sets of nodes may represent users and the other of the two sets of nodes may represent items. The user-item bipartite graph may comprise edges, with each edge representing interactions between a user node and an item node. The positive edges may correspond to positives instances in the training data, and the negative edges may correspond to negative instances in the training data.

At1004, a hardness score associated with each of the negative instances may be estimated by calculating an effective conductance corresponding to each negative edge. For example, the user-item bipartite graph may be imagined as an electricity network, where each edge (uin, vjn) is a conductor with conductance G(uin, vjn). The conductance measures the edge's ability to transfer “electrical current.” G(uin, vjn) may be large when a user uinexpresses direct preference of item vjn. In particular, G(uin, vjn) may be set to equal yn. Thus, the conductance may be equal to one if there is a direct preference, and the conductance may be equal to zero if there is not a direct preference expressed. The effective conductance Geff(uin, vjn) between uinand vjnmay represent the network's ability to transfer “current” from uinto vjn(or vice versa). If there are many conductible paths between uinand vjn, then the effective conductance Geff(uin, vjn) may be large. Effective conductance may demonstrate user preference. Sample hardness may be estimated via effective conductance. Effective conductance positively relates to sample hardness.

At1006, the hardness score associated with each of the negative instances may be smoothed using graph propagation. The edge effective conductance derived from the graph may be noisy, thus leading to an inaccurate estimation of hardness scores. Graph propagation may be used to smooth the hardness score. Edge propagation may be reduced to node propagation by transforming the user-item bipartite graph (U, V, E) into its corresponding line graph L(U, V, E)=(VL,EL), where VL=E and ELis the collection of edge pairs that share the same node.

FIG.11illustrates an example process1100of improving data subsampling for recommendation systems. For example, the system100may perform the process1100. Although depicted as a sequence of operations inFIG.11, those of ordinary skill in the art will appreciate that various embodiments may add, remove, reorder, or modify the depicted operations.

The edge effective conductance derived from a graph may be noisy, thus leading to an inaccurate estimation of hardness scores. Graph propagation may be used to smooth the hardness score. Edge propagation may be reduced to node propagation by transforming the user-item bipartite graph (U, V, E) into its corresponding line graph L(U, V, E)=(VL,EL), where VL=E and ELis the collection of edge pairs that share the same node.

The hardness score associated with each of the negative instances may be smoothed using graph propagation. Smoothing the hardness score associated with each of the negative instances may comprise determining an average effective conductance associated with neighboring negative edges of each negative edge. At1102, an average effective conductance associated with neighboring negative edges of each negative edge may be determined. Then, for each negative edge, a weighted sum of the average effective conductance and a corresponding effective conductance may be calculated. At1104, a weighted sum of the average effective conductance and a corresponding effective conductance may be calculated for each negative edge. The weighted sum may be equal to the final model-agnostic hardness score for that negative edge.

FIG.12illustrates an example process1200of improving data subsampling for recommendation systems. For example, the system100may perform the process1200. Although depicted as a sequence of operations inFIG.12, those of ordinary skill in the art will appreciate that various embodiments may add, remove, reorder, or modify the depicted operations.

Some hard instances may be overlooked by model-agnostic methods. For example, estimating sample hardness via effective conductance in the manner described above (e.g., a model-agnostic method) may cause some hard instances to be overlooked. The hard instances that may be overlooked by model-agnostic methods may be captured by model-based methods, such as by a pre-trained pilot model. At1202, a hardness score associated with each negative instance in training data may be generated. The hardness score associated with each negative instance in training data may be generated using a pre-trained pilot model. At1204, the hardness score associated with each of the negative instances may be smoothed. For example, the hardness score associated with each of the negative instances may be smoothed based on a line graph transformation of the user-item bipartite graph and graph propagation.

FIG.13illustrates an example process1300of improving data subsampling for recommendation systems. For example, the system100may perform the process1300. Although depicted as a sequence of operations inFIG.13, those of ordinary skill in the art will appreciate that various embodiments may add, remove, reorder, or modify the depicted operations.

A line-graph transformation of the user-item bipartite graph may be used to smooth model-agnostic hardness scores and model-based hardness scores. To smooth the hardness scores associated with both model-agnostic and model-based methods, graph propagation techniques may be utilized. The edge effective conductance derived from the graph may be noisy, thus leading to an inaccurate estimation of hardness scores. Graph propagation may be used to smooth the hardness score.

At1302, a final hardness score associated with each negative instances in the training data may be determined. The final hardness score may be determined based on a corresponding smoothed hardness score determined based on a user-item graph and a corresponding smoothed hardness score determined by a pre-trained pilot model. For example, a maximum between the final model-agnostic hardness scores and the final model-based hardness scores may be determined. For example, for each instance, it may be determined whether the final model-agnostic hardness score or the final model-based hardness score is greater.

A subsampling rate may be generated based on the final hardness score associated with each instance. At1304, a subsampling rate of the negative instances in the training data may be generated based on the final hardness score associated with each of the negative instances. Negative instances in the training data may be subsampled based on the subsampling rate. An offline recommendation model may be trained using positive instances in the training data and the subsampled negative instances.

As described above, for model-based sampling, pilot misspecification may lead to discrepancies in model performance. Described below are the results of experiments showing that pilot misspecification may lead to discrepancies in model performance. Also described below are the empirical results over two datasets that demonstrate the superiority of the model agnostic subsampling method described herein. The results of extensive ablation studies that were conducted to investigate the effectiveness of model-agnostic hardness score, score propagation, and the benefit of ensembling model-agnostic and model-based methods are also described below. Finally, effective resistance and its relationship to negative sampling is discussed below.

The empirical results described below are demonstrated using a first data set (e.g., KuaiRec) and a second data set (e.g., Microsoft News Dataset (MIND)). For both datasets, 80% of the data was used for training, 10% was used for validation, and 10% was used for testing. All experimental results are reported for 8 runs with random initializations on one random data split. The average subsampling rate was α=0.2 on training data for both datasets.

The first data set is a recommendation dataset collected from a video-sharing mobile app. The first dataset is generally a sparse user-item interaction matrix with a fully observed small submatrix. The fully observed submatrix was cropped and only the rest of entries in the sparse matrix were considered as those data are collected under natural settings. The label “watch ratio” was used, which represents the total duration of a user watching a video divided by the video duration. In the experiment, a user is considered to like a video (positive instance) if the “watch ratio” is larger than 3. The second data set is a large-scale news recommendation dataset with binary labels indicating users' impressions of recommended news. The content data in each news corpus was not used during the experiment. The second data set did not require extra pre-processing.

Regarding the baselines and model selections for the experiments, two baseline subsampling methods were considered. The first baseline subsampling method is the model-agnostic uniform negative sampling and the second is a model-based near-optimal sampling method (Opt-Sampling), which relies on the prediction scores of a pilot model as the hardness score to calculate sample rates. Regarding the model architecture, the wide and deep model was chosen as the training target model to validate the effectiveness of the model-agnostic method described herein.

For model-based subsampling methods, a pilot model was pre-trained to estimate the sample hardness. To test the effect of pilot misspecification, five types of pilot models were considered. Those pilot models are: the wide and deep model (W&D), a linear logistic regression model (LR), an automatic feature interaction selection model (AFI), a neural factorization machines model (NFM), and a deep factorization machine model (DFM). In the remainder of the experiment description, unless otherwise specified, the W&D is used as the pilot model as it shares the same architecture as the target model (consistent pilot). All pilot models were trained using 10% of the training data.

As described above, model-based subsampling may rely on a correctly specified pilot model. This concept was studied on the first dataset when the pilot model is misspecified by using the same model-based subsampling approach while changing pilot model architectures.FIG.14shows a box plot1400reporting the target model performance. As shown in the graph1400, the target model's area under the curve (AUC) obtained from different pilot models varies from 0.8557 (AFI) to 0.8577 (LR). As the standard deviation is around 0.001, the AUC difference is significant, demonstrating a potential loss in large-scale recommendation systems processing millions of data points on a daily basis. This result consolidates the effect of pilot misspecification, which justifies using model-agnostic subsampling approaches, such as the techniques described herein.

The target model was trained with different data sampling strategies.FIG.15shows a set of box plots1500showing the AUC performance of all training configurations on the two datasets. The graph on the left shows the AUC performance of all training configurations on the first data set, while the graph on the right shows the AUC performance of all training configurations on the second data set. As shown inFIG.15, the model-agnostic effective conductance (MA-EC) sampling strategy consistently outperforms the uniform sampling baseline over both of the two datasets. In the first data set, MA-EC achieves comparable results to Opt-Sampling. In the second data set, Opt-Sampling does not improve over uniform sampling and is worse than MA-EC. As also shown inFIG.15, extra performance is gained by smoothing the hardness estimation via propagation. The performance of ensembling the model-agnostic method and the model-based method via the maximum strategy is also shown inFIG.15(referred to as “Comb(Max.)) in the set of box plots1500).FIG.15shows that the ensemble performs better than every single approach on both datasets. Similarly, the smoothed scores from Opt-Sampling and MA-EC may be ensembled, achieving the best performance demonstrated in the last column of the set of box plots1500.

The first data set was used to conduct extensive ablation studies. Regarding the subsampling rate, uniform sampling was compared with the best of the methods described herein by ensembling smoothed scores from Opt-Sampling and MA-EC.FIG.16shows a box plot1600. The box plot1600demonstrates that the methods described herein consistently outperform uniform sampling under different subsampling rates. For example, the box plot1600shows that the AUC for the methods described herein is consistently higher than the AUC for uniform sampling under different subsampling rates.

Regarding the ensemble strategies, to investigate whether hardness scores from MA-EC and Opt-Sampling complement each other, a control experiment was designed. Instances were assigned with subsampling rates from each method. For instances that have inconsistent subsampling rates between two methods, their subsampling rates were flipped into the other method. For example, instances that have πD(x)<0.2 and πϕ(x)>0.8 were assigned with the subsampling rate πϕ(x), and the rest of the instances were assigned with the subsampling rate πD(x). The result of the experiment shows that we achieve better model performance by assigning most of the sample with one set of scores and flipping part of the sample scores. This verifies that some hard negative instances might be overlooked by one method and can be discovered by the other.

The control experiment justifies ensembling MA-EC and Opt-Sampling. The ensemble strategies (maximum, mean, and product) were experimented on.FIG.17ashows a set of box plots1700of the three ensemble methods. For each method, nine configurations of the hyperparameters (QD,Qϕ) are presented, whereQD ∈ {0.1, 0.12, 0.14} andQϕ ∈{0.005, 0.01, 0.03}. For product strategy, hyperparameterQprod=0.005 for all experiments. From the box plots1700, it can be observed that the maximum strategy consistently gives comparable or better results than Opt-Sampling and MA-EC. While in mean and product strategies significant improvement is not observed. For the product strategy, the model performance even deteriorates. MA-EC needs to compute effective conductance to calculate subsampling rates. Effective conductance computation is not a bottleneck since it can be reused once computed. MA-EC is model-agnostic, thus can support training with different target models.

The effectiveness of correcting the hardness scores via graph propagation was investigated. The application of score correction in Opt-Sampling and MA-EC and their ensemble was of interest. Additionally, in applying both score correction and score ensemble, either ensembling corrected scores or correcting ensemble scores may be attempted. The latter consistently results in worse performance, so presented herein is only the result of the former in this work.FIG.17bshows a set of box plots1702reporting the model performance of the ablation study. For the experiments of correcting scores estimated from Opt-Sampling and MA-EC, the propagation coefficient γ ∈ {0.05, 0.1, 0.2, 0.3, 0.4} was explored. For each coefficient, iteration to smooth the scores until convergence was performed. Uncertainty propagation significantly improves model performance for both subsampling approaches. In score propagation, which runs on scores corrected by uncertainty propagation, model performance slightly improves in Opt-Sampling and worsens in MA-EC. In the ensemble of corrected scores, the hardness scores from the best configurations of both methods were combined via the maximum strategy described above. The reported result in the box plots1702demonstrates that the ensemble strategy improves model performance over not only the original scores but also the corrected scores.

The definition provided for effective resistance Reffin Equation 3 is often used for graph sparsification. An edge with high effective resistance is considered important in maintaining graph topology. Since the definitions of edge importance using effective conductance and effective resistance run against each other, it can be shown that defining edge importance with effective resistance is not applicable to the scenario described herein. For example, two model-agnostic subsampling methods with effective resistance (MA-ER) and effective conductance (MA-EC) as the hardness scores were compared. The effective resistance was computed on the graph where all edges have unit resistances. MA-ER fails to capture hard negative instances. On the first data set, MA-ER yields an average test AUC of 0.8535, which is worse than uniform sampling (0.8553). To unravel how MA-ER and MA-EC affect model training, a run from each method was randomly selected to visualize the model training metrics. As shown in the set of graphs1800ofFIG.18, when using MA-ER, training AUC remains the same as testing AUC before convergence. Besides, the model converges earlier. In sharp contrast, in MA-EC, there is a huge gap between training AUC and testing AUC. The gap shows that training instances are overall harder than those in the test set. This verifies that MA-EC discovers hard negatives while MA-ER does not.

FIG.19illustrates a computing device that may be used in various aspects, such as the services, networks, modules, and/or devices depicted inFIG.1. With regard to the example architecture ofFIG.1, the cloud network (and any of its components), the client devices, and/or the network may each be implemented by one or more instance of a computing device1900ofFIG.19. The computer architecture shown inFIG.19shows a conventional server computer, workstation, desktop computer, laptop, tablet, network appliance, PDA, e-reader, digital cellular phone, or other computing node, and may be utilized to execute any aspects of the computers described herein, such as to implement the methods described herein.

The computing device1900may include a baseboard, or “motherboard,” which is a printed circuit board to which a multitude of components or devices may be connected by way of a system bus or other electrical communication paths. One or more central processing units (CPUs)1904may operate in conjunction with a chipset1906. The CPU(s)1904may be standard programmable processors that perform arithmetic and logical operations necessary for the operation of the computing device1900.

The CPU(s)1904may be augmented with or replaced by other processing units, such as GPU(s)1905. The GPU(s)1905may comprise processing units specialized for but not necessarily limited to highly parallel computations, such as graphics and other visualization-related processing.

A chipset1906may provide an interface between the CPU(s)1904and the remainder of the components and devices on the baseboard. The chipset1906may provide an interface to a random-access memory (RAM)1908used as the main memory in the computing device1900. The chipset1906may further provide an interface to a computer-readable storage medium, such as a read-only memory (ROM)1920or non-volatile RAM (NVRAM) (not shown), for storing basic routines that may help to start up the computing device1900and to transfer information between the various components and devices. ROM1920or NVRAM may also store other software components necessary for the operation of the computing device1900in accordance with the aspects described herein.

The computing device1900may operate in a networked environment using logical connections to remote computing nodes and computer systems through local area network (LAN). The chipset1906may include functionality for providing network connectivity through a network interface controller (NIC)1922, such as a gigabit Ethernet adapter. A NIC1922may be capable of connecting the computing device1900to other computing nodes over a network1916. It should be appreciated that multiple NICs1922may be present in the computing device1900, connecting the computing device to other types of networks and remote computer systems.

The computing device1900may be connected to a mass storage device1928that provides non-volatile storage for the computer. The mass storage device1928may store system programs, application programs, other program modules, and data, which have been described in greater detail herein. The mass storage device1928may be connected to the computing device1900through a storage controller1924connected to the chipset1906. The mass storage device1928may consist of one or more physical storage units. The mass storage device1928may comprise a management component. A storage controller1924may interface with the physical storage units through a serial attached SCSI (SAS) interface, a serial advanced technology attachment (SATA) interface, a fiber channel (FC) interface, or other type of interface for physically connecting and transferring data between computers and physical storage units.

The computing device1900may store data on the mass storage device1928by transforming the physical state of the physical storage units to reflect the information being stored. The specific transformation of a physical state may depend on various factors and on different implementations of this description. Examples of such factors may include, but are not limited to, the technology used to implement the physical storage units and whether the mass storage device1928is characterized as primary or secondary storage and the like.

A mass storage device, such as the mass storage device1928depicted inFIG.19, may store an operating system utilized to control the operation of the computing device1900. The operating system may comprise a version of the LINUX operating system. The operating system may comprise a version of the WINDOWS SERVER operating system from the MICROSOFT Corporation. According to further aspects, the operating system may comprise a version of the UNIX operating system. Various mobile phone operating systems, such as IOS and ANDROID, may also be utilized. It should be appreciated that other operating systems may also be utilized. The mass storage device1928may store other system or application programs and data utilized by the computing device1900.

The mass storage device1928or other computer-readable storage media may also be encoded with computer-executable instructions, which, when loaded into the computing device1900, transforms the computing device from a general-purpose computing system into a special-purpose computer capable of implementing the aspects described herein. These computer-executable instructions transform the computing device1900by specifying how the CPU(s)1904transition between states, as described above. The computing device1900may have access to computer-readable storage media storing computer-executable instructions, which, when executed by the computing device1900, may perform the methods described herein.

A computing device, such as the computing device1900depicted inFIG.19, may also include an input/output controller1932for receiving and processing input from a number of input devices, such as a keyboard, a mouse, a touchpad, a touch screen, an electronic stylus, or other type of input device. Similarly, an input/output controller1932may provide output to a display, such as a computer monitor, a flat-panel display, a digital projector, a printer, a plotter, or other type of output device. It will be appreciated that the computing device1900may not include all of the components shown inFIG.19, may include other components that are not explicitly shown inFIG.19, or may utilize an architecture completely different than that shown inFIG.19.

As described herein, a computing device may be a physical computing device, such as the computing device1900ofFIG.19. A computing node may also include a virtual machine host process and one or more virtual machine instances. Computer-executable instructions may be executed by the physical hardware of a computing device indirectly through interpretation and/or execution of instructions stored and executed in the context of a virtual machine.

It is to be understood that the methods and systems are not limited to specific methods, specific components, or to particular implementations. It is also to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting.

The present methods and systems may be understood more readily by reference to the following detailed description of preferred embodiments and the examples included therein and to the Figures and their descriptions.