Recommendation method for graph contrast learning based on two denoising modules
By using the graph comparison learning method of two denoising modules in the recommended model, combining the LightGCN model and the comparison learning task, the problem of noise interaction data and data sparsity is solved, and the high accuracy and robustness of the recommended model are achieved.
Patent Information
- Application Number
- CN202411452585.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing recommended model based on graph neural networks is degraded when dealing with noise interactive data and data sparsity problems, making it difficult to achieve high accuracy and robustness.
Using the graph comparison learning method based on two denoising modules, different views are generated through the first denoising module and the second denoising module, combining the LightGCN model and the contrast learning task, the main recommended task and the graph comparison learning task are optimized to achieve joint train.
It effectively alleviates noise problems and data sparseness problems, improves the accuracy and robustness of the recommended model, and improves the performance of the model when processing noise interactive data and sparse data.
Smart Images

Figure CN119441593A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of recommendation methods, and in particular relates to a recommendation method based on graph contrast learning of two denoising modules. Background Art
[0002] With the rapid development and popularization of Internet technology, information overload has become an increasingly severe challenge in the daily life of individuals in modern society. In order to effectively deal with this problem, the recommendation system has emerged as an innovative and efficient solution. It not only greatly simplifies the process of users filtering and locating the required content in massive information, but also opens up new growth points for service providers, promoting the surge in traffic and significant increase in revenue. With its personalized and intelligent characteristics, the recommendation system has been widely embedded and has profoundly influenced many application fields, including but not limited to product recommendations on e-commerce platforms, content push on social media websites, customized information services on news portals, and book and resource guidance in digital libraries. In these scenarios, the recommendation system accurately tailors personalized recommendation lists for users by analyzing multi-dimensional information such as users' historical behaviors, preferences, interests, and contextual environments, thereby achieving efficient matching and delivery of information and enhancing user experience satisfaction and loyalty.
[0003] Driven by the remarkable achievements of deep learning in computer vision and language understanding, the research trend of recommendation systems has clearly shifted to exploring and inventing new recommendation models based on neural networks. In recent years, the industry has witnessed a major leap forward in the development of neural recommendation models, which have not only been widely promoted but also surpassed traditional recommendation models in performance due to the powerful representation learning capabilities demonstrated by their neural networks. Integrating graph neural networks (GNNs) with traditional collaborative filtering techniques has proven to be beneficial in recommendation systems. Representing users and items as nodes in a graph with interactions as edges enables GNNs to provide more accurate personalized recommendations by discovering and leveraging complex connections that would otherwise be undetectable.
[0004] Although the recommendation model based on graph neural network has achieved excellent results in the field of personalized recommendation, and has realized more accurate and personalized recommendations by capturing the graph structure information of user behavior data, there are still some problems that need to be solved. These problems mainly include the following aspects: (1) Noise problem: The noise problem refers to the fact that the collected interaction data between users and products is mixed with a large amount of inaccurate, misleading or random information, which is collectively referred to as noise data. The paradigm of neighborhood node aggregation aims to enrich the representation of users or products by aggregating their neighbor information. However, if the neighbor information contains a lot of noise, the aggregation process will also include this noise, thereby amplifying the impact of the noise on the final learned representation and causing the model performance to deteriorate. (2) Data sparsity problem: Data sparsity refers to the fact that the interaction data between users and products is very limited relative to the entire user-product space, resulting in a lack of direct interaction records between most user-product pairs. This sparsity not only limits the amount of information that the model can directly use, but also increases the difficulty of accurately inferring user preferences and product features from a small amount of data. Most collaborative filtering models based on graph neural networks (GNNs) follow the paradigm of supervised learning when they are built, which requires the model to rely on labeled data of sufficient quality for model training during the training process. However, many practical recommendation scenarios face the problem of data sparsity when learning high-quality user and item representations from limited interaction data. Summary of the invention
[0005] The purpose of the present invention is to solve the above problems and propose a recommendation method based on graph contrast learning with two denoising modules. This method uses two different denoising modules to generate different views for graph contrast learning, which effectively alleviates the noise problem and data sparsity problem, thereby improving the accuracy and robustness of the recommendation model.
[0006] In order to achieve the above-mentioned purpose, the present invention adopts the following technical solutions:
[0007] A proposed method for graph contrast learning based on two denoising modules includes the following steps:
[0008] S1, based on the user-item bipartite graph, using the first denoising module and the second denoising module to generate a new first view and a new second view;
[0009] S2. Use the LightGCN model to train the original view, the first view, and the second view respectively;
[0010] S3, use the BPR loss function to optimize the main recommendation task and the InfoNCE loss function to optimize the graph comparison learning task, and perform joint training to optimize the overall loss;
[0011] S4. Build a prediction layer to obtain the prediction result through the inner product of the final embedding representation of the learned user and product
[0012] Further, as a preferred technical solution of the present invention, step S1 includes the following steps:
[0013] S101, based on the user-product bipartite graph, a new first view is generated using the first denoising module: noise interaction is eliminated according to the structural similarity between the user and the product; first, the one-hop neighbors of the nodes are extracted as structural features based on the user-product bipartite graph, and embedded into a d-dimensional hidden space:
[0014]
[0015] Among them, A0∈A0 |U|×|V| The user-product interaction data, is the user's feature matrix, is the feature matrix of the product;
[0016] Then use cosine similarity to measure similarity:
[0017]
[0018] in, They are The uth row and The vth row of ; Since formula (2) may be negative, normalization is used as the correlation of the interaction:
[0019]
[0020] Finally, the noise edges are deleted according to the correlation threshold β, that is, the interaction edges with low correlation will be deleted:
[0021]
[0022] Among them, Π(·) is a judgment function, if the condition is true, it returns 1, then The value of is r u,v ; Otherwise, it is 0, that is, the edge is deleted directly; the value of formula (4) The edge weights of the interaction graph are written into the adjacency matrix A1. At this time, the graph G1 is the graph corresponding to the adjacency matrix A1, that is, the new first view generated by the first denoising module;
[0023] S102. Generate a new second view using a second denoising module based on the user-product bipartite graph: use a graph neural network including a denoising layer to learn parameters To determine whether to delete the noise edge; first, use an adjacency matrix with only 0 and 1 for each layer to indicate whether there is an edge between two nodes. If it is noise, the value is 0, that is, B l ∈(0, 1) |V|×|V| ;
[0024] Then learn the parameters To determine whether to delete the noise edge, that is, to calculate the user node u and the product node v in is given by θ l Parameterized MLP;
[0025] Finally, the optimization loss of the graph neural network with denoising layer is expressed as:
[0026]
[0027] in, yes The cumulative distribution function (CDF) of The value range of It is determined by the parameters The random variables extracted from the binary specific distribution of the determined location; the original user-product interaction matrix and the adjacency matrix B after the second denoising module l Perform dot product, that is, A2 = A·B l ; At this time, the new view G2 is the graph corresponding to the adjacency matrix A2, that is, the new second view generated by the second denoising module.
[0028] Further as a preferred technical solution of the present invention, step S2 comprises the following steps:
[0029] S201: Encode the original user-item bipartite graph, the first view, and the second view respectively to obtain their user embeddings and product embedding
[0030] S202, use LightGCN to perform graph convolution operations on the original user-item bipartite graph, the first view, and the second view respectively:
[0031]
[0032] in, For symmetric normalization, |N u | represents the number of products interacted with user u, |N v | represents the number of users interacting with product v;
[0033] S203, respectively add the embeddings of each layer of the original user-item bipartite graph, the first view and the second view, andi The final embedding and product v j The final embedding of performs inner product operation:
[0034]
[0035] Among them, α l represents the importance of the layer embedding in the total embedding and is a manually tuned hyperparameter set to Represents user u i And the product v j Prediction preference between .
[0036] Further as a preferred technical solution of the present invention, step S3 comprises the following steps:
[0037] S301. Use the Bayesian personalized ranking BPR loss function to optimize the main recommendation task of the original user-item bipartite graph; select negative samples from unobserved user-item interactions to construct paired training data, and use the BPR loss for optimization:
[0038]
[0039] Among them, σ(·) is the sigmoid activation function, is the preference score of user u for the interacted item i, is the preference score of user u for item j that has not been interacted with;
[0040] S302, using the information noise contrast estimation InfoNCE loss function to optimize the new first view and second view graph contrast learning task; by maximizing the similarity between the representations of different views of the same node and minimizing the similarity between the representations of different nodes, the representation learning ability of the model is enhanced:
[0041]
[0042] in, is the representation of the same node in two different views, which is regarded as a positive sample in contrastive learning; is the view representation of any different node, which is regarded as a negative sample in contrastive learning; s(·) is the cosine similarity function; τ is a hyperparameter representing the temperature coefficient; similarly, the contrast loss function on the product side can be obtained The final contrast loss function is
[0043] S303: Use the joint training strategy to jointly train the main recommendation task and the image comparison learning task:
[0044]
[0045] Among them, Θ represents the main task are the model parameters in ; λ1 and λ2 are hyperparameters that control the strength of CL and L2 regularization, respectively.
[0046] Further, as a preferred technical solution of the present invention, step S4 is to construct a prediction layer, and obtain the prediction result through the inner product of the final embedded representation of the learned user and product; according to the inner product Items are sorted by the size of the value. Items with larger values are considered to be more interesting to users, and the top-ranked items are recommended to users.
[0047] The recommendation method based on graph contrast learning with two denoising modules described in the present invention adopts the above technical solution and has the following technical effects compared with the prior art:
[0048] (1) The present invention uses a denoising module based on a cosine similarity function to perform denoising according to the calculated correlation value, thereby effectively alleviating the noise interaction problem.
[0049] (2) The present invention uses a GCN-based denoising module to learn denoising parameters, which not only effectively alleviates the noise problem but also increases the versatility of the model.
[0050] (3) The present invention uses a self-supervised learning task based on contrastive learning, which alleviates the problem of data sparsity to a certain extent.
[0051] (4) The present invention uses the main recommendation task and the self-supervised task of contrastive learning for joint training, which increases the accuracy and robustness of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 The figure is a flowchart of the steps of an embodiment of the present invention.
[0053] Figure 2 This is a framework diagram of the model recommended by the present invention. DETAILED DESCRIPTION
[0054] The present invention is further explained below in detail with reference to the accompanying drawings so that those skilled in the art can more deeply understand the present invention and be able to implement it. However, the following reference examples are only used to explain the present invention and are not intended to limit the present invention.
[0055] like Figure 1 and Figure 2 As shown, a recommendation method for graph contrast learning based on two denoising modules includes the following steps:
[0056] S1: Based on the user-item bipartite graph, denoising module 1 and denoising module 2 are used to generate new views Figure 1 With Vision Figure 2 ;
[0057] S2: Use the LightGCN model to train the original view and the new view separately Figure 1 and Xinshi Figure 2 ;
[0058] S3: Use the BPR loss function to optimize the main recommendation task and the InfoNCE loss function to optimize the graph comparison learning task, and perform joint training to optimize the overall loss;
[0059] S4: Build a prediction layer to obtain the prediction result through the inner product of the learned final embedding representation of users and items.
[0060] Step S1 includes the following steps:
[0061] S101: Generate new views based on the user-item bipartite graph using denoising module 1 Figure 1 : Eliminate noise interactions based on the structural similarity between users and products. First, extract the one-hop neighbors of the nodes as structural features based on the user-product bipartite graph and embed them into the d-dimensional hidden space:
[0062]
[0063] Among them, A0∈A0 |U|×|V| The user-product interaction data, is the user's feature matrix, is the feature matrix of the product.
[0064] Then use cosine similarity to measure similarity:
[0065]
[0066] in, They are The uth row and The vth row of . Since Formula 2 may be negative, normalization is used as the correlation of the interaction:
[0067]
[0068] Finally, the noise edges are deleted according to the correlation threshold β (that is, the interaction edges with low correlation will be deleted):
[0069]
[0070] Among them, Π(·) is a judgment function, if the condition is true, it returns 1, then The value of is r u,v Otherwise, it is 0, that is, the edge is deleted directly. As the edge weights of the interaction graph, the graph G1 is written into the adjacency matrix A1. At this time, the graph G1 is the graph corresponding to the adjacency matrix A1, that is, the new view generated by the denoising module 1. Figure 1 ;
[0071] S102: Generate a new view based on the user-product bipartite graph using denoising module 2 Figure 2 : Learning parameters using a graph neural network with a denoising layer To determine whether to delete the noise edge. First, use an adjacency matrix with only 0 and 1 in each layer to indicate whether there is an edge between two nodes (if it is noise, the value is 0), that is, B l ∈(0, 1) |V|×|V| .
[0072] Then learn the parameters To determine whether to delete the noise edge, that is, to calculate the user node u and the product node v in is given by θ l Parameterized MLP.
[0073] Finally, the optimization loss of the graph neural network with denoising layer can be expressed as:
[0074]
[0075] in, yes The cumulative distribution function (CDF) of . σ(·) is a function that expands The value range of It is determined by the parameters The random variable extracted from the binary specific distribution of the determined location. The original user-product interaction matrix is compared with the adjacency matrix B after the denoising module 2. l Perform dot product, that is, A2 = A·B l At this time, the new view G2 is the graph corresponding to the adjacency matrix A2, that is, the new view generated by the denoising module 2. Figure 2 .
[0076] Step S2 includes the following steps:
[0077] S201: respectively divide the original user-item bipartite graph and the new view Figure 1 and Xinshi Figure 2 Encode and get their user embeddings and product embedding
[0078] S202: respectively analyze the original user-item bipartite graph and the new view Figure 1 and Xinshi Figure 2 Use LightGCN for graph convolution operations:
[0079]
[0080] in, For symmetric normalization, |N u | represents the number of products interacted with user u, |N v | represents the number of users interacting with product v;
[0081] S203: respectively perform the original user-item bipartite graph and the new view Figure 1 and Xinshi Figure 2 The embeddings of each layer are summed and passed to user u i The final embedding and product v j The final embedding of performs inner product operation:
[0082]
[0083] Among them, α l represents the importance of the layer embedding in the total embedding and is a manually tuned hyperparameter set to Represents user u i And the product v j Prediction preference between .
[0084] Step S3 includes the following steps:
[0085] S301: Use the Bayesian Personalized Ranking (BPR) loss function to optimize the main recommendation task of the original user-item bipartite graph. Negative samples are selected from unobserved user-item interactions to construct paired training data, and the BPR loss is used for optimization:
[0086]
[0087] Among them, σ(·) is the sigmoid activation function, is the preference score of user u for the interacted item i, is the preference score of user u for item j that has not been interacted with.
[0088] S302: Optimizing the new view using the information noise contrast estimation (InfoNCE) loss function Figure 1 and Xinshi Figure 2 The graph comparison learning task of maximizing the similarity between the representations of different views of the same node and minimizing the similarity between the representations of different nodes can enhance the representation learning ability of the model.
[0089]
[0090] in, is the representation of the same node in two different views, which is regarded as a positive sample in contrastive learning; is the view representation of any different node, which is regarded as a negative sample in contrastive learning; s(·) is the cosine similarity function; τ is a hyperparameter representing the temperature coefficient. Similarly, the contrast loss function on the product side can be obtained The final contrast loss function is
[0091] S303: Use the joint training strategy to jointly train the main recommendation task and the image comparison learning task:
[0092]
[0093] Among them, Θ represents the main task are the model parameters in ; λ1 and λ2 are hyperparameters that control the strength of CL and L2 regularization, respectively.
[0094] In step S4, a prediction layer is constructed to obtain the prediction result through the inner product of the final embedded representation of the learned user and product. Items are sorted by the size of the value. Items with larger values are considered to be more interesting to users, and the top-ranked items are recommended to users.
[0095] The present invention proposes a recommendation method based on graph contrast learning with two denoising modules, which can effectively alleviate the noise problem and data sparsity problem, and improve the recommendation accuracy and robustness of the model.
[0096] The specific implementation scheme described above further describes in detail the purpose, technical scheme and beneficial effects of the present invention. It should be understood that the above is only a specific implementation scheme of the present invention and is not intended to limit the scope of the present invention. Any equivalent changes and modifications made by any technician in the field without departing from the concept and principle of the present invention should fall within the scope of protection of the present invention.
Claims
1. A recommendation method based on graph contrast learning with two denoising modules, characterized in that: The following steps are involved: S1, based on the user-item bipartite graph, using the first denoising module and the second denoising module to generate a new first view and a new second view; S2. Use the LightGCN model to train the original view, the first view, and the second view respectively; S3, use the BPR loss function to optimize the main recommendation task and the InfoNCE loss function to optimize the graph comparison learning task, and perform joint training to optimize the overall loss; S4. Build a prediction layer to obtain the prediction result through the inner product of the learned final embedding representation of users and products.
2. The recommendation method based on graph contrast learning with two denoising modules according to claim 1, characterized in that: The step S1 comprises the following steps: S101, using the first denoising module to generate a new first view based on the user-product bipartite graph: eliminating noise interactions based on the structural similarity between users and products; firstly extracting the one-hop neighbors of the nodes as structural features based on the user-product bipartite graph, and embedding them into a d-dimensional hidden space: Among them, A0∈A0 |U|×|V| The user-product interaction data, is the user's feature matrix, is the feature matrix of the product; Then use cosine similarity to measure similarity: in, They are The uth row and The vth row of ; Since formula (2) may be negative, normalization is used as the correlation of the interaction: Finally, the noise edges are deleted according to the correlation threshold β, that is, the interaction edges with low correlation will be deleted: Among them, Π(·) is a judgment function, if the condition is true, it returns 1, then The value of is r u,v ; Otherwise, it is 0, that is, the edge is deleted directly; the value of formula (4) The edge weights of the interaction graph are written into the adjacency matrix A1. At this time, the graph G1 is the graph corresponding to the adjacency matrix A1, that is, the new first view generated by the first denoising module; S102. Generate a new second view using a second denoising module based on the user-product bipartite graph: use a graph neural network including a denoising layer to learn parameters To determine whether to delete the noise edge; first, use an adjacency matrix with only 0 and 1 for each layer to indicate whether there is an edge between two nodes. If it is noise, the value is 0, that is, B l ∈(0, 1) |V|×|V| ; Then learn the parameters To determine whether to delete the noise edge, that is, to calculate the user node u and the product node v in is given by θ l Parameterized MLP; Finally, the optimization loss of the graph neural network with denoising layer is expressed as: in, yes The cumulative distribution function (CDF) of The value range of It is determined by the parameters The random variables extracted from the binary specific distribution of the determined location; the original user-product interaction matrix and the adjacency matrix B after the second denoising module l Perform dot product, that is, A2 = A·B l ; At this time, the new view G2 is the graph corresponding to the adjacency matrix A2, that is, the new second view generated by the second denoising module.
3. The recommendation method based on graph contrast learning with two denoising modules according to claim 2, characterized in that: The step S2 comprises the following steps: S201: Encode the original user-item bipartite graph, the first view, and the second view respectively to obtain their user embeddings and product embedding S202, use LightGCN to perform graph convolution operations on the original user-item bipartite graph, the first view, and the second view respectively: in, For symmetric normalization, |N u | represents the number of products interacted with user u, |N v | represents the number of users interacting with product v; S203, respectively add the embeddings of each layer of the original user-item bipartite graph, the first view and the second view, and i The final embedding and product v j The final embedding of performs inner product operation: Among them, α l represents the importance of the l-th layer embedding in the total embedding and is a manually adjusted hyperparameter, which is set to Represents user u i And the product v j Prediction preference between .
4. The recommendation method based on graph contrast learning with two denoising modules according to claim 3, characterized in that: The step S3 comprises the following steps: S301. Use the Bayesian personalized ranking BPR loss function to optimize the main recommendation task of the original user-item bipartite graph; select negative samples from unobserved user-item interactions to construct paired training data, and use the BPR loss for optimization: Among them, σ(·) is the sigmoid activation function, is the preference score of user u for the interacted item i, is the preference score of user u for item j that has not been interacted with; S302, using the information noise contrast estimation InfoNCE loss function to optimize the new first view and second view graph contrast learning task; by maximizing the similarity between the representations of different views of the same node and minimizing the similarity between the representations of different nodes, the representation learning ability of the model is enhanced: in, is the representation of the same node in two different views, which is regarded as a positive sample in contrastive learning; is the view representation of any different node, which is regarded as a negative sample in contrastive learning; s(·) is the cosine similarity function; τ is a hyperparameter representing the temperature coefficient; similarly, the contrast loss function on the product side can be obtained The final contrast loss function is S303: Use the joint training strategy to jointly train the main recommendation task and the image comparison learning task: Among them, Θ represents the main task are the model parameters in ; λ1 and λ2 are hyperparameters that control the strength of CL and L2 regularization, respectively.
5. The recommendation method based on graph contrast learning with two denoising modules according to claim 4, characterized in that: The step S4 is to construct a prediction layer, and obtain the prediction result through the inner product of the final embedded representation of the learned user and product; Items are sorted by the size of the value. Items with larger values are considered to be more interesting to users, and the top-ranked items are recommended to users.