A User-Item Recommendation Method

By introducing the auxiliary score bu into the recommendation system, combined with pointwise and pairwise loss functions, the problem of difficulty in learning the user's personalized interest boundary and vanishing gradient is solved, significantly improving the accuracy and performance of the recommendation system.

CN114880582BActive Publication Date: 2024-09-13INSTITUTE OF INFORMATION ENGINEERING CHINESE ACADEMY OF SCIENCES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210373353.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-11
Publication Date
2024-09-13
Estimated Expiration
2042-04-11

AI Technical Summary

Technical Problem

In existing recommendation systems, it is difficult for methods based on collaborative filtering to learn and clarify the boundaries of users' personalized interests, and the pairwise loss function suffers from low training efficiency and vanishing gradient problems, resulting in insufficient recommendation accuracy.

Method used

The auxiliary score bu is introduced, combining pointwise loss and pairwise loss, and optimizing the recommendation system model by calculating the similarity score and auxiliary score between users and items to improve the recommendation accuracy of the recommendation system.

Benefits of technology

The accuracy of user item recommendation is significantly improved, personalized interest boundaries can be directly inferred, the performance of the recommendation system is improved by about 2% to 10%, and the vanishing gradient problem is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114880582B
    Figure CN114880582B
Patent Text Reader

Abstract

The present invention discloses a user-item recommendation method, which comprises the following steps: 1) selecting an observed user / item pair (u, p) from a training data set and inputting it into a recommendation system model M to obtain a similarity score s(u, p) between the user u and the item p; 2) selecting an unobserved user / item pair (u, n) and inputting it into the model M to obtain a similarity score s(u, n) between the user u and the item n; 3) using a loss function #imgabs0# to calculate a loss value #imgabs1#; then optimizing the model M using a back propagation algorithm based on the obtained loss value #imgabs2#; u is the auxiliary score corresponding to user u; 4) For a predicted item x, it is input into the trained model M. If the similarity score s(u,x) is greater than b u , then recommend item x to user u.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of computer software, and in particular relates to a user project recommendation method. Background Art

[0002] Faced with the problem of information overload, recommendation systems play an important role in efficiently providing users with useful information. As a widely used technique in recommendation systems, collaborative filtering (CF) based methods usually leverage user interaction behaviors to model users' latent preferences and recommend items to users based on their preferences. In general, given user-item interaction data, typical CF methods usually include two steps: (i) defining a scoring function to calculate the relevance score between users and candidate items, and (ii) defining a loss function to optimize the total relevance score of all observed user-item interactions. From the perspective of loss definition, CF methods are usually optimized by a loss function that assigns a higher score s to observed interactions (i.e., positive instances). p , assigning a lower score s to unobserved interactions (i.e., negative instances) n In previous work, two types of loss functions are designed for recommender systems, namely pointwise loss functions and pairwise loss functions. Point-based methods usually formulate the ranking task as a regression or classification task, where the loss function ψ(x, l) directly converts the normalized relevance score s of sample x into x Optimize for its label l∈{0,1}. Example x=(u,i) is an observed or unobserved pair of user u and item i. Usually, the point-based loss function uses a fixed hard index (such as 0.5) to distinguish whether a sample is positive or negative, that is, for all users in the ranking stage, samples with a score greater than 0.5 are considered positive, that is, user u is interested in item i. Correspondingly, the paired method is to pair the positive and negative samples (x n , x p ) as input and try to pass the loss function φ(x n ,x p ) minimizes the relative score s n -s p The point of pairwise loss is to make the score s of positive samples p Greater than the score s of negative samples n , which can prove the rationality of using sample x=(u,i) in the ranking stage.

[0003] In recent years, these two loss function paradigms have been widely used in various recommendation methods and help to achieve good recommendation performance. However, they still have shortcomings. It is difficult for them to learn to clearly define the personalized interest boundaries of users, which can directly infer whether the user likes a given unseen item. In fact, in the ranking stage, users learn their own interest boundaries from interactions to determine whether the sample is a positive sample. As mentioned above, the pointwise loss function is non-personalized and tends to determine the global interest boundary as a fixed hard line for all users, which may misclassify users whose actual interest boundary is lower than the fixed hard line. Since the pairwise method cannot provide a clear personalized boundary for the unseen candidate sample x, because its score S learned by the relative score x It can only reflect the rationality of sample x, rather than a clear user-specific indicator, indicating whether the sample is a positive sample in the ranking stage.

[0004] In addition, paired methods suffer from the problem of low training efficiency. For paired samples, as the model converges in the later stages of training, most negative samples are correctly classified. In this case, the loss of most randomly generated training samples is zero, that is, these samples are too "easy" to be correctly classified and cannot generate valid gradients to update the model, which is also known as the vanishing gradient problem. To alleviate this problem, previous works have adopted hard negative sample mining strategies to increase the probability of valid samples. Although these methods are successful, they ignore the basic mechanism that leads to the vanishing problem. Intuitively, hard samples are usually samples near the boundary, and it is difficult for the model to distinguish these samples well, so the accuracy of the corresponding recommendation system when recommending items to different users needs to be improved. Summary of the invention

