Recommendation method and system based on variational graph auto-encoder denoising
By adopting a variational graph autoencoder and graph attention mechanism in the recommendation system, combined with BPR loss and comparison loss, the performance problems caused by the limitations of data enhancement in the prior art are solved, and a more efficient recommendation effect is achieved.
Patent Information
- Application Number
- CN202411598892.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-11
AI Technical Summary
The existing recommended methods based on graph comparison learning have limitations in data enhancement, and it is difficult to retain the inherent properties of the interactive graph and the unique characteristics of the nodes, resulting in insufficient performance.
The denoising recommendation method based on the variational graph autoencoder is adopted to capture auxiliary information of the knowledge graph through the graph attention mechanism, and combine BPR loss and comparison loss to optimize the representation of users and projects, and improve the robustness of the system.
It effectively alleviates the problems of sparse data and cold start, improves the performance and accuracy of the recommendation system, and especially shows good results when processing noise information.
Smart Images

Figure CN119577239A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of deep learning and recommendation technology, and in particular relates to a recommendation method and system based on variational graph autoencoder denoising, which are used to improve the performance of a recommendation system. Background Art
[0002] Recommendation systems have been widely used in multiple online service platforms such as e-commerce, social media, video sharing, and search engines. It alleviates the problem of information overload by analyzing users' potential preferences for unknown items and provides users with personalized decision support. In the recommendation scenario, the classic collaborative filtering framework is a very important technology. Nowadays, recommendation systems have become an indispensable part of people's daily lives and business development. With the advancement of deep learning, incorporating knowledge graphs as auxiliary information into recommendation systems has become a new research hotspot. The main advantage of knowledge graphs is that they provide rich project side information and can more accurately capture users' personalized interests. By utilizing knowledge graphs, problems such as data sparsity and cold start can be effectively solved, while improving the interpretability of the system. Although current research has achieved excellent performance in recommendation systems, the negative impact of noise information on recommendation systems is often ignored. In complex real-world scenarios, due to the interference of multiple factors, the collected knowledge graph data usually contains a large amount of information that is irrelevant to user interactions. This information may come from users' random clicks, abnormal behaviors, etc. Existing knowledge graph-aware recommendation methods rely heavily on high-quality input knowledge graphs and are easily affected by noise perturbations.
[0003] To address the above limitations and challenges, graph contrastive learning methods have been widely used in recommender systems to alleviate the noise problem of knowledge graphs. These methods suppress the noise in knowledge graphs by performing knowledge graph contrastive learning and use external signals in the process to measure the deviation of item representations affected by knowledge graph noise. These signals can serve as guidance for user-item graph contrastive learning views, maintain useful graph structures and reduce the impact of noise. However, existing graph contrastive learning methods generally have some limitations in data augmentation techniques. On the one hand, structural augmentation randomly loses nodes or edges, which easily destroys the intrinsic properties of the user-item graph; on the other hand, feature augmentation applies the same scale noise augmentation to each node, ignoring the unique features of nodes on the graph. In real-world recommender systems, different users or items have different characteristics, and data augmentation should be customized for these situations.
[0004] In summary, developing a recommendation method that is computationally efficient, can preserve the intrinsic properties of the interaction graph and the unique characteristics of the nodes, and improve the performance of graph comparative learning methods has become an urgent need in the current field of recommendation systems. Summary of the invention
[0005] In order to solve the performance problems caused by the limitations of data enhancement in the recommendation methods based on graph contrastive learning in the prior art, the present invention proposes a recommendation method and system based on variational graph autoencoder denoising, which uses the graph attention mechanism to capture the auxiliary information of the knowledge graph, improves the generalization ability of the model through contrastive learning, and jointly optimizes the BPR loss and contrastive loss to improve the robustness of the system, thereby alleviating the problems of data sparsity and cold start.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: a recommendation method based on variational graph autoencoder denoising, comprising the following steps:
[0007] Step S1: Construct the user-item interaction graph G based on the interaction rating information between users and items ui ; At the same time, based on the auxiliary information of the project, construct the knowledge graph G kg ;
[0008] Step S2: Knowledge graph G kg The project nodes in the graph are initialized for graph embedding, the entities and relationships in the knowledge graph are encoded based on the relationship-aware knowledge aggregation mechanism, and the embedding representation of the project nodes is generated. The generation formula is:
[0009]
[0010] Among them, x i and x e are the embedding representations of item node i and entity e, respectively, α(e,r e,i ,i) indicates that the project node i is connected to the relationship r e,i The attention coefficient propagated to entity e; N i are different types of relations r in the knowledge graph e,i The adjacent entities of item i;
[0011] Step S3: Use the variational graph autoencoder to enhance the items of the knowledge graph to obtain the mean vector and variance vector of the items, then generate two potential representations of the items through two samplings, and reconstruct them through the decoder to obtain two knowledge graphs;
[0012] Step S4: Based on the two obtained knowledge graphs, graph contrast learning is performed in the interaction graph to optimize the representation of users and items through contrast loss;
[0013] Step S5: updating all parameters to be learned in the model according to the optimization target L; the optimization target L includes the BPR loss and the total contrast loss;
[0014] Step S6: Obtain the final embedding representation x of users and items based on the optimized model u With xi , calculate the predicted interaction probability between users and items, and generate recommended items based on the predicted interaction probability.
[0015] In step S2, the attention coefficient α(e,r e,i ,i) is calculated as:
[0016] α(e,r e,i ,i)=σ(x r W[x e ||x i ]);
[0017] Among them, x r Represents the relationship e,i The embedded representation of .
[0018] In step S2, the TransE method is used to take the predicted vector (h+r) as the representation of vector t, and the embedding representation x of entity and relationship semantics is updated by minimizing the distance between it and the true vector. e and x r .
[0019] In step S2, the optimization loss used is:
[0020]
[0021] Among them, L KG represents the optimization loss of the knowledge graph, g(x e ,x r ,x i' ) represents three vectors (x e ,x r ,x i' ), (x e ,x r ,x i' ) is obtained by converting (x e ,x r ,x i ) is a negative sampling triplet formed by randomly replacing the items in g(x e ,x r ,x i ) represents three vectors (x e ,x r ,x i ) is a similarity measurement function between .
[0022] In step S3, a graph attention network (GAT) is used as the encoder of the variational graph autoencoder (VGAE).
[0023] In step S3, the expressions of the item mean vector μ and variance vector σ are obtained respectively:
[0024] μ=GAT μ (X,A),log(σ 2 )=GAT σ (X,A);
[0025] Where X represents the feature matrix of the initial project node and A represents the adjacency matrix. μ Represents the average operation of the graph attention network, GAT σ Represents the variance operation of the graph attention network;
[0026] The two potential representations of an item are:
[0027] Z′=μ+σeε′; Z″=μ+σeε″,
[0028] Among them, Z′ and Z″ represent the potential representations of the two sampled items, ε′ and ε″ represent the two sampled noise vectors, and e represents the element-level multiplication operation.
[0029] In step S4, when performing graph contrast learning in the interaction graph, the classic lightweight graph convolutional neural network LightGCN model is used to perform weighted aggregation on the embedded representations of users and items on the two interaction graphs, and the calculation process of the graph convolution propagation is as follows:
[0030]
[0031] in, and are the embedding representations of users and items when propagating at the kth layer, N u is the set of items purchased by user u, N i is the set of users who have purchased item i;
[0032] The contrast loss used by the lightweight graph convolutional neural network LightGCN model is:
[0033]
[0034] Among them, s(·) represents the cosine similarity between positive or negative pairs, and τ is the temperature coefficient, which is used by the model to control the discrimination of negative samples. Respectively represent the embedding representation of node n in the two knowledge graphs, Respectively represent the embedding representation of node n' in the two knowledge graphs.
[0035] In step S5, the calculation formula of the optimization target L is:
[0036]
[0037] in, represents the BPR loss, represents the total contrast loss, λ 1 is a hyperparameter, λ 2 is the regularization parameter, Indicates that the parameter Θ to be learned is regularized by the L2 norm;
[0038] BPR Loss The calculation formula is:
[0039]
[0040] in, and They represent the predicted values of the interaction probability between user u and item i respectively.
[0041] In step S6, the calculation formula for the interaction probability between the user and the item is:
[0042]
[0043] in, represents the predicted value of the interaction probability between user u and item i, and σ is the Sigmoid activation function.
[0044] In addition, the present invention also provides a recommendation system based on variational graph autoencoder denoising, comprising:
[0045] Graph construction module: used to construct the user-item bipartite interaction graph G based on the interaction score information between users and items ui ; At the same time, based on the auxiliary information of the project, construct the knowledge graph G kg ;
[0046] Graph embedding initialization module: used to embed the knowledge graph G kg Initialize graph embedding of project nodes in the knowledge graph, encode entities and relationships in the knowledge graph based on the relationship-aware knowledge aggregation mechanism, and generate embedding representations of project nodes;
[0047] Variational graph generation module: used to enhance the structure of the knowledge graph using the variational graph autoencoder to obtain the mean vector and variance vector of the item, and then generate two potential representations of the item through two samplings, and reconstruct two knowledge graphs through the decoder;
[0048] Graph contrast learning module: used to perform graph contrast learning in the interaction graph based on the two obtained knowledge graphs, and optimize the representation of users and items through contrast loss;
[0049] Joint optimization module: used to update all parameters to be learned in the model according to the optimization target L; the optimization target L includes BPR loss and total contrast loss;
[0050] Prediction output module: used to obtain the final embedding representation x of users and items based on the optimized model u With x i , calculate the interaction probability between users and items.
[0051] Compared with the prior art, the present invention has the following beneficial effects:
[0052] 1. Different from the traditional data enhancement method of random edge deletion, the present invention uses a variational graph autoencoder to generate a comparison view of the knowledge graph, building a bridge between generation and comparison. The generated comparison view can well reconstruct the input graph while avoiding information distortion as much as possible, thereby improving the training efficiency of the model. Unlike most models that use GCN as an encoder, the encoder model proposed in the present invention uses a graph attention network GAT to implement the autoencoder on the graph, which improves the expression ability of the model;
[0053] 2. The present invention constructs interactive prediction under the guidance of self-supervised contrastive learning and knowledge graph to improve the robustness of the model, so that the recommendation system can extract rich user behavior preferences to alleviate data sparsity and cold start problems;
[0054] 3. The present invention jointly optimizes the contrast loss and the prediction loss, and conducts experimental verification in three real-world knowledge graph recommendation scenarios, such as the book recommendation dataset Amazon-Book, the commercial place recommendation dataset Yelp2018, and the news recommendation dataset MIND. Compared with the current best method, the present invention achieves the best performance in terms of precision and recall.
[0055] In summary, the present invention proposes a recommendation method and system based on variational graph autoencoder denoising, adopts a new variational graph to generate a contrastive learning framework. Compared with the existing data enhancement, the variational graph autoencoder is used to generate contrast views to serve contrastive learning, and a bridge is established between the generation model and the contrastive learning model. The generated contrast representation can well reconstruct the original graph while avoiding information distortion as much as possible. Therefore, the present invention can effectively improve the performance of the recommendation system and improve the accuracy of recommendations. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 A flowchart of a recommendation method for denoising based on variational graph autoencoder;
[0057] Figure 2 Schematic diagram of the principle of variational graph autoencoder;
[0058] Figure 3 Figure 1 is a feature aggregation framework based on graph contrastive learning.
[0059] Figure 4 A schematic diagram of the structure of a recommendation system based on variational graph autoencoder denoising provided in Example 2. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0061] Embodiment 1
[0062] like Figure 1 As shown, the first embodiment of the present invention provides a recommendation method based on variational graph autoencoder denoising, comprising the following steps:
[0063] Step S1: Construct the user-item interaction graph G ui With the knowledge graph G kg Specifically, the user-item interaction graph G is constructed based on the interaction rating information between users and items. ui ; At the same time, based on the auxiliary information of the project, construct the knowledge graph G kg .
[0064] Specifically, the auxiliary information of an item consists of real-world entities and relations, represented by knowledge graph triples.
[0065] Generally speaking, in a recommendation scenario based on knowledge graph, it usually includes an interaction graph between users and items and a knowledge graph composed of auxiliary information of the items.
[0066] The user-item interaction graph represents all historical interaction information between users and items, such as clicks, purchases, comments, etc. In this embodiment, the user-item interaction graph is represented as a two-part interaction graph, which is defined as:
[0067] G ui ={(u,y ui ,i)|u∈U,i∈I}, (1)
[0068] Among them, U is the set of all users, I is the set of all items, and y ui Represents the interaction probability value between user u and item i, using binary representation. If there is interaction, y ui =1, otherwise y ui =0.
[0069] The knowledge graph consists of entities and relationships in the real world. For example, a book can be described by its author, publication time, and type, i.e., the knowledge graph G. kg is defined as:
[0070] G kg ={(h,r,t)|h,t∈E,r∈R}, (2)
[0071] Among them, E represents the entity set, R represents the relationship set, and each triple (h, r, t) describes that the head entity h is connected to the tail entity t through the relationship r. Therefore, the item set I and the entities connected to the items together constitute the set E, that is, the item I is part of the entity set E. Take the book "To Live" as an example: the author is Yu Hua; the publication time is 1992; the type is a novel; among them, "To Live" is the head entity; the author, publication year, and type are all relationships; Yu Hua, 1992, and novels are all tail entities; the triples (h, r, t) corresponding to each head entity, tail entity, and relationship are embedded as follows: h ,x r ,x t .
[0072] Step S2: Knowledge graph G kg The project nodes in the graph are initialized for graph embedding, the entities and relations in the knowledge graph are encoded based on the relationship-aware knowledge aggregation mechanism, and the embedded representation of the project nodes is generated.
[0073] With the rise of deep learning, many recommendation methods use graph neural networks to extract heterogeneous structural information. The high-order connectivity on the graph can make more accurate and explainable recommendations. Inspired by the graph attention mechanism, knowledge graph comparative learning adopts the graph attention propagation layer as the basic structure for information aggregation.
[0074] In the knowledge graph, for any triple, the attention coefficient of the tail entity propagating to the head entity through the relationship is as follows:
[0075] α(h,r,t)=σ(x r W[x h ||x t ]), (3)
[0076] Among them, x h 、x r 、x t are the embedding representations of the head entity, relation, and tail entity, respectively. σ(·) is the Sigmoid activation function. W is the parameter weight matrix of the linear transformation. α(h, r, t) represents the attention coefficient. The larger its value, the more attention the vector x h 、x r 、x tThe denser, the closer the tail entity is to the head entity.
[0077] Therefore, in this embodiment, the generation formula of the embedded representation of the project is:
[0078]
[0079] Among them, x i and x e are the embedding representations of item node i and entity e, respectively, α(e,r e,i ,i) indicates that the project node i is connected to the relationship r e,i The attention coefficient propagated to entity e; N i are different types of relations r in the knowledge graph e,i The neighboring entities of item i. Among them, the attention coefficient α(e,r e,i ,i) is calculated as:
[0080] α(e,r e,i ,i)=σ(x r W[x e ||x i ]); (5)
[0081] Among them, x r Represents the relationship e,i The embedded representation of .
[0082] Furthermore, in this embodiment, in order to better learn the embedding representation of entity and relationship semantics in the knowledge graph, the TransE method is used to take the predicted vector (h+r) as the representation of vector t, and update the embedding representation by minimizing the distance between it and the true vector. For example, given a triple (h, r, t) on the knowledge graph, the similarity measurement function between the three vectors is as follows:
[0083]
[0084] The lower the score, the g(x h ,x r ,x t ) indicates that the greater the probability that the triple (h, r, t) is true.
[0085] In order to prevent the vector from approaching 0 during model training, in this embodiment, a negative sample is constructed for each triple. Finally, when the knowledge graph is updated, the optimization loss used is as follows:
[0086]
[0087] Among them, L KG represents the optimization loss of the knowledge graph, g(x e ,x r ,xi' ) represents three vectors (x e ,x r ,x i' ), (x e ,x r ,x i' ) is obtained by converting (x e ,x r ,x i ) is a negative sampling triplet formed by randomly replacing the items in g(x e ,x r ,x i ) represents three vectors (x e ,x r ,x i ) is a similarity measurement function between .
[0088] Through repeated iterative updates, the vector representation capabilities of entities and relationships on the knowledge graph will become more and more robust.
[0089] Step S3: Use the variational graph autoencoder to enhance the items of the knowledge graph to obtain the mean vector and variance vector of the items, then generate two potential representations of the items through two samplings, and reconstruct them through the decoder to obtain two knowledge graphs.
[0090] Variational graph autoencoders provide more powerful and flexible tools for graph data processing tasks through their ability to handle uncertainty, improve robustness, capture complex graph structures, and generate continuous node representations. Figure 2 Shown is a schematic diagram of the principle of the variational graph autoencoder.
[0091] Specifically, in step S3 of this embodiment, a graph attention network (GAT) is used as an encoder of a variational graph autoencoder (VGAE) to optimize and enhance the node embedding of the knowledge graph. The encoder can generate a mean vector and a variance vector after two operations.
[0092] GAT can adaptively assign different attention weights to neighboring nodes to capture more fine-grained node relationships. The formula is as follows:
[0093] Z = GAT(X,A); (8)
[0094] Among them, Z represents the potential representation of the node after encoding, X is the initial node feature matrix, and A is the adjacency matrix.
[0095] For the encoded node representation, the corresponding mean vector μ and variance vector σ are generated, and assuming that the potential representation of the node obeys the Gaussian distribution, the expressions of the obtained project mean vector μ and variance vector σ are:
[0096] μ=GAT μ (X,A),log(σ 2 )=GAT σ (X,A); (9)
[0097] Where X represents the feature matrix of the initial project node and A represents the adjacency matrix. μ Represents the average operation of the graph attention network, GAT σ Represents the variance operation of the graph attention network;
[0098] Sampling twice from the generated Gaussian distribution gives us two potential representations of the item:
[0099] Z′=μ+σeε′; Z″=μ+σeε″, (10)
[0100] Among them, Z′ and Z″ represent the potential representations of the two sampled items, ε′ and ε″ represent the two sampled noise vectors, and e represents the element-level multiplication operation.
[0101] The sampled potential representation is passed into the decoder, and the original knowledge graph structure is reconstructed through the decoder. The goal of the decoder is to maximize the marginal likelihood of the reconstructed adjacency matrix. The formula is as follows:
[0102]
[0103] Among them, A ij represents the elements in the adjacency matrix, z i and z j are the potential representations of node i and node j respectively.
[0104] The optimization goal of VGAE is to minimize the following variational lower bound:
[0105] L=E q(Z|X,A) [log p(A|Z)]-KL[q(Z|X,A)||p(Z)], (12)
[0106] Among them, the KL term represents the Kullback-Leibler divergence between the prior distribution and the posterior distribution of the potential representation. Among them, p(Z) is the prior distribution of the latent variable z, and the inference model q(Z|X,A) is used to approximate the posterior distribution p(A|Z). q(Z|X,A) and p(A|Z) also represent the encoder and decoder parameterized by the neural network. KL[q(Z|X,A)||p(Z)] is the Kullback-Leibler divergence between the approximate posterior q(Z|X,A) and the prior p(Z), which is used to constrain q(Z|X,A) to be closer to the prior Gaussian distribution.
[0107] In this embodiment, the node potential representation enhanced by GAT can more accurately capture the complex relationship between the node and its neighbors, thereby providing a more optimized input representation for subsequent graph contrast learning.
[0108] Step S4: Based on the two obtained knowledge graphs, perform graph contrast learning in the interaction graph and optimize the representation of users and items through contrast loss. Figure 3 As shown, it is a feature aggregation framework diagram based on graph contrast learning.
[0109] After enhancing the knowledge graph structure, two knowledge graphs are obtained, represented as η 1 (G k ) and η 2 (G k ),by Figure 1 Inspired by the consistency research, in order to explore the consistency attributes of each project based on the augmented view, we define the knowledge graph structure consistency c of project i i , the consistency between representations encoded from different views is as follows:
[0110] c i =s(f k (x i ,η 1 (G k )),f k (x i ,η 2 (G k ))), (13)
[0111] Among them, f k Representing a relation-aware knowledge aggregation scheme to generate item embedding representations corresponding to the enhanced structural view and s(·) represents the estimated item embedding representation and The cosine function of the similarity between .
[0112] If an item achieves a high construct consistency score c i , then it is less sensitive to changes in topological information. Therefore, if item i is more affected by knowledge graph noise than item i', then c i <c i' That is, the higher the knowledge graph structure consistency score, the smaller the project noise is, and the greater the contribution to modeling the user's real interests is. The derived knowledge structure consistency characteristics are used as a guide to combat the user-item interaction noise of knowledge graph dependence and auxiliary self-supervision signals.
[0113] In this embodiment, the exported project-specific knowledge graph structure consistency c iMerged into the operator on the user-item interaction graph, the formula is as follows:
[0114]
[0115] Among them, p u,i represents the estimated probability of interaction edge exit between user u and item i, w u,i Indicates the influence of project i on user u, and c i The corresponding structural consistency score is proportional to the cutoff probability p. τ For w u,i Normalize to alleviate the low value effect, and then get the intermediate variable p' u,i and with the mean value μ p Integrate to get the exit probability value p u,i , here p a The strength of the mean-based effect is controlled using the probability p u,i , generating two masking vectors based on Bernoulli distribution Then applied to the user-item interaction graph G u , the formula is as follows:
[0116]
[0117] in, represents the graph enhancement operator, which is based on the inferred probability p u,i , removed the image G u The user-item interactions in the edge set E of .
[0118] Furthermore, in step S4, when performing graph contrast learning in the interaction graph, the classic lightweight graph convolutional neural network LightGCN model is used to perform weighted aggregation on the embedded representations of users and items on the two interaction graphs, and the calculation process of the graph convolution propagation is as follows:
[0119]
[0120] in, and are the embedding representations of users and items when propagating at the kth layer, N u is the set of items purchased by user u, N i is the set of users who have purchased item i.
[0121] The embedding of the project comes from the knowledge graph, which makes the model perform well even when facing data sparseness or cold start problems; taking the user node as an example, the model aggregates the nodes on the knowledge graph and the interaction graph respectively, and obtains a pair of embedding representations of the same node on the two views. For any user, its node in any view is called an anchor point, which constitutes a pair of positive samples with the same node in the other view, and the remaining nodes in the two views constitute multiple pairs of negative samples with it. The sampling method of the project is consistent with that of the user. Therefore, in this embodiment, the contrast loss used by the lightweight graph convolutional neural network LightGCN model is:
[0122]
[0123] Among them, s(·) represents the cosine similarity between positive or negative pairs, and τ is the temperature coefficient, which is used by the model to control the discrimination of negative samples. Respectively represent the embedding representation of node n in the two knowledge graphs, Respectively represent the embedding representation of node n' in the two knowledge graphs.
[0124] Step S5: Update all parameters to be learned in the model according to the optimization target L; the optimization target L includes the BPR loss and the total contrast loss.
[0125] Contrastive loss maps similar users or items to adjacent spatial regions, which helps improve the system's understanding of the complex relationship between users and items, alleviates data sparsity and cold start problems, and thus better performs personalized recommendations; BPR loss is a loss function used for ranking tasks in recommendation systems, which maximizes the ranking difference between positive and negative examples to better understand user preferences. Therefore, in step S5, the calculation formula for the optimization target L is:
[0126]
[0127] in, represents the BPR loss, represents the total contrast loss, λ 1 is a hyperparameter, λ 2 is the regularization parameter, Indicates that the parameter Θ to be learned is regularized by the L2 norm; among them, the BPR loss The calculation formula is:
[0128]
[0129] in, and They represent the predicted values of the interaction probability between user u and item i respectively.
[0130] Step S6: Obtain the final embedding representation x of users and items based on the optimized model u With x i , calculate the predicted interaction probability between users and items, and generate recommended items based on the predicted interaction probability.
[0131] In step S6, the calculation formula for the interaction probability between the user and the item is:
[0132]
[0133] in, represents the predicted value of the interaction probability between user u and item i, which represents u’s potential preference for i, and σ represents the Sigmoid activation function. In this embodiment, the final representation x of the user and item is u With x i Feed the prediction function of the above formula to predict the interaction probability between u and i.
[0134] As shown in Table 1, the recommended method of the present invention has been experimentally verified on multiple data sets.
[0135] Table 1 Dataset
[0136]
[0137] As shown in Table 2, the recommendation method of the embodiment of the present invention achieves the best performance in terms of the two indicators of precision NDCG and recall Recall, which shows that the present invention can effectively improve the performance of the recommendation system and improve the accuracy of recommendations.
[0138] Table 2 Experimental performance comparison table
[0139]
[0140] Embodiment 2
[0141] like Figure 4 As shown, the second embodiment of the present invention provides a recommendation system based on variational graph autoencoder denoising, which is used to implement a recommendation method described in the first embodiment, which specifically includes:
[0142] Graph building module: used to build the user-item interaction graph G ui With the knowledge graph G kg Specifically, it constructs a user-item bipartite interaction graph G based on the interaction rating information between users and items. ui ; At the same time, based on the auxiliary information of the project, construct the knowledge graph G kg ;
[0143] Graph embedding initialization module: used to embed the knowledge graph G kgInitialize graph embedding of project nodes in the knowledge graph, encode entities and relationships in the knowledge graph based on the relationship-aware knowledge aggregation mechanism, and generate embedding representations of project nodes;
[0144] Variational graph generation module: used to enhance the structure of the knowledge graph using the variational graph autoencoder to obtain the mean vector and variance vector of the item, and then generate two potential representations of the item through two samplings, and reconstruct two knowledge graphs through the decoder;
[0145] Graph contrast learning module: used to perform graph contrast learning in the interaction graph based on the two obtained knowledge graphs, and optimize the representation of users and items through contrast loss;
[0146] Joint optimization module: used to update all parameters to be learned in the model according to the optimization target L; the optimization target L includes BPR loss and total contrast loss;
[0147] Prediction output module: used to obtain the final embedding representation x of users and items based on the optimized model u With x i , calculate the interaction probability between users and items.
[0148] In addition, the present invention also provides a computer device / equipment / system, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in Example 1.
[0149] In addition, the present invention also provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the method described in Example 1 are implemented.
[0150] Furthermore, the present invention also provides a computer program product, including a computer program, which implements the steps of the method described in Example 1 when executed by a processor.
[0151] Those skilled in the art also know that, in addition to implementing the client and server in a purely computer-readable program code, the client and server can be made to implement the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a client and server can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.
[0152] It can be known from the description of the above implementation modes that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various implementation modes of the present application or certain parts of the implementation modes.
[0153] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the implementation of the computer storage medium, the server and the client, the introduction of the implementation of the aforementioned method can be referred to for comparative explanation.
[0154] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A recommendation method based on variational graph autoencoder denoising, characterized in that: The following steps are involved: Step S1: Construct the user-item interaction graph G based on the interaction rating information between users and items ui ; At the same time, based on the auxiliary information of the project, construct the knowledge graph G kg ; Step S2: Knowledge graph G kg The project nodes in the graph are initialized for graph embedding, the entities and relationships in the knowledge graph are encoded based on the relationship-aware knowledge aggregation mechanism, and the embedding representation of the project nodes is generated. The generation formula is: Among them, x i and x e are the embedding representations of item node i and entity e, respectively, α(e,r e,i ,i) indicates that the project node i is connected to the relationship r e,i The attention coefficient propagated to entity e; N i are different types of relations r in the knowledge graph e,i The adjacent entities of item i; Step S3: Use the variational graph autoencoder to enhance the items of the knowledge graph to obtain the mean vector and variance vector of the items, then generate two potential representations of the items through two samplings, and reconstruct them through the decoder to obtain two knowledge graphs; Step S4: Based on the two obtained knowledge graphs, graph contrast learning is performed in the interaction graph to optimize the representation of users and items through contrast loss; Step S5: updating all parameters to be learned in the model according to the optimization target L; the optimization target L includes the BPR loss and the total contrast loss; Step S6: Obtain the final embedding representation x of users and items based on the optimized model u With x i , calculate the predicted interaction probability between users and items, and generate recommended items based on the predicted interaction probability.
2. The recommendation method based on variational graph autoencoder denoising according to claim 1, characterized in that: In step S2, the attention coefficient α(e,r e,i ,i) is calculated as: a(e,r e,i ,i)=σ(x r W[x e ||x i ]); Among them, x r Represents the relationship e,i The embedded representation of .
3. The recommendation method based on variational graph autoencoder denoising according to claim 1, characterized in that: In step S2, the TransE method is used to take the predicted vector (h+r) as the representation of vector t, and the embedding representation x of entity and relationship semantics is updated by minimizing the distance between it and the true vector. e and x r .
4. The recommendation method based on variational graph autoencoder denoising according to claim 2, characterized in that: In step S2, the optimization loss used is: Among them, L KG represents the optimization loss of the knowledge graph, g(x e ,x r ,x i' ) represents three vectors (x e ,x r ,x i' ), (x e ,x r ,x i' ) is obtained by converting (x e ,x r ,x i ) is a negative sampling triplet formed by randomly replacing the items in g(x e ,x r ,x i ) represents three vectors (x e ,x r ,x i ) is a similarity measurement function between .
5. The recommendation method based on variational graph autoencoder denoising according to claim 1, characterized in that: In step S3, a graph attention network (GAT) is used as the encoder of the variational graph autoencoder (VGAE).
6. The recommendation method based on variational graph autoencoder denoising according to claim 5, characterized in that: In step S3, the expressions of the item mean vector μ and variance vector σ are obtained respectively: μ=GAT μ (X,A),log(σ 2 )=GAT σ (X,A); Among them, X represents the feature matrix of the initial project node, A represents the adjacency matrix; GAT μ Represents the average operation of the graph attention network, GAT σ Represents the variance operation of the graph attention network; The two potential representations of an item are: Z′=μ+σeε′; Z″=μ+σeε″, Among them, Z′ and Z″ represent the potential representations of the two sampled items, ε′ and ε″ represent the two sampled noise vectors, and e represents the element-level multiplication operation.
7. The recommendation method based on variational graph autoencoder denoising according to claim 1, characterized in that: In step S4, when performing graph contrast learning in the interaction graph, the classic lightweight graph convolutional neural network LightGCN model is used to perform weighted aggregation on the embedded representations of users and items on the two interaction graphs, and the calculation process of the graph convolution propagation is as follows: in, and are the embedding representations of users and items when propagating at the kth layer, N u is the set of items purchased by user u, N i is the set of users who have purchased item i; The contrast loss used by the lightweight graph convolutional neural network LightGCN model is: Among them, s(·) represents the cosine similarity between positive or negative pairs, and τ is the temperature coefficient, which is used by the model to control the discrimination of negative samples. Respectively represent the embedding representation of node n in the two knowledge graphs, Respectively represent the embedding representation of node n' in the two knowledge graphs.
8. The recommendation method based on variational graph autoencoder denoising according to claim 1, characterized in that: In step S5, the calculation formula of the optimization target L is: in, represents the BPR loss, represents the total contrast loss, λ1 is a hyperparameter, λ2 is a regularization parameter, Indicates that the parameter Θ to be learned is regularized by the L2 norm; BPR Loss The calculation formula is: in, and They represent the predicted values of the interaction probability between user u and item i respectively.
9. The recommendation method based on variational graph autoencoder denoising according to claim 1, characterized in that: In step S6, the calculation formula for the interaction probability between the user and the item is: in, represents the predicted value of the interaction probability between user u and item i, and σ is the Sigmoid activation function.
10. A recommendation system based on variational graph autoencoder denoising, characterized in that: include: Graph construction module: used to construct the user-item bipartite interaction graph G based on the interaction score information between users and items ui ; At the same time, based on the auxiliary information of the project, construct the knowledge graph G kg ; Graph embedding initialization module: used to embed the knowledge graph G kg Initialize graph embedding of project nodes in the knowledge graph, encode entities and relationships in the knowledge graph based on the relationship-aware knowledge aggregation mechanism, and generate embedding representations of project nodes; Variational graph generation module: used to enhance the structure of the knowledge graph using the variational graph autoencoder to obtain the mean vector and variance vector of the item, and then generate two potential representations of the item through two samplings, and reconstruct two knowledge graphs through the decoder; Graph contrast learning module: used to perform graph contrast learning in the interaction graph based on the two obtained knowledge graphs, and optimize the representation of users and items through contrast loss; Joint optimization module: used to update all parameters to be learned in the model according to the optimization target L; the optimization target L includes BPR loss and total contrast loss; Prediction output module: used to obtain the final embedding representation x of users and items based on the optimized model u With x i , calculate the interaction probability between users and items.
Citation Information
Patent Citations
De-biased recommendation method and system based on graph contrast learning
CN116701767A
Graph contrast learning recommendation method based on relational graph convolutional neural network
CN118013135A
Intelligent recommendation system and method based on knowledge graph
CN118400423A
Cited By
Neural network platform novel recommendation method based on node feature enhancement
CN120296258A
User-project recommendation method and system, computer equipment and storage medium
CN122489847A