Decoupled Graph Comparison Collaborative Filtering Recommendation Method Integrating Structural Neighbors and Semantic Neighbors
By comparing the collaborative filtering method of fusion structural neighbors and semantic neighbors, the problem of unconsidered intention importance in the prior art is solved, and a more efficient and accurate recommendation effect is achieved.
Patent Information
- Application Number
- CN202310885035.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-18
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2043-07-18
AI Technical Summary
The existing comparative learning tasks fail to effectively consider the importance of different ideas in the recommendation system, are susceptible to data noise, and lack learning for non-connected projects, resulting in suboptimal learning efficiency.
By decoupling the user and project's embedded representations at the intent level, fusing the representation learning of structural neighbors and semantic neighbors, and constructing joint contrast learning tasks, including initializing the embedded representation, learning of structural neighbors and semantic neighbors, aggregation and contrast learning processes.
It improves the learning efficiency and accuracy of the recommendation system, reduces interactive noise, and enhances the interpretability and adjustability of the learning effect.
Smart Images

Figure CN116738069B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information recommendation, and particularly to a decoupled graph contrast collaborative filtering recommendation method that fuses structural neighbors and semantic neighbors. Background Art
[0002] Recommendation technology is a method for users to quickly and effectively screen out objects that meet their preference characteristics from a large number of objects. Recommendation technology is widely used in various Internet services and plays an important role in fields such as e-commerce, advertising, and social media. In recent years, in order to improve the accuracy of the recommendation system, graph neural networks have begun to be applied to collaborative filtering, realizing collaborative filtering through neighborhood aggregation and graph structure iteration, and simultaneously stacking multiple graph convolutional layers to capture high-order collaboration signals. Graph-based collaborative filtering models have achieved significant accuracy improvement in the recommendation system.
[0003] To solve the problem of scarce labels and further improve the accuracy, contrastive learning has begun to be applied to recommendation. One typical method is to use structural perturbations, such as enhancing the user-item bipartite graph with a specific proportion of random edge / node loss, and then maximizing the consistency of representations under different views. In this setting, the contrastive learning task acts as an auxiliary task and is jointly optimized with the recommendation task, achieving state-of-the-art recommendation accuracy.
[0004] Existing contrastive learning tasks focus on adjusting the graph structure. Usually, nodes are regarded as a whole without considering the importance of different intentions, and are easily affected by data noise. During the message propagation process, only the learning of structurally connected items is considered, lacking the learning of non-connected items, resulting in suboptimal learning efficiency. Summary of the Invention
[0005] The purpose of the present invention is to apply the separated intentions to contrastive learning, and at the same time fuse the content of structural neighbors and semantic neighbors to optimize the recommendation effect, thereby proposing a decoupled graph contrast collaborative filtering recommendation method that fuses structural neighbors and semantic neighbors. The content includes:
[0006] A decoupled graph contrast collaborative filtering recommendation method that fuses structural neighbors and semantic neighbors, characterized by comprising the following steps:
[0007] S1: Initialize the embedding representations of users and items, project them into different spaces respectively, and perform decoupling at the intention level;
[0008] S2: Based on the user-item interaction graph, perform representation learning on structural neighbors;
[0009] S3: Use a clustering algorithm to mine potential semantic neighbors and perform representation learning on semantic neighbors;
[0010] S4: Aggregate the learning factors of structural neighbors and semantic neighbors to generate the complete high-order representations of users and items;
[0011] S5: Construct structural and semantic contrastive learning tasks respectively through node representations;
[0012] S6: Construct a loss function to optimize the model and predict the interaction probability of users and items.
[0013] Based on the above content, the specific steps of S1 are as follows:
[0014] S11: Perform initial embedding representation on the ids of users and items;
[0015] S12: Use non-linear transformation to project the initial embedding into a total of K subspaces for decoupling K different intents. The specific process is as follows:
[0016]
[0017]
[0018] where, e i and e j represent the matrices W k with the initial embedding size of users and items being and the vectors b k with the length of both representing the training parameters of the k-th intent. D is the embedding length, σ is the sigmoid function, and the L2 norm is used to prevent overfitting; the obtained and are the embedding representations of the k-th intent of users and items;
[0019] Based on the above content, the specific steps of S2 are as follows:
[0020] S21: Based on the interaction graph of users and items, calculate the similarity scores of users / items and their structural neighbors on different intents, expressed as:
[0021]
[0022] where, represents the structural neighbor similarity score of user i for item j for the k-th intent, and are the embeddings of the l-th order user i and the structural item j corresponding to the k-th intent, is the set of all intents of this user, exp is the exponential function, sim is the cosine similarity function, l is the order of the graph neural network, and τ is the temperature coefficient.
[0023] S22: Calculate the learning factor of the user for any structurally neighboring item by using the similarity scores on each intention:
[0024]
[0025] where N(i) represents all the neighboring items of user i at the l-th order, which represents the learning factor of this user for any neighboring item j. Similarly, the learning factor of the item can be obtained:
[0026]
[0027] where N(j) represents all the neighboring items of item j at the l-th order, which represents the learning factor of this item for any neighboring user i.
[0028] Based on the above, the specific steps of S3 are as follows:
[0029] S31: Calculate the interest value of all the structural neighbors of this user based on intention k according to the structural neighbor similarity score of user i for item j on intention k, which is expressed as follows:
[0030]
[0031] where, represents the interest value of user i for intention k at the l-th order, and the importance of this intention can be sorted according to the size of the interest value.
[0032] S32: Select the top m (m < K) intentions with the highest interest values as the index for selecting semantic neighbors at each order, and set masks for the embedding dimensions of other intentions.
[0033] S33: Apply the K-means clustering algorithm to obtain the prototypes of users or items, and at the same time use the EM algorithm to optimize this process. The optimization objective is to maximize the following log-likelihood function, which is expressed as follows:
[0034]
[0035] where θ represents the set of parameters, p(u i ; θ) is the probability density function, the total number of users is I, z i represents the prototype of user u obtained through clustering i , z i represents the set of user clusters, and n represents the number of clusters.
[0036] S34: Consider the prototype embedding of the cluster where the user / item is located as the semantic neighbor, and the semantic neighbor similarity score can be calculated. The calculation method is as follows:
[0037]
[0038] Among them, represents the similarity score of user i for semantic neighbor z with respect to intention k of the l-th order; i The similarity score; is the embedding of the semantic neighbor item corresponding to intention k of user i of the l-th order.
[0039] S35: Using the similarity scores on each intention, calculate the learning factor of the user for any semantic neighbor item:
[0040]
[0041] where N ′(i) represents any semantic neighbor of user i, that is, it represents the learning factor of this user for any semantic neighbor user i. Similarly, the learning factor of the item can be obtained:
[0042]
[0043] where N ′(j) represents all neighbor items of item j at the l-th order, that is, it represents the learning factor of this item for any neighbor item j.
[0044] Based on the above content, the specific steps of the so-called S4 are as follows:
[0045] S41: Aggregate the semantic neighbor and structure neighbor factors, and the aggregation process is:
[0046]
[0047]
[0048] where the matrix W l represents the training parameter of size K×K at the l-th order, and the coefficient α is the weight adjustment parameter, and are the embeddings of the user and item corresponding to intention k at the l-th order.
[0049] S42: The final user and item representations after expanding each order of embedding to a high-order graph and stacking are:
[0050]
[0051] where L is the total number of orders. When l = 0, the user and item embeddings are initial values to reduce the impact of overfitting.
[0052] Based on the above content, the specific steps of the so-called S5 are as follows:
[0053] S51: Randomly perturb the node embeddings during message propagation, and the view generated in this way is the contrast view;
[0054] S52: Combine the user embeddings output at each layer with the corresponding user embeddings in the contrast view to form positive samples, and regard the other user embeddings as negative samples. Propose a graph-structured contrast learning objective that minimizes the distance between the two:
[0055]
[0056] Among them, is the embedding output by the l-th order user, is the corresponding embedding under the contrast view, represents all user embeddings in the contrast view, and the total number of users is I, The structural contrast loss of the user. Similarly, the structural contrast loss of the project is expressed as follows:
[0057]
[0058] Among them, is the embedding output by the l-th order project, is the corresponding embedding under the contrast view. represents all project embeddings in the contrast view, and the total number of projects is J.
[0059] S53: The overall structural contrast loss function Loss st is represented by the weighted sum of the above two losses:
[0060]
[0061] where γ is the weight parameter used to adjust the weight ratio of the two losses.
[0062] S54: Combine the user with the prototype embedding in the clustering cluster to form positive samples, and the semantic neighbors in other clusters are regarded as negative samples. Propose a semantic neighbor contrast learning objective that minimizes the distance between the two:
[0063]
[0064] Among them, is the embedding output by the l-th order user, is its semantic neighbor, represents all the semantic neighbors of this user, i.e., represents the semantic contrast loss of the user. Similarly, the semantic contrast loss of the project is expressed as follows:
[0065]
[0066] Among them, is the embedding output for the l-th order item, is its semantic neighbor, represents all the semantic neighbors of the item.
[0067] S55: The overall semantic contrast loss function Loss se is represented by the weighted sum of the above two losses:
[0068]
[0069] Based on the above, the specific steps of S6 are as follows:
[0070] S61: After training to obtain the final embeddings of users / items, the predicted score can be calculated:
[0071] y i,j = u i T v j
[0072] Among them, y i,j represents the product score of the transpose of the user i embedding and the item j embedding.
[0073] S62: Use the Bayesian personalized ranking loss commonly adopted by the recommendation system to make the predicted score of the observed interaction item higher than that of the unobserved interaction item. The Bayesian personalized ranking loss Loss bpr is expressed as follows:
[0074]
[0075] Among them, j + represents the item observed by user i in the positive sampling in batch ρ, and j - is the unobserved item obtained by negative sampling.
[0076] S63: Integrate the recommendation loss and the self-supervised loss into a multi-task optimization objective. The overall loss function is as follows:
[0077] Loss = Loss bpr + λ1Loss st + λ2Loss se + λ3‖Θ‖2
[0078] Among them, λ1, λ2, and λ3 are the weight hyperparameters controlling the two contrast objectives and the regularization term respectively, Θ is the set of model parameters, and Loss represents the overall loss function of the model.
[0079] Starting from three aspects: decoupling user - item intentions, integrating structural and semantic neighbor information, and constructing a joint contrastive learning task, the present invention proposes a decoupled graph contrast collaborative filtering recommendation method that integrates structural neighbors and semantic neighbors. Compared with the prior art, the advantages of the present invention are as follows:
[0080] 1. During the propagation process, the present invention performs a decoupling operation on the original input, enabling different intentions to automatically calculate weights during propagation. Compared with the original traditional graph learning methods, it can reduce interaction noise and make the recommendation highly interpretable.
[0081] 2. Based on structural learning, the present invention introduces a learning strategy for semantic neighbors. Compared with the original traditional learning strategies, it can aggregate more information of homogeneous structures to the original node and enhance the learning effect.
[0082] 3. In the contrastive learning task, the present invention establishes contrastive learning schemes for structural neighbors and semantic neighbors respectively. Compared with the original traditional contrastive learning schemes, the learning is more adjustable and the optimization effect on the model is more obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] Figure 1 is the specific flowchart of a decoupled graph contrast collaborative filtering recommendation method that integrates structural neighbors and semantic neighbors according to the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0084] The technical solutions of the present invention will be further described below in conjunction with the drawings and specific embodiments.
[0085] 1. Training dataset
[0086] In the embodiment of the present invention, the dataset Yelp2018 is taken as an example. Yelp2018 is a publicly available dataset used in the Yelp website challenge in 2018, containing 1,561,406 rating data of 38,048 items from 31,668 users, including interaction data files, item data files, and user data files. The dataset contains the ratings of users for items. Considering the existence of reviews or ratings as the interaction between users and items, the explicit feedback rating data is thus converted into implicit feedback interaction behavior data. Users and interaction items with more than 10 interactions are selected. For any user, 80% of the interaction items are randomly selected as training data, and 10% of the data is randomly selected from them as the validation set, and the remaining 20% of the interaction items will be used as the test set for model evaluation.
[0087] 2. Obtain the decoupled user and item embedding representations
[0088] Based on the training dataset obtained from the above-mentioned data training, initialize the embedding, and project the initialized embedding to generate an intent-decoupled embedding, which includes the following steps:
[0089] Step 1: To generate high-order representations of users and items, I + J initial embeddings of length D need to be randomly generated according to the number of users and items, and then proceed to Step 2;
[0090] Step 2: To obtain the intent-decoupled embedding, use a non-linear transformation to project the initial embedding into a total of K subspaces for decoupling K different intents. The basic idea is to use a non-linear transformation to make the embedding have a non-linear relationship in different dimensions, so that the decoupled intents have a certain degree of independence. The specific process is as follows:
[0091]
[0092]
[0093] where, e i and e j represent the initial embeddings of users and items with a size of matrix W k and vector b with a length of k both represent the training parameters of the k-th intent. D is the embedding length, σ is the sigmoid function, and the L2 norm is used to prevent overfitting; the and obtained through training are the embedding representations of the k-th intent of users and items;
[0094] 3. Learn the structural neighbor representation based on the graph structure
[0095] According to the user-item interaction graph, calculate the similarity scores of users / items and their structural neighbors on different intents, and calculate the learning factor through the similarity scores, which includes the following steps:
[0096] Step 1: To effectively obtain the role of different decoupled intents in the message propagation process, based on the user-item interaction graph, calculate the similarity scores of users / items and their structural neighbors on different intents, which is expressed as:
[0097]
[0098] In represents the structural neighbor similarity score of user i for item j for intent k, and are the embeddings of the l-th order user i and structural item j corresponding to intent k, It is the set of all the user's intents. exp is the exponential function, sim is the cosine similarity function, l is the order of the graph neural network, and τ is the temperature coefficient. Through the calculated similarity scores, the feature information of the structural neighbors can be effectively learned. After calculating the similarity scores, proceed to Step Two;
[0099] Step Two: Use the similarity scores on each intent to calculate the learning factor of the user for any structural neighbor item. The basic idea is that the higher the similarity score, the more interested the user is in this intent of the item, and this intent should have a greater weight in the learning process. The formula is calculated as follows;
[0100]
[0101] Among them, N(i) represents all the neighbor items of user i at the l-th order, which represents the learning factor of this user for any neighbor item j. Similarly, the learning factor of the item can be obtained:
[0102]
[0103] Among them, N(j) represents all the neighbor items of item j at the l-th order, which represents the learning factor of this item for any neighbor user i. In graph structure learning, the representation of neighbor nodes will be passed to itself through the learning factor.
[0104] 3. Learn the semantic neighbor representation based on the clustering algorithm
[0105] According to the K-means and EM clustering algorithms, train to obtain the semantic neighbors of users and items, calculate the similarity scores between users / items and semantic neighbors on different intents, and calculate the learning factor through the similarity scores. It includes the following steps:
[0106] Step One: According to the structural neighbor similarity score of user i for item j on intent k, calculate the interest value of all the structural neighbors of this user based on intent k, which is expressed as follows:
[0107]
[0108] Among them, represents the interest value of user i for intent k at the l-th order. The importance of this intent can be sorted by the size of the interest value. The higher the interest value, the greater the attractiveness of this intent to the user. After calculating t k,l proceed to Step Two;
[0109] Step Two: If the user has a strong interest in a certain type of intent of an item, then this type of intent will be given priority when choosing an item. Therefore, select the top m (m < K) intents with the highest interest values As an index for selecting semantic neighbors at each level, set masks for other intent embedding dimensions, and after obtaining the modified user and item embeddings, proceed to Step 3;
[0110] Step 3: The spatial distances of similar users / items are often closer, and these nodes can be partitioned into several clusters. Therefore, apply the K-means clustering algorithm to obtain the prototypes of users or items, and at the same time use the EM algorithm to optimize this process. The optimization objective is to maximize the following log-likelihood function, which is expressed as follows:
[0111]
[0112] where, θ represents a set of parameters, p(u i ; θ) is the probability density function, the total number of users is I, z i represents the prototype of user u i obtained through clustering, z i represents the set of user clusters, n represents the number of clusters. After training to obtain the prototypes of users or items, proceed to Step 4;
[0113] Step 4: Regarding the prototype embedding of the cluster where the user / item is located as a semantic neighbor, the semantic neighbor similarity score can be calculated, and the calculation method is as follows:
[0114]
[0115] where, represents the similarity score of user i for the semantic neighbor z i for the k-th intent at the l-th level; is the embedding of the k-th intent corresponding to the semantic neighbor item of user i at the l-th level, and proceed to Step 5;
[0116] Step 5: Using the similarity scores on each intent, calculate the learning factor of the user for any semantic neighbor item:
[0117]
[0118] where, N ′(i) represents any semantic neighbor of user i, i.e., represents the learning factor of this user for any semantic neighbor user i. Similarly, the learning factor of the item can be obtained:
[0119]
[0120] where, N ′(j) represents all neighbor items of item j at the l-th level, i.e., represents the learning factor of this item for any neighbor item j. In semantic neighbor learning, the representation of neighbor nodes will be passed to itself through the learning factor.
[0121] 4. Generate the complete high - order representations of users and items
[0122] According to the learning factors of structural neighbors and semantic neighbors, expand them to a high - order graph neural network, and generate the complete high - order representations of users and items after aggregation, which includes the following steps:
[0123] Step 1: Aggregate the semantic neighbor factor and the structural neighbor factor. The aggregation process is as follows:
[0124]
[0125]
[0126] Among them, the matrix W l represents the training parameter of size K×K at the l - th order. The coefficient α is the weight - tuning parameter, and are the embeddings of the l - th order user and item corresponding to the intention k respectively. Obtain the user and item embeddings of each order and enter Step 2;
[0127] Step 2: Expand the embeddings of each order to a high - order graph and stack them. The final user and item representations are as follows:
[0128]
[0129] Among them, L is the total number of orders. When l = 0, the user and item embeddings are initial values to reduce the impact of over - fitting. 5. Construct the contrastive learning tasks of structure and semantics
[0130] Perform data augmentation by randomly perturbing each order of node representations to generate contrastive views. Construct the contrastive learning tasks of structure and semantics through the contrastive views and the original views, and optimize through the joint contrastive learning tasks, which includes the following steps.
[0131] Step 1: Design a decoupled data augmentation strategy based on node perturbation. Randomly perturb the node embeddings during the message - passing process. The view generated in this way is the contrastive view, and the process is as follows:
[0132] c′={c1 + Δ1⊙c1,…,c I+J +Δ I+J ⊙c I+J}
[0133] Among them, represents any node c iThe perturbation vector, where the parameter θ is adjustable and θ ∈ [0, 1], and this value is usually different for different nodes. This perturbation will be carried out during the message passing process and will not damage the graph structure. This way of generating views can promote a more uniform representation distribution and higher adjustment feasibility. After generating the contrast views, proceed to Step 2:
[0134] Step 2: Combine the user embeddings output at each layer with the corresponding user embeddings in the contrast views to form positive samples, and regard the other user embeddings as negative samples. Propose a graph structure contrast learning objective that minimizes the distance between the two:
[0135]
[0136] where, is the embedding output by the l-th order user, is the corresponding embedding under the contrast view, represents all user embeddings in the contrast view, and the total number of users is I, the structural contrast loss of the user. Similarly, the structural contrast loss of the item is expressed as follows:
[0137]
[0138] where, is the embedding output by the l-th order item, is the corresponding embedding under the contrast view. represents all item embeddings in the contrast view, and the total number of items is J. Proceed to Step 3;
[0139] Step 3: The overall structural contrast loss function Loss st can be represented by weighting the above two losses:
[0140]
[0141] where γ is the weight parameter used to adjust the weight ratio of the two losses. Proceed to Step 4;
[0142] Step 4: Since the selection of semantic neighbors has strong randomness, data augmentation is not performed on semantic neighbors. The semantic neighbors of users are homogeneous structure neighbors. The user and the prototype embedding in the clustering cluster form positive samples, and the semantic neighbors in other clusters are regarded as negative samples. Propose a semantic neighbor contrast learning objective that minimizes the distance between the two:
[0143]
[0144] where, is the embedding output by the l-th order user, is its semantic neighbor, Denote all the semantic neighbors of the user, i.e., represent the semantic contrast loss of the user. Similarly, the semantic contrast loss of the item is expressed as follows:
[0145]
[0146] where is the embedding output by the l-th order item, is its semantic neighbor, denote all the semantic neighbors of the item. Proceed to Step Five;
[0147] Step Five: The overall semantic contrast loss function Loss se can be represented by the weighted sum of the above two losses:
[0148]
[0149] 6. Construct a loss function to optimize the model and predict the interaction probabilities of users and items
[0150] Step One: After training to obtain the final embeddings of users / items, the predicted scores can be calculated:
[0151] y i,j = u i T v j
[0152] where u i and v j are the final embedding representations of the user and the item, and y i,j represents the product score of the transpose of the user i's embedding and the item j's embedding. Proceed to Step Two;
[0153] Step Two: Use the Bayesian personalized ranking loss commonly adopted by recommendation systems to make the predicted scores of observed interaction items higher than those of unobserved interaction items. The Bayesian personalized ranking loss Loss bpr is expressed as follows:
[0154]
[0155] where j + denotes the item observed by user i in the positive sampling in batch ρ, and j - is the unobserved item obtained by negative sampling. The Adam algorithm is used to minimize the objective function, and parameter updates are performed through the backpropagation algorithm. In each iteration, n negative samples are randomly sampled for each target item. Proceed to Step Three;
[0156] Step Three: Integrate the recommendation loss and the self-supervised loss into a multi-task optimization objective. The overall loss function is as follows:
[0157] Loss = Loss bpr + λ1Loss st + λ2Loss se + λ3‖Θ‖2
[0158] Among them, λ1, λ2, and λ3 are weight hyperparameters that control two comparison objectives and the regularization term respectively, Θ is a set of model parameters, and Loss represents the overall loss function of the model.
[0159] Step 4: Use evaluation metrics recall (Recall) and normalized discounted cumulative gain (NDCG) to evaluate the performance of the model. Recall calculates the proportion of successfully predicted items among all positive samples. The higher the recall, the higher the recommendation accuracy. Normalized discounted cumulative gain NDCG is used to measure the quality of the recommendation ranking, and scores are assigned based on the hit positions. The larger the result, the better the prediction effect. They are defined as follows:
[0160]
[0161]
[0162] Among them, U represents the set of users, represents the set of recommended items predicted by the model for user u, and R(u) is the set of true recommended items of this user in the test set. K represents the top K recommended items for user u, δ is an indicator function representing the relevance between item i and user u, which is set to 1 if there is an interaction, otherwise 0, and min(|R(u)|, K) represents the set of items with the highest relevance in K.
Claims
1. A decoupled graph contrast collaborative filtering recommendation method that fuses structural neighbors and semantic neighbors, characterized in that It includes the following steps: S1: Initialize the embedding representations of users and items, project them into different spaces respectively for decoupling at the intention level. The specific steps of S1 are as follows: S11: Conduct initial embedding representations for the ids of users and items; S12: Use non-linear transformation to project the initial embedding into a total of K subspaces for decoupling K different intentions. The specific process is as follows: Among them, e i and e j represent that the initial embedding sizes of the user and the project are matrix w k and the length is vector b k both represent the training parameters of the k-th intention. D is the embedding length, σ is the sigmoid function, and the L2 norm is used to prevent overfitting; the obtained through training and are the embedding representations of the user and the project intention k; S2: Based on the user-item interaction graph, conduct representation learning for structural neighbors. The specific steps of S2 are as follows: S21: Based on the user-item interaction graph, calculate the similarity scores of users / items and structural neighbors on different intentions, expressed as: Among them, represents the structural neighbor similarity score of user i for item j with respect to intention k, and are the embeddings of user i and structural item j corresponding to intention k of the l-th order, is the set of all intentions of this user; exp is the exponential function, sim is the cosine similarity function, l is the order of the graph neural network, τ is the temperature coefficient, and are the embeddings of the user and item corresponding to intention k of the l-th order; S22: Use the similarity scores on each intention to calculate the learning factor of the user for any structural neighbor item: Among them, N(i) represents all neighbor items of user i at the l-th order, That is, it represents the learning factor of this user for any neighbor item j, and the learning factor of the item is obtained: Among them, N(j) represents all the neighbor items of item j at the l-th level, that is, it represents the learning factor of this item for any neighbor user i; S3: Use clustering algorithms to mine potential semantic neighbors and conduct representation learning for semantic neighbors; S4: Aggregate the learning factors of structural neighbors and semantic neighbors to generate complete high-order representations of users and items; S5: Respectively construct structural and semantic contrast learning tasks through node representations; S6: Construct a loss function to optimize the model and predict the interaction probabilities of users and items.
2. The decoupled graph contrast collaborative filtering recommendation method that fuses structural neighbors and semantic neighbors according to claim 1, characterized in that The specific steps of S3 are as follows: S31: According to the structural neighbor similarity scores of user i for item j on intention k, calculate the interest values of all structural neighbors of this user based on intention k, expressed as follows: Among them, represents the interest value of user i at the l-th level for intention k, and the importance of this intention is sorted according to the magnitude of the interest value; S32: Select the top m intents with the highest interest values as the index for selecting semantic neighbors at each level, and set masks for the embedding dimensions of other intents, where m < k; S33: Apply the K-means clustering algorithm to obtain the prototypes of users or items, and at the same time use the EM algorithm to optimize this process. The optimization goal is to maximize the following log-likelihood function, expressed as follows: Among them, θ represents the set of parameters, p(u i ; θ) is the probability density function, the total number of users is I, z i represents the prototype of user u i obtained by clustering, z i represents the set of user clusters, and n represents the number of clusters; S34: Regard the prototype embedding of the cluster where the user / item is located as the semantic neighbor, and calculate the semantic neighbor similarity score. The calculation method is as follows: Among them, represents the similarity score of user i for semantic neighbor z i for the intention k of the l-th order; is the embedding of the intention k corresponding to the semantic neighbor item of user i of the l-th order; S35: Use the similarity scores on each intention to calculate the learning factor of the user for any semantic neighbor item: Among them, N ′(i) represents any semantic neighbor of user i That is, it represents the learning factor of this user for any semantic neighbor user i; Obtain the learning factor of the item: Among them, N ′(j) represents all the neighbor items of item j at the l-th order, that is, it represents the learning factor of this item for any neighbor item j.
3. A decoupled graph comparison collaborative filtering recommendation method that combines structural neighbors and semantic neighbors, characterized in that, The specific steps of S4 are as follows: S41: Aggregate the structural neighbor and semantic neighbor factors. The aggregation process is: Among them, matrix W l represents the training parameter of size K×K at the l-th order, and the coefficient α is the weight adjustment parameter, and are the embeddings of the l-th order user and item corresponding to intention k respectively; S42: Expand each-order embedding to a high-order graph and stack it. The final user and item representations are: Among them, L is the total order. When l = 0, the user and item embeddings are initial values to mitigate the impact of overfitting.
4. A decoupled graph comparison collaborative filtering recommendation method that fuses structural neighbors and semantic neighbors, characterized in that The specific steps of S5 are as follows: S51: Randomly perturb the node embeddings during the message propagation process. The views generated in this way are contrast views; S52: Combine the user embeddings output by each layer with the corresponding user embeddings in the contrast view to form positive samples, and regard other user embeddings as negative samples. Propose a graph structure contrast learning objective to minimize the distance between the two: Among them, is the embedding output for the l-th order user, is the corresponding embedding under the comparison view, represents all user embeddings in the comparison view, and the total number of users is I, the structural contrast loss of the user; similarly, the structural contrast loss of the project is expressed as follows: Among them, is the embedding output for the l-th order item, is the corresponding embedding under the comparison view, represents all item embeddings in the comparison view, and the total number of items is J; S53: The overall structure comparison loss function Loss st is represented by the weighted sum of the above two losses: Among them, γ is the weight parameter used to adjust the weight ratio of the two losses; S54: Combine the user and the prototype embedding in the clustering cluster to form positive samples, and regard the semantic neighbors in other clusters as negative samples. Propose a semantic neighbor contrast learning objective to minimize the distance between the two: wherein, is the embedding output for the l-th order user, is its semantic neighbor, represents all the semantic neighbors of the user, i.e., represents the semantic contrast loss of the user. Similarly, the semantic contrast loss of the item is expressed as follows: wherein, is the embedding output for the l-th order item, is its semantic neighbor, represents all the semantic neighbors of the item; S55: Represent the overall semantic contrast loss function Loss se as the weighted sum of the above two losses: