An individualized recommendation method based on graph contrastive learning and negative interest propagation

By employing graph contrastive learning and negative interest propagation, positive and negative interest embeddings for users and items are generated, solving the problems of interaction sparsity and bias in user interest modeling and improving the accuracy and personalized recommendation effect of the recommendation system.

CN116561426BActive Publication Date: 2025-11-07BEIJING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310567535.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-19
Publication Date
2025-11-07
Estimated Expiration
2043-05-19

AI Technical Summary

Technical Problem

Existing recommendation technologies suffer from interaction sparsity and bias issues when modeling user interests, resulting in insufficient recommendation performance, especially in failing to effectively capture users' different attribute preferences and fine-grained biases towards items.

Method used

We employ a graph-based contrastive learning and negative interest propagation approach. Through a bias-reduction interest propagation module, a contrastive graph interest propagation module, a two-level contrastive learning module, and an optimization module, we generate positive and negative interest embeddings for users and items. We use negative interest to constrain positive interest modeling, thereby reducing popularity and personal bias in user interest interactions.

Benefits of technology

It effectively mitigates popularity and individual bias in user interest modeling, and improves the accuracy and personalized recommendation effect of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116561426B_ABST
    Figure CN116561426B_ABST
Patent Text Reader

Abstract

The application discloses a personalized recommendation method based on graph contrast learning and negative interest propagation. In the past recommendation model, the negative interest signal only serves the loss in back propagation, and its role in interest coding has not been explored. In addition, the sparse non-difference interaction has inherent implicit bias in revealing user interest, leading to suboptimal interest prediction. The application proposes a new method of using negative interest, which introduces negative interest auxiliary contrast learning architecture to model interest, so that the negative interest signal becomes a promising evidence to support fine-grained interest modeling. First, the negative interest learning auxiliary channel generates contrast graphs through negative sampling, and then propagates the complementary embedding of users and items to encode negative signals. Finally, by comparing positive and negative embeddings, the interest mining of recommendation is promoted. A large number of experiments on three real-world datasets prove the ability of the method to alleviate the problem of interaction sparsity and recommendation bias.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the related technologies of mining and identifying graph network data, deep learning, etc.; the present application relates to the collaborative filtering technology, in particular to the model-based collaborative filtering algorithm; the present application relates to the representation learning technology based on graph learning, in particular to the LightGCN algorithm; the present application relates to the representation learning technology based on contrast learning, in particular to the XSimGCL algorithm; the present application also relates to the negative sample generation technology. BACKGROUND

[0002] With the continuous development of information technology, the amount of multimedia information under the social media environment is increasing day by day, thus generating the problem of information overload. The recommendation system aims to help users extract the information of interest from the complex data, which improves the efficiency, and also helps to improve user satisfaction and platform benefit. However, the extremely sparse historical data makes it difficult for the recommendation technology to fully measure the user's interest. The observed user behavior data in social media also has various biases.

[0003] In the recommended technology, collaborative filtering (CF) mines user interest by modeling user-item historical interactions. CF makes recommendations through neighborhood learning, using the user's historical interaction items to represent the user's preferences. Early CF models attempt to encode users and items as continuous vectors in a shared space, such as matrix factorization or factorization machine methods, achieving good recommendation performance. With the continuous development of deep learning, methods based on graph neural networks (GNN) have shown natural advantages in mining the graph structure information of the recommendation system. GNN encodes collaborative signals through node aggregation, fusing high-order neighborhood information, and achieving advanced performance. The construction of graph data and the difference in the graph aggregation process determine the difference in neural graph recommendation models. For example, 'Graph convolutional matrix completion (GC-MC)' uses two multi-connected graph convolutional layers to aggregate user and item feature information, and uses an end-to-end graph autoencoder for modeling. 'Neural graph collaborative filtering (NGCF)' integrates user-item interaction information into the embedding through iterative graph convolution, thereby completing the representation modeling of two-part graph high-order connectivity. 'Revisiting graph based collaborative filtering (LR-GCCF)' and 'Simplifying and powering graph convolution network for recommendation (LightGCN)' use linear embedding or remove feature transformation, nonlinear activation to simplify GCN, achieving advanced performance. As can be seen, how to better model the graph data is one of the key technologies to improve the recommendation performance. However, these methods only model user interest using user interaction records, which means that the model is only constructed and learned on known positive interactions, making the data basis single, interaction implicit bias, and not sufficient to learn balanced and stable user interest.

