A graph comparison learning recommendation method based on temporary fallback and denoising techniques
By using temporary retreat method and denoising technology in the graph neural network recommendation system, and optimizing model parameters by comparing and learning, the long tail and noise problems are solved, and the accuracy and robustness of the recommendation system are improved. In particular, the It is a recommendation effect for unpopular projects.
Patent Information
- Application Number
- CN202410582454.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-11
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-05-11
AI Technical Summary
The recommendation system based on graph neural networks has long tail problems and noise problems. Users prefer popular projects and ignore unpopular projects, and the noise interaction data affects the learning results.
A new graph view is generated by using temporary retreat method and denoising technology. By comparing and learning, maximizing the prediction consistency of positive pairs and minimizing the prediction consistency of negative pairs, the model parameters are optimized in combination with multi-layer GCN and BPR loss functions.
It effectively alleviates the long tail problem and noise problem, improves the accuracy and robustness of the recommendation system, and improves the discovery ability of unpopular projects and the overall performance of the model.
Smart Images

Figure CN118505343B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of recommendation methods, and in particular relates to a graph comparison learning recommendation method based on a temporary retreat method and a denoising technology. Background Art
[0002] With the rapid development of the Internet and digital technology, the explosive growth of information has become a prominent feature of today's society. In this era of information overload, users are faced with huge information overload and choice dilemma. In this case, the recommendation system has become one of the effective ways to solve the problem of information overload. Users rely on recommendation systems to alleviate the problem of information overload and explore the content they are interested in from a large number of items (such as products, movies, news, or restaurants). Therefore, accurately modeling users' preferences from their historical interactions (such as clicks, views, readings, and purchases) is the core of the recommendation system.
[0003] Recently, graph neural networks (GNNs) have emerged as an effective collaborative filtering (CF) method in recommender systems. The key idea of GNN-based recommender systems is to rely on sufficient high-quality training data to recursively perform message passing along user-item interaction edges to refine the encoded embedding. GNN-based recommender systems can be roughly divided into four categories: user-item bipartite graph, sequential recommendation, social recommendation, and knowledge graph-based recommendation. The advantage of GNN is that it provides powerful and systematic tools to explore multi-hop relationships, which has been proven to be beneficial for recommender systems. With these advantages, GNNs have achieved remarkable achievements in recommender systems in the past few years. In academic research, a large number of works have shown that GNN-based models outperform previous methods on public benchmark datasets and obtain more accurate recommendation results. At the same time, many of their variants have been proposed and applied to various recommendation tasks, such as session-based recommendation, point of interest recommendation, group recommendation, multimedia recommendation, and bundle recommendation.
[0004] Although GNN-based recommendation systems have achieved relatively excellent results, there are still some problems that need to be solved, such as (1) the long-tail problem and (2) the noise problem. (1) The long-tail problem refers to the phenomenon that users tend to choose popular items and ignore a large number of long-tail items (i.e., unpopular items). Specifically, the long-tail problem is manifested as a small number of popular items (usually bestsellers, popular movies, pop music, etc.) attracting the attention of most users, while a large number of other items are relatively rarely discovered and consumed by users. This long-tail distribution phenomenon is common on many online platforms and e-commerce websites, such as Taobao, Douban, and Amazon. (2) The noise problem refers to the fact that the user-item interaction data contains a lot of noise, and the paradigm based on neighborhood node aggregation will expand the influence of the "noise observation edge", resulting in the final learned representation being greatly affected by the noisy interaction data. Summary of the invention
[0005] The purpose of the present invention is to solve the above-mentioned problem. A graph contrastive learning recommendation method based on the retreat method and denoising technology is proposed. The method uses the retreat method to randomly remove the edges in the bipartite graph to generate new views, so as to reduce the influence of high-degree nodes, thereby alleviating the long-tail problem; uses denoising technology to reduce the noise edges in the interaction graph to generate new views, thereby alleviating the noise problem; and then uses contrastive learning to maximize the prediction consistency of the positive pairs and minimize the prediction consistency of the negative pairs for the two generated new views, thereby enhancing the robustness and accuracy of the recommendation system.
[0006] In order to achieve the above-mentioned purpose, the present invention adopts the following technical solutions:
[0007] A graph comparison learning recommendation method based on a temporary retreat method and a denoising technique comprises the following steps:
[0008] S1. Data preprocessing: processing the yelp2018 dataset into interactive data files of users, products, and rating stars;
[0009] S2, view generation, constructing a user-item bipartite graph through the user-item interaction dataset, and generating a new first view and second view using the temporary retreat method and denoising technology respectively;
[0010] S3, view learning, using multi-layer GCN to learn the embedding representations of the first view and the second view respectively;
[0011] S4, training loss, using the BPR Bayesian personalized ranking loss function and the contrastive learning loss function InfoNCE information contrast estimation for joint training, back-propagation to update model parameters and optimize model effects;
[0012] S5, prediction, adding the embedding representations of the first view and the second view, and obtaining the prediction result through the softmax function;
[0013] S6. Performance evaluation: calculate the model recall rate and NDCG normalized discounted cumulative gain to verify the model performance.
[0014] Further, as a preferred technical solution of the present invention, step S1 includes the following steps:
[0015] S101. Dataset collection: Collect the open source website dataset yelp2018 and filter out user id, product id and rating star data;
[0016] S102, data preprocessing: cleaning the screened data, processing missing values, duplicate values, and abnormal values;
[0017] S103, data set division: the preprocessed data is divided into a training set, a validation set and a test set in a ratio of 7:1:2.
[0018] Further as a preferred technical solution of the present invention, step S2 comprises the following steps:
[0019] S201, constructing a user-product bipartite graph based on the interaction data between users and products, and generating a corresponding adjacency matrix;
[0020] S202, a new first view is formed by performing a temporary retreat method on the user-item bipartite graph, that is, the edge temporary retreat method is used to discard the edges of the bipartite graph with a probability ρ (ρ is a probability parameter, which can be manually adjusted and is set to 0.2) to generate a new view, and the formula is:
[0021] A dropout (g) = V, Mε⊙ε) (1)
[0022] Among them, M ε ∈{0, 1}|ε| is the mask vector on the edge set ε, ⊙ represents the element-wise product;
[0023] S203, denoising technology is performed on the user-item bipartite graph to form a new second view, that is, a denoising layer is used to remove the noise edges; a GCN with a denoising layer is used to filter out the noise edges in the input graph; for the lth layer of GCN, a binary matrix M is used l ∈0,1 |V|×|V| ,in Represents node u i and v j Whether there is noise in the edge between them, 0 indicates a noisy edge; formally, the adjacency matrix of the obtained view is:
[0024] A l =A⊙M l (2).
[0025] Further as a preferred technical solution of the present invention, step S3 comprises the following steps:
[0026] S301: The adjacency matrix of the first view and the second view generated by using the temporary retreat method and the denoising technology is Symmetric normalization is performed respectively, and the formula is:
[0027]
[0028] Among them, D (u) and D (v) Represent the degree matrices of users and items respectively, represents the number of products that user i interacts with, represents the number of users who interact with product j;
[0029] S302: Encode the interaction patterns between users and products in the first view and the second view respectively, and embed them into the d-dimensional latent space for propagation. The formula for embedding the propagation layer of the local graph is as follows:
[0030]
[0031] Among them, E (u) and E (v) Represent the embedding matrices of users and items respectively;
[0032] S303, multiple graph embedding propagation layers are integrated to refine the user / product representation and aggregate the local neighborhood information of the context embedding, and the user u i and project v j The embedding of the graph neural network GNN at the lth layer is expressed as and The message passing process from layer (l-1) to layer l is as follows:
[0033]
[0034] Add the embedding representations of all layers to obtain the final embedding representations of users and items:
[0035]
[0036] in, Represents user u i and project v j Prediction preference between .
[0037] Further as a preferred technical solution of the present invention, step S4 comprises the following steps:
[0038] S401, firstly, the original user-item bipartite graph is trained by the BPR loss function, and the loss function is:
[0039]
[0040] Among them, O={(u,i,j)|(u,i)∈O + , (u, j)∈O -} is the training data, O + is the observed interaction, O - =U×I\O + is the unobserved interaction, σ(·) represents the sigmoid activation function;
[0041] S402, then the generated first view and second view are trained using the contrastive learning InfoNCE loss function, that is, maximizing the prediction consistency of the positive pair and minimizing the prediction consistency of the negative pair:
[0042]
[0043] Among them, e′ u ,e″ u represents the pairs of different views of the same node, e′ u ,e″ v represents the negative pairs of different views of different nodes, s represents the cosine similarity function, and τ represents the temperature coefficient;
[0044] The above means calculating the contrast loss of user nodes. Similarly, the contrast loss of product nodes can be obtained. The final contrast loss function is
[0045] S403, finally, joint training is performed, and back propagation is performed to update model parameters and optimize the model effect:
[0046]
[0047] Further, as a preferred technical solution of the present invention, step S5 is to weight the embedded representations learned from different views and output the prediction results through a softmax function.
[0048] Further as a preferred technical solution of the present invention, in step S6, the calculation formula of Recall rate is:
[0049]
[0050] Among them, TP represents the number of items correctly predicted as liked by the user, and FN represents the number of items that the user actually likes that are incorrectly predicted as disliked;
[0051] The calculation formula of NDCG normalized discounted cumulative gain is:
[0052]
[0053] Among them, rel i represents the relevance of the result at the i-th position, and |REL| represents the actual number of relevances of the result set.
[0054] The image comparison learning recommendation method based on the temporary retreat method and the denoising technology described in the present invention adopts the above technical solution and has the following technical effects compared with the prior art:
[0055] (1) The present invention uses the temporary retreat method to randomly discard the edges of the user-item bipartite graph to achieve the purpose of constructing a new view. Its function is to reduce the influence of high-degree nodes, which can effectively alleviate the long-tail problem and improve the accuracy of the model.
[0056] (2) The present invention uses denoising technology to remove noisy edges in the user-item bipartite graph and generate new views, which can effectively alleviate the noise problem and improve the robustness of the model.
[0057] (3) The present invention uses contrastive learning to combine different views generated by the temporal retreat method and denoising technology, maximizes the consistency of the same node in different views, minimizes the consistency of different nodes in different views, optimizes the model parameters, and improves the recommendation effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 The following is a flowchart of the steps of the method recommended by the present invention.
[0059] Figure 2 The following is a flow chart of the method proposed by the present invention. DETAILED DESCRIPTION
[0060] 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.
[0061] Figure 1 and Figure 2 As shown, a graph comparison learning recommendation method based on the temporary retreat method and denoising technology includes the following steps:
[0062] S1: Data preprocessing: processing the yelp2018 dataset into interactive data files of users, products, and rating stars;
[0063] S2: View generation: construct a user-item bipartite graph through the user-item interaction dataset, and generate new views using the temporary retreat method and denoising technology respectively. Figure 1 With Vision Figure 2 ;
[0064] S3: View learning, using multi-layer GCN to learn the view Figure 1 And Vision Figure 2 Embedding representation of ;
[0065] S4: training loss, using BPR (Bayesian personalized ranking) loss function and contrastive learning loss function InfoNCE (information contrastive estimation) for joint training, back-propagation to update model parameters and optimize model effects;
[0066] S5: Prediction, add the embedding representations of the two views and obtain the prediction result through the softmax function;
[0067] S6: Performance evaluation: Calculate the model Recall and NDCG (normalized discounted cumulative gain) to verify the model performance.
[0068] Step S1 includes the following steps:
[0069] S101: Dataset collection: Collect the open source website dataset yelp2018 (yelp2018 contains rich user reviews, business information and user-business interaction data extracted from the Yelp platform. This dataset can be used to analyze user preferences for businesses and is an important dataset in the field of recommendation systems), and filter out user IDs, product IDs and rating star data;
[0070] S102: Data preprocessing: Clean the filtered data, process missing values, duplicate values, abnormal values, etc. Specifically, check whether there are missing values in the row / column and process them, check whether the rating star value is abnormal. The normal star rating is 1-5. If it is not within this range, delete it;
[0071] S103: Dataset division: The preprocessed data is divided into a training set, a validation set, and a test set in a ratio of 7:1:2.
[0072] Step S2 includes the following steps:
[0073] S201: constructing a user-product bipartite graph based on the interaction data between users and products, and generating a corresponding adjacency matrix;
[0074] S202: Perform a temporary retreat method on the user-item bipartite graph to form a new view Figure 1 , that is, use the edge temporary retreat method to discard the edges of the bipartite graph with probability ρ (ρ is a probability parameter that can be manually adjusted and set to 0.2) to generate a new view. The formula is:
[0075] A dropout (g) = (V, M ε ⊙ε) (1)
[0076] Among them, M ε ∈{0, 1} |ε| is the mask vector on the edge set ε, and ⊙ represents the element-wise product.
[0077] S203: Perform denoising technology on the user-item bipartite graph to form a new visual Figure 2 , that is, use a denoising layer to remove the noisy edges. Specifically, use a GCN with a denoising layer to filter out the noisy edges in the input graph. For the l-th layer of GCN, use the binary matrix Ml ∈0,1 |V|×|V| ,in Represents node u i and v j Whether there is noise in the edge between them (0 indicates a noisy edge). Formally, the adjacency matrix of the resulting view is:
[0078] A l =A⊙M l (2)
[0079] Step S3 includes the following steps:
[0080] S301: The new view generated by the temporary retreat method and denoising technology Figure 1 and Xinshi Figure 2 The adjacency matrix of Symmetric normalization is performed respectively, and the formula is:
[0081]
[0082] Among them, D (u) and D (v) Represent the degree matrices of users and items respectively, represents the number of products that user i interacts with, represents the number of users who interact with product j;
[0083] S302: Encode the interaction patterns between users and products in the two views respectively, embed them into the d-dimensional latent space for propagation, and the local graph embedding propagation layer formula is as follows:
[0084]
[0085] Among them, E (u) and E (v) Represent the embedding matrices of users and items respectively;
[0086] S303: Integrate multiple graph embedding propagation layers, refine user / item representations and aggregate local neighborhood information of context embedding, and embed user u i and project v j The embeddings of the l-th layer of the graph neural network (GNN) are expressed as and The message passing process from layer (l-1) to layer l is as follows:
[0087]
[0088] Add the embedding representations of all layers to obtain the final embedding representations of users and items:
[0089]
[0090] in, Represents user u i and project v j Prediction preference between .
[0091] Step S4 includes the following steps:
[0092] S401: First, the original user-item bipartite graph is trained using the BPR loss function, which is:
[0093]
[0094] Among them, O={(u,i,j)|(u,i)∈O + , (u, j)∈O -} is the training data, O + is the observed interaction, O-=U×I\O + is the unobserved interaction and σ(·) denotes the sigmoid activation function.
[0095] S402: The two generated new views are then trained using the contrastive learning InfoNCE loss function, that is, maximizing the prediction consistency of the positive pair and minimizing the prediction consistency of the negative pair:
[0096]
[0097] Among them, e′ u ,e″ u represents the pairs of different views of the same node, e′ u ,e″ v denotes the negative pairs of different views of different nodes, s denotes the cosine similarity function, and τ denotes the temperature coefficient.
[0098] The above means calculating the contrast loss of user nodes. Similarly, the contrast loss of product nodes can be obtained. The final contrast loss function is
[0099] S403: Finally, joint training is performed and back propagation is performed to update model parameters and optimize the model effect:
[0100]
[0101] In step S5, the embedded representations learned from different views are weighted and the prediction results are output through the softmax function.
[0102] In step S6, the calculation formula of Recall is:
[0103]
[0104] Among them, TP (True Positives) represents the number of items correctly predicted as the user's favorites, and FN (False Negatives) represents the number of items that the user actually likes that are incorrectly predicted as disliked.
[0105] The calculation formula of NDCG (normalized discounted cumulative gain) is:
[0106]
[0107] Among them, rel i represents the relevance of the result at the i-th position, and |REL| represents the actual number of relevances of the result set.
[0108] This paper proposes a graph comparison learning recommendation method based on the temporary retreat method and denoising technology, which can alleviate the long tail problem and noise problem in the recommendation system and improve the robustness of the model and the accuracy of the recommendation.
[0109] 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 graph contrast learning recommendation method based on temporary retreat method and denoising technology, characterized in that: The following steps are involved: S1. Data preprocessing: processing the yelp2018 dataset into interactive data files of users, products, and rating stars; S2, view generation, constructing a user-item bipartite graph through the user-item interaction dataset, and generating a new first view and second view using the temporary retreat method and denoising technology respectively; S3, view learning, using multi-layer GCN to learn the embedding representations of the first view and the second view respectively; S4, training loss, using the BPR Bayesian personalized ranking loss function and the contrastive learning loss function InfoNCE information contrast estimation for joint training, back-propagation to update model parameters and optimize model effects; S5, prediction, adding the embedding representations of the first view and the second view, and obtaining the prediction result through the softmax function; S6. Performance evaluation: calculate the model recall rate and NDCG normalized discounted cumulative gain to verify the model performance; The step S1 comprises the following steps: S101. Dataset collection: Collect the open source website dataset yelp2018 and filter out user id, product id and rating star data; S102, data preprocessing: cleaning the screened data, processing missing values, duplicate values, and abnormal values; S103, data set division: divide the preprocessed data into a training set, a validation set, and a test set in a ratio of 7:1:2; The step S2 comprises the following steps: S201, constructing a user-product bipartite graph based on the interaction data between users and products, and generating a corresponding adjacency matrix; S202, a new first view is formed by performing a temporary retreat method on the user-item bipartite graph, that is, the edge temporary retreat method is used to discard the edge of the bipartite graph with a probability ρ to generate a new view, and the formula is: A dropout (g)=(V,M ε ⊙ε) (1) Among them, M ε ∈{0, 1} |ε| is the mask vector on the edge set ε, ⊙ represents the element-wise product; S203, denoising technology is performed on the user-item bipartite graph to form a new second view, that is, a denoising layer is used to remove the noise edges; a GCN with a denoising layer is used to filter out the noise edges in the input graph; for the lth layer of GCN, a binary matrix M is used l ∈0,1 |V|×|V| , in the matrix Represents node u i and v j Whether there is noise in the edge between them, 0 indicates a noisy edge; Formally, the adjacency matrix of the resulting view is: A l =A⊙M l (2); The step S3 comprises the following steps: S301: The adjacency matrix of the first view and the second view generated by using the temporary retreat method and the denoising technology is Symmetric normalization is performed respectively, and the formula is: Among them, D (u) and D (v) Represent the degree matrices of users and items respectively, represents the number of products that user i interacts with, represents the number of users who interact with product j; S302: Encode the interaction patterns between users and products in the first view and the second view respectively, and embed them into the d-dimensional latent space for propagation. The formula for embedding the propagation layer of the local graph is as follows: Among them, E (u) and E (v) Represent the embedding matrices of users and items respectively; S303, multiple graph embedding propagation layers are integrated to refine the user / product representation and aggregate the local neighborhood information of the context embedding, and the user u i and product v j The embedding of the graph neural network GNN at the lth layer is expressed as and The message passing process from layer (l-1) to layer l is as follows: Add the embedding representations of all layers to obtain the final embedding representations of users and items: in, Represents user u i and product v j Prediction preference between .
2. The image contrast learning recommendation method based on the temporary retreat method and denoising technology according to claim 1 is characterized in that: The step S4 comprises the following steps: S401, firstly, the original user-item bipartite graph is trained by the BPR loss function, and the loss function is: Among them, O={(u,i,j)|(u,i)∈O + , (u, j)∈O - } is the training data, O + is the observed interaction, O - =U×I / O + is the unobserved interaction, σ(·) represents the sigmoid activation function; S402, then the generated first view and second view are trained using the contrastive learning InfoNCE loss function, that is, maximizing the prediction consistency of the positive pair and minimizing the prediction consistency of the negative pair: Among them, (e′ u ,e″ u ) represents the pairs of different views of the same node, (e′ u ,e″ v ) represents the negative pairs of different views of different nodes, s represents the cosine similarity function, and τ represents the temperature coefficient; The above formula (8) represents the calculation of the contrast loss of the user node. Similarly, the contrast loss of the product node can be obtained: The final contrast loss function is S403, finally, joint training is performed, and back propagation is performed to update model parameters and optimize the model effect:
3. The image contrast learning recommendation method based on the temporary retreat method and denoising technology according to claim 2 is characterized in that: The step S5 is to weight the embedded representations learned from different views and output the prediction results through the softmax function.
4. The image contrast learning recommendation method based on the temporary retreat method and denoising technology according to claim 3 is characterized in that: In step S6, the calculation formula of Recall rate is: Among them, TP represents the number of items correctly predicted as liked by the user, and FN represents the number of items that the user actually likes that are incorrectly predicted as disliked; The calculation formula of NDCG normalized discounted cumulative gain is: Among them, rel t represents the relevance of the result at the tth position, and |REL| represents the actual number of relevances of the result set.
Citation Information
Patent Citations
GCN recommendation method based on comparative learning improvement
CN116503137A
Knowledge perception-based graph self-supervised learning recommendation method
CN117634600A
Night unmanned aerial vehicle target tracking method fusing mixed attention mechanism
CN117974716A