[0005] In view of the problems existing in the prior art, the present invention aims to provide a method for recommending user items, which can take into account the advantages of both the pairwise method and the pointwise method and learn the user's clear interest boundary.

[0006] On the one hand, pointwise loss usually optimizes each sample to match its label, which is flexible but not suitable for ranking-related tasks. On the other hand, pairwise loss takes a pair of positive and negative samples and then optimizes the model to make their scores ordered, which is a great success but suffers from the gradient vanishing problem. u They successfully combine and complement each other. Specifically, in the whole loss expression, it follows the point-wise loss, because the positive and negative samples are represented by L p and L n Calculate. p and L n In the example, each sample uses the auxiliary fraction b uApply pairwise loss. In other words, the pairwise loss is applied to (b u -s(u,p)) and (s(u,n)-b u ), rather than the traditional (s(u,n)-s(u,p)). In this way, the method of the present invention can provide a flexible and effective loss function, greatly improving the recommendation accuracy of the recommendation system.

[0007] The technical solution of the present invention is:

[0008] A user-item recommendation method, comprising the steps of:

[0009] 1) Select an observed user / item pair (u, p) from the training data set and input it into the recommendation system model M to obtain a similarity score s(u, p) between user u and item p; wherein the training data set includes multiple observed user / item pairs of user u and multiple unobserved user / item pairs of user u;

[0010] 2) Select an unobserved user / item pair (u, n) from the training data set and input it into the recommendation system model M to obtain the similarity score s(u, n) between user u and item n;

[0011] 3) Using loss function Calculate the loss value Then according to the loss value The recommendation system model M is optimized by using the back propagation algorithm; wherein, b u is the auxiliary score corresponding to user u, is the set of observed user / item pairs, φ() is the pairwise loss function, and α is a hyperparameter;

[0012] 4) For a predicted item x, it is input into the trained recommendation system model M to obtain the similarity score s(u,x) between the user u and the predicted item x; if the similarity score s(u,x) is greater than b u , then recommend the item x to be predicted to the user u.

[0013] Furthermore, b u is a learnable vector, and b is determined by training and optimizing the recommendation system model M. u The final value of .

[0014] Furthermore, Among them, P u is the embedding vector of user u; W is the linear transformation matrix used to transform the user embedding vector P u Extract auxiliary score b u function.

[0015] Furthermore, the linear transformation matrix W is randomly initialized and automatically learned through a backpropagation algorithm to obtain the final required linear transformation matrix W.

[0016] Furthermore, the recommendation system model M first extracts the embedding vector pair (P u ,Q p ), and P u With Q p Multiply them together to get the similarity score s(u,p) between user u and item p; where P u is the embedding vector of user u, Q p is the embedding vector of item p.

[0017] Furthermore, the recommendation system model M first extracts the embedding vector pair (P u ,Q n ), and P u With Q n Multiply them together to get the similarity score s(u,n) between user u and item n; where P u is the embedding vector of user u, Q n is the embedding vector of item n.

[0018] Furthermore, the pairwise loss function φ is MarginLoss or LnSigmoid.

[0019] A server, characterized in that it comprises a memory and a processor, wherein the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program comprises instructions for executing each step in the above method.

[0020] A computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the above method when executed by a processor.

[0021] The advantages of the present invention are as follows:

[0022] 1. The loss function recommendation system designed by the present invention has high accuracy in personalized user item recommendation. Experiments have shown that this method is about 2% to 10% higher than the existing pairwise loss method and pointwise loss method.

[0023] 2. The loss function designed by the present invention can explicitly learn the user's personalized interest boundary, and the user's personalized interest boundary can directly infer whether the user likes a given unseen item. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is the main flow chart of the recommended method. DETAILED DESCRIPTION

[0025] The present invention is further described in detail below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention but not to limit the scope of the present invention.

[0026] For implicit CF methods, user-item interactions are an important resource to promote the development of recommendation systems. For convenience, the following consistent notations are used in this paper: User set is The project set is The interaction set is The observed part is regarded as the user's real interaction history Formally, the label function is used to indicate whether a sample is observed, where a value of 1 indicates that the interaction is positive (i.e. ), a value of 0 indicates a negative interaction (i.e. ).

[0027] In implicit collaborative filtering, the goal of the model is to learn a scoring function To reflect the correlation between items and users.

[0028] The loss function is used to indicate the degree of fit of the score function, which can usually be summarized into two paradigms: pointwise and pairwise. The pointwise method describes the task as a classification task for a single sample, and its loss function ψ directly optimizes the standardized relevance score s(u,x) between user u and item x, and marks it as l(u,x):

[0029]

[0030] where ψ can be the cross entropy or the mean sum error, etc. Since the point-wise method optimizes each sample individually, it is very flexible in terms of instance-level sampling and weighting. However, since these scores depend on the observation context, fitting samples to fixed scores hardly reflects the inherent ranking properties.