[0004] Recently, contrastive learning-based methods have become popular in deep representation learning. Without the need for manually labeled class label information, they directly use data itself as supervision information to learn the feature representation of sample data, and have played an important role in many research fields. In the recommendation field, 'Self-supervised graph learning for recommendation (SGL)' generates multiple views of a node to maximize the consistency between different views of the same node. 'Improving graph collaborative filtering with neighborhood-enriched contrastive learning (NCL)' introduces the neighbors of a node from the graph structure and semantic space to construct a node contrastive objective. 'Simple graph contrastive learning for recommendation (SimGCL)' discards the graph enhancement mechanism and adds uniform noise to the embedding space to create contrastive views. However, users have different preferences for the degree of interaction with items, and also have different preferences for item attributes. The existing methods improve the consistency of the same node between different perspectives, lack the constraint of the imbalance of data preferences within the node, and lead to suboptimal recommendation performance.

[0005] Negative sampling-based recommendation techniques extract negative signals from only positive samples to constrain the model to generate reasonable personalized recommendation results. Since the quality of negative samples plays a decisive role in the performance of the recommendation model, in recent years, people have conducted research on negative sampling. Generally, negative sampling uses a uniform distribution to randomly select a portion of items that have not been interacted with by the user as negative samples, considering them as items that are not of interest to the user. In order to improve the quality of negative sampling in GNN, 'Understanding negative sampling in graph representation learning (MCNS)' redesigned the positive and negative sampling distributions according to their structural relevance. 'An improved training method for graph neural network-based recommender systems (MixGCF)' proportionally injected positive information into negative samples, combined the difficult negative samples obtained through over-pooling, and generated false difficult negative samples containing rich information. The success of these methods demonstrates the effectiveness of high-quality negative samples for recommendation models, but existing methods only use generated negative samples for model optimization, while negative samples can also constrain the forward model learning graph from the perspective of graph construction, helping to alleviate the hidden fine-grained bias in interactions.

[0006] In summary, the existing methods based on collaborative filtering, graph learning, contrastive learning and negative sampling of recommendation have the shortcomings of not solving the problem of interaction sparsity and bias in the field of recommendation. The present application starts from this point and proposes a personalized recommendation method based on graph contrastive learning and negative interest propagation. SUMMARY

[0007] In reality, users purchase various different items, which does not mean that they have the same degree of preference. From a rough perspective, the different degrees of user preference for interactive items make it difficult to model user interest. In order to make up for this bias, it is necessary to balance the learning of interest modeling. Similarly, the fact that a user likes a certain item does not mean that he or she likes all the attributes of the item. From a detailed perspective, users show different points of interest for the same item, which is difficult to reveal in non-differential interactions. For example, a user expresses love for a gray and blue striped round-neck sweater, which is expressed as the user's positive interest. If only the user's positive interest is modeled, the model will default that the user likes all the attributes of the item, but in real life, people's preferences for items are obviously not like this. In order to solve this problem, if the user dislikes an item as a constraint, i.e. it is additionally known that the user dislikes a gray and blue non-patterned high-neck sweater as the user's negative interest. By integrating positive and negative interests, it can be analyzed that the user is not sensitive to the interest in the attributes of gray, upper garment and sweater clothing. However, the user's true preference is more likely to be the striped pattern of clothing and dislike high-neck clothing. As can be seen, having both positive and negative interests of the user can help to grasp the interest boundary, so as to better tap the user's true interest.

[0008] Inspired by the user interest modeling jointly constrained by positive and negative interests, the present application discloses a personalized recommendation method based on graph contrastive learning and negative interest propagation, which reduces the popularity bias in user interest interaction and the implicit bias of personal interaction through embedding distribution uniformization and positive and negative interest contrastive learning. The overall framework of the method is as follows Figure 1As shown, the data used all come from commonly used data sets in the academic and industrial communities (review website: Yelp 2018, image recommendation platform: Huaban, movie rating website: Movielens-1M). The method includes four modules, namely, a bias-free interest propagation module, a contrastive graph interest propagation module, a two-level contrastive learning module, and an optimization and recommendation module. Specifically, the bias-free interest propagation module describes the generation and propagation process of stable interest, and increases the uniformity of feature distribution by encoding the collaborative signal on the interaction graph through bias-free interest propagation disturbed by graph convolution, thereby reducing popularity bias. Since negative interest is unobservable in interaction records, the contrastive graph interest propagation module models negative interest from the perspectives of graph construction and features. First, a contrastive graph is generated by negative sampling of user interest, and second, a complementary embedding mechanism is proposed to generate negative interest by embedding complementation and propagate the negative interest on the contrastive graph. After the above network, the positive and negative interests after propagation need to be constrained, and in the two-level contrastive learning module, the method proposes a positive and negative interest contrastive learning strategy, introduces positive and negative interest contrastive personal embedding correction, and alleviates the implicit bias of interaction. In the optimization and recommendation module, the method trains the objective function of the model optimization, and in the test stage, the inner product of the user features and the target item features is calculated, the inner product value is taken as the predicted score between the user and the target item, and finally the item list with the maximum score value is recommended to the user.

