A semantic and importance degree guided diffusion graph recommendation method and system
Patent Information
- Application Number
- CN202611476641.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-22
- Publication Date
- 2026-10-27
AI Technical Summary
[0006]为克服上述现有技术的不足,本发明提供了一种语义与重要度引导的扩散图谱推荐方法及系统,旨在解决现有推荐系统在利用知识图谱时,因忽略文本语义和无法有效甄别拓扑噪声而导致推荐准确性低、抗噪鲁棒性差的问题
(1)本发明将大语言模型提取的深层文本语义先验与节点的统计学中心性指标进行深度融合,构建了语义与结构双重引导的条件扩散去噪机制。通过在大语言模型提供的高维语义空间中进行特征提取与对齐,使得扩散模型在逆向去噪过程中能够明确区分“有意义的关联”与“无意义的噪声”,从而在剔除冗余连边的同时最大程度地保留了物品的核心属性特征,显著提升重构图谱的信噪比,为后续推荐任务提供高质量的图结构输入。
Smart Images

Figure CN122986186A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of recommendation system technology, and in particular relates to a semantic and importance-guided diffusion graph recommendation method and system. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] In recent years, with the explosive growth of internet information, recommender systems have played a core role in alleviating information overload and achieving personalized information distribution. While traditional recommender algorithms based on collaborative filtering can provide a certain degree of personalized recommendations by mining users' historical behavior, their effectiveness significantly decreases when dealing with extremely sparse data scenarios or the cold start problem, and their accuracy fails to meet the needs of practical applications.
[0004] To address these issues, researchers have begun incorporating knowledge graphs into recommender systems. Knowledge graphs map the relationships between entities and items into a graph structure, providing rich auxiliary information to recommender systems by characterizing the semantic relationships between entities, effectively improving the system's reasoning ability regarding item features and user preferences. However, raw knowledge graphs constructed in the real world often suffer from severe information redundancy and topological noise, such as meaningless weak connections and erroneous or inaccurate entity relationships. Traditional graph neural network methods, when aggregating information on the graph, typically employ an "indiscriminate absorption" strategy, treating all neighboring nodes equally and lacking the ability to discern and refine highly relevant information. This results in a large number of edge nodes and noisy entities, which are of no benefit to the recommendation task, being introduced into the model, obscuring the truly core features, and significantly reducing the accuracy and confidence of the recommendation results.
[0005] Existing knowledge graph recommendation methods based on graph neural networks have significant limitations. First, they lack sufficient feature focus in the semantic dimension. Traditional methods ignore the rich descriptive textual attributes of item nodes themselves, and simple topological denoising easily loses the core semantic essence of things, resulting in a lack of strong supporting features in the reconstructed graph. How to accurately extract and retain the most relevant semantic entity features from a complex graph using a large language model is a problem that current technology has not yet solved. Second, they lack sufficient effective information retention in the structural dimension. Existing feature aggregation mechanisms cannot identify the true importance of nodes in the graph, causing edge nodes or incorrect connections to produce an "error amplification" effect during propagation, which seriously weakens the noise robustness of the recommendation results. Summary of the Invention
[0006] To overcome the shortcomings of the prior art, this invention provides a semantic and importance-guided diffusion graph recommendation method and system, aiming to solve the problems of low recommendation accuracy and poor noise robustness in existing recommendation systems when using knowledge graphs, due to ignoring textual semantics and failing to effectively identify topological noise.
[0007] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: The first aspect of this invention provides a semantically and importance-guided diffusion graph recommendation method; A semantically and importance-guided diffusion graph recommendation method includes: Construct a user-item interaction graph and an original knowledge graph, extract semantic features of item text using a large language model, spatially align semantic features with graph node features to obtain text feature vectors; The text feature vector is fused with the node structure features of the global credibility of the reaction node to construct a joint conditional guidance vector. Under the constraint of the joint conditional guidance vector, the original knowledge graph is subjected to forward noise addition and reverse noise removal through a diffusion model to reconstruct the denoised knowledge graph. Calculate the scalar importance score of the nodes in the denoised knowledge graph, inject the scalar importance score into the graph attention aggregation network, and perform weighted aggregation of the features of neighboring nodes to obtain the updated node feature representation; Using the original knowledge graph and the denoised knowledge graph as dual views, cross-view self-supervised comparative learning is performed, and the final recommendation result is output through multi-task joint optimization.
[0008] As a further technical solution, a user-item interaction graph and an original knowledge graph are constructed. A large language model is used to extract semantic features of the item text. These semantic features are then spatially aligned with the graph node features to obtain text feature vectors, including: Construct user and item sets, assign randomly initialized feature vectors, and form a user-item interaction graph; Obtain the triple data of the original knowledge graph and construct the initial knowledge graph adjacency matrix; Collect textual descriptions of items and extract high-dimensional raw semantic vectors using a pre-trained Llama model; The high-dimensional original semantic vector is reduced in dimensionality and aligned to the graph feature space by a projection network that includes layer normalization and ReLU activation functions, thus obtaining the text feature vector.
[0009] As a further technical solution, the constructed joint conditional guiding vector is as follows:
[0010] in, This represents the joint condition vector used to guide the generation direction of diffusion denoising; This represents the text feature vector of the item output by the upstream module; This represents a structural feature vector that reflects the topological importance of nodes; This represents the feature concatenation operation between vectors.
[0011] As a further technical solution, a diffusion model is used to perform forward denoising and reverse denoising on the original knowledge graph, reconstructing a denoised knowledge graph, including: Based on the joint conditional guiding vector, a forward Gaussian diffusion process is performed, gradually adding Gaussian noise to the adjacency matrix of the original knowledge graph over multiple time steps, transforming it into a continuous probability distribution. A denoising network is modeled using conditional probability. Under the constraint of the joint conditional guiding vector, an inverse denoising process is performed to gradually predict and remove noise from the noisy state, and the denoised knowledge graph is reconstructed.
[0012] As a further technical solution, the scalar importance score of nodes in the denoised knowledge graph is calculated, specifically including: For each node in the denoised knowledge graph, its multidimensional topological statistical index is calculated, which includes degree centrality, PageRank value, feature vector centrality, in-degree, out-degree, and logarithmic degree. Each indicator is subjected to maximum and minimum normalization, and the normalized indicators are concatenated into a structural feature matrix of the node. A learnable parameter vector is introduced, normalized by the Softmax activation function, and then linearly combined with the structural feature matrix to calculate the scalar importance score for each node:
[0013] in, The nodes obtained from the adaptive evaluation of the model are represented. Overall importance scalar score; Indicates the use of adjusting the first Learnable parameters for the weights of various statistical indicators; Represents a node In the structural feature matrix The corresponding number in the middle Normalized eigenvalues of a topological index.
[0014] As a further technical solution, scalar importance scores are injected into the graph attention aggregation network to perform weighted aggregation of neighbor node features, resulting in updated node feature representations, including: The scalar importance score is used as an additional attention bias and injected into the aggregation layer of the graph attention aggregation network to calculate the attention score of the center node to its neighboring nodes:
[0015] in, This represents the initial attention score of the central node towards its neighboring nodes; Indicates and A vector of all 1s with the same dimension. Used to sum and map relation-modulated vector features to a scalar attention score; and They represent the current state. The latent feature vectors of the central node and its neighboring nodes in a layered graph network; This represents the projection weight matrix used for the linear transformation; A feature vector representing a specific type of relationship between two nodes; This represents the global topological importance score of the central node obtained above; We perform weighted aggregation of the neighbor node features to obtain the updated node feature representation:
[0016] in, Indicates the central node The next layer of feature vectors output after this round of aggregation; This represents the attention weighting coefficients after local normalization; This represents the set of neighbors whose edges are still connected after noise reduction.
[0017] As a further technical solution, the original knowledge graph and the denoised knowledge graph are used as dual views. Cross-view self-supervised contrastive learning is performed, and through multi-task joint optimization, the final recommendation results are output, including: The original knowledge graph and the denoised knowledge graph are respectively input into the graph attention aggregation network to generate the original view node feature representation and the denoised view node feature representation. A cross-view self-supervised contrastive learning task is constructed. The feature representations of the same item in the original view and the denoised view are used as positive sample pairs, and the feature representations of different items in the same training batch are used as negative sample pairs. The InfoNCE loss function is used for optimization, and the contrastive learning loss is calculated. A Bayesian personalized ranking loss function is constructed for the main recommendation task, and the main recommendation task loss, contrastive learning loss, diffusion denoising and reconstruction loss, and user-knowledge graph consistency loss are used as training objectives. The model parameters are updated through joint training or alternating optimization, and the final recommendation result is output.
[0018] A second aspect of the present invention provides a semantically and importance-guided diffusion graph recommendation system.
[0019] A semantically and importance-guided diffusion graph recommendation system includes: The feature alignment module is configured to: construct a user-item interaction graph and the original knowledge graph, extract semantic features of item text using a large language model, and spatially align the semantic features with the graph node features to obtain text feature vectors. The conditional diffusion denoising module is configured to: fuse the text feature vector with the node structure features that reflect the global credibility of the node, construct a joint conditional guidance vector, and under the constraint of the joint conditional guidance vector, perform forward noise addition and reverse noise removal on the original knowledge graph through a diffusion model to reconstruct the denoised knowledge graph; The importance-aware aggregation module is configured to: calculate the scalar importance score of nodes in the denoised knowledge graph, inject the scalar importance score into the graph attention aggregation network, and perform weighted aggregation of the features of neighboring nodes to obtain the updated node feature representation; The dual-view comparative learning and joint optimization module is configured to: use the original knowledge graph and the denoised knowledge graph as dual views, perform cross-view self-supervised comparative learning, and output the final recommendation result through multi-task joint optimization.
[0020] A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps of a semantically and importance-guided diffusion map recommendation method as described in the first aspect of the present invention.
[0021] A fourth aspect of the present invention provides an electronic device including a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of a semantic and importance-guided diffusion map recommendation method as described in the first aspect of the present invention.
[0022] The above one or more technical solutions have the following beneficial effects: (1) This invention deeply integrates the deep textual semantic priors extracted by the large language model with the statistical centrality index of nodes to construct a conditional diffusion denoising mechanism guided by both semantics and structure. By extracting and aligning features in the high-dimensional semantic space provided by the large language model, the diffusion model can clearly distinguish between "meaningful associations" and "meaningless noise" during the reverse denoising process. This allows the core attribute features of items to be preserved to the greatest extent while eliminating redundant edges, significantly improving the signal-to-noise ratio of the reconstructed graph and providing high-quality graph structure input for subsequent recommendation tasks.
[0023] (2) This invention proposes a graph attention aggregation mechanism based on topological importance awareness, which effectively curbs the error cascading amplification effect in heterogeneous graphs. By quantitatively calculating multi-dimensional topological indicators such as degree centrality, PageRank value, and eigenvector centrality of nodes in the global graph, and introducing learnable parameters to adaptively evaluate the importance weights of each indicator, these are injected as additional attention biases into the aggregation process. This enables the model to intelligently assign extremely high attention weights to core entities while suppressing the interference of edge noise.
[0024] (3) This invention employs a dual-view comparative learning method using the original and denoised knowledge graphs, significantly improving the model's generalization ability in sparse and noisy environments through self-supervision. This invention utilizes the denoised view reconstructed by the diffusion model and the original view to construct cross-view positive and negative sample pairs, employing the InfoNCE loss function to force the model to learn the "common" representations of items from different perspectives while ignoring "noise" representations. This comparative learning mechanism enables the model to autonomously mine stable and robust feature representations from the knowledge graph even in the absence of extensive user feedback, greatly improving recommendation accuracy in long-tail items and cold-start scenarios.
[0025] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0026] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0027] Figure 1 This is a flowchart of the method in the first embodiment.
[0028] Figure 2 This is a schematic diagram of the conditional denoising process in the first embodiment.
[0029] Figure 3 This is a system structure diagram of the second embodiment. Detailed Implementation
[0030] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0031] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0032] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0033] Example 1 This embodiment discloses a semantic and importance-guided diffusion graph recommendation method. It extracts textual semantics from a large language model and aligns them with graph features, constructing a conditional diffusion model guided by both semantics and topological centrality. This model performs forward noise addition and reverse denoising on the original knowledge graph, reconstructing a high-fidelity denoised graph. Based on this, it calculates multidimensional importance scores for nodes and injects them into a relational graph attention network for weighted aggregation. Finally, through dual-view comparative learning and multi-task joint optimization, it achieves accurate and robust personalized recommendations.
[0034] like Figure 1 As shown, a semantically and importance-guided diffusion graph recommendation method includes: Step S1: Construct a user-item interaction graph and an original knowledge graph. Use a large language model to extract semantic features of the item text. Spatially align the semantic features with the graph node features to obtain the text feature vector.
[0035] In order to simultaneously capture collaborative filtering signals, graph topology, and high-order semantic information, data from three different sources are processed and initialized.
[0036] Specifically, the primary task of a recommendation system is to construct a multi-dimensional feature space, starting with establishing a basic interaction representation between users and items, i.e., a UI interaction graph. Let the user set be denoted as... The collection of items is denoted as The model is for each user and items Assign a randomly initialized vector and These vectors will be continuously optimized during training to learn the most basic collaborative filtering features.
[0037] In addition to interactive data, a knowledge graph (KG) is further introduced as external auxiliary knowledge for items. The knowledge graph consists of a large number of triples, and the total number of entity nodes in the graph is denoted as... This maps entities and relationships to a vector space. Among these, items... The corresponding initial map node features are represented as follows: Based on the full set of triples, an initial knowledge graph adjacency matrix is constructed. Its internal elements Represents a node With nodes Does an initial connection exist between them? The initial knowledge graph adjacency matrix serves as both the original graph structure input for the forward noise addition and reverse denoising processes of the diffusion model, and the source of the original views in dual-view contrastive learning. These structured inputs provide the topological basis for the model to understand the derived attributes of items.
[0038] The purpose of semantic feature extraction is to enable the model to deeply understand the deep textual semantics of items and transform this discrete textual information into a structured representation in the knowledge graph. When processing the original dataset, the textual descriptions of the items are first collected and then input into a pre-trained Llama model. Because Llama possesses powerful natural language understanding capabilities, it can automatically parse and extract key information with fixed semantics (such as book title, author, publication year, etc.). These extracted core words correspond to the actual "entities" and "relationships" in the knowledge graph. Through Llama's processing, the originally isolated textual descriptions are encoded into a high-dimensional original semantic vector. It not only contains the literal information of the items, but also implicitly contains the entity relationships required to build the knowledge graph.
[0039] To ensure that the high-dimensional semantic vectors output by Llama can be integrated with the graph feature space within the recommendation system, feature alignment is performed using a projection network. The original vectors are then... The input is fed into a linear mapping network containing layer normalization (LayerNorm) and ReLU activation functions to compute dimensionality-reduced and aligned text feature vectors. :
[0040] in, Represents items Text feature vectors after dimensionality reduction and alignment; and This represents the learnable weight matrix in the network; This represents the original high-dimensional semantic vector of the item extracted by the large language model; and The bias parameter is for the linear mapping.
[0041] Step S2: The text feature vector is fused with the node structure features that reflect the global credibility of the node to construct a joint conditional guidance vector. Under the constraint of the joint conditional guidance vector, the original knowledge graph is subjected to forward noise addition and reverse noise removal through a diffusion model to reconstruct the denoised knowledge graph.
[0042] like Figure 2As shown, the original knowledge graph often has high noise levels due to the presence of a large amount of auxiliary information unrelated to recommendation. To extract the connections that are truly valuable for the recommendation task, a high-fidelity denoised knowledge graph is reconstructed from the original complex connections by simulating the noise addition and denoising process of the graph structure.
[0043] During the generation or reconstruction process, the diffusion model requires explicit conditional constraints to ensure that the generated connection structure conforms to the attribute logic of the item itself. The textual features of the item are concatenated with the node structure features reflecting the global credibility of the nodes to obtain a unified guiding condition vector. :
[0044] in, This represents the joint condition vector used to guide the generation direction of diffusion denoising; This represents the text feature vector of the item output by the upstream module; This represents a structural feature vector that reflects the topological importance of nodes; This represents the feature concatenation operation between vectors.
[0045] This fusion approach can simultaneously provide constraints for the denoising process from both "semantic" and "structural" dimensions. The existence of conditional vectors enables the denoising network to determine whether an edge is a real association or random noise based on the category, attributes, and importance of the item in the graph when predicting edges.
[0046] The purpose of the forward process is to connect the original graph matrix. This is gradually transformed into a continuous probability distribution that is easy to model. Gaussian noise is continuously added over T time steps using Gaussian diffusion. This causes the originally clear connection structure to gradually become blurred, which allows the model to learn the evolution of the graph structure under different levels of disturbance, thereby enhancing the model's noise robustness.
[0047] at any time step Noisy state Based on the original state Direct calculation yields:
[0048] in, Indicates the first The state of the graph adjacency matrix after noise is applied at each time step; This indicates the percentage of original map information retained from the start time to the current time step; Represents the adjacency matrix of the original pure graph input to the model; This represents the Gaussian noise tensor sampled from the standard normal distribution.
[0049] The purpose of the reverse process is to start from a noisy state. By removing interference, the purest original structure is restored. Unlike unconditional generative models, this embodiment uses conditional probability modeling, that is, given a conditional vector... Under the premise of, derive from arrive The transformation.
[0050] Using a trained denoising network, a denoised knowledge graph is generated through deterministic reasoning, denoted as . .in, This represents the denoised knowledge graph reconstructed under joint conditional guided vector constraints. This represents the denoised knowledge graph. The corresponding reconstructed adjacency matrix. Because this graph is generated with reference to the semantics and node importance weights extracted by LLM, it can retain the core features with strong correlation to the greatest extent and can shield the interference of edge noise, thus providing high-quality input for subsequent feature aggregation.
[0051]
[0052] in, This represents the adjacency matrix of the knowledge graph predicted and reconstructed by the denoising network. This represents a parameterized neural network denoiser; the training objective is to improve the predicted noise level. As close as possible to real noise-free In this way, unreasonable connections can be eliminated under semantic guidance.
[0053] Step S3: Calculate the scalar importance score of the nodes in the denoised knowledge graph, inject the scalar importance score into the graph attention aggregation network, and perform weighted aggregation of the features of neighboring nodes to obtain the updated node feature representation.
[0054] In traditional graph convolutional networks, central nodes typically employ an "indiscriminate absorption" or simple degree normalization strategy when collecting information from their neighbors. However, the status of entities in a knowledge graph is extremely unbalanced. If all neighbors are weighted uniformly, the model is prone to absorbing and amplifying topological noise from edge entities. To address this issue, this embodiment adaptively adjusts the information aggregation weights of the Graph Attention Network (RGAT) by quantitatively calculating the global topological status of nodes.
[0055] Since the model needs to consider not only the number of neighbors a node has locally, but also its pivotal role in the overall graph structure, for each node in the graph, the importance of the node is comprehensively quantified from local to global by extracting the most representative graph topology statistical indicators: (1) Degree centrality: measures the total number of directly connected neighbors of a node, reflecting its most basic local activity and connection breadth. The calculation formula is:
[0056] in, Represents a node Degree centrality index; and Represents the initial adjacency matrix The corresponding element in the data reflects the node. With nodes The existence of bidirectional edges between them; This represents the total number of network nodes.
[0057] (2) PageRank: Measures the core position of a node in the global network. If a node is pointed to by other high-authority nodes, its PageRank value will increase accordingly. The calculation formula is:
[0058] in, Represents a node The overall authority score, The denominator represents the damping coefficient that controls wander decay; Neighbor nodes were strictly quantified. Total out-degree in the graph. The damping coefficient is... This represents the total number of nodes.
[0059] (3) Eigenvector centrality: This measures the degree of correlation between a node and its neighboring nodes. Nodes connected to nodes with high importance have a greater structural influence than nodes connected to nodes with low importance. The calculation formula is:
[0060] in, Represents a node eigenvector centrality score; Representing the adjacency matrix The corresponding principal characteristic value.
[0061] (4) In-degree and out-degree: Count the number of edges pointing to the node. and the number of edges emanating from that node This is used to distinguish whether an entity is a passive attribute or an active core.
[0062]
[0063] in, Represents a node The number of in-degrees; Indicates from node Pointing to node The directed edge state.
[0064]
[0065] in, Represents a node The number of out-degrees; Indicates from node Pointing to node The directed edge state.
[0066] (5) Logarithmic Degree: Since the degree distribution of real knowledge graphs usually exhibits an extreme long-tail effect, logarithmic smoothing is used to prevent nodes with excessively high degrees from dominating the feature space.
[0067] After calculating the above indicators, since the physical meanings and value ranges of each indicator differ significantly, max-min normalization is used to map them uniformly to the interval [0, 1], and finally, they are concatenated into the structural feature matrix of each node. .
[0068] To avoid the limitations of manually setting weights, a learnable parameter vector is introduced. This parameter is trained end-to-end with the model, aiming to allow the model to automatically learn and evaluate which statistical metrics are most valuable for the current recommendation task. Through... The system is normalized by applying the Softmax activation function, transforming it into a probability distribution. Then, it is compared with the statistical feature matrix of the nodes. Perform linear combinations to calculate the nodes. Final scalar importance score :
[0069] in, The nodes obtained from the adaptive evaluation of the model are represented. Overall importance scalar score; Indicates the use of adjusting the first Learnable parameters for the weights of various statistical indicators; Represents a node In the structural feature matrix The corresponding number in the middle Normalized eigenvalues of various topological indices.
[0070] Rating-based graph attention aggregation (RGAT) injects node importance scores into the aggregation layer of the graph attention network. During information transmission at each layer, the central entity node... It needs to absorb its neighboring entities Its characteristics.
[0071] During the aggregation process, the central node Absorb neighbors Attention score when receiving information The importance score mentioned above needs to be considered. The formula is as follows:
[0072] in, Indicates the central node For neighboring nodes Initial attention score; Indicates and A vector of all 1s with the same dimension. Used to sum and map relation-modulated vector features to a scalar attention score; and They represent the current state. The latent feature vectors of the center node and its neighbors in a layered graph network, where the input of layer 0 is... ; Represents the projection weight matrix used for linear transformation A feature vector representing a specific type of relationship between two nodes; This represents the central node derived from the above. The global topological importance score.
[0073] Ultimately, the node features are updated to a weighted sum of neighbor information:
[0074] in, Indicates the central node The next layer of feature vectors output after this round of aggregation; This represents the attention weighting coefficients after local normalization; This represents the set of neighbors whose edges are still connected after noise reduction.
[0075] This series of calculations not only meticulously handles heterogeneous relationships but also forces the model to prioritize core entities with high structural weights during aggregation. This mechanism significantly reduces the interference from peripheral entities and long-tailed noise, ensuring the high quality and purity of the output node features.
[0076] Step S4: Using the original knowledge graph and the denoised knowledge graph as dual views, perform cross-view self-supervised comparative learning, and output the final recommendation result through multi-task joint optimization.
[0077] To address the issue of sparse user interaction data in real-world recommendation scenarios, relying solely on limited click feedback often proves insufficient for training accurate node vectors. To mitigate this problem and further enhance the model's resilience to topological noise, a cross-view self-supervised contrastive learning mechanism is introduced and jointly trained with the main recommendation task.
[0078] The unprocessed raw knowledge graph is directly input into the importance-aware aggregation module to extract node features containing complete connection information. The graph, reconstructed using the diffusion model and with redundant edges removed, is then input into the same aggregation module to extract cleaner node features. The core idea behind dual-view construction is that the core semantics represented by the same item in both views should be completely consistent.
[0079] Based on the aforementioned concept of feature consistency, a node-level contrastive learning task was designed. For the same item... Represent its features in the original view and the denoised view. As a pair of positive samples, features from other different items in the current training batch are combined as negative samples. The model uses the InfoNCE loss function for comparative optimization.
[0080] in, This represents the self-supervised contrastive learning loss across views; This represents the current training batch; This is a function for calculating the cosine similarity between two vectors. and These form positive sample pairs, representing the final graph node features extracted from the items under the original noisy graph view and the diffused denoising graph view, respectively. This represents negative samples consisting of other items within the batch. By minimizing this loss function, the model narrows the representation distance of the same item across different views in the vector space and widens the representation distance of different items. This self-supervised mechanism guides the model to learn stable features unaffected by noise, even in the absence of real user feedback.
[0081] After feature extraction and comparison alignment, the model performs the final recommendation prediction task. It is optimized using the Bayesian Personalized Ranking (BPR) loss function, commonly used in recommender systems, with the goal of ensuring that the predicted scores of positive items that the user has interacted with are consistently higher than the predicted scores of negative items that the user has not interacted with.
[0082] in, The personalized ranking loss represents the measure of recommendation accuracy. This represents the set of training interaction triples constructed from user historical feedback; This represents the Sigmoid function; and These represent the user predictions made by the model. For positive sample items and negative sample items Preference ratings, which are generated by user latent vectors. Final characteristics after aggregation with items The inner product is calculated.
[0083] Finally, the diffusion denoising task is combined with the main recommendation task to construct a multi-task joint optimization objective. In one implementation, the model is trained using an alternating optimization approach.
[0084] In the diffusion denoising stage, the diffusion denoising network is trained using the diffusion denoising reconstruction loss and the user-knowledge graph consistency loss, with its stage loss function... Defined as:
[0085] in, This represents the denoising reconstruction loss of the diffusion model, used to constrain the reconstructed graph output by the denoising network to maintain the same structure as the original graph. This represents the user-knowledge graph consistency loss, used to constrain the diffusion reconstruction results to maintain consistency with user-item interaction signals and knowledge graph entity representations. This represents the weighting coefficient between the two.
[0086] In the recommendation optimization stage, a dual-view representation is constructed based on the denoised knowledge graph reconstructed by the diffusion model and the original knowledge graph. The recommendation model is then trained by combining the recommendation main task loss and the cross-view comparative learning loss. Its stage loss function... Defined as:
[0087] in, This represents the Bayesian personalized ranking loss for the main recommendation task; The cross-view self-supervised contrastive learning loss represents the difference between the original knowledge graph view and the denoised knowledge graph view. For learnable parameters optional Regularization terms are used to suppress model overfitting.
[0088] Through the above-mentioned alternating optimization methods, the diffusion denoising module is used to generate a more reliable denoised knowledge graph, while the recommendation optimization module learns stable user and item representations based on the original view and the denoised view, thereby improving the accuracy and noise resistance of the recommendation model.
[0089] Example 2 This embodiment discloses a semantically and importance-guided diffusion graph recommendation system; like Figure 3 As shown, a semantically and importance-guided diffusion graph recommendation system includes: The feature alignment module is configured to: construct a user-item interaction graph and the original knowledge graph, extract semantic features of item text using a large language model, and spatially align the semantic features with the graph node features to obtain text feature vectors. The conditional diffusion denoising module is configured to: fuse the text feature vector with the node structure features that reflect the global credibility of the node, construct a joint conditional guidance vector, and under the constraint of the joint conditional guidance vector, perform forward noise addition and reverse noise reduction on the original knowledge graph through a diffusion model to reconstruct the denoised knowledge graph; The importance-aware aggregation module is configured to: calculate the scalar importance score of nodes in the denoised knowledge graph, inject the scalar importance score into the graph attention aggregation network, and perform weighted aggregation of the features of neighboring nodes to obtain the updated node feature representation; The dual-view comparative learning and joint optimization module is configured to: use the original knowledge graph and the denoised knowledge graph as dual views, perform cross-view self-supervised comparative learning, and output the final recommendation result through multi-task joint optimization.
[0090] Example 3 The purpose of this embodiment is to provide a computer-readable storage medium.
[0091] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in a semantically and importance-guided diffusion map recommendation method as described in Example 1.
[0092] Example 4 The purpose of this embodiment is to provide an electronic device.
[0093] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in a semantically and importance-guided diffusion map recommendation method as described in Embodiment 1.
[0094] The steps and methods involved in the apparatuses of Embodiments 2, 3, and 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0095] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0096] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A semantically and importance-guided diffusion graph recommendation method, characterized in that, include: Construct a user-item interaction graph and an original knowledge graph, extract semantic features of item text using a large language model, spatially align semantic features with graph node features to obtain text feature vectors; The text feature vector is fused with the node structure features of the global credibility of the reaction node to construct a joint conditional guidance vector. Under the constraint of the joint conditional guidance vector, the original knowledge graph is subjected to forward noise addition and reverse noise removal through a diffusion model to reconstruct the denoised knowledge graph. Calculate the scalar importance score of the nodes in the denoised knowledge graph, inject the scalar importance score into the graph attention aggregation network, and perform weighted aggregation of the features of neighboring nodes to obtain the updated node feature representation; Using the original knowledge graph and the denoised knowledge graph as dual views, cross-view self-supervised comparative learning is performed, and the final recommendation result is output through multi-task joint optimization.
2. The semantic and importance-guided diffusion graph recommendation method as described in claim 1, characterized in that, Construct a user-item interaction graph and an original knowledge graph. Extract semantic features of item texts using a large language model. Spatially align the semantic features with the graph node features to obtain text feature vectors, including: Construct user and item sets, assign randomly initialized feature vectors, and form a user-item interaction graph; Obtain the triple data of the original knowledge graph and construct the initial knowledge graph adjacency matrix; Collect textual descriptions of items and extract high-dimensional raw semantic vectors using a pre-trained Llama model; The high-dimensional original semantic vector is reduced in dimensionality and aligned to the graph feature space by a projection network that includes layer normalization and ReLU activation functions, thus obtaining the text feature vector.
3. The semantic and importance-guided diffusion graph recommendation method as described in claim 1, characterized in that, The constructed joint conditional guiding vector is: in, This represents the joint condition vector used to guide the generation direction of diffusion denoising; This represents the text feature vector of the item output by the upstream module; This represents a structural feature vector that reflects the topological importance of nodes; This represents the feature concatenation operation between vectors.
4. The semantic and importance-guided diffusion graph recommendation method as described in claim 1, characterized in that, The original knowledge graph is subjected to forward denoising and reverse denoising using a diffusion model, resulting in a reconstructed denoised knowledge graph, including: Based on the joint conditional guiding vector, a forward Gaussian diffusion process is performed, gradually adding Gaussian noise to the adjacency matrix of the original knowledge graph over multiple time steps, transforming it into a continuous probability distribution. A denoising network is modeled using conditional probability. Under the constraint of the joint conditional guiding vector, an inverse denoising process is performed to gradually predict and remove noise from the noisy state, and reconstruct the denoised knowledge graph.
5. The semantic and importance-guided diffusion graph recommendation method as described in claim 1, characterized in that, Calculate the scalar importance score of nodes in the denoised knowledge graph, specifically including: For each node in the denoised knowledge graph, its multidimensional topological statistical index is calculated. The multidimensional topological statistical index includes degree centrality, PageRank value, feature vector centrality, in-degree, out-degree, and logarithmic degree. Each indicator is subjected to maximum and minimum normalization, and the normalized indicators are concatenated into a structural feature matrix of the node. A learnable parameter vector is introduced, normalized by the Softmax activation function, and then linearly combined with the structural feature matrix to calculate the scalar importance score for each node: in, The nodes obtained from the adaptive evaluation of the model are represented. Overall importance scalar score; Indicates the use of adjusting the first Learnable parameters for the weights of various statistical indicators; Represents a node In the structural feature matrix The corresponding number in the middle Normalized eigenvalues of various topological indices.
6. The semantic and importance-guided diffusion graph recommendation method as described in claim 1, characterized in that, The scalar importance score is injected into the graph attention aggregation network to perform weighted aggregation of neighbor node features, resulting in an updated node feature representation, including: The scalar importance score is injected as an additional attention bias into the aggregation layer of the graph attention aggregation network, and the attention score of the center node to its neighboring nodes is calculated as follows: in, This represents the initial attention score of the central node towards its neighboring nodes; Indicates and A vector of all 1s with the same dimension. Used to sum and map relation-modulated vector features to a scalar attention score; and They represent the current state. The latent feature vectors of the central node and its neighboring nodes in a layered graph network; This represents the projection weight matrix used for the linear transformation; A feature vector representing a specific type of relationship between two nodes; This represents the global topological importance score of the central node obtained above; We perform weighted aggregation of the neighbor node features to obtain the updated node feature representation: in, Indicates the central node The next layer of feature vectors output after this round of aggregation; This represents the attention weighting coefficients after local normalization; This represents the set of neighbors whose edges are still connected after noise reduction.
7. The semantic and importance-guided diffusion graph recommendation method as described in claim 1, characterized in that, Using the original knowledge graph and the denoised knowledge graph as dual views, cross-view self-supervised contrastive learning is performed. Through multi-task joint optimization, the final recommendation results are output, including: The original knowledge graph and the denoised knowledge graph are respectively input into the graph attention aggregation network to generate the original view node feature representation and the denoised view node feature representation. A cross-view self-supervised contrastive learning task is constructed. The feature representations of the same item in the original view and the denoised view are used as positive sample pairs, and the feature representations of different items in the same training batch are used as negative sample pairs. The InfoNCE loss function is used for optimization, and the contrastive learning loss is calculated. A Bayesian personalized ranking loss function is constructed for the main recommendation task, and the main recommendation task loss, contrastive learning loss, diffusion denoising and reconstruction loss, and user-knowledge graph consistency loss are used as training objectives. The model parameters are updated through joint training or alternating optimization, and the final recommendation result is output.
8. A semantically and importance-guided diffusion graph recommendation system, characterized in that, include: The feature alignment module is configured to: construct a user-item interaction graph and the original knowledge graph, extract semantic features of item text using a large language model, and spatially align the semantic features with the graph node features to obtain text feature vectors. The conditional diffusion denoising module is configured to: fuse the text feature vector with the node structure features that reflect the global credibility of the node, construct a joint conditional guidance vector, and under the constraint of the joint conditional guidance vector, perform forward noise addition and reverse noise removal on the original knowledge graph through a diffusion model to reconstruct the denoised knowledge graph; The importance-aware aggregation module is configured to: calculate the scalar importance score of nodes in the denoised knowledge graph, inject the scalar importance score into the graph attention aggregation network, and perform weighted aggregation of the features of neighboring nodes to obtain the updated node feature representation; The dual-view comparative learning and joint optimization module is configured to: use the original knowledge graph and the denoised knowledge graph as dual views, perform cross-view self-supervised comparative learning, and output the final recommendation result through multi-task joint optimization.
9. A computer-readable storage medium having a program stored thereon, characterized in that, When executed by a processor, the program implements the steps of a semantically and importance-guided diffusion graph recommendation method as described in any one of claims 1-7.
10. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the semantic and importance-guided diffusion map recommendation method as described in any one of claims 1-7.