Training method, evaluation method and apparatus for bias-free rating prediction model for recommendation system
By constructing a two-layer optimization model that combines biased and unbiased samples, and introducing biased and error interpolation models and balancing weights, the problem of unobserved confounding factors and bias caused by model specification errors in the recommendation system is solved, thus achieving biased score prediction and improving the accuracy and stability of the recommendation system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-17
- Publication Date
- 2026-04-03
AI Technical Summary
Existing recommender systems suffer from biased estimation problems due to unobserved confounding factors and model specification errors, leading to inaccurate rating predictions.
By constructing a two-layer optimization model that combines a large-scale biased sample with a small-scale unbiased sample, a bias model, an error interpolation model, and a balanced weight model are introduced to jointly update the parameters of the initial prediction model in order to counteract the influence of unmeasured confounding factors.
It enables bias-free recommendations between user subjects and item subjects in recommendation systems, improving the accuracy and stability of rating predictions, and is applicable to various recommendation scenarios such as e-commerce, social networks, and video.
Smart Images

Figure CN117390254B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, evaluation method and apparatus for training a biased rating prediction model for a recommendation system. Background Technology
[0002] Recommender systems aim to accurately predict user preferences and provide personalized recommendations, thereby helping users efficiently obtain information of interest. As a fundamental task in recommender systems, rating prediction aims to predict each user's rating for each item. Examples include movie rating prediction, e-commerce website product rating prediction, and video rating prediction. In recent years, much research has focused on using deep learning for rating prediction, employing appropriate deep model structures to fit collected data. Although rating data is easy to collect and of a large scale, it is well known that this data always contains various biases and cannot reflect users' true preferences. For example, users tend to rate items they like, while data for items not rated by users is missing and the missing data is not random. In such cases, the data is biased, and directly training a model based on this biased rating data can lead to long-tail effects and amplified bias.
[0003] Existing technologies include schemes that infer and replace missing scores, but the sparsity of data and unmeasured confounding of users and items in recommender systems make accurate estimation of these missing values extremely difficult. Schemes that weight observed data by assessing the probability of an item being observed also exist, but unobserved confounding factors simultaneously affect both the missing mechanism and the scores, making it impossible to completely eliminate bias. Schemes that model the missing mechanism and data generation process using generative models exist, but in the presence of unmeasured confounding, this may violate model specifications and data generation assumptions, leading to biased estimations. Therefore, a novel debiased evaluation scheme is urgently needed for recommender systems to combat the impact of unmeasured confounding. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a training method, evaluation method and apparatus for a debiased rating prediction model for a recommendation system, in order to eliminate or improve one or more defects existing in the prior art, and solve the problem of biased estimation caused by unobserved confounding factors or model specification errors when the recommendation system calculates the user's evaluation of the item.
[0005] One aspect of the present invention provides a method for training a bias-free rating prediction model for a recommendation system, the method comprising the following steps:
[0006] Obtain a training sample set, which includes a large biased sample set and a small unbiased sample set. Each sample in the biased sample set and the unbiased sample set contains a user subject's subject feature vector and rating for a project subject. The biased sample set is ideal data with non-random missing data, and the unbiased sample set is the ideal data with random missing data. The ideal data is the complete and unmissing feature vectors and ratings of multiple user subjects for multiple project subjects.
[0007] An initial prediction model is obtained, which takes the main feature vector of each sample as input and outputs a first prediction score;
[0008] A bias model is constructed, which takes the subject feature vector of each sample as input and outputs the probability that the user subject evaluates the subject of the project; a loss function is constructed using the bias model and the observed true error of the rating, and a balancing weight is added;
[0009] A two-layer optimization is constructed to simultaneously minimize the loss function on both the biased and unbiased samples to train the initial prediction model, resulting in a debiased scoring prediction model. During each round of parameter update iterations, the parameters of the bias model affecting the loss function are fixed, and the parameters of the initial prediction model are updated based on the biased samples. Using the updated initial prediction model, the bias model is updated based on the unbiased samples. The parameters of the balancing weights are updated based on both the biased and unbiased samples. Finally, using the updated parameters of the loss function, the parameters of the original initial prediction model before the hypothesis update are truly updated based on the biased samples.
[0010] In some embodiments, the unbiased sample is obtained based on a randomized controlled trial or an A / B test.
[0011] In some embodiments, the subject feature vector includes: one or more user features for marking user subject attributes and one or more project object features for marking project object attributes.
[0012] In some embodiments, the initial prediction model is a matrix factorization model, a collaborative filtering model, or a deep learning model.
[0013] In some embodiments, the propensity model is constructed using Naive Bayes, logistic regression, Poisson decomposition, multi-task learning, variance regularization constraints, or stability constraints.
[0014] In some embodiments, the propensity score model is constructed using logistic regression, and the calculation formula is as follows:
[0015] ;
[0016] in, This represents the probability that user subject u will rate project subject i. This represents the feature vector between user subject u and project subject i. These are the parameters of the propensity model;
[0017] In the method described, the propensity model is updated by minimizing the cross-entropy loss, where the propensity loss is... for:
[0018]
[0019] in, This represents the set of user entities and project entities. It is a binary variable. A value of 1 indicates that project subject i was observed and rated by user subject u. A value of 0 indicates that the project subject i was not observed by the user subject u and was not rated.
[0020] In some embodiments, the loss function is constructed using an inverse probability-weighted estimator, and is calculated as follows:
[0021]
[0022] in, This represents the set of user entities and project entities. Represents the balancing weight ; This represents the prediction error of the initial prediction model. This represents the probability that user subject u will rate project subject i;
[0023] The parameters of the balance weights are updated based on the biased and unbiased samples, including: training the balance weights by minimizing negative empirical entropy and violating balance constraints, and using this as regularization; the loss used to update the balance weights is:
[0024]
[0025] in, It is a hyperparameter used to balance the original loss estimate and the correction caused by unobserved confounding. This indicates the biased sample. This indicates the unbiased sample. This represents the prediction error of the initial prediction model. This represents the probability that user subject u will rate project subject i.
[0026] In some embodiments, the method further introduces a pre-trained error imputation model, which takes the main feature vector of each sample as input and outputs a second predicted score to fill in the missing scores in the biased samples, and constructs a prediction error with the first predicted score. A loss function is constructed using the bias model, the prediction error, and the observed true error of the scores, and a balancing weight is added. The loss function is constructed using a dual robust estimator, and the calculation formula is:
[0027]
[0028] in, This represents the set of user entities and project entities. and All are balanced weights; This represents the prediction error of the initial prediction model. This indicates the prediction made by the error interpolation model. ; This represents the probability that user subject u rates project subject i; the error interpolation model is trained using a deep neural network; the prediction error is calculated using the squared error loss or cross-entropy loss function.
[0029] In each round of parameter update iteration, the parameters of the bias model and the error interpolation model that affect the loss function are fixed, and the parameters of the initial prediction model are updated based on the biased samples. Using the initial prediction model obtained from the hypothesis update, the parameters of the bias model and the error interpolation model are truly updated based on the unbiased samples. The parameters of the balancing weights are updated based on the biased samples and the unbiased samples. Using the parameters of the loss function obtained from the true update, the parameters of the original initial prediction model before the hypothesis update are truly updated based on the biased samples.
[0030] The balancing weights are trained by minimizing the following loss function:
[0031]
[0032] in, It is a hyperparameter used to balance the original loss estimate and the correction caused by unobserved confounding. This indicates the biased sample. This indicates the unbiased sample. This represents the set of user entities and project entities. and All are balanced weights; This represents the prediction error of the initial prediction model. This indicates the prediction made by the error interpolation model. ; This represents the probability that user subject u will rate project subject i.
[0033] On the other hand, the present invention also provides a method for bias-free evaluation of a recommendation system, comprising the following steps:
[0034] Retrieve the main project feature vectors for a specified user and a specified project object;
[0035] The main item feature vector is input into the biased rating prediction model in the above-mentioned training method for the biased rating prediction model of the recommendation system, and the predicted rating is output.
[0036] On the other hand, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0037] The beneficial effects of the present invention are at least as follows:
[0038] The present invention describes a training method, evaluation method, and apparatus for a debiased rating prediction model in a recommendation system. It combines a large number of biased samples with a small number of unbiased samples, constructing a two-layer optimization to jointly update the parameters of the initial prediction model in both biased and unbiased samples, thus combating the influence of unmeasured confounding factors. During the construction of the loss function, a bias model is introduced to predict the probability of a user rating an item; an error interpolation model is introduced to output a second predicted rating to replace the missing ratings in the biased samples to calculate the prediction error; and a balanced weight model is introduced to handle the influence of non-random observations and unmeasured confounding factors. During model data updates, the parameters of the initial prediction model, the bias model and error interpolation model constituting the loss function, and the balanced weight model are updated alternately. The weights added to the missing observations in the biased samples are balanced, and the parameter updates of the rating prediction part are optimized, completing the training of the debiased rating prediction model and achieving debiased recommendations for items by users in the recommendation system.
[0039] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the description, or may be learned by practice of the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures specifically pointed out in the specification and drawings.
[0040] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description
[0041] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, are not intended to limit the scope of the invention. In the drawings:
[0042] Figure 1 This is a logical schematic diagram of a method for training a bias-free rating prediction model for a recommendation system according to an embodiment of the present invention.
[0043] Figure 2 This is a logical schematic diagram of a method for training a biased rating prediction model for a recommendation system, as described in another embodiment of the present invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.
[0045] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.
[0046] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.
[0047] It should also be noted that, unless otherwise specified, the term "connection" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.
[0048] In the following description, embodiments of the invention will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.
[0049] In recommender systems, predicting user preferences and providing personalized recommendations is the primary task. A core aspect of this is fitting collected data to user ratings of specific items. While the collected rating data is substantial, it invariably contains various biases. Fitting this biased data fails to reflect true user needs, leading to significant errors. Current techniques construct unbiased estimates of the ideal loss function for rating prediction models based on biased data and train the models. However, in the presence of unobserved confounding factors or model specification errors, existing methods cannot obtain unbiased estimates of the prediction model's loss function, hindering the rating prediction task. This invention provides a debiased rating prediction model training method, evaluation method, and apparatus for recommender systems. It constructs a two-layer optimization based on biased and unbiased samples to balance the impact of unobserved confounding factors or model specification errors.
[0050] Specifically, one aspect of the present invention provides a method for training a biased rating prediction model for a recommendation system, the method comprising the following steps S101-S104:
[0051] Step S101: Obtain a training sample set, which includes a large biased sample set and a small unbiased sample set. Each sample in the biased and unbiased samples contains a user subject's subject feature vector and rating for a project subject. The biased sample set is non-randomly missing ideal data, and the unbiased sample set is randomly missing ideal data. The ideal data is the complete and unmissing feature vectors and ratings of multiple user subjects for multiple project subjects.
[0052] Step S102: Obtain the initial prediction model. Initialize the prediction model by taking the main feature vector of each sample as input and outputting the first prediction score.
[0053] Step S103: Construct a propensity model, which takes the subject feature vector of each sample as input and outputs the probability that the user subject evaluates the subject of the project; construct a loss function using the propensity model and the observed true error of the rating, and add balancing weights.
[0054] Step S104: Construct a two-layer optimization to train the initial prediction model by simultaneously minimizing the loss function on both biased and unbiased samples, thus obtaining a debiased scoring prediction model; during each round of parameter update iteration, fix the parameters of the bias model that affect the loss function, and update the parameters of the initial prediction model based on the biased samples; use the initial prediction model obtained from the hypothesis update to update the bias model based on the unbiased samples; update the parameters of the balanced weights based on the biased and unbiased samples; use the updated parameters of the loss function to truly update the parameters of the original initial prediction model before the hypothesis update based on the biased samples.
[0055] In step S101, the project subject refers to the product or service project provided to customers in the actual application scenario, and the user subject refers to the user of the product or service project participating in the evaluation. Ideal data is the true evaluation of each project subject by each user subject. Ideal data is complete and unbiased. However, in real-world scenarios, because user evaluations of project subjects are selective and based on their own preferences, large-scale ideal data is difficult to obtain. Usually, large-scale data collection is a biased sample obtained from ideal data without random missing data. Unbiased samples It can be obtained through randomized controlled trials or A / B testing, but it can only be achieved on a small scale.
[0056] The training sample set used in this embodiment consists of two parts: one is a large-scale biased sample that can be collected on a large scale; the other is an unbiased sample that can only be obtained on a small scale through control experiments or A / B tests.
[0057] Each data point in both biased and unbiased samples contains a subject feature vector representing the relationship between a user subject and a project subject, as well as the user subject's rating of the project subject. The subject feature vector includes one or more user features labeling user subject attributes and one or more project object features labeling project object attributes. User features may include, but are not limited to, user age, user gender, and user occupation; project object features may include, but are not limited to, product or service category attributes, price range, and provider ratings. Ratings can be expressed as specific scores or ratings.
[0058] In step S102, the initial prediction model is used to output a score based on the subject feature vector. In some embodiments, the initial prediction model is a matrix factorization model, a collaborative filtering model, or a deep learning model.
[0059] For example, suppose This is the initial prediction model, designed to accurately predict all true ratings. This represents the feature vector between user subject u and project subject i. For model parameters, This represents the first predicted score. The initial prediction model can be a multilayer perceptron (fully connected neural network) model containing only one hidden layer, and the calculation formula can be expressed as:
[0060]
[0061] in, The output vector function of the hidden layer. For activation function, For the function of the output layer, These are the parameters to be learned.
[0062] In step S103, to achieve unbiased estimation of the ideal loss during training, a propensity model is introduced to calculate the probability of a user evaluating a project, thus balancing the loss during actual training. The propensity model is constructed using methods such as Naive Bayes, logistic regression, Poisson decomposition, multi-task learning, variance regularization constraints, or stability constraints.
[0063] Specifically, the propensity score model can be constructed using logistic regression, and the calculation formula is as follows:
[0064] ;
[0065] in, This represents the probability that user subject u will rate project subject i. This represents the feature vector between user subject u and project subject i. These are the parameters for the propensity model;
[0066] During the process of updating the bias model, the bias model is updated by minimizing the cross-entropy loss. for:
[0067]
[0068] in, This represents the set of user entities and project entities. It is a binary variable. A value of 1 indicates that project subject i was observed and rated by user subject u. A value of 0 indicates that the project subject i was not observed by the user subject u and was not rated.
[0069] Ideally, the loss is constructed by minimizing the prediction error between the prediction matrix output by the initial prediction model and the true rating matrix. The model is then trained with this ideal loss. This can be expressed as:
[0070]
[0071] in, It is a collection of all user entities and project entity pairs. yes A collection of user subjects, yes A collection of project entities. This represents the actual rating of user subject u for project subject i. This indicates that the initial prediction model estimates the predicted score of user subject u for project subject i. It is a pre-specified loss function. The prediction error of user subject u to project subject i can be represented by the squared difference loss or cross-entropy loss function.
[0072] The expression for the squared difference loss is as follows:
[0073] .
[0074] The expression for the cross-entropy loss function is:
[0075] .
[0076] However, during training based on biased samples, a large number of ratings will be missing because users only observe items of interest. To balance this missing data, in this embodiment, the probability of user subject u rating item subject i is... This is called a propensity profile, which can be calculated using a propensity profile model. The estimated value, , The parameters represent the propensity score model. The loss function, constructed based on the inverse probability weighted (IPS) estimator, is as follows:
[0077]
[0078] in, This represents the set of user entities and project entities. Represents the balancing weight ; This represents the prediction error of the initial prediction model. This represents the probability that user subject u will rate project subject i;
[0079] The parameters of the balance weights are updated based on biased and unbiased samples, including: training the balance weights by minimizing negative empirical entropy and violating balance constraints, and using this as regularization. The loss function used to update the balance weights is:
[0080]
[0081] in, It is a hyperparameter used to balance the original loss estimate and the correction caused by unobserved confounding. This indicates a biased sample. Indicates unbiased samples, This represents the prediction error of the initial prediction model. This represents the probability that user subject u will rate project subject i.
[0082] In step S104, a two-layer optimization is constructed, using unbiased samples to correct the parameters of the biased model, and then the initial prediction model is trained by minimizing the loss function based on biased sample estimation. Formally, this objective can be expressed as:
[0083] ;
[0084]
[0085] in, It is a predefined loss on biased scoring. It is a predefined loss on unbiased scoring, where , representing the parameters of the propensity model. This represents the parameters of the initial prediction model. This indicates a biased sample. This represents an unbiased sample. In each iteration, the biased sample pairs are first used as the basis for... Perform hypothesis updates, and then update the propensity parameter based on unbiased samples. , in the assumption and Based on this, the biased and unbiased samples are used to balance the weights. Update, and finally update. and Based on this, the initial prediction model parameters are updated again based on biased samples. .
[0086] Specifically, such as Figure 1 As shown, in the s-th iteration, given To approximate the optimal First, based on biased sample pairs Make a hypothesis update, expressed as:
[0087] ;
[0088] Then update the obtained hypothesis. replace Then based on unbiased sample pairs To perform the actual update, the expression is:
[0089] ;
[0090] Based on this, the hypothesis update The truly updated Balanced weights based on biased and unbiased samples Update;
[0091] Finally, in the updated and Based on biased sample pairs To perform the actual update, the expression is:
[0092]
[0093] This constitutes one iteration. This process continues until convergence.
[0094] In other embodiments, step S103 may also construct a loss function based on a dual robust estimator (DR).
[0095] Specifically, the method also introduces a pre-trained error interpolation model, which is trained using a deep neural network. The error interpolation model takes the main feature vector of each sample as input and outputs a second predicted score to fill in the missing scores in biased samples. This second predicted score is then combined with the first predicted score to construct a prediction error. A loss function is constructed using the bias model, the prediction error, and the observed true error of the score, with a balancing error added. The loss function is constructed using a dual robust estimator, and its calculation formula is:
[0096]
[0097] in, This represents the set of user entities and project entities. and All are balanced weights; This represents the prediction error of the initial prediction model. This indicates the prediction made by the error interpolation model. ; This represents the probability that user subject u will rate project subject i;
[0098] Furthermore, in step S104, during each round of parameter update iteration, the parameters of the bias model and the error interpolation model that affect the loss function are fixed, and the parameters of the initial prediction model are updated based on biased samples; using the initial prediction model obtained from the hypothesis update, the parameters of the bias model and the error interpolation model are truly updated based on unbiased samples; the parameters of the balanced weights are updated based on biased and unbiased samples; using the parameters of the loss function obtained from the true update, the parameters of the original initial prediction model before the hypothesis update are truly updated based on biased samples.
[0099] The balancing weights are trained by minimizing the following loss function:
[0100]
[0101] in, It is a hyperparameter used to balance the original loss estimate and the correction caused by unobserved confounding. This indicates a biased sample. Indicates unbiased samples, This represents the set of user entities and project entities. and All are balanced weights; This represents the prediction error of the initial prediction model. This indicates the prediction made by the error interpolation model. ; This represents the probability that user subject u will rate project subject i.
[0102] Specifically, the update target in this embodiment is:
[0103]
[0104]
[0105] in, It is a predefined loss on biased scoring. It is a predefined loss on unbiased scoring, where , The parameters representing the propensity model, The parameters represent the error interpolation model. This represents the parameters of the initial prediction model. This indicates a biased sample. This represents an unbiased sample. In each iteration, the biased sample pairs are first used as the basis for... Perform hypothesis updates, and then update the propensity parameter based on unbiased samples. , in the assumption and Based on this, the biased and unbiased samples are used to balance the weights. and Update, and finally update. , and Based on this, the initial prediction model parameters are updated again based on biased samples. .
[0106] Specifically, such as Figure 2 As shown, in the s-th iteration, given To approximate the optimal First, based on biased sample pairs Make a hypothesis update, expressed as:
[0107] ;
[0108] Then update the obtained hypothesis. replace Then based on unbiased sample pairs To perform the actual update, the expression is:
[0109] ;
[0110] Based on this, the hypothesis update The truly updated Balanced weights based on biased and unbiased samples and Update;
[0111] Finally, in the updated , and Based on biased sample pairs To perform the actual update, the expression is:
[0112]
[0113] This constitutes one iteration. This process continues until convergence.
[0114] On the other hand, the present invention also provides a method for bias removal evaluation of a recommendation system, comprising the following steps S201~S202:
[0115] Step S201: Obtain the main project feature vectors of the specified user and the specified project object.
[0116] Step S202: Input the main item feature vector into the biased rating prediction model in the training method of the biased rating prediction model for the recommendation system in steps S101 to S104 above, and output the predicted rating.
[0117] On the other hand, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0118] The principles of this invention are explained below:
[0119] This invention proposes a balanced training objective that combats unobserved confounding and model error by further utilizing unbiased scoring. To address the bias problem caused by unobserved confounding and model specification errors, a balancing method is proposed that fully utilizes unbiased scoring for debiased recommendations. First, when there is no unobserved confounding, the following conclusions can be drawn:
[0120]
[0121] in, Indicates based on biased samples The loss, Indicates based on unbiased samples The loss, The parameters of the propensity score model and / or error interpolation model. This refers to the parameters of the initial prediction model. To obtain unbiased estimates in the presence of unobserved confounding or model specification errors, the hypothesis space (the set of mappings from the input space to the output space) is... Expand to ,in Includes user projects right The contribution. By introducing each coefficient , making the formula This satisfies the balance relationship, thus balancing the effects of unobserved confounding and model error. The following propositions are an empirical version of the formula for balancing the loss functions of inverse probability weighted IPS, doubly robust DR, and automatic debiasing methods.
[0122] Proposition: (a) Exists Make
[0123]
[0124] (b) Existence and Make
[0125]
[0126] (c) Exists and Make
[0127]
[0128] From proposition (a), we know that when At this point, the left-hand side will degenerate into a standard IPS with balanced weights, and the entropy will be maximized. The training objective of balanced IPS is:
[0129]
[0130]
[0131]
[0132]
[0133] The training objective is to maximize the empirical entropy of the balanced weights to avoid extreme weights. The positivity and standardization of the balanced weights are guaranteed by constraints. In the last equation, the IPS estimates of the biased scores are reweighted to balance the effects of unobserved confounding and model errors.
[0134] Similarly, in propositions (b) and (c), the estimators for balancing DR and AutoDebias pass through the whole and biased user-item pairs, respectively. and Reweighting is performed to offset the effects of unobserved confounding and model errors. The training objective for balancing DR is:
[0135]
[0136]
[0137]
[0138]
[0139] in, , The difference with balancing AutoDebias is that the last equation becomes:
[0140]
[0141] Among them, when in superior ,exist superior When the condition is met, the solutions will degenerate into standard DR and AutoDebias, respectively. The following theorem uses the Karush-Kuhn-Tucker conditions to prove the existence of global optimal solutions corresponding to the proposed equilibrium IPS, DR, and AutoDebias.
[0142] Based on the theorem, a global optimum exists in the optimization problem balancing IPS, DR, and AutoDebias. Furthermore, since the empirical entropy is a strictly convex function as the optimization objective, it can be proven that the inequality constraints are strictly feasible, i.e., they exist. In Make Furthermore, the equality constraints are affine. According to the Karush-Kuhn-Tucker conditions, a global optimum exists, thus completing the proof. Theoretically, due to the convexity of the objective function, its local optimum is identical to its global optimum. The generalized Lagrange multiplier method can be used to solve both the primal and dual problems; this balanced weighting effectively counteracts unobserved confounding.
[0143] The present invention will now be described with reference to a specific embodiment:
[0144] This embodiment proposes an efficient model-agnostic training algorithm to achieve the proposed training objective. The algorithm consists of three parts: First, a two-layer optimization is used to train the bias and error imputation models without updating the prediction model; then, the gradients of the balance weights are reparameterized and updated to counteract the effects of unobserved confounding; finally, the estimated balance loss (Bal-IPS, Bal-DR, or Bal-AutoDebias) is minimized, and the prediction model is updated to achieve unbiased learning.
[0145] Step 1: Training the propensity score and error interpolation model
[0146] Using only two-layer optimization to perform prediction model parameterization The hypothesis is updated, and the propensity score and error interpolation model parameters are updated. Due to the possibility of unmeasured confounding, the predicted model parameters will be... The actual update is postponed to "Step 3," after the balancing in "Step 2" is performed.
[0147] Step 2: Balancing Unobserved Hybrid Training
[0148] One challenge in solving the balanced optimization problem is that the number of balance weights increases with the number of user-item pairs, leading to a significant increase in solution time for large-scale datasets. To address this issue, a new approach to balance weights in balanced IPS is proposed. Perform modeling (reparameterization), i.e. ,in, These are the parameters of the equilibrium model. To satisfy the optimization constraints, The last layer uses Sigmoid as the activation function to ensure positiveness and batch normalization to ensure normality.
[0149] The balance weights in a balanced IPS are trained as regularization by minimizing negative empirical entropy and violating balance constraints.
[0150]
[0151] in, It is a hyperparameter used to balance the original loss estimate and the correction caused by unobserved confounding.
[0152] Similarly, in balancing DR and balancing AutoDebias and It was also reparameterized to and The balance weights in Balanced DR and Balanced AutoDebias are trained by minimizing the following loss function:
[0153]
[0154]
[0155] as well as
[0156]
[0157]
[0158] in It is a hyperparameter. These are the parameters of the equilibrium model.
[0159] Step 3: Prediction Model Training
[0160] Since optimizing the balancing weights aims to balance the prediction errors of biased and unbiased scores, and this also depends on the prediction model, this embodiment alternately updates the balancing model and the prediction model. Specifically, given the balancing weights of the IPS, the prediction model is trained by minimizing the Balancing IPS (Bal-IPS):
[0161]
[0162] Similarly, for Balanced DR (Bal-DR) or Balanced AutoDebias (Bal-AutoDebias), the prediction model is trained by minimizing the following loss function:
[0163]
[0164] as well as
[0165]
[0166] Next, given the prediction model, the balance weights are updated again as described in "Step Two". The balance weights and the prediction model are updated alternately, allowing for more full utilization of the unbiased score, thus achieving unbiased learning of the prediction model.
[0167] Compared to Learning to Debias (LTD) and AutoDebias methods, the main difference in this embodiment is that it not only uses unbiased scores to select the parameters of the biased and imputed models, but also updates the predictive model using standard IPS or DR. Instead, this embodiment introduces a balanced model to counteract unobserved confounding effects, and then updates the predictive model based on the balanced loss. It is worth noting that the proposed method is model-independent and can be applied to any debiased recommendation method. This embodiment uses IPS, DR, and AutoDebias for illustration.
[0168] In "Step One", the algorithm of this embodiment is respectively in and The prediction model underwent two forward and backward passes, and was performed on the [predictive model]. In Step 1, one forward and one backward pass were performed for the bias and imputation models. Backpropagation was used to obtain the gradients of the bias and imputation models. In Step 2, one forward pass and one backward pass were performed to balance the model. In Step 3, backpropagation was used to actually update the prediction model. This embodiment indicates that the running time of backpropagation and forward pass is approximately the same. Therefore, compared to two-stage learning, the training time of the proposed algorithm is no more than 3 times the learning time, and approximately 1.5 times the learning time compared to LTD and AutoDebias.
[0169] Therefore, the advantages of this invention include: First, by combining unbiased and biased rating data, the proposed debiasing recommendation method can improve the predictive performance of the recommendation system without the need for expensive large-scale A / B testing, thus effectively solving the bias problem existing in large-scale observation data. Second, the proposed method is a theoretically guaranteed model-independent balancing method, applicable to any existing debiasing method, and capable of handling unobserved confounding and model specification errors, improving the accuracy and stability of the recommendation system. Third, the method of this invention is adaptive, capable of learning the balance coefficients of biased samples, further improving the debiasing effect. This adaptability can adapt to different data distributions and sample characteristics, improving the generalization ability of the algorithm. Fourth, the method of this invention has broad application prospects and can be applied to various recommendation scenarios, including e-commerce, social networks, video, and music, improving users' shopping and usage experience and promoting the development of commerce and social interaction.
[0170] In summary, the training method, evaluation method, and apparatus for debiased rating prediction models in recommendation systems described in this invention combine a large number of biased samples with a small number of unbiased samples. Through a two-layer optimization, the parameters of the initial prediction model are updated jointly in both biased and unbiased samples to combat the influence of unmeasured confounding factors. During the construction of the loss function, a bias model is introduced to predict the probability of a user rating an item, and an error interpolation model is introduced to output a second predicted rating to replace the missing ratings in the biased samples to calculate the prediction error. Simultaneously, a balanced weight model is introduced to handle the influence of non-random observations and unmeasured confounding factors. During model data updates, the parameters of the initial prediction model, the bias model and error interpolation model constituting the loss function, and the balanced weight model are updated alternately. The weights added to the missing observations in the biased samples are balanced, and the parameter updates of the rating prediction part are optimized, completing the training of the debiased rating prediction model and achieving debiased recommendations for items by users in the recommendation system.
[0171] Corresponding to the above method, the present invention also provides an apparatus / system including a computer device, the computer device including a processor and a memory, the memory storing computer instructions, the processor executing the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the apparatus / system performs the steps of the method as described above.
[0172] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned edge computing server deployment method. The computer-readable storage medium can be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium known in the art.
[0173] Those skilled in the art will understand that the exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the desired tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave.
[0174] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.
[0175] In this invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or in place of features of other embodiments.
[0176] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations of the embodiments of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for training a bias-free rating prediction model for a recommender system, characterized in that, The method includes the following steps: Obtain a training sample set, which includes a large biased sample set and a small unbiased sample set. Each sample in the biased sample set and the unbiased sample set contains a user subject's subject feature vector and rating for a project subject. The biased sample set is ideal data with non-random missing data, and the unbiased sample set is the ideal data with random missing data. The ideal data is the complete and unmissing feature vectors and ratings of multiple user subjects for multiple project subjects. An initial prediction model is obtained, which takes the main feature vector of each sample as input and outputs a first prediction score; A bias model is constructed, which takes the subject feature vector of each sample as input and outputs the probability that the user subject evaluates the subject of the project; a loss function is constructed using the bias model and the observed true error of the rating, and a balancing weight is added; A two-layer optimization is constructed to simultaneously minimize the loss function on both the biased and unbiased samples to train the initial prediction model, resulting in a debiased scoring prediction model. During each round of parameter update iterations, the parameters of the bias model affecting the loss function are fixed, and the parameters of the initial prediction model are updated based on the biased samples. Using the updated initial prediction model, the bias model is updated based on the unbiased samples. The parameters of the balancing weights are updated based on both the biased and unbiased samples. Finally, using the updated parameters of the loss function, the parameters of the original initial prediction model before the hypothesis update are truly updated based on the biased samples.
2. The method for training a bias-free rating prediction model for a recommendation system according to claim 1, characterized in that, The unbiased samples are obtained based on randomized controlled trials or A / B tests.
3. The method for training a bias-free rating prediction model for a recommendation system according to claim 1, characterized in that, The subject feature vector includes: one or more user features for marking user subject attributes and one or more project object features for marking project object attributes.
4. The method for training a bias-free rating prediction model for a recommendation system according to claim 1, characterized in that, The initial prediction model is a matrix factorization model, a collaborative filtering model, or a deep learning model.
5. The method for training a bias-free rating prediction model for a recommendation system according to claim 1, characterized in that, The propensity model is constructed using methods such as Naive Bayes, logistic regression, Poisson decomposition, multi-task learning, variance regularization constraints, or stability constraints.
6. The method for training a bias-free rating prediction model for a recommendation system according to claim 5, characterized in that, The propensity score model is constructed using logistic regression, and the calculation formula is as follows: ; in, This represents the probability that user subject u will rate project subject i. This represents the feature vector between user subject u and project subject i. These are the parameters of the propensity model; In the method described, the propensity model is updated by minimizing the cross-entropy loss, where the propensity loss is... for: in, This represents the set of user entities and project entities. It is a binary variable. A value of 1 indicates that project subject i was observed and rated by user subject u. A value of 0 indicates that the project subject i was not observed by the user subject u and was not rated.
7. The method for training a bias-free rating prediction model for a recommendation system according to claim 6, characterized in that, The loss function is constructed using an inverse probability weighted estimator, and its calculation formula is as follows: in, This represents the set of user entities and project entities. Indicates the balancing weights; This represents the prediction error of the initial prediction model. This represents the probability that user subject u will rate project subject i; Updating the parameters of the balance weights based on the biased and unbiased samples includes: training the balance weights by minimizing negative empirical entropy and violating balance constraints, and using this as regularization to update the balance weights using the following loss: in, It is a hyperparameter used to balance the original loss estimate and the correction caused by unobserved confounding. This indicates the biased sample. This indicates the unbiased sample. This represents the prediction error of the initial prediction model. This represents the probability that user subject u will rate project subject i.
8. The method for training a bias-free rating prediction model for a recommendation system according to claim 6, characterized in that, The method also introduces a pre-trained error interpolation model, which takes the main feature vector of each sample as input and outputs a second predicted score to fill in the missing scores in the biased samples. This second predicted score is then combined with the first predicted score to construct a prediction error. A loss function is constructed using the bias model, the prediction error, and the observed true error of the scores, with balanced weights added. The loss function is constructed using a dual robust estimator, and its calculation formula is: in, This represents the set of user entities and project entities. and All are balanced weights; This represents the prediction error of the initial prediction model. This indicates the prediction made by the error interpolation model. ; This represents the probability that user subject u rates project subject i; the error interpolation model is trained using a deep neural network; the prediction error is calculated using the squared error loss or cross-entropy loss function. In each round of parameter update iteration, the parameters of the bias model and the error interpolation model that affect the loss function are fixed, and the parameters of the initial prediction model are updated based on the biased samples. Using the initial prediction model obtained from the hypothesis update, the parameters of the bias model and the error interpolation model are truly updated based on the unbiased samples. The parameters of the balancing weights are updated based on the biased samples and the unbiased samples. Using the parameters of the loss function obtained from the true update, the parameters of the original initial prediction model before the hypothesis update are truly updated based on the biased samples. The balancing weights are trained by minimizing the following loss function: in, It is a hyperparameter used to balance the original loss estimate and the correction caused by unobserved confounding. This indicates the biased sample. This indicates the unbiased sample. This represents the set of user entities and project entities. and All are balanced weights; This represents the prediction error of the initial prediction model. This indicates the prediction made by the error interpolation model. ; This represents the probability that user subject u will rate project subject i.
9. A method for bias-free evaluation in recommender systems, characterized in that, Includes the following steps: Retrieve the main project feature vectors for a specified user and a specified project object; The main item feature vector is input into the training method of the bias-free rating prediction model for a recommendation system as described in any one of claims 1 to 8, and the predicted rating is output.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Recommendation system method based on data non-random-missing mechanism
CN108287902A
A cross-domain collaborative filtering method and system
CN109446420A