[0009] The invention contents of the main modules of the method are as follows:

[0010] 1. Bias-free interest propagation module

[0011] The method regards the interaction data of users and items in the data set as a user-item bipartite graph structure, takes the IDs of users and items as nodes, takes the user historical interaction records as undirected connected edges, and regards the weight of each edge as 1. Randomly initialize each user and item ID as an initial embedding, and use a disturbed linear convolution to propagate the basic node information. As shown in Figure 2 In different layers of graph convolution, a disturbance vector of the same size is added to the user and item embedding. The user-item embedding of the middle layer is extracted as a positive perspective embedding of interest representation. After L (the number of final iterations of bias-free interest propagation graph convolution variable) times of propagation, the embeddings obtained by all convolution layers are aggregated to generate a second positive perspective embedding of interest representation, which is taken as the final embedding of user-item. Through the bias-free interest propagation module, the method uniformizes the embedding distribution of user-item, thereby being able to alleviate the popularity bias to a certain extent.

[0012] 2. Contrastive graph interest propagation module

[0013] In reality, user interests are complex and diverse, i.e., users have different preferences for various attributes of items and different degrees of preference for different interactive items. Traditional methods often ignore the fine-grained bias hidden in these interactions. Therefore, the present method uses user-specific negative interest samples to construct a contrast graph and derives the complementary embedding of the graph nodes to introduce negative interest propagation to correct the positive interest modeling in subsequent contrast learning. The contrast graph interest propagation module includes three parts. First, as shown in Figure 3 , the contrast graph generation mechanism is used to evaluate the similarity between users and items, select P (a variable representing the number of least relevant items for each user) least relevant items for each user and Q (a variable representing the number of least relevant users for each item) least relevant users, and control the size of P or Q to be within 50 to generate reasonable connection edges in the contrast graph. Secondly, the size of the embedding in different dimensions reflects the degree of preference of the node for different attributes to some extent. As shown in Figure 4 , the present method extracts the maximum and minimum values of each dimension in the user and item ID embedding through the complementary embedding generation mechanism, thereby normalizing the original features, and obtains the feature size of each dimension in the opposite direction through embedding complementation, which is used as the generated negative interest. Finally, as shown in Figure 5 , in the negative interest propagation part, the present method performs graph convolution on the generated negative interest on the contrast graph, and after K (a variable representing the final number of iterations of negative interest propagation graph convolution) times of propagation, the final aggregation of the embedding obtained by all convolution layers generates a negative perspective embedding of the interest representation.

[0014] 3. Two-stage contrast learning module

[0015] So far, the present method has generated two positive and one negative perspectives for each user and item. In the two-stage contrast learning module, the present method first contrasts the two positive representations to maximize the consistency of the same nodes and minimize the consistency of different nodes, thereby constraining the stability and balance of positive user interest learning. Secondly, the present method contrasts the positive representation with the negative representation to maximize the consistency of the positive representation of the current node and the negative representation of all nodes in a batch, which balances the learning of positive and negative interests in the same node, uses negative interest to assist positive interest to explore the boundary of user interest, and reduces the fine-grained bias existing in the interaction.

[0016] 4. Optimization and recommendation module

[0017] The method uses a multi-task training strategy to jointly optimize the BPR loss of the classic recommendation task and the loss function of two-level contrastive learning. Three losses are matched with different weights to control the loss ratio. After training, the final user-item representation is matched in the form of inner product to generate the final prediction score, and the top N (recommendation list length variable) items that the user may be interested in are recommended according to the score for recommendation. BRIEF DESCRIPTION OF DRAWINGS

[0018] Figure 1 The personalized recommendation method based on graph contrastive learning and negative interest propagation of the application.

[0019] Figure 2 The schematic diagram of the interest propagation module

[0020] Figure 3 The schematic diagram of the contrastive graph generation mechanism

[0021] Figure 4 The schematic diagram of the complementary embedding generation mechanism

[0022] Figure 5 The schematic diagram of the negative interest propagation DETAILED DESCRIPTION