[0031] Unlike sample fitting with a fixed score, the pairwise method attempts to assign positive samples with scores higher than negative to positive samples. The loss function of the pairwise method can be rewritten as:

[0032]

[0033] The pairwise loss function φ can be MarginLoss or LnSigmoid, etc. Although the pairwise method can improve the generalization performance by learning the qualitative scores between positive and negative samples, it is difficult to provide effective ranking information in the inference stage and there is a gradient vanishing problem. Intuitively, fully combining the advantages of both can get a better loss function, thereby further improving the recommendation performance.

[0034] The present invention proposes a new loss model, combining the advantages of two mainstream methods to adaptively match the interests of users. The present invention innovatively introduces an auxiliary score for each user. To represent the user interest boundary (UIB), it can be a learnable parameter or calculated by embedding the user, as shown in Eq.

[0035]

[0036] in is the learnable embedding vector of user u, is a learnable vector, represents a linear transformation matrix, which is randomly initialized and automatically learned through the back propagation algorithm, and represents a function for extracting auxiliary scores from the user embedding vector. The loss of the present invention comes from the weighted sum of two parts: the positive sample loss part L p , the negative sample loss part L n In L p and L n In the above example, pairwise loss is used to penalize crossing the decision boundary b. u Samples, that is, s(u,p) is lower than b u The positive sample and s(u,n) are higher than b u Negative samples. Formally, the loss function of this method can be rewritten as:

[0037]

[0038] Among them, α is a hyperparameter used to balance the contribution weights of positive samples and negative samples.

[0039] The user project recommendation method of the present invention is as follows: Figure 1 As shown, the steps include:

[0040] Step 1), select an observed user / item pair (u, p) from the training dataset and input it into any recommendation system model. Since our loss method is applicable to any model, we can assume that the model is M, and the embedding vector (P) corresponding to the user / item is usually extracted from M. u ,Q p ), and P u With Q p Multiply them together to get the similarity score s(u,p) between user u and item p;

[0041] Step 2), select an unobserved user / item pair (u, n) from the training data set and input it into the same model M, perform the same processing, and obtain the similarity score s(u, n) between user u and item n;

[0042] Step 3), use Calculate the loss value Then according to the loss value The back propagation algorithm is used to optimize the M model.

[0043] Step 4), repeat steps 1 to 3) until the model converges, that is, the loss value If it does not decrease any more, the training is completed.

[0044] Step 5), given user u needs to predict whether item x is what he likes, then it is input into the trained model M, and the similarity score s(u,x) is obtained using the same method as step 1; when the similarity score is greater than b u If , it means that user u likes project x, otherwise it does not.

[0045] Although the specific embodiments of the present invention are disclosed for the purpose of illustration, the purpose is to help understand the content of the present invention and implement it accordingly, those skilled in the art will understand that various substitutions, changes and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the content disclosed in the best embodiment, and the scope of the present invention is subject to the scope defined in the claims.

Claims

1. A user item recommendation method, the steps comprising: 1) Select an observed user / item pair (u, p) from the training data set and input it into the recommendation system model M to obtain a similarity score s(u, p) between user u and item p; wherein the training data set includes multiple observed user / item pairs of user u and multiple unobserved user / item pairs of user u; 2) Select an unobserved user / item pair (u, n) from the training data set and input it into the recommendation system model M to obtain the similarity score s(u, n) between user u and item n; 3) Using loss function Calculate the loss value Then according to the loss value The recommendation system model M is optimized by using the back propagation algorithm; wherein, b u is the auxiliary score corresponding to user u, is the set of observed user / item pairs, φ() is the pairwise loss function, and α is a hyperparameter; 4) For a predicted item x, it is input into the trained recommendation system model M to obtain the similarity score s(u,x) between the user u and the predicted item x; if the similarity score s(u,x) is greater than b u , then recommend the item x to be predicted to the user u.

2. The method according to claim 1, characterized in that: b u is a learnable vector, and b is determined by training and optimizing the recommendation system model M. u The final value of .

3. The method according to claim 1 or 2, characterized in that: Among them, P u is the embedding vector of user u; W is the linear transformation matrix used to transform the user embedding vector P u Extract auxiliary score b u function.

4. The method according to claim 3, characterized in that The linear transformation matrix W is randomly initialized and automatically learned through the back propagation algorithm to obtain the final required linear transformation matrix W.

5. The method according to claim 1, characterized in that The recommendation system model M first extracts the embedding vector pair (P) corresponding to the observed user / item pair (u, p) u ,Q p ), and P u With Q p Multiply them together to get the similarity score s(u,p) between user u and item p; Among them, P u is the embedding vector of user u, Q p is the embedding vector of item p.

6. The method according to claim 1, characterized in that The recommendation system model M first extracts the embedding vector pairs (P u ,Q n ), and P u With Q n Multiply them together to get the similarity score s(u,n) between user u and item n; Among them, P u is the embedding vector of user u, Q n is the embedding vector of item n.

7. The method according to claim 1, characterized in that The pairwise loss function φ is MarginLoss or LnSigmoid.

8. A server, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program comprises instructions for executing each step in the method according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.