Multi-Relational Graph Convolutional Collaborative Filtering Recommendation Method, System and Device
By constructing explicit relationships and using attention networks to weight graph convolutional layers, the method enhances user and item feature representations, addressing the limitations of existing algorithms and improving recommendation accuracy.
Patent Information
- Application Number
- CN202310470329.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-27
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2043-04-27
AI Technical Summary
The existing collaborative filtering recommendation algorithm based on graph convolution networks does not fully utilize the explicit relationship between user-user, project-project, and the feature representations of different propagation layers use the same weight, which makes it impossible for users and projects to obtain the optimal feature representation, affecting the recommendation effect.
By building user-user graphs and project-project graphs, learning explicit relationships from the historical interactive data of users and projects, and assigning different weights to each graph convolutional layer using attention networks, combining implicit and explicit relationships to optimize feature representations.
Effectively alleviate data sparsity, improve the accuracy of user preference modeling and recommendation accuracy, and improve the performance of recommendation systems.
Smart Images

Figure CN116541612B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of recommendation systems, and in particular, to a multi-relation-based graph convolutional collaborative filtering recommendation method, system, and device. Background Art
[0002] The core function of a personalized recommendation system is to model user preferences based on information such as user attributes and historical behaviors, and then generate recommendations that users like. Therefore, a personalized recommendation method must have the ability to identify user preferences and predict the degree of user interest in a certain item, and then determine the items to be recommended according to the level of interest in the items. Among them, collaborative filtering, as a simple and effective technology, is often applied as one of the building blocks of many recommendation systems. It fully considers the interaction history of users and items, and infers the preferred items of users according to the idea that similar users have similar interests.
[0003] However, existing collaborative filtering recommendation algorithms based on graph convolutional networks, such as NGCF and LightGCN, as two representative graph collaborative filtering algorithms, learn the implicit relationships between users and items by iteratively stacking multiple layers of graph convolutions on the user-item bipartite graph, but do not fully utilize the explicit relationships between user-user and item-item; secondly, when representing the user and item features after the graph convolutional network, they both perform weighted summation of the feature representations learned in different propagation layers with the same weight. In a real environment, the activity levels of each user and item are different, and using the same weight will result in the inability to obtain the optimal feature representations of users and items, resulting in poor recommendation effects. Summary of the Invention
[0004] To solve the above problems, the present invention provides a multi-relation-based graph convolutional collaborative filtering recommendation method. Different from the multi-relation collaborative filtering algorithm based on graph neural networks proposed by Deng Xiaoheng et al., the present invention separately establishes the explicit relationship between users and items by analyzing the historical behaviors of users, rather than using the sequence information of users and items to construct the relationship graph between users and items.
[0005] The technical solution of the present invention is as follows:
[0006] A multi-relation-based graph convolutional collaborative filtering recommendation method includes the following steps:
[0007] S1. Obtain the initial embedding vectors of user u and item i through one-hot encoding
[0008] S2. Use a graph convolutional network to perform convolution on the user-item bipartite graph to obtain the embedding vectors of the user and the item after l layers of convolution and
[0009] S3. Obtain the embedding vectors of users and items obtained for each graph convolutional layer using the attention network and assign different weights α l and β l , and use these weights to obtain the implicit relationships a u and a i ;
[0010] S4. Analyze the historical interaction data of user-item, and establish user-user graphs and item-item graphs for users and items respectively to obtain their explicit relationships l u and l i ;
[0011] S5. Integrate the implicit relationships a u and a i of users and items obtained in S3 with the explicit relationships l u and l i of users and items obtained in S4 together respectively to obtain the feature representations e u and e i ;
[0012] S6. Use the feature representations e u and e i of users and items obtained in S5, and obtain the score of the target user for the target item through the inner product operation, so as to predict the preference of the user for the item.
[0013] The specific process of step S2 is as follows: Convolve the initial embedding vectors of user u and item i on the user-item bipartite graph, that is:
[0014]
[0015]
[0016] where l represents the number of layers of graph convolution, and represent the embedding vectors of user u and item i after propagation in the l-th layer respectively, N u and N i represent the number of neighbor nodes of user u and item i respectively, is a symmetric normalization term.
[0017] The specific process of step S3 is as follows:
[0018] Introduce the attention mechanism for the embedding vectors of users and items obtained for each graph convolutional layer and Assign different weights α l and β l and use these weights to obtain the implicit relationships a u and a i :
[0019]
[0020]
[0021] where α l and β l respectively represent the attention weights of the feature contributions of users and items in the l-th layer.
[0022] The specific process of step S4 is as follows:
[0023] S4.1. Analyze the historical behavior records of the user, and use the following similarity calculation formula to find the k users y who are most similar to the interests of user x:
[0024]
[0025] where N(i) represents the number of users who like item i, N(x) represents the number of items liked by user x, N(y) represents the number of items liked by user y, and C xy represents the similarity between user x and user y;
[0026] S4.2. Form a user similarity matrix with the k users with the closest similarities obtained, that is, a user-user graph, and input it into the linear layer to obtain the explicit relationship l u ;
[0027] S4.3. Analyze the historical behavior records of the user, and use the following similarity calculation formula to find the k items v that are most similar to item u:
[0028]
[0029] where |N(u)| represents the number of users who like item u, and |N(v)| represents the number of users who like item v;
[0030] S4.4. Form a project similarity matrix with the k items with the closest similarities obtained, that is, a project-project graph, and then perform normalization processing to obtain the final project similarity matrix C' uv :
[0031]
[0032] Input it into the linear layer to obtain the explicit relationship l i .
[0033] The specific process of step S5 is as follows: the implicit relationship a between the user and the item obtained in S3 u , a i and the explicit relationship l between the user and the item obtained in S4 u , l i are used to obtain the feature representations e of the user and the item by element-wise summation u and e i :
[0034] e u = a u + l u ,
[0035] e i = a i + l i .
[0036] In step 6, the recommendation model is optimized using a loss function. The specific process includes: using the classical loss function Bayesian Personalized Ranking to optimize the recommendation model, which assumes that the observed interactions should have higher predicted scores than the unobserved interactions:
[0037]
[0038] where O = {(u, i, j)|(u, i) ∈ R + , (u, j) ∈ R -} represents the pairwise training data, R + represents the set of observed interactions, R - represents the set of unobserved interactions, e u and e i represent the feature representations of the user and the item, e j represents the feature representation of the item that has no interaction with user u, and σ(·) is the sigmoid function. γ is used to control the L2 regularization strength to prevent overfitting.
[0039] A multi-relation graph convolutional collaborative filtering recommendation system includes:
[0040] An initialization module for obtaining the initial embedding vectors of user u and item i through one-hot encoding
[0041] A graph convolutional network for inputting the initial embedding vectors of user u and item i performing convolution to obtain the embedding vectors of the user and the item after l layers of convolution and
[0042] An attention network for the embedding vectors of the user and the item obtained by each graph convolutional layer and assign different weights α l and β l and use these weights to obtain the implicit relationships a u and a i ;
[0043] A graph construction module for analyzing the historical interaction data between users and items, and establishing a user-user graph and an item-item graph for users and items respectively to obtain the explicit relationships l u and l i ;
[0044] An integration module for integrating the implicit relationships a u 、a i of users and items with the explicit relationships l u 、l i of users and items together respectively to obtain the feature representations e u and e i ;
[0045] A prediction module for obtaining the score of a target user for a target item through an inner product operation on the feature representations e u and e i of the user and the item, and predicting the preference of the user for the item.
[0046] An electronic device includes at least one processor and a memory communicatively connected to the processor. The memory stores a program executable by the at least one processor. When the program is executed by the processor, the above-mentioned recommendation method can be implemented.
[0047] A computer-readable storage medium stores a computer program. When the program is executed by a processor, the above-mentioned recommendation method can be implemented.
[0048] Advantages of the present invention:
[0049] 1. By constructing a user-user graph and an item-item graph from the historical interaction data between users and items, the present invention can learn the explicit relationships between users and users and between items and items. Therefore, users can directly obtain isomorphic node information from similar users, and items can directly obtain isomorphic node information from similar items, so as to alleviate the negative impact brought by the data sparsity problem and unreliable nodes.
[0050] 2. By using a graph convolutional network to learn the implicit relationships between users and between items in a user-item bipartite graph, the present invention can mine the high-order relationships between users and items.
[0051] 3. The present invention assigns different weights to each layer of the graph convolutional network through an attention network, so as to obtain the optimal feature representations of users and items, enabling the model to better model user preferences and improve recommendation accuracy. Description of the Drawings
[0052] Figure 1 is a schematic flowchart of the present invention;
[0053] Figure 2 is a schematic diagram of the model of the present invention. Detailed Embodiments
[0054] The present invention will be described in detail below in conjunction with the drawings and specific embodiments.
[0055] A multi-relation graph convolutional collaborative filtering recommendation method, as Figure 1 shown, includes the following steps:
[0056] S1. Obtain the initial embedding vectors of user u and item i through one-hot encoding
[0057] S2. Convolve the initial embedding vectors of user u and item i on the user-item bipartite graph, that is:
[0058]
[0059]
[0060] where l represents the number of layers of graph convolution, and respectively represent the embedding vectors of user u and item i after propagation in the l-th layer, N u , N i respectively represent the number of neighbor nodes of user u and item i, is a symmetric normalization term. It is to avoid the increase in the scale of node features with graph convolution operations.
[0061] S3. Use the attention network to obtain different weights α and for the embedding vectors of users and items obtained by each graph convolution layer l and β l , and use these weights to obtain the implicit relationships a u and a i between users and items;
[0062]
[0063]
[0064] where α l and β l respectively represent the attention weights of the feature contributions of the users and items in the l-th layer. A two-layer neural network is used to parameterize the item attention α l and β l .
[0065] S4. Analyze the historical interaction data of user-item, and establish user-user graph and item-item graph for users and items respectively to obtain their explicit relationships l u and l i . The process is as follows:
[0066] S4.1. Analyze the historical behavior records of users, and use the following similarity calculation formula to find the k users y with the most similar interests to user x:
[0067]
[0068] where N(i) represents the number of users who like item i, N(x) represents the number of items liked by user x, N(y) represents the number of items liked by user y, and C xy represents the similarity between user x and user y;
[0069] S4.2. Construct a user similarity matrix from the k users with the closest similarity obtained, that is, the user-user graph, and input it into the linear layer to obtain the explicit relationship l u ;
[0070] S4.3. Analyze the historical behavior records of users, and use the following similarity calculation formula to find the k items v with the most similar interests to item u:
[0071]
[0072] where |N(u)| represents the number of users who like item u, and |N(v)| represents the number of users who like item v;
[0073] S4.4. Construct an item similarity matrix from the k items with the closest similarity obtained, that is, the item-item graph, and then perform normalization to obtain the final item similarity matrix C' uv :
[0074]
[0075] Input it into the linear layer to obtain the explicit relationship l i .
[0076] S5. Combine the implicit relationships a u 、ai The explicit relationship between the user and the project obtained by S4 u and i Obtain the feature representations of the user and the project in the way of summing by elements u and i :
[0077] e u = a u + u ,
[0078] e i = a i + i .
[0079] S6. Use the feature representations e u and i of the user and the project obtained by S5, and obtain the score of the target user for the target project through the inner product operation, so as to predict the user's preference for the project.
[0080] In this step, the classical loss function Bayesian personalized ranking is used to optimize the recommendation model. This model assumes that the observed interactions (positive samples) should have higher prediction scores than the unobserved interactions (negative samples):
[0081]
[0082] where O = {(u, i, j)|(u, i) ∈ R + , (u, j) ∈ R -} represents the pairwise training data, R + represents the set of observed interactions, R - represents the set of unobserved interactions, e u and i represent the feature representations of the user and the project, e j represents the feature representation of the item that has no interaction with the user u, σ(·) is the sigmoid function, and γ is used to control the L2 regularization strength to prevent overfitting.
[0083] The graph convolutional collaborative filtering recommendation method based on multi - relations described in the above embodiments of the present invention can be implemented and deployed using the Python programming language. To evaluate the performance of the graph convolutional collaborative filtering recommendation method based on multi - relations in the recommendation task, experimental analysis is carried out on three real - world recommendation datasets: Gowalla, Yelp - 2018, and Amazon - Book. The sizes and sparsities of these datasets are different, and they are all publicly available online. Then, the graph convolutional collaborative filtering recommendation method based on multi - relations is compared with six other comparative algorithms, and the commonly used recommendation metrics RECALL and NDCG are used to evaluate the model effect. Recall@k represents the coverage of real items in the top - k recommendations, and NDCG@k represents the measure of ranking quality.
[0084] The following first explains the six selected comparative algorithms:
[0085] (1) MF: A matrix factorization method with a Bayesian personalized ranking loss function, which is widely used as a recommendation baseline.
[0086] (2) GC - MC: This model adopts GCN technology and only uses one - layer convolutional operation to generate user and item representations.
[0087] (3) Pinsage: This model is used to use GraphSAGE on the item graph.
[0088] (4) Mult - VAE: This model is an item - based CF method based on variational auto - encoder (VAE). It assumes that the data is generated by a multinomial distribution and uses variational inference for parameter estimation.
[0089] (5) NGCF: This model is a graph - based collaborative filtering model. It refines the embeddings of users and items by putting user - item interaction data into multiple embedding propagation layers, and connects the obtained multi - layer embeddings together to get complete features.
[0090] (6) LightGCN: This model is a state - of - the - art graph convolutional collaborative filtering model. It is developed by simplifying and eliminating some unnecessary operations in the NGCF model and has achieved good performance.
[0091] Details of the experimental parameter settings are as follows: The size of the mini - batch is fixed at 1024. To prevent overfitting, the L2 regularization coefficient is in {1e -4 , 1e -3,...,1}, the number of layers of the feature propagation layer is adjusted within the range of {1, 2, 3, 4}, the size d of the embedding vector is within the range of {32, 64, 128, 256}, and the k users and items with the largest similarity are within the range of {20, 50, 80, 100}. For the parameters of the baseline method, the optimal values provided by the inventors are used.
[0092] Table 1: Results of the comparative experiment
[0093]
[0094] Experimental analysis: Table 1 summarizes the results of each model on different datasets. By analyzing the experimental results, it is observed that: the model (MRGCCF) of the present invention has always performed the best on all datasets, achieving the highest RECALL (recall rate) and NDCG (normalized discounted cumulative gain) scores, which indicates that considering both the explicit and implicit relationships between users and items is very helpful for user preference prediction. From the experimental results, it can be concluded that compared with other recommendation algorithms, the multi-relationship graph convolutional collaborative filtering recommendation method described in the present invention can effectively improve the recommendation effect.
[0095] In summary, the multi-relationship graph convolutional collaborative filtering recommendation method proposed by the present invention effectively combines the explicit and implicit relationships between users and between items; secondly, different weights are also assigned to the feature representations of different graph convolutional layers to obtain the optimal feature representations of users and items, so as to improve the recommendation performance.
Claims
1. A multi-relation based graph convolutional collaborative filtering recommendation method, characterized in that Including the following steps: S1. Obtain the initial embedding vectors of user u and item i through one-hot encoding S2. Use a graph convolutional network to perform convolution on the user-item bipartite graph to obtain the embedded vectors of users and items after l layers of convolution and S3. Obtain the embedded vectors of users and items obtained by each graph convolutional layer using the attention network and assign different weights α l and β l , and use these weights to obtain the implicit relationships a u and a i ; The specific process is as follows: Introduce an attention mechanism to obtain the embedding vectors of users and items for each graph convolutional layer and assign different weights α l and β l , and use these weights to obtain the implicit relationships a u and a i : where α l and β l respectively represent the attention weights of the feature contributions of the users and items in the l-th layer; S4. Analyze the historical interaction data of users and projects, and establish user-user graphs and project-project graphs for users and projects respectively to obtain their explicit relationships. u and i ; The specific process is as follows: S4.
1. Analyze the historical behavior records of the user, and use the following similarity calculation formula to find the k users y with the most similar interests to user x: Among them, N(i) represents the number of users who like item i, N(x) represents the number of items liked by user x, N(y) represents the number of items liked by user y, and C xy represents the similarity between user x and user y; S4.
2. Construct a user similarity matrix, i.e., a user-user graph, consisting of the k users with the closest similarity scores obtained, and input it into the linear layer to obtain the explicit relationship l between users. u ; S4.
3. Analyze the historical behavior records of users, and use the following similarity calculation formula to find the k items v that are most similar to item u: Where, |N(u)| represents the number of users who like item u, and |N(v)| represents the number of users who like item v; S4.
4. Construct the project similarity matrix consisting of the k items with the closest similarity, that is, the project-project graph, and then perform normalization to obtain the final project similarity matrix C'. uv : Input it into the linear layer to obtain the explicit relationship l between items i ; S5. Integrate the implicit relationship a of the user and the project obtained in S3 u and a i with the explicit relationship l of the user and the project obtained in S4 u and l i respectively to obtain the feature representation e of the user and the project u and e i ; The specific process is as follows: the implicit relationship a between the user and the project obtained in S3 u and a i are added element-wise to the explicit relationship l between the user and the project obtained in S4 u and l i to obtain the feature representation e of the user and the project u and e i : e u = a u + l u , e i = a i + l i ; S6. Using the feature representations e of users and items obtained in S5 u and e i , the score of the target user for the target item is obtained through an inner product operation, thereby predicting the preference of the user for the item.
2. The method for multi-relationship graph convolutional collaborative filtering recommendation according to claim 1, wherein: The specific process of step S2 is as follows: The initial embedding vectors of user u and item i are convolved on the user-item bipartite graph, that is: where l represents the number of graph convolution layers, and represent the embedding vectors of user u and item i after propagation in the l-th layer, respectively. N u , N i represent the number of neighbor nodes of user u and item i, respectively. is a symmetric normalization term.
3. The multi-relationship based graph convolutional collaborative filtering recommendation method according to claim 1, characterized in that: In step 6, the recommendation model is optimized using a loss function. The specific process includes: using the classic loss function Bayesian personalized ranking to optimize the recommendation model, which assumes that the observed interactions should have higher prediction scores than the unobserved interactions: where \(O = \{(u, i, j)|(u, i)\in R\) + , (u, j)\in R\) -}\) represents paired training data, \(R\) + represents the set of observed interactions, \(R\) - represents the set of unobserved interactions, \(e\) u and \(e\) i represent the feature representations of users and items, \(e\) j represents the feature representation of items that have no interaction with user \(u\), \(\sigma(\cdot)\) is the sigmoid function, and \(\gamma\) is used to control the L2 regularization strength to prevent overfitting.
4. A multi-relation graph convolutional collaborative filtering recommendation system, characterized in that: Including: Initialization module, used to obtain the initial embedding vectors of user u and item i through one-hot encoding Graph Convolutional Network, for the initial embedding vectors of input user u and item i Perform convolution to obtain the embedding vectors of the user and item after l layers of convolution and Attention network, used to obtain the embedding vectors of users and items for each graph convolutional layer and assign different weights α l and β l , and use these weights to obtain the implicit relationships a u and a i ; The specific process is as follows: Introduce the attention mechanism to obtain the embedding vectors of users and items obtained by each graph convolutional layer and assign different weights α l and β l , and use these weights to obtain the implicit relationships a u and a i : where α l and β l represent the attention weights of the feature contributions of the users and items in the l-th layer, respectively; A display graph construction module, which is used to analyze the historical interaction data of users and projects, and establish a user-user graph and a project-project graph for users and projects respectively to obtain the explicit relationships between them. u and i ; The specific process is as follows: S4.
1. Analyze the historical behavior records of the user, and use the following similarity calculation formula to find the k users y with the most similar interests to user x: Among them, N(i) represents the number of users who like item i, N(x) represents the number of items liked by user x, N(y) represents the number of items liked by user y, and C xy represents the similarity between user x and user y; S4.
2. Construct a user similarity matrix, i.e., a user-user graph, consisting of the k users with the closest similarities obtained, and input it into the linear layer to obtain the explicit relationship l between users. u ; S4.
3. Analyze the historical behavior records of users, and use the following similarity calculation formula to find the k items v that are most similar to item u: Where, |N(u)| represents the number of users who like item u, and |N(v)| represents the number of users who like item v; S4.
4. Construct the project similarity matrix consisting of the k items with the closest similarity obtained, that is, the project-project graph, and then perform normalization to obtain the final project similarity matrix C'. uv : Input it into the linear layer to obtain the explicit relationship l between items i ; Integration module, used to integrate the implicit relationships a between users and projects u and a i with the explicit relationships l between users and projects u and l i respectively, to obtain the feature representations e of users and projects u and e i ; The specific process is as follows: The obtained implicit relationships a between users and projects u and a i are added element-wise with the obtained explicit relationships l between users and projects u and l i to obtain the feature representations e of users and projects u and e i : e u = a u + l u , e i = a i + l i ; A prediction module for obtaining, through inner product operation, the score of a target user for a target item from the feature representations e of the user and the item, and predicting the preference of the user for the item. u and e i through inner product operation, and predicting the preference of the user for the item.
5. An electronic device, characterized in that: Including at least one processor and a memory communicatively connected to the processor. The memory stores a program executable by the at least one processor. When the program is executed by the processor, the recommendation method according to any one of claims 1-3 can be implemented.
Citation Information
Patent Citations
Personalized recommendation method and system based on collaborative filtering and deep learning
CN112598462A
Collaborative filtering recommendation algorithm based on graph convolution attention mechanism
CN112905900A