[0023] The application discloses a personalized recommendation method based on graph contrastive learning and negative interest propagation. The specific implementation steps of the application are as follows:

[0024] Step one: data preprocessing and division of training set and test set

[0025] Firstly, three data sets from real world commonly used in academic and industrial circles are selected: Yelp2018 (a review website), Huaban (a picture recommendation platform), and Movielens-1M (a movie rating website). For each data set, the users and items are arranged in order according to the number starting from 0 as the ID code representing their identity. The user-item pair label with interaction records (browsing, purchasing, collecting, etc.) is established and set to 1, and all interaction data is preprocessed in the format of "user ID item ID label 1". The three data sets have different sizes and densities, which helps to measure the ability to handle different scenarios. On each data set, the commonly used data set division ratio and positive and negative sample ratio of the recommendation algorithm are used, which facilitates comparison with other methods and verifies the effectiveness of the performance. That is, 80% of the historical interactions of each user are randomly selected for training, and the rest are tested, and at least one interaction record is reserved for each user to participate in the test, ensuring the rationality of performance evaluation. The positive and negative sample ratio in the training set is 1:1.

[0026] Step two: model initialization and input

[0027] The present application respectively uses U = {u1, u2, …, u M} and I = {i1, i2, …, i N} to represent the set of users and items, where the number of users variable M = |U|, the number of items variable N = |I|. The binary user-item interaction matrix is defined as Here represents R as an M row by N column real number matrix. Wherein, if the user u has interaction with the item i, each element r ui = 1 in the matrix, otherwise r ui = 0. Read all users and items in the data set and their historical interactions, and convert them into a user-item bipartite graph Where is the node set involving all users and items, and ε = {(u, i) | u ∈ U, i ∈ I, r ui = 1} is the user-item interaction edge set. Because each user and item is associated with a unique ID, the present application initializes the feature vector of each ID by Xavier random, and is represented by represents the initialized ID feature vector of the user u, represents the initialized ID feature vector of the item i, where d is the dimension of the embedding, that is represents and are both d-dimensional real number vectors. Generally speaking, the larger the dimension of the embedding, the more information the feature vector can contain, but it will also reduce the efficiency of the algorithm. Therefore, in order to balance between the two, according to the conventional setting of the recommendation algorithm, the embedding dimension variable d is set to 64, which is the same as other comparative methods.

[0028] Step three: interest propagation without bias:

[0029] In order to deal with the long tail bias, the present application constructs balanced learning by perturbing graph convolution. First, linear convolution is used to propagate basic node information, which is defined as:

[0030]

[0031] Wherein and are the embeddings of the user u and the item i after l layer propagation, l is a positive integer taking value 1 to L, representing the number of layers variable in the interest propagation without bias graph convolution iteration process, that is l = 1, 2, …, L, is the set of items that have interaction with the user u, is the set of users who have interacted with item i. Because too many iterations of graph convolution will cause oversmoothing between nodes, L is tuned in the range of {1, 2, 3, 4}, and the value of L is set to 2 to obtain better recommendation performance through experimental attempts. In addition, balanced learning uses relatively small perturbation to guide the uniformity of embedding distribution, which is defined as:

[0032]

[0033] where and are the perturbation vectors of the l-th layer user u and item i, and δ is a variable that controls the perturbation scale. Here, a larger δ to some extent will make the embedding tend to a more balanced distribution, which helps to eliminate recommendation bias, but too uniform distribution will cause the loss of similarity between nodes and the loss of effective information in the original features, and the difference in the value of δ depends on the characteristics of different data sets, so δ is tuned in the range of {0.05, 0.10, 0.15, 0.20, 0.25, 0.30}. Through experimental attempts, the value of δ is set to 0.15 on the Yelp2018 (review website) dataset, and the value of δ is set to 0.25 on the Huaban (image recommendation platform) dataset and the Movielens-1M (movie rating website) dataset to obtain better recommendation performance. The sign(·) function controls the direction of the perturbation to be the same as the original feature is a variable that controls the uniform distribution of perturbation, where denotes that ξ is a d-dimensional real vector, U(0, 1) denotes that ξ follows a uniform distribution with a value range of (0, 1), and norm(·) denotes the 2-norm function. By combining the above two parts, the final l-th layer user and item embedding and is represented as follows:

[0034]

[0035] In addition, the result embedding is selected from the intermediate layer as a positive perspective of embedding representation, which is represented as follows:

[0036]

[0037] where, and denote the first positive perspective embedding of user u and item i, respectively.

[0038] After L-layer propagation, the weighted sum function is used to aggregate the feature representations of each layer, and the final representation is used as another positive perspective of embedding representation, as follows:

