A recommendation method based on a guided diffusion model enhanced graph encoder
By enhancing the graph encoder through a guided diffusion model and combining structural and semantic information to optimize the representation of users and items, the imbalance between structural and semantic reconstruction in existing methods is resolved, thereby improving the performance and robustness of the recommendation system.
Patent Information
- Application Number
- CN202411861406.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-12-17
AI Technical Summary
Existing generative self-supervised learning methods fail to fully utilize the semantic information of graphs in recommender systems, resulting in an insufficient balance between structural reconstruction and semantic reconstruction, which affects the recommendation performance.
A guided diffusion model is used to enhance the graph encoder. An adaptive mask encoder is used to enhance the supervision signal at the structural level, and a directed noise diffusion model is used for semantic denoising. The representation of users and items is optimized by combining structural and semantic information.
This approach enables in-depth mining of collaborative signals in graph recommendation systems, enhancing the recommendation model's ability to capture user behavior patterns and improving the accuracy and robustness of recommendations.
Smart Images

Figure CN119807522B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of recommendation algorithm and self-supervised learning, in particular to a recommendation method based on a graph encoder enhanced by a guided diffusion model. BACKGROUND
[0002] Under the background of the rapid development of current digitization and information technology, the application of recommendation systems in online platforms is becoming more and more common, and has become an important tool for users to obtain information and personalized services. From the perspective of graph structure, a recommendation system can be modeled as a bipartite graph containing nodes and edges, where nodes represent users and items (such as goods, articles, movies, etc.), and edges reflect the interaction between users and items, such as clicks, purchases or ratings. This graph structure not only reveals the potential patterns of user interests, but also provides rich contextual information for recommendation algorithms. Graph-based recommendation systems can effectively mine the relationships and propagation paths in the network, thereby improving the recommendation accuracy and providing strong support for diversified network services and personalized applications.
[0003] In practical applications, recommendation systems need to handle large-scale user and item interaction data, such as Amazon's product recommendations and Douyin's video recommendations. These data are often sparse and contain noise, for example, most users only browse a small number of goods or like a small number of content, and many clicks may not reflect real interests. To solve these problems, contrastive learning is introduced, which helps the model learn the implicit relationship between users and items by constructing contrastive views (such as node subgraphs, randomly perturbed graph structures) and maximizing the mutual information between views. However, the construction of contrastive views requires careful design, and any mistake may lead to view distortion; at the same time, the calculation cost of negative sample sampling is high, which limits its application in large-scale scenarios. Generative self-supervised learning has shown significant advantages by directly reconstructing the original graph data. For example, in e-commerce, generative methods can predict the feature distribution of user-uninteracted goods, thereby better capturing user preferences; in social recommendation, the user relationship graph can be reconstructed to denoise and mine potential associations.
[0004] However, the potential of existing generative self-supervised learning methods in recommendation systems has not been fully tapped, and the main problem is that they focus too much on structure reconstruction and ignore the importance of semantic reconstruction. Specifically, existing methods often focus on restoring the structural information of the graph, but do not effectively utilize the rich semantic information in the graph, which leads to the inability to fully exploit the two-dimensional information (structure and semantics) of the graph representation. In addition, traditional denoising autoencoders and variational graph encoders lack sufficient semantic reconstruction capability in collaborative filtering tasks. Due to the limited ability of single-step hidden state compression, they are easily disturbed when dealing with noisy or incorrect interaction data, leading to deviations in the optimization of semantic space and affecting the recommendation effect. SUMMARY
[0005] The present application aims to provide a recommendation method based on a graph encoder enhanced by a guided diffusion model to solve the above defects.
[0006] To achieve the above-mentioned purpose, the present application provides the following technical solutions:
[0007] A recommendation method based on a graph encoder enhanced by a guided diffusion model, comprising the following steps:
[0008] S1, modeling a user-item interaction network as a bipartite graph G=(V,E), wherein the node set V represents users and items in the interaction network, and the edge set E represents the interaction behavior between users and items; initializing a user-item interaction adjacency matrix and normalizing it to generate a Laplacian matrix used in the model inference stage;
[0009] S2, enhancing the supervision signal from the structural level, specifically, based on user click behavior information and item popularity, adaptively calculating a mask probability for each click behavior to generate a partially visible mask bipartite graph as the input of the mask graph encoder in the model training process;
[0010] S3, enhancing the supervision signal from the semantic level, specifically, using the mask graph encoder to generate representations of users and items, and using a diffusion model guided by adding directed noise and introducing collaborative signals for denoising processing;
[0011] S4, in the inference stage, using the graph encoder to generate user and item representations, and optimizing the semantic information of the representations through the trained diffusion model, and finally predicting the possible clicked items for each user.
[0012] Preferably, in step S1, the specific steps are as follows:
[0013] S11, determining the user-item interaction adjacency matrix A:
[0014]
[0015] In the formula, R is the user-item interaction matrix, T represents the matrix transpose, 0 represents the all-zero matrix, and M and N represent the number of users and items, respectively;
[0016] S12, normalizing the user-item interaction adjacency matrix to calculate the Laplacian matrix L used in the graph convolution process:
[0017]
[0018] In the formula, A is the interaction adjacency matrix, and D is the adjacency matrix degree diagonal matrix.
[0019] Preferably, in step S2, the supervision signal is enhanced from the structural level, and the specific steps are as follows:
[0020] S21, by disturbing the interaction edges of the original user-item interaction bipartite graph G=(V, E), a masked interaction graph is obtained, and a masked graph encoder is constructed:
[0021]
[0022] In the formula, ε represents an edge set, is a mask vector composed of 0 and 1, o, r, and m represent the original edge set, the remaining edge set, and the masked edge set respectively; the dot product operation is performed on the original edge set and the mask vector to obtain the remaining edge set;
[0023] S22, the mask vector is obtained by an adaptive mask strategy:
[0024]
[0025] In the formula, u represents a user, i represents an item, (u, i) represents an interaction edge; m is a bit in the mask vector , the value range is {0, 1}, which represents whether the corresponding edge is masked or retained; p represents the adaptive probability of each edge in the original graph, Bernoulli is a Bernoulli distribution, that is, the adaptive probability of the mask m is obtained by sampling from the Bernoulli distribution;
[0026] S23, the adaptive probability p of each edge is calculated:
[0027]
[0028] In the formula, scr represents the adaptive score calculated by the edge, and degree represents the degree of the user or item node, that is, the adaptive score of the edge is calculated by the degree of the two nodes at both ends of the edge;
[0029]
[0030] In the formula, l represents the lowest probability hyperparameter, h represents the highest probability hyperparameter, min represents the minimum value of scr, and max represents the maximum value of scr, that is, the adaptive probability is obtained by normalizing the adaptive score, and the upper and lower bounds of the probability are controlled by the hyperparameters;
[0031] S24, after using the mask vector obtained in step S22, a masked graph can be obtained, and in the training stage, the masked graph is used as a graph encoder, and through a neighbor aggregation formula, the embedding representation of the user and the item is obtained:
[0032]
[0033] where u (l) denotes the user's l-th layer embedding representation, denotes the mask map, u (l-1) denotes the user's (l-1)-th layer embedding representation, N denotes the user's neighbor nodes; through this formula, the embedding representation of each layer is obtained;
[0034] S25, after obtaining the embedding representation of each layer of the user and the item through the mask map encoder, the final user and item representation is obtained by aggregating the representation of each layer:
[0035]
[0036] where u e is the final embedding representation of the user, and L denotes the number of layers of the graph convolution.
[0037] Preferably, in step S3, the supervision signal is enhanced from the semantic level, and the specific steps are as follows:
[0038] S31, after obtaining the final user and item embedding through the mask map encoder in step S25, a semantic level reconstruction task is performed through a scaled guided diffusion model, and a directed noise adding strategy is used for the forward process of the diffusion model:
[0039]
[0040] where u t denotes the user representation of the t-th step of adding noise, a denotes a value between 0 and 1, which is a control of the noise size, is and ∈ d is a directed random noise added to the user representation;
[0041] S32, in order to adapt to the anisotropic characteristics of the user and item embedding, the random noise of the diffusion forward process is limited to a directed noise, and the formula is as follows:
[0042]
[0043] where sign is a sign function, that is, the noise direction is aligned with the direction of the user or item embedding, is an anisotropic Gaussian noise, which is as follows:
[0044]
[0045] where ∈ is a random Gaussian noise, μ and σ are the mean and variance of the user and item embedding representation, respectively;
[0046] S33, after step S32, the user and item embedding at time t is obtained, and the reverse process of the diffusion model is performed:
[0047]
[0048] wherein, is the representation of the user embedding at time t after reconstruction, represents a normal distribution, μ θ and ∑θ are Gaussian distribution parameters determined by the denoising neural network, and the learnable parameters θ are shared between users and items;
[0049] S34, in the reverse process of the diffusion model in step S33, a denoising model needs to be learned to fit the mean and variance of the distribution, so that the denoising model can be denoised from time t to time t-1; the mean fitting formula is as follows:
[0050]
[0051] wherein, u e t is directly obtained by the forward process formula in step S31, and α is a hyperparameter artificially specified, and the model fits u e 0, that is, the model needs to fit the most initial user or item representation at time 0;
[0052] S35, the guided denoising model is used to complete the reconstruction task under the following conditions:
[0053]
[0054] wherein, MLP is a multi-layer perceptron, u e 0 is obtained by reconstruction through the MLP, is the user embedding at time t, and t represents the input of time, and are conditional embedding and unconditional embedding, respectively, and the unconditional embedding is represented by a full 0 vector, and the conditional embedding formula is as follows:
[0055]
[0056] wherein, I u is the interaction record of the user u, and i e is the representation of the item, that is, the conditional embedding for reconstructing the user representation is the historical interaction of the user, and the preference of the user is used to guide the denoising reconstruction process.
[0057] Preferably, the S4 step is specifically as follows:
[0058] S41, through steps S21-S25, get the final user and item embedding representation, and then update the embedding parameters through the loss function of structure reconstruction by back propagation:
[0059]
[0060] In the formula, The recommendation loss is represented, u represents the user, i + And i - Respectively represent the items interacted by the user and the items not interacted by the user (positive and negative samples), and sigma represents the sigmoid function, And The user scores the positive and negative sample pairs, The original user-item interaction graph is represented;
[0061]
[0062] In the formula, u e And i e Respectively represent the embedding representation of the user and the item, and T represents the matrix transpose; the score Is obtained by the dot product of the user and item embedding transposition, which is used to calculate the loss and the final prediction ranking;
[0063] S42, execute steps S31-S35, do semantic reconstruction through the guided diffusion model, and then update the parameters by calculating the reconstruction loss and back propagation:
[0064]
[0065] In the formula, And Respectively are the conditional reconstruction loss and the unconditional reconstruction loss; the And u e Use mean square error as the loss function, and the final semantic level reconstruction loss is:
[0066]
[0067] In the formula, Is the final semantic level loss, which is obtained by averaging the conditional reconstruction loss and the unconditional reconstruction loss;
[0068] S43, repeat steps S41-S42 until the entire recommendation model parameter converges; in the inference stage of the model, use the scaling guided strategy to further optimize the embedding representation of the user and the item, and finally predict the score and ranking through the dot product of the user and item embedding:
[0069]
[0070] wherein, and are the user embedding representations under conditional and unconditional reconstruction respectively, and the final restored user embedding is obtained by denoising guided by scaling.
[0071] The present application has the following beneficial effects:
[0072] (1) The present application is a recommendation method based on a graph encoder enhanced by a guided diffusion model, which comprehensively considers the structural and semantic levels of a graph. By designing a guided diffusion enhanced mask graph autoencoder, it realizes deep mining of collaborative signals in a graph recommendation system. This new paradigm makes up for the lack of balance between structural reconstruction and semantic reconstruction in existing methods.
[0073] (2) The present application effectively reconstructs the structural information of the graph through an adaptive mask encoder, deeply mines the collaborative relationship between users and items, and enhances the ability of the recommendation model to capture user behavior patterns, providing more accurate structural features for the recommendation task.
[0074] (3) The present application designs a special guided diffusion model to optimize the collaborative filtering process from the semantic level. This method accurately reconstructs the semantic space by gradually adding and removing noise, and fully utilizes self-supervised signals to improve the performance and robustness of the recommendation system from different dimensions. BRIEF DESCRIPTION OF DRAWINGS
[0075] Figure 1 is a flowchart of the method of the present application.
[0076] Figure 2 is a visualization diagram of embedding clustering of a real data set in the embodiment.
[0077] Figure 3 is a visualization diagram of embedding distribution of a real data set in the embodiment. DETAILED DESCRIPTION
[0078] The present application will be further described below in conjunction with embodiments. It should be noted that the embodiments are only examples and illustrations of the present application, and those skilled in the art can make various modifications, supplements or substitutions to the described embodiments or use similar ways to replace them, as long as they do not deviate from the concept of the present application or exceed the scope defined by the present claims, and they should be considered to fall within the protection scope of the present application.
[0079] Embodiment 1:
[0080] Figure 1 is a flowchart of the method of the present application. As shown in Figure 1 , a recommendation method based on a graph encoder enhanced by a guided diffusion model includes the following steps:
[0081] S1, model the user-item interaction network as a bipartite graph G=(V, E), where the node set V represents users and items in the interaction network, and the edge set E represents the interaction behavior between users and items, initialize the user-item interaction adjacency matrix, and perform Laplacian normalization on it to generate the Laplacian matrix used in the model inference stage.
[0082] And model the user-item interaction network as a bipartite graph G=(V, E), where the node set V represents users and items in the interaction network, and the edge set E represents the interaction behavior between users and items, initialize the user-item interaction adjacency matrix, the specific steps are as follows:
[0083] S11, determine the user-item interaction adjacency matrix A:
[0084]
[0085] In the formula, R is the user-item interaction matrix, T is the matrix transpose, 0 is the all-zero matrix, and M and N are the number of users and items;
[0086] S12, normalize the user-item interaction adjacency matrix, and calculate the Laplacian matrix used in the graph convolution process
[0087]
[0088] In the formula, A is the interaction adjacency matrix, and D is the adjacency matrix degree diagonal matrix.
[0089] S2, enhance the supervision signal from the structure level, specifically, based on the user click behavior information and the popularity of the item, adaptively calculate the mask probability for each click behavior, generate a partially visible mask bipartite graph, and input it as the mask graph encoder in the model training process.
[0090] As shown in the adaptive mask of the U-I graph in Figure 1 , enhance the supervision signal from the structure level, the specific steps are as follows:
[0091] S21, obtain the masked interaction graph by perturbing the interaction edges of the original user-item interaction bipartite graph G=(V, E), and construct the masked graph encoder:
[0092]
[0093] In the formula, ε represents the edge set, is a mask vector composed of 0 and 1, o, r, and m represent the original edge set, the remaining edge set, and the masked edge set respectively; that is, the original edge set is composed of the remaining edge set and the masked edge set. Perform dot product operation on the original edge set and the mask vector to obtain the remaining edge set.
[0094] S22, mask vector From the adaptive mask strategy:
[0095]
[0096] In the formula, u represents a user, i represents an item, (u, i) represents an interaction edge; m is a mask vector , the value range is {0, 1}, which represents whether the corresponding edge is masked or retained; p represents the adaptive probability of each edge in the original graph, Bernoulli is a Bernoulli distribution, that is, the adaptive probability of the mask m is obtained by sampling from the Bernoulli distribution.
[0097] S23, calculate the adaptive probability p of each edge:
[0098]
[0099] In the formula, scr represents the adaptive score calculated by the edge, and degree represents the degree of the user or item node, that is, the adaptive score of the edge and the degree of the two nodes at both ends of the edge are calculated;
[0100]
[0101] In the formula, l represents the lowest probability hyperparameter, h represents the highest probability hyperparameter, min represents the minimum value of scr, and max represents the maximum value of scr, that is, the adaptive probability is obtained by normalizing the adaptive score, and the upper and lower bounds of the probability are controlled by the hyperparameter.
[0102] S24, after using the mask vector obtained in step S22, the mask graph can be obtained, and the mask graph is used as a graph encoder in the training stage, and the embedding representation of the user and the item is obtained through the neighbor aggregation formula:
[0103]
[0104] In the formula, u (l) represents the embedding representation of the user at the l-th layer, represents the mask graph, u (l-1) represents the embedding representation of the user at the (l-1)-th layer, and N represents the neighbor nodes of the node. Through the formula, the embedding representation of each layer is obtained.
[0105] S25, after obtaining the graph convolution embedding representation of each layer of the user and the item through the mask graph encoder, the final user and item representation is obtained by aggregating the representation of each layer:
[0106]
[0107] where u e is the final embedding representation of users, and L denotes the number of layers of graph convolution.
[0108] S3, further enhance the supervision signal from the semantic level, specifically, use the mask graph encoder to generate the representation of users and items, and use the diffusion model with directed noise and the introduction of collaborative signal guidance to denoise.
[0109] As shown in the diffusion model process and denoising model in Figure 1 , the supervision signal is enhanced from the semantic level, and the specific steps are as follows:
[0110] S31, after obtaining the final user and item embedding by the mask graph encoder in step S25, the diffusion model with guided scaling is used to perform the reconstruction task at the semantic level, and the forward process of the diffusion model is performed using the directed noise addition strategy:
[0111]
[0112] where u t represents the user representation of the t-th step with noise, and α represents a value between 0 and 1, which controls the noise size, is and ∈ d is the addition of directed random noise.
[0113] S32, in order to adapt to the anisotropic characteristics of user and item embedding, the random noise of the diffusion forward process is limited to directed noise, and the formula is:
[0114]
[0115] where sign is the sign function, that is, the noise direction is aligned with the direction of the user or item embedding, is the anisotropic Gaussian noise, which is as follows:
[0116]
[0117] where ∈ is a random Gaussian noise, μ and σ are the mean and variance of the user and item embedding representation respectively, and the Gaussian noise is made to conform to the anisotropy in this way.
[0118] S33, after step S32, the user and item embedding at time t is obtained, and the reverse process of the diffusion model is performed:
[0119]
[0120] where is the user embedding representation at time t after reconstruction, represents a normal distribution, μθ and ∑θ are Gaussian distribution parameters determined by the denoising neural network, and the user and item share learnable parameters θ.
[0121] S34, in the reverse process of the diffusion model, a denoising model needs to be learned to fit the mean and variance of the distribution, so that the denoising model can be denoised from t-1 time; In order to facilitate fitting, we only fit the mean value here, and the mean fitting formula is as follows:
[0122]
[0123] In the formula, u e t It is directly obtained by the forward process formula of step S31, and α is a hyperparameter artificially specified, so only u e 0, that is, the model needs to fit the most initial 0 time representation of the user or the item.
[0124] S35, using the guided denoising model to complete the reconstruction task under the following conditions:
[0125]
[0126] In the formula, MLP is a multi-layer perceptron, After reconstruction by MLP, the obtained is the user embedding at time t, t is the input representing the time, and are conditional embedding and unconditional embedding respectively, and the unconditional embedding is represented by a vector of all 0s, while the conditional embedding formula is as follows:
[0127]
[0128] In the formula, I u is the interaction record of user u, i e is the representation of the item, that is, the conditional embedding of the reconstructed user representation is the historical interaction of the user, and the user's preference is used to guide the denoising reconstruction process.
[0129] S4, in the reasoning stage, the user and item representations are generated by using the graph encoder, and the semantic information of the representations is optimized by the trained diffusion model, and finally the possible clicked items for each user are predicted, as follows:
[0130] S41, through steps S21-S25, the final user and item embedding representations are obtained by the mask graph encoder, and the embedding parameters are updated by back propagation through the structure reconstruction loss function:
[0131]
[0132] In the formula, represents the recommendation loss, u represents a user, i represents an item + represents the recommendation loss, u represents a user, i represents an item - respectively represent the items interacted by the user and the items not interacted by the user (positive and negative samples), and σ represents a sigmoid function, and represents the score of the user to the positive and negative sample pair, represents the original user-item interaction graph;
[0133]
[0134] In the formula, u e and i e respectively represent the embedding representations of the user and the item, and T represents a matrix transpose; the score is obtained by the dot product of the transposed user and item embeddings, and is used to calculate the loss and the final prediction ranking.
[0135] S42, steps S31-S35 are performed, semantic reconstruction is performed by the guided diffusion model, and then the reconstruction loss is calculated and the parameters are updated by back propagation:
[0136]
[0137] In the formula, and respectively are the conditional reconstruction loss and the unconditional reconstruction loss; the and use the mean square error as the loss function, and the final semantic-level reconstruction loss is:
[0138]
[0139] In the formula, is the final semantic-level loss, which is obtained by averaging the conditional reconstruction loss and the unconditional reconstruction loss.
[0140] S43, steps S41-S42 are repeatedly performed until the entire recommendation model parameters converge; in the inference stage of the model, the scaling guided strategy is used to further optimize the embedding representations of the user and the item, and finally the score is predicted and ranked by the dot product of the user and item embeddings:
[0141]
[0142] In the formula, and respectively are the user embedding representations under the conditional reconstruction and the unconditional reconstruction, and the final restored user embedding is obtained by the scaling guided denoising.
[0143] As Figure 2 and Figure 3As shown, 1000 users and 1000 items are randomly selected from real data. The embeddings are clustered by k-means clustering and visualized in two dimensions to show the distribution of user embeddings. When the denoising module is removed, the embedding representation shows a uniform distribution, lacking fine capture of user behavior characteristics. After introducing the denoising module, the user and item embeddings are more closely clustered into their respective categories, showing clearer collaborative relationships. This shows that the denoising module can optimize the embedding representation through collaborative signals and reduce the impact of noise. In real-world scenarios, such as e-commerce platforms, the denoising module can help the model more accurately identify the core interest points of users and avoid the interference of accidental clicks or invalid data on the recommendation results. This method not only improves the accuracy of recommendations but also enhances the robustness of the system in the face of complex data distribution, better meeting the needs of practical applications. The visualization of the embedding further verifies the potential of this method in improving the performance of the recommendation system.
[0144] The present application is a recommendation method based on a guided diffusion model enhanced graph encoder, which comprehensively considers the structural and semantic levels of the graph. By designing a guided diffusion enhanced mask graph autoencoder, deep mining of collaborative signals in the graph recommendation system is achieved. This new paradigm addresses the imbalance between structural reconstruction and semantic reconstruction in existing methods.
[0145] The present application effectively reconstructs the structural information of the graph through an adaptive mask encoder, deeply mines the collaborative relationship between users and items, and enhances the ability of the recommendation model to capture user behavior patterns, providing more accurate structural features for the recommendation task.
[0146] To address the problem of insufficient semantic reconstruction, the present application designs a dedicated guided diffusion model to optimize the collaborative filtering process from the semantic level. This method accurately reconstructs the semantic space through step-by-step noise addition and removal, fully utilizes self-supervised signals, and improves the performance and robustness of the recommendation system from different dimensions.
[0147] The present application is a recommendation method based on a guided diffusion model enhanced graph encoder, which adopts an adaptive mask encoder to reconstruct the structural information of the graph and fully mine the collaborative relationship between users and items. By designing a diffusion model for semantic reconstruction, the present application focuses on optimizing the collaborative filtering process from the semantic level of the graph. This two-pronged strategy can better utilize self-supervised signals and enhance the effect of graph recommendation from both structural and semantic perspectives.
[0148] The above is an exemplary description of the invention. Obviously, the specific implementation of the present application is not limited to the above-mentioned manner. Any non-essential improvement that adopts the inventive concept and technical solution, or directly applies the inventive concept and technical solution to other occasions without modification, is within the scope of protection of the present application.
Claims
1. A recommendation method based on a guided diffusion model enhanced graph encoder, characterized in that, The method comprises the following steps: S1, model the user-item interaction network as a bipartite graph where the node set represents users and items in the interaction network, and the edge set represents the interaction behavior between users and items; initializing a user-item interaction adjacency matrix and normalizing the same to generate a Laplacian matrix for a model inference stage; S2, from the structural level, the supervision signal is enhanced, the mask probability is adaptively calculated for each click behavior based on the user click behavior information and the popularity of the item, and a partially visible mask bipartite graph is generated as the input of the mask graph encoder in the model training process; S3, from the semantic level, the supervision signal is further enhanced, the representation of the user and the item is generated by using the mask graph encoder, and the diffusion model guided by the added directed noise and the introduced collaborative signal is used for denoising processing; S4, in the inference stage, the user and item representation is generated by using the graph encoder, and the semantic information of the representation is optimized by the trained diffusion model, and finally the possible clicked items of each user are predicted; In step S2, the supervision signal is enhanced from the structural level, and the specific steps are as follows: S21, By perturbing the original user-item By analyzing the interaction edges, we obtain the masked interaction graph and construct a masked graph encoder: , wherein, represents the original edge set, represents the remaining edge set, represents the edge set masked by the mask vector, is a mask vector consisting of 0 and 1; the dot product of the original edge set and the mask vector is obtained to obtain the remaining edge set; S22, mask vector From the adaptive mask strategy: , wherein, represents a user, represents an item, represents an interaction edge; is a mask vector , whose value range is {0, 1}, representing whether the corresponding edge is masked or reserved; represents the adaptive probability of each edge in the original graph, is a Bernoulli distribution, i.e., the mask is obtained by sampling from the Bernoulli distribution using the adaptive probability of each edge; S23, the adaptive probability of each edge is calculated: , In the formula, denotes the adaptive score of the edge, denotes the degree of the user node denotes the degree of the item node denotes the degree of the item node , i.e. the adaptive score of the edge and the degree of the two nodes at the ends of the edge. , wherein, represents the lowest probability hyperparameter, represents the highest probability hyperparameter, denotes the minimum of denotes the maximum of , i.e. the adaptive probability is obtained by normalizing the adaptive score and the upper and lower bounds of the probability are controlled by the hyperparameters; S24, after the mask vector obtained in step S22 is used, the mask graph can be obtained, and the mask graph is used as the graph encoder in the training stage, and the embedding representation of the user and the item is obtained through the neighbor aggregation formula: , wherein, (l) denotes the embedding representation of the user at the l-th layer; denotes the mask graph centered at the user node u; denotes the mask graph centered at the item node i; denotes the neighbor nodes of a node; (l-1) denotes the embedding representation of the user at the (l-1)-th layer; through this formula, the embedding representation of each layer is obtained; S25, after the user and item embedding representation of each layer is obtained by the mask graph encoder, the final user and item representation is obtained by aggregating each layer representation: , In the formula, e is the final embedding representation of the user, and L represents the number of layers of graph convolution.
2. The recommendation method of a graph encoder based on a guided diffusion model enhancement according to claim 1, characterized in that, In step S1, a user-item interaction network is modeled as a bipartite graph where a node set represents users and items in the interaction network, and an edge set represents the interaction behavior between users and items, initializes a user-item interaction adjacency matrix, and the specific steps are as follows: S11, determining a user-item interaction adjacency matrix : , wherein, is a user-item interaction matrix, denotes the transpose, 0 denotes the all-zero matrix, and denote the number of users and items, respectively; S12, normalizing the user-item interaction adjacency matrix, computing the Laplacian matrix for use in the graph convolution process : , wherein is an incidence adjacency matrix, is an adjacency matrix degree diagonal matrix.
3. The recommendation method of a graph encoder based on a guided diffusion model enhancement according to claim 1, characterized in that, In step S3, the supervision signal is enhanced from the semantic level, and the specific steps are as follows: S31, after the final user and item embedding is obtained by the mask graph encoder in step S25, the semantic level reconstruction task is performed by using the guided diffusion model with scaling, and the forward process of the diffusion model is performed by using the directed noise addition strategy: , wherein, denotes the user representation of the t-th step with added noise, denotes the user representation at the initial time instant; denotes a value between (0, 1) and is a control of the noise size, is s and d is the added directed random noise; S32, in order to add the anisotropic characteristics of the user and item embedding, the random noise of the diffusion forward process is limited, and the formula is: , where is a sign function, i.e., such that the noise direction aligns with the direction of the user or item embedding, is an anisotropic Gaussian noise, specified as follows: , where, is a random Gaussian noise, and are the mean and variance of the user and item embedding representations, respectively. S33, after step S32, obtaining The user and item embeddings at the time instant are used to perform the reverse process of the diffusion model: , In the formula, e t is determined by the reconstructed user embedding representation at the moment, represents a normal distribution, and are Gaussian distribution parameters determined by the denoising neural network, and the user and the item share learnable parameters ; S34、In the reverse process of the diffusion model in step S33, a de-noising model needs to be learned to fit the mean and variance of the distribution, so that the de-noising model can de-noise from time to time time; the mean fitting formula is as follows: , In the formula, The formula is directly obtained by the forward process formula of step S31, is a hyperparameter artificially specified, and the model fitting That is, the model needs to fit the representation of the user or the item at the initial 0 time. S35, the guided denoising model is used to complete the reconstruction task under the following conditions: , where MLP is a multi-layer perceptron, The reconstructed , is the user embedding at time t, is the input representing time t, and are the conditional and unconditioned embeddings, respectively, with the unconditioned embedding represented by an all-zero vector, and the conditional embedding is given by: , wherein, is a user interaction record, is a representation of an item, i.e., the conditional embedding of the user representation is conditioned on the user's historical interactions to guide the denoising reconstruction process using the user's preferences.
4. The recommendation method of a graph encoder based on a guided diffusion model enhancement according to claim 3, characterized in that, The S4 step is as follows: S41, the final user and item embedding representation is obtained by steps S21-S25, and the embedding parameters are updated by backward propagation through the structure reconstruction loss function: , wherein, bpr represents the recommendation loss, represents a user, + with - respectively represent items interacted by the user and not interacted by the user, represents a sigmoid function, u,i + and u,i - represents the user's rating on the positive and negative sample pair, represents an original user-item interaction graph; , where, and denote the user and item embedding representations, respectively, denotes the transpose; ratings are obtained by the dot product of the user and item embeddings transposed, used to compute the loss and final prediction ranking; S42, steps S31-S35 are executed, the semantic reconstruction is performed by the guided diffusion model, and the parameters are updated by backward propagation through the calculation of the reconstruction loss: , where represents c and unc are conditional and unconditional reconstruction loss, respectively; is represented as: the mathematical expectation of the conditional distribution of the 1st-step noisy user embedding given the initial user embedding is reconstructed by the MLP e and e The reconstruction loss at the semantic level is: , wherein elbo is the final semantic-level loss, resulting from the average of the conditional reconstruction loss and the unconditional reconstruction loss; S43, steps S41-S42 are repeatedly executed until the parameters of the whole recommendation model converge; in the inference stage of the model, the embedding representation of the user and the item is further optimized by using the scaling guide strategy, and finally the score is predicted and sorted by the dot product of the user and item embedding. , wherein and are the user embedding representation under conditional and unconditional reconstruction, respectively, and the final restored user embedding is obtained by denoising guided by scaling.