A contrast learning-based enhanced graph convolutional network recommendation method applied to a recommendation system
By combining contrastive learning and multi-layer graph convolutional networks, richer user-item embeddings are generated, solving the problem of insufficient capture of interactive information in personalized recommendations and achieving better recommendation results.
Patent Information
- Application Number
- CN202510036371.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-01-09
AI Technical Summary
Existing personalized recommendation methods are insufficient in capturing user-item interaction information, resulting in poor recommendation results.
We employ an enhanced graph convolutional network recommendation method based on contrastive learning. Through contrastive learning and message passing in multi-layer graph convolutions, we generate richer user-item embeddings and combine them with a collaborative filtering algorithm to generate recommendation results.
It significantly improves recommendation performance, enabling more accurate recommendations of items that users may be interested in, and enhances the model's expressive and generalization capabilities.
Smart Images

Figure CN119940412B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of personalized recommendation technology, and specifically relates to an enhanced graph convolutional network recommendation method based on contrastive learning applied to a recommendation system. Background Art
[0002] Personalized recommendations have been applied to numerous online services, such as e-commerce, advertising, and social media. Learning vector representations is at the core of modern recommendation methods. From early matrix factorization to recent deep learning-based approaches, intelligent algorithms for personalized recommendations have emerged.
[0003] Existing personalized recommendation methods obtain user (or item) embeddings by mapping from pre-existing features describing the user (or item). Some methods extend the embedding function of matrix decomposition by integrating deep representations learned from rich side information of items, or use neural collaborative filtering models to replace the interaction function of matrix decomposition with nonlinear neural networks. Projection-based collaborative filtering models use Euclidean distance metrics as interaction functions, etc. Despite their effectiveness, these methods are insufficient to generate satisfactory embedding collaboration signals. Specifically, most existing methods only use descriptive features without considering user-item interactions.
[0004] To address the aforementioned issue of insufficient interaction information, this paper uses a graph convolutional network (GCN) in its recommendation framework. This approach introduces contrastive learning, which uses positive and negative examples to extract more potential information from limited data, thereby improving the model's generalization ability for sparse data. Summary of the Invention
[0005] To address the shortcomings of current personalized recommendation methods, such as insufficient capture of interaction signals from potential users (or items), which are not encoded during the embedding process and therefore often fail to recommend the best items to a particular user, this paper proposes an enhanced graph convolutional network recommendation method based on contrastive learning for use in recommendation systems. Through contrastive learning and message passing via multi-layer graph convolution, this method strengthens the implicit association between users and items, achieving better recommendation results when recommending to users.
[0006] To achieve the above object, the technical solution adopted by the present invention is:
[0007] An enhanced graph convolutional network recommendation method based on contrastive learning applied to a recommendation system includes the following steps:
[0008] Step 1: Extract the initial user-item interaction matrix based on historical user-item interaction data; further enhance the initial interaction matrix, generate a comparison matrix with the initial interaction matrix, and initialize the user and item weight matrices;
[0009] Step 2: Recursively propagate the comparison matrix and weight matrix through multiple layers of graph convolution to obtain the deep characteristics of the interaction information and generate richer embedding representations for users and items. Then, combining the idea of contrastive learning, the two sets of contrastive embedding matrices are fused to generate the final user embedding and item embedding.
[0010] Step 3: Calculate the user's preference for the item through the inner product of the user embedding and the item embedding, and generate the recommendation results in combination with the collaborative filtering algorithm.
[0011] As a preferred technical solution of the present invention, the step 1 specifically includes:
[0012] (1) Initialize the user-item weight matrix W using a normal distribution with a standard deviation of 0.1. The formula is:
[0013] W~N(0,0.1 2 )(1)
[0014] (2) Get an initial sparse graph A, where each user and item is a vertex. A is represented as:
[0015]
[0016] In formula (2), R represents the interaction matrix between users and items;
[0017] (3) Final sparse graph Expressed as:
[0018]
[0019] In formula (3), D is the degree matrix;
[0020] Initial embedding and Respectively expressed as:
[0021]
[0022] As a preferred technical solution of the present invention, the step 2 specifically includes:
[0023] (1) The recursive propagation process of multi-layer graph convolution is equivalent to:
[0024]
[0025] In formulas (6) and (7), k is the number of times graph convolution is performed;
[0026] (2) Using the idea of contrastive learning, we obtain two sets of embedding matrices E1 and E2 after multi-layer graph convolution recursive propagation, which are expressed as:
[0027]
[0028] (3) Aggregate the two sets of contrasting embedding matrices to obtain the final embedding matrix for model prediction:
[0029] E=(E1+E2) / 2(10).
[0030] As a preferred technical solution of the present invention, the step three specifically includes:
[0031] (1) Perform inner product to estimate the user's preference for the target item:
[0032]
[0033] In formula (11), e u and e i are user embedding and item embedding, obtained from the final embedding matrix E;
[0034] (2) Obtain user ratings for all items and take the top N largest ratings to generate the Top-N recommendation results.
[0035] In addition, the present invention also proposes a recommendation system for implementing the above recommendation method, including a data initialization module, a message transmission module, a comparison and aggregation module, and a prediction and recommendation module, wherein:
[0036] The data initialization module implements:
[0037] Obtain historical user-item interaction behavior data and initialize weights;
[0038] The messaging module implements:
[0039] The initialized weight matrix and the constructed user-item interaction matrix are passed through multiple layers of graph convolution to generate a deeper embedding matrix.
[0040] The comparison aggregation module implements:
[0041] Aggregate the constructed comparative data to generate the final interactive information;
[0042] The prediction and recommendation module implements:
[0043] The final interaction information is extracted to generate deep embedding representations of users and items respectively; inner product operations are performed on the embedding representations of users and items to predict the user's preference score for the item.
[0044] This invention proposes an enhanced graph convolutional network recommendation method based on contrastive learning for use in recommendation systems, which can recommend more suitable items to users. This recommendation method first extracts the user-item correlation matrix based on the historical interaction behavior data between users and items; secondly, the initialization weight matrix is added to the recursive propagation of multi-layer graph convolution to capture deeper embedding information of users and items; then, the embedding information of the control group is added using the idea of contrastive learning, and the two sets of embedding information are merged into the final user-item embedding; finally, the user's preference for the item is predicted by the inner product of the user embedding and the item embedding, and the recommendation result is generated using the collaborative filtering algorithm. Compared with the existing technology, the beneficial effects of this invention are:
[0045] (1) Before the recommendation algorithm runs, the present invention preprocesses the data, including randomly initializing the weight matrices for users and items. These weight matrices are also recursively propagated through multiple layers of graph convolution, thereby improving the propagation of feature information and the ability to capture interactive features. Finally, by calculating the inner product of the user embedding and the item embedding, the user's preference for the item is evaluated and the recommendation result is generated.
[0046] (2) The present invention has superior performance on a variety of data sets. A comparative experiment was conducted using the most advanced recommendation method. To ensure the fairness of the experiment, no parameters of the method were changed to ensure the best performance. Finally, all evaluation indicators on most data sets have advantages. Therefore, by designing the initialization strategy of the weight matrix and the multi-layer graph convolutional network, the present invention can effectively propagate feature information, capture the deep interaction characteristics of users and items, and learn a more expressive embedding representation, thereby significantly improving the model's expressiveness and recommendation effect.
[0047] (3) This paper addresses the problem of personalized recommendation by using contrastive learning and multi-layer GCN to capture deeper user-item interaction information. This is a natural way to encode collaborative signals in the interaction graph structure, improving the scalability and usability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a structural framework diagram of the model constructed in the present invention.
[0049] Figure 2 An example graph is constructed for user recommendation, where a represents the user's feature relationship and b represents the constructed simplified graph structure. DETAILED DESCRIPTION
[0050] Example 1
[0051] See also Figure 1 As shown, this embodiment proposes an enhanced graph convolutional network recommendation method based on contrastive learning applied to a recommendation system, comprising the following steps:
[0052] Step 1: Based on the historical interaction data between users and items, extract the initial interaction matrix between users and items; further enhance the initial interaction matrix, generate a comparison matrix with the initial interaction matrix, and initialize the weight matrix of users and items. Specifically, it includes:
[0053] (1) Initialize the user-item weight matrix W using a normal distribution with a standard deviation of 0.1. The formula is:
[0054] W~N(0,0.1 2 )(1)
[0055] (2) Get an initial sparse graph A, where each user and item is a vertex. A is represented as:
[0056]
[0057] In formula (2), R represents the interaction matrix between users and items;
[0058] (3) Final sparse graph Expressed as:
[0059]
[0060] In formula (3), D is the degree matrix;
[0061] Initial embedding and Respectively expressed as:
[0062]
[0063] Step 2: Recursively propagate the comparison matrix and weight matrix through multiple layers of graph convolution to obtain the deep characteristics of the interaction information and generate richer embedding representations for users and items. Then, combining the idea of contrastive learning, the two sets of contrastive embedding matrices are fused to generate the final user embedding and item embedding. Specifically, it includes:
[0064] (1) The recursive propagation process of multi-layer graph convolution is equivalent to:
[0065]
[0066] In formulas (6) and (7), k is the number of times graph convolution is performed;
[0067] (2) Using the idea of contrastive learning, we obtain two sets of embedding matrices E1 and E2 after multi-layer graph convolution recursive propagation, which are expressed as:
[0068]
[0069] (3) Aggregate the two sets of contrasting embedding matrices to obtain the final embedding matrix for model prediction:
[0070] E=(E1+E2) / 2(10)
[0071] Step 3: Calculate the user's preference for the item through the inner product of the user embedding and the item embedding, and generate the recommendation results by combining the collaborative filtering algorithm. Specifically include:
[0072] (1) Perform inner product to estimate the user's preference for the target item:
[0073]
[0074] In formula (11), e u and e i are user embedding and item embedding, obtained from the final embedding matrix E;
[0075] (2) Obtain user ratings for all items and take the top N largest ratings to generate the Top-N recommendation results.
[0076] Example 2
[0077] This embodiment proposes a recommendation system for implementing the above-mentioned recommendation method, including a data initialization module, a message transmission module, a comparison and aggregation module, and a prediction and recommendation module, wherein:
[0078] The data initialization module implements:
[0079] Obtain historical user-item interaction behavior data and initialize weights;
[0080] The messaging module implements:
[0081] The initialized weight matrix and the constructed user-item interaction matrix are passed through multiple layers of graph convolution to generate a deeper embedding matrix.
[0082] The comparison aggregation module implements:
[0083] Aggregate the constructed comparative data to generate the final interactive information;
[0084] The prediction and recommendation module implements:
[0085] The final interaction information is extracted to generate deep embedding representations of users and items respectively; inner product operations are performed on the embedding representations of users and items to predict the user's preference score for the item.
[0086] Example 3
[0087] Taking music recommendation as an example, the recommendation system proposed by the present invention is introduced:
[0088] Recommender systems infer user preferences from user-item interactions or static features and recommend items that the user may be interested in. Items here can be user interests and hobbies, such as music recommendations, food recommendations, and online shopping recommendations.
[0089] Take music as an example, assuming that user 1 likes music 1, music 2, and music 3; user 2 likes music 2, music 4, and music 5; and user 3 likes music 3 and music 4. In this embodiment, users 1, 2, and 3 are represented by u1, u2, and u3 respectively, and music 1-5 are represented by i1, i2, ..., i5 respectively. Figure 2 shown.
[0090] Figure 2 Part a represents the user's feature relationship, and part b is a simple graph structure constructed for recommendation analysis. Figure 2 In b, the path u1←i2←u2 indicates the behavioral similarity between u1 and u2, because both users interacted with i2; the longer path u1←i2←u2←i4 indicates that u1 is likely to adopt i4, because u1's similar user u2 has previously used i4. In addition, from an overall perspective, music i4 is more likely to arouse u1's interest than music i5, because there are two paths connecting<i4,u1> , and there is only one path connecting<i5,u1> Therefore, recommending item i4 to user u1, that is, recommending the song music 4 to user 1, can achieve the best recommendation result.
[0091] Example 4 Comparative Experiment
[0092] 1. Dataset Introduction
[0093] We use publicly available datasets suitable for recommendation, namely: Gowalla, Douban, Amazon-Book, Yelp2018, coat, yahoo, Food, and ml-1m. The sources of these datasets are:
[0094] Gowalla: Check-in dataset obtained from Gowalla.
[0095] Douban: From Douban, a well-known Chinese review website.
[0096] Amazon-Book: The Amazon Book Dataset is a comprehensive data set that focuses on book reviews on the Amazon platform.
[0097] Yelp2018: From the 2018 edition of the Yelp Challenge, containing Yelp business reviews and user data.
[0098] ml-1m: A widely used dataset collected from Movielens. Our experiments use the 1M version, which converts explicit data into implicit feedback and treats all user-item ratings as positive interactions.
[0099] Food: The Food dataset contains recipe details and reviews from Food.com (formerly GeniusKitchen). The data includes cooking recipes and review text.
[0100] Coat, Yahoo: The Coat and Yahoo datasets come from a clothing shopping recommendation service and Yahoo Music, respectively. Both datasets consist of a training set of biased rating data collected from normal user interactions and a test set of unbiased rating data from users rating randomly selected items.
[0101] The statistics of these datasets are shown in Table 1.
[0102] Table 1 Statistics of the dataset
[0103]
[0104] 2. Evaluation indicators
[0105] In a recommendation system, the main function of evaluation metrics is to quantify the performance of the recommendation system, help developers understand the strengths and weaknesses of the model, and guide improvement and optimization. The evaluation metrics used in this experiment are:
[0106] NDCG (Normalized Discounted Cumulative Gain) is a ranking-based metric that emphasizes the rationality of the ordering of related items in a recommendation list. It uses the concept of cumulative gain (CG) to calculate the benefits of related items in the recommendation results and introduces a discount factor to reduce the contribution of related items ranked lower. The result is then normalized to a range between 0 and 1. Its purpose is to measure the relevance and ranking quality of the results in the recommendation list. NDCG is an important metric when the accuracy of the recommendation results needs to be emphasized, such as in movie and music recommendations.
[0107] Precision indicates the proportion of relevant items in a recommendation list, that is, the accuracy of the recommendation. It measures the proportion of relevant items in the recommendation results. When the size of the recommendation list is fixed and the focus is on recommendation quality rather than coverage, precision is the primary metric (such as product recommendations in e-commerce).
[0108] Recall (recall rate) represents the proportion of relevant items found by the recommendation system from all relevant items, that is, the coverage of the recommendations. It measures the proportion of relevant items that the user may be interested in that are captured by the recommendation system. Recall is a key metric when the recommendation system covers the user's interests as much as possible.
[0109] 3 Experimental results
[0110] To evaluate the performance of the proposed recommendation system, we compared the experimental results of DR-GNN (a recommendation system based on distributed blueprints), available from https: / / github.com / . We conducted experiments using the basic settings of DR-GNN to maximize its performance. The experimental results of the proposed system and DR-GNN on eight datasets are shown in Table 2, where the bolded sections represent the best performance of the comparison dataset.
[0111] Table 2 Experimental results
[0112]
[0113]
[0114] Comparing experimental results reveals that this method achieves excellent recommendation results across many datasets. This is due to the use of contrastive learning and message passing with multi-layer graph convolution to strengthen the implicit user-item relationship, resulting in better recommendations for users. Therefore, this method can capture deeper user-item interaction information within the recommendation system data, enabling better recommendations.
[0115] The above content is merely an example and explanation of the concept of the present invention. Those skilled in the art may make various modifications or additions to the described specific embodiments or replace them in a similar manner. As long as they do not deviate from the concept of the invention or exceed the scope defined by the claims, they should all fall within the scope of protection of the present invention.
Claims
1. An enhanced graph convolutional network recommendation method based on contrastive learning applied to recommendation systems, characterized in that: The steps include: Step 1: Extract the initial user-item interaction matrix based on the historical user-item interaction behavior data; The initial interaction matrix is further enhanced, a comparison matrix with the initial interaction matrix is generated, and the weight matrices of users and items are initialized. Specifically, the following steps are performed: (1) Initialize the user-item weight matrix , initialized using a normal distribution with a standard deviation of 0.1, the formula is: (1) (2) Obtain an initial sparse graph , each user and item is a vertex, Expressed as: (2) In formula (2), Represents the interaction matrix between users and items; (3) Final sparse graph , expressed as: (3) In formula (3), is the degree matrix; Initial embedding and Respectively expressed as: (4) (5) Step 2: Recursively propagate the comparison matrix and weight matrix through multiple layers of graph convolution to obtain the deep characteristics of the interaction information and generate richer embedding representations for users and items. Then, combining the idea of contrastive learning, the two sets of contrastive embedding matrices are fused to generate the final user embedding and item embedding. This includes: (1) The recursive propagation process of multi-layer graph convolution is equivalent to: (6) (7) In formula (6) and (7), is the number of times graph convolution is performed; (2) Using the idea of contrastive learning, we obtain two sets of embedding matrices that have been recursively propagated through multi-layer graph convolution. and , respectively expressed as: (8) (9) (3) Aggregate the two sets of contrasting embedding matrices to obtain the final embedding matrix for model prediction: (10) Step 3: Calculate the user's preference for the item through the inner product of the user embedding and the item embedding, and generate the recommendation results by combining the collaborative filtering algorithm; specifically, it includes: (1) Perform inner product to estimate the user's preference for the target item: (11) In formula (11), and For user embedding and item embedding, from the final embedding matrix Obtained in; (2) Obtain user ratings for all items and take the top N largest ratings to generate the Top-N recommendation results.
2. A recommendation system for implementing the recommendation method according to claim 1, characterized in that: It includes data initialization module, message passing module, comparison aggregation module and prediction and recommendation module, among which: The data initialization module implements: Obtain historical user-item interaction behavior data and initialize weights; The messaging module implements: The initialized weight matrix and the constructed user-item interaction matrix are passed through multiple layers of graph convolution to generate a deeper embedding matrix. The comparison aggregation module implements: Aggregate the constructed comparative data to generate the final interactive information; The prediction and recommendation module implements: The final interaction information is extracted to generate deep embedding representations of users and items respectively; inner product operations are performed on the embedding representations of users and items to predict the user's preference score for the item.
Citation Information
Patent Citations
Comparative learning graph recommendation method based on noise enhancement
CN117056597A
Multi-modal recommendation method and system for enhancing user representation through graph convolutional neural network
CN119202398A