[0039]

[0040] where, and denote the second positive perspective embedding of user u and item i respectively.

[0041] Step four: contrastive interest propagation:

[0042] To alleviate the sparsity and bias problem, the present application constructs a contrastive graph with negative user preference from the perspective of the graph, and generates complementary interest embedding from the perspective of features, and finally promotes the propagation of negative interest on the contrastive graph. First, the present application calculates the similarity between users and items, which is expressed as follows:

[0043]

[0044] where s ui denotes the interest degree of user u to item i, W1 and W2 are two learnable parameter matrices, which initialize the ID feature vector and the ID initialization feature vector from the free latent space to the similarity space, <,> denotes the inner product operation, and σ(·) is a nonlinear activation function, in which the sigmoid function is selected for smoothness and easy derivation. After that, each user obtains the interest score of all items, and each item obtains the correlation score of all users, as follows:

[0045] s u =[s u1 ,s u2 ,…,s uN ], s i =[s 1i ,s 2i ,…,s Mi ] T ,

[0046] where s u and s i are the similarity vectors of user u and item i. The present application uses a sparse matrix to represent the connected edges on the contrastive graph, wherein for each user, the present application selects the last P (the number of variables of the least relevant items of the user) items that are not liked from s u , and selects the last Q (the number of variables of the least relevant users of the item) users that are not relevant to each item in s i . For each node, since P or Q is too large, it will lead to the selection of the user's interested items or the relevant users of the item, therefore, the present application controls the size of P or Q to be less than 50 to generate reasonable connected edges. The related variables are defined as follows:

[0047]

[0048] wherein and are elements in the user-item negative preference matrix and item-user low relation matrix to be learned, here denotes S U is an M by N real matrix, denotes S I is an N by M real matrix. Accordingly, the adjacency matrix A C of the contrast graph is obtained by the present application as follows:

[0049]

[0050] On this basis, the present application proposes a complementary embedding mechanism to generate complementary features with opposite dimensional attributes, as follows:

[0051]

[0052] wherein and are and complementary embeddings of and are d-dimensional all-1 embedding vectors, are the maximum and minimum vectors in all user or item embeddings, and are both d-dimensional real vectors. The complementary embedding mechanism captures the reverse interest embedding of negative interest in a normalized manner. For the contrast graph with a known weight matrix A C , the present application propagates the generated complementary embeddings thereon, and the propagation process is represented in matrix form as follows:

[0053]

[0054] wherein and denote the embedding matrices of all users and items after k times of propagation, here denotes is an M by d real matrix, denotes is an N by d real matrix. k is a positive integer with a value of 1 to K, representing a layer variable in the negative interest propagation graph convolution iteration process, i.e., k = 1, 2, …, K. Similarly, too high a number of negative interest propagation graph convolution iterations will cause over-smoothing between nodes, so K is optimized in the range of {1, 2, 3, 4}, and through experimental attempts, the value of K is set to 2 to obtain better recommendation performance. D is the degree matrix of the adjacency matrix A C . It should be noted that the features of the 0th layer are composed of the generated complementary embeddings, and are represented as follows:

[0055]

[0056] where and denote the complementary embeddings of all users and items. After K-layer propagation, the invention aggregates the negative interest representation of each layer as follows:

[0057]

[0058] where and are the final representations of the negative interest of user u and item i, as a negative perspective embedding of representation.

[0059] Step five: two-level contrastive learning:

[0060] So far, the invention has obtained two positive and one negative representation for each user and item. In order to fully exploit the advantages of contrastive learning, the invention first proposes to contrast and two positive-positive perspective embeddings, which limit the stability and balance of user interest positive learning. The corresponding positive-positive contrastive loss is represented as:

[0061]

[0062] where v, v' are nodes in the sampling batch s(·) is the cosine similarity function, and τ is the temperature hyperparameter, which is optimized in the range of {0.05, 0.10, 0.15, 0.20, 0.25, 0.30}. After experimental attempts, the value of τ is set to 0.20 to obtain better recommendation performance. In addition, the contrastive positive perspective embedding and the negative perspective embedding exploit negative interest to assist positive interest exploration and alleviate fine-grained bias in interactions. The corresponding positive-negative contrastive loss is represented as:

[0063]

[0064] Step six: loss function and optimization method

[0065] The invention aggregates the second positive perspective embeddings of users and items and as the final user embeddings and item embeddings used for interaction prediction. The pair-wise interaction score between user u and item i is calculated using a simple inner product function, which is represented as follows:

[0066]

[0067] wherein denotes the prediction score for evaluating the interaction degree of user u and item i. The present application recommends the top N (recommendation list length variable) items with the highest prediction score for each user.

[0068] The loss function in the present application includes three parts, the first part is used to optimize the recommendation task, and the BPR loss function is selected The score of the item interacted by the user is constrained to be higher than the score of the unobserved item, which is in the form of:

[0069]

[0070] wherein denotes the (user, interacted item, uninteracted item) triplet, r ui and r uj are elements in the binary user-item interaction matrix R, r ui = 1 indicates that user u has interaction with item i, r uj = 0 indicates that user u has no interaction with item j, and σ(·) is the sigmoid activation function. The second and third parts of the loss function are used to optimize the contrastive learning task, which has been described in detail in step five. Finally, the multi-task joint learning method is adopted, and the two-level contrastive learning is used as an auxiliary task to integrate the final loss function so as to promote the interaction prediction, which is represented as:

[0071]

[0072] wherein λ1, λ2, λ3 are hyperparameters for controlling the contrastive loss and the regularization term, and the difference in the numerical value of λ1, λ2, λ3 depends on the characteristics of different data sets. λ1, λ2 are optimized in the range of {0.05, 0.10, 0.15, 0.20, 0.25, 0.30}, and λ3 is optimized in the range of {10 -3 ,10 -4 ,10 -5}. After experimental attempts, the present application sets the values of λ1, λ2, λ3 as {0.20, 0.18, 10 -4} on the Yelp2018 (review website) data set and the Huaban (image recommendation platform) data set, and sets the values of λ1, λ2, λ3 as {0.10, 0.17, 10 -4} on the Movielens-1M (movie rating website) data set to obtain better recommendation performance. θ = {E (0){W1, W2} represents the trainable parameter set of the method, where E (0) represents the initialized ID feature vector set of all nodes.

[0073] Step seven: verify the effectiveness of the method:

[0074] To quantitatively evaluate the effectiveness of the method, after the model training is completed, different platform public data sets are selected: Yelp2018 (review website), Huaban (image recommendation platform), Movielens-1M (movie rating website) for verification. The full ranking strategy is adopted, and after obtaining the predicted score of the target user for all items , for each user, the top N corresponding items with the highest predicted score are selected to form a Top-N personalized recommendation list. In general, the value of N can be selected as a positive integer within 100, and the specific value depends on the requirements of the recommendation task. Here, the value of N is set to 20 for easy comparison with other methods, thereby verifying the effectiveness of the method in improving recommendation performance. The verification part of the method uses four commonly used evaluation indicators, including Precision@N (correctness relative to the Top-N list), Recall@N (correctness relative to all positive samples), NDCG@N (focus on the position of positive samples appearing in the Top-N recommendation list), and Hit Rate@N (test the probability of any positive sample being hit in the Top-N list), and reports the average indicators of all users.

Claims

1. An individualized recommendation method based on graph contrastive learning and negative interest propagation, characterized in that it comprises the following steps: S1, data preprocessing: selecting a data set, obtaining ID codes representing the identities of users and items; establishing user-item pair labels with interaction records; dividing the training set and test set in the data set with a positive sample ratio of 4:1; generating a training set with a positive and negative sample ratio of 1:1; S2, model initialization and input: defining the set representation of users and items, reading all users and items and their historical interaction records in the data set, and converting them into node and edge information in the user-item bipartite graph, and randomly initializing the feature vector of each node ID as the model input; S3, unbiased interest propagation: using linear convolution to propagate basic node information, and using relatively small perturbations to guide the uniformity of embedding distribution to promote balanced learning; extracting the user-item embedding of the middle layer as the first positive perspective embedding of interest representation, aggregating all the embeddings obtained by the convolution layer to generate the second positive perspective embedding of interest representation and the final embedding representation for interaction prediction; S4, contrastive graph interest propagation: first, by evaluating the similarity of user-item, selecting a set of uninterested items for each user and a set of unrelated users for each item to connect the user-item connection edge in the contrastive graph; second, normalize the original features of users and items, and generate negative interest through embedding complement; finally, perform graph convolution on the generated negative interest on the contrastive graph, and finally aggregate all the embeddings obtained by the convolution layer to generate the negative perspective embedding of interest representation; S5, two-level contrastive learning: first, contrast the two positive perspective embeddings to maximize the consistency of the same nodes and minimize the consistency of different nodes; second, contrast the positive and negative perspective embeddings to maximize the consistency of the positive representation of the current node and the negative representation of all nodes in a batch; S6, loss function and optimization method: the loss function consists of three parts, including the BPR loss used for recommendation prediction and the two loss functions of two-level contrastive learning; the three losses are controlled by different weights to control the loss proportion, and a multi-task training strategy is used for joint optimization; S7, generating a recommendation list: according to the generated prediction score, recommend the top N items with the highest prediction score for each user, i.e. the recommendation list length variable, to generate an individualized recommendation list for each user. For each data set, the users and items are arranged in order with the starting number 0 as the ID code representing their identity; the user-item pair labels with interaction records are established in the form of implicit feedback and set to 1, and all interaction data are preprocessed in the format of "user ID item ID label 1"; the training set and test set in the data set are divided with a positive sample ratio of 4:1, and at least one interaction record is reserved for each user to participate in testing; the training set is generated with a positive and negative sample ratio of 1:

1.

2. The personalized recommendation method based on graph contrastive learning and negative interest propagation according to claim 1, characterized in that: Balanced learning is constructed by perturbation graph convolution, first, linear convolution is used to propagate basic node information, which is defined as:

3. The personalized recommendation method based on graph contrastive learning and negative interest propagation according to claim 1, characterized in that: Use U={u1,u2,…,u M } and I={i1,i2,…,i N Let} represent the set of users and items, where the number of users is M = |U| and the number of items is N = |I|; define the binary user-item interaction matrix as follows: here Let R be an M x N real number matrix; where, if user u interacts with item i, each element r ui =1, otherwise r ui =0; Read all users and items in the dataset, along with their historical interactions, and convert them into a user-item bipartite graph. in It is a set of nodes involving all users and items, ε={(u,i)|u∈U,i∈I,r ui =1} is the user-item interaction edge set; the feature vector of each ID is randomly initialized and then... This represents the initial ID feature vector of user u. Let represent the initial ID feature vector of item i, where d is the dimension of the embedding, i.e. express and All are d-dimensional real vectors; following the standard settings of recommendation algorithms, the embedding dimension variable d is set to 64 dimensions, the same as other comparison methods.

4. The personalized recommendation method based on graph contrastive learning and negative interest propagation according to claim 1, characterized in that: In addition, the result embedding is selected from the middle layer as a positive perspective of embedding representation, which is represented as follows: wherein and are the embeddings of user u and item i after l-th layer propagation, l is a positive integer with value from 1 to L, representing the layer number variable in the process of interest propagation graph convolution iteration, i.e. l = 1, 2, …, L, is the set of items that have interactions with user u, is the set of users that have interactions with item i; the balanced learning adopts relatively small perturbation to guide the uniformity of embedding distribution, which is defined as: where and is the perturbation vector of the l-th layer user u and item i, and δ is a variable that controls the scale of the perturbation; through experimental trials, the value of δ is set to 0.15 on the Yelp 2018 review website dataset, and the value of δ is set to 0.25 on the Huaban picture recommendation platform dataset and the Movielens-1M movie rating website dataset; the difference in the value of δ depends on the characteristics of different datasets, and for other datasets, δ can be selected in the range of {0.05, 0.10, 0.15, 0.20, 0.25, 0.30} by tuning; the sign(·) function controls the direction of the perturbation and the original feature is the same, is a variable that controls the uniform distribution of the perturbation, where represents that ξ is a d-dimensional real vector, U(0, 1) represents that ξ is uniformly distributed with a value range of (0, 1), and norm(·) represents a 2-norm function; by combining the above two parts, the final l-th layer user and item embedding is obtained and which is represented as follows: ​ wherein, and respectively denote the first positive perspective embedding of user u and item i; After propagation through L layers, the features of each layer are aggregated using a weighted sum function, and the final representation is used as another positive perspective of the embedding representation, as follows: where, and respectively denote the second positive perspective embedding of user u and item i.

5. The personalized recommendation method based on graph contrastive learning and negative interest propagation according to claim 1, characterized in that: From the perspective of the graph, a contrast graph with negative user preferences is constructed, and complementary interest embeddings are generated from the perspective of features, which ultimately facilitate the propagation of negative interests on the contrast graph; First, the similarity between users and items is calculated, as follows: where s ui represents the interest degree of user u to item i, W1 and W2 are two learnable parameter matrices, which initialize the ID feature vector of user u and the ID feature vector of item i from the free latent space to the similar space, <,> represents the inner product operation, and σ(·) is a nonlinear activation function, where the sigmoid function is selected for its smoothness and ease of derivation; after that, each user obtains the interest score of all items, and each item obtains the relevance score of all users, as follows: s u = [s u1 ,s u2 ,…,s uN ], s i = [s 1i ,s 2i ,…,s Mi ] T , where s u and s i are the similarity vectors for user u and item i; A sparse matrix is used to represent the connecting edges on the contrast graph, where for each user, from s u the last P users, the number of items that are least relevant to the user is selected, and for each item in s i the last Q items, the number of users that are least relevant to the item is selected. For each node, since P or Q is too large, it will lead to the selection of user interested items or item related users, therefore, control the size of P or Q to be less than 50 to generate reasonable connection edges; Related variables are defined as follows: where and are the elements of the user-item negative preference matrix and the item-user low relation matrix to be learned, respectively, where denotes the S U is a real matrix of M rows and N columns, denotes the S I is a real matrix of N rows and M columns; from this, the adjacency matrix A of the contrast graph is obtained C is: A complementary embedding mechanism is proposed to generate complementary features with opposite dimensional attributes, as follows: where and are and complementary embeddings of the negative interest of user u and item i, is a d-dimensional all-1 embedding vector, is the maximum, minimum vector in all user or item embeddings, and both are d-dimensional real vectors; the complementary embedding mechanism captures the reverse interest embedding of negative interest in a normalized way; for the known weight matrix A C The contrastive graph on which the complementary embedding generated by the propagation is generated, and the propagation process is represented in the form of a matrix as follows: wherein and denote the embedding matrix of all users and items after k propagation, where denote is a real matrix of M rows and d columns, denote is a real matrix of N rows and d columns, k is a positive integer taking values from 1 to K, denoting the layer number variable in the negative interest propagation graph convolution iteration process, i.e. k = 1, 2, …, K, D is the degree matrix of the adjacency matrix A C ; it should be noted that the features of layer 0 are composed of the generated complementary embeddings, which are denoted as follows: where and respectively denote the complementary embeddings of all users and items; after K layers of propagation, the negative interest representation of each layer is aggregated as follows: where and are the final representations of the negative interest of user u and item i, as a negative perspective embedding of the representation.

6. The personalized recommendation method based on graph contrastive learning and negative interest propagation according to claim 1, characterized in that: Contrast and Two positive perspective embeddings, limiting the stability and balance of user interest positive learning; Corresponding positive-positive contrast loss is represented as: where v, v ′ are the nodes in the sampled batch s(·) is the cosine similarity function, τ is a temperature hyperparameter with a value of 0.20, and the positive perspective embedding and the negative perspective embedding explores and mitigates the fine-grained bias in the interaction using negative interest to assist positive interest; the corresponding positive-negative contrastive loss is represented as:

7. The personalized recommendation method based on graph contrastive learning and negative interest propagation according to claim 1, characterized in that: Embedding a second positive perspective of the aggregated users and items and User embeddings as final input for interaction prediction and item embeddings Compute the pairwise interaction prediction score between user u and item i with the inner product function which is expressed as follows: wherein represents a prediction score for evaluating the interaction degree of the user u with the item i; the top N recommended list length variable items with the highest prediction scores are recommended to each user; The loss function is composed of three parts, the first part is used for optimizing the recommendation task, and the BPR loss function is selected The form is: wherein denotes a (user, item, non-item) triplet, r ui and r uj are elements in the binary user-item interaction matrix R, r ui = 1 indicates that user u has interacted with item i, r uj = 0 indicates that user u has not interacted with item j, σ(·) is a sigmoid activation function; the second and third parts of the loss function are used to optimize the contrastive learning task, which has been described in detail in step five; finally, a multi-task joint learning method is adopted, with two-level contrastive learning as an auxiliary task, to integrate the final loss function so as to facilitate interaction prediction, which is represented as: where λ1, λ2, λ3are hyperparameters that control the contrastive loss and the regularization term; the values of λ1, λ2, λ3are set to {0.20, 0.18, 10 -4} on Yelp2018 review website dataset and Huaban image recommendation platform dataset, and set to {0.10, 0.17, 10 -4} on Movielens-1M movie rating website dataset to obtain better recommendation performance; the difference in the values of λ1, λ2, λ3depends on the characteristics of different datasets, and for other datasets, λ1, λ2are tuned in the range of {0.05, 0.10, 0.15, 0.20, 0.25, 0.30}, and λ3is tuned in the range of {10 -3 , 10 -4 , 10 -5}, that is, a selection can be made; θ = {E (0) , W1, W2} represents a set of trainable parameters, where E (0) represents a set of initialized ID feature vectors of all nodes.