Recommendation system based on dual-module enhanced knowledge graph framework
Through the knowledge selection and transfer modules of the Dual Module Enhanced Knowledge Graph Framework (DMKGE), the problem of lack of key attributes of unpopular items in the recommendation system is solved, and efficient and accurate recommendation effects are achieved.
Patent Information
- Application Number
- CN202510854133.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-09-19
AI Technical Summary
In recommendation systems, unpopular items lack key attributes, leading to knowledge discrepancies. Existing technologies are unable to effectively alleviate the problems of knowledge imbalance and noisy data.
A dual-module enhanced knowledge graph framework (DMKGE) is adopted, including a knowledge selection module and a knowledge transfer module. Attribute scores are dynamically assigned through the graph attention mechanism, and semantic alignment is performed by combining information theory metrics and pre-trained language models to identify and supplement attributes that are highly relevant to user-item interactions.
It significantly improves the computational efficiency and accuracy of the recommendation system, outperforming existing methods, especially in alleviating knowledge differences and noisy data, and improving cold start performance.
Smart Images

Figure CN120670673A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of recommendation systems, and in particular to a recommendation system based on a dual-module enhanced knowledge graph framework. Background Art
[0002] With the increasing popularity of the internet and the exponential growth of online information, the problem of information overload has become increasingly severe in recent years. Therefore, efficiently retrieving relevant information from this massive data environment has become a key challenge, and recommender systems have been developed to address this challenge.
[0003] Although graph neural networks (GNNs) have demonstrated advantages in improving recommendation performance, the cold-start problem persists due to the sparseness of user-item interaction data. This has prompted the development of several advanced techniques, including meta-learning, contrastive learning, and knowledge graphs (KGs). Meta-learning methods enhance model adaptability to cold-start users / items by transferring knowledge across tasks. Contrastive learning frameworks incorporate self-supervised learning to enhance the representation of cold-start entities. Unlike meta-learning and contrastive learning, knowledge graphs (KGs) incorporate additional information about cold-start items by integrating external information related to the items. KGs have been widely integrated into recommendation architectures based on GNNs. For example, lightweight graph convolutional networks (GCNs) and neural graph collaborative filtering (NGCF) apply GNNs to the graph structure of user-item interactions to learn robust representations. Similarly, knowledge graph convolutional networks (KGCNs), knowledge graph attention networks (KGATs), and knowledge graph contrastive learning (KGCL) incorporate semantic knowledge from knowledge graphs to enrich interaction-related data and improve cold-start performance.
[0004] However, some items, especially unpopular items, often lack important attributes, while popular items are more attribute-rich. The lack of key attributes may lead to insufficient representation of unpopular items compared to popular items, a phenomenon known as the knowledge gap problem. The key to alleviating the knowledge gap is to increase the number of missing attributes of items. Knowledge graphs inevitably contain a large amount of noisy data and attributes irrelevant to the task, which makes it unwise to directly transfer attributes from similar items for a given unpopular item. This brings two challenges: the first challenge is to determine how to reduce noisy and irrelevant attributes and select comprehensive candidate attributes for the target item; the other major challenge is to identify missing attributes from the candidate attributes, which involves semantic alignment while migrating these attributes to the item representation.
[0005] In order to meet the above challenges, the present invention proposes a recommendation system based on a dual-module enhanced knowledge graph framework to alleviate the above technical problems caused by the knowledge differences in the recommendation system. Summary of the Invention
[0006] The emergence of knowledge graph-based recommendation systems has brought significant benefits because it makes it possible to obtain more comprehensive information from neighboring nodes. However, in knowledge graph-based recommendation systems, unpopular items often lack key information related to a given task, which leads to an imbalance in the recommendation results, that is, more popular items are more likely to be recommended than less popular items. To address this problem, this paper proposes a recommendation system based on a dual-module enhanced knowledge graph framework (DMKGE) to alleviate the knowledge imbalance problem of different item attributes. Experimental evaluations conducted on two benchmark datasets show that the proposed method outperforms powerful baseline methods. In addition, it also has significant advantages, including high computational efficiency and low time and space complexity.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is:
[0008] A recommendation system based on a dual-module enhanced knowledge graph framework alleviates the knowledge discrepancy problem in the recommendation system. The dual-module enhanced knowledge graph framework (DMKGE) includes a knowledge selection module and a knowledge transfer module, wherein:
[0009] The knowledge selection module uses a graph attention mechanism to dynamically assign relevance scores to the attributes of items in the knowledge graph based on the characteristics of the item's neighbors and the task context, while filtering out attributes that are not relevant to the task;
[0010] The knowledge transfer module implements a semantically aware architecture for two-layer attribute selection. It analyzes mutual information using information-theoretic metrics to identify attributes that are highly relevant to user-item interactions, and aligns the semantics of these attributes with item representations using a pre-trained language model. The selected attributes are then embedded into the newly expanded knowledge graph, alleviating the knowledge gap problem by systematically enhancing the completeness and semantic consistency of the attributes.
[0011] As a preferred technical solution of the present invention, in the knowledge selection module, the core GAT formula for calculating the attention coefficient is retained, while redundant operations are eliminated to reduce space and time complexity; the details are as follows:
[0012] The input of this layer is a set of node features, denoted as Among them, N represents the number of nodes, F represents the number of features of each node; the output of this layer is a set of new node features, recorded as
[0013] In order to transform the input features into a higher-level representation, at least a learnable linear transformation is required; first, a linear transformation consisting of a weight matrix is applied to all nodes. Parameterized shared linear transformation followed by self-attention operation The shared attention mechanism dynamically weighs the contributions of neighboring nodes by calculating the attention coefficient;
[0014]
[0015] These coefficients indicate the importance of node j’s features to node i;
[0016] The graph structure is integrated into the model through the masked attention mechanism—only the neighboring nodes of node i Calculate e ij ,in represents a certain neighborhood of node i in the graph; in order to promote the comparability of attention coefficients between different nodes, the softmax function is used to normalize the coefficients of all candidate nodes j:
[0017]
[0018] In DMKGE, the attention mechanism is a single-layer feedforward neural network consisting of a weight vector Parameterized and applying the LeakyReLU nonlinear activation function with a slope of α = 0.2; after full expansion, the coefficients calculated by the attention mechanism are expressed as:
[0019]
[0020] Among them, ·T represents transpose, Quantify the transformed features of node i and the contextual correlation between them and the corresponding attention parameters; at the same time, It measures the transformed features of node j and the degree of alignment with the task-specific attention weights; a new comprehensive relevance score is generated here by summing up, which dynamically balances the contributions from its own representation and neighbor representations;
[0021] After obtaining the normalized attention coefficients, these coefficients are used to calculate the weighted linear combination of the corresponding neighbor features; a nonlinear activation function is applied to the calculation, and the result is the final output representation of each node;
[0022]
[0023] where σ represents the activation function; the combination of normalized weights and neighbor features ensures that the representation of each node incorporates context-aware contributions from its topological neighbors, while nonlinear transformations introduce the expressive power required to capture complex patterns in the knowledge graph; this design retains structural information that is critical to accurate recommendation tasks while maintaining computational efficiency.
[0024] As a preferred technical solution of the present invention, in the knowledge transfer module, the correlation between project attributes is inferred by mining user interaction patterns, as follows:
[0025] ①. Diversity function calculation
[0026] By integrating user interaction data, the model evaluates the degree of correlation between items and reveals the intrinsic connection between item attributes from the perspective of information theory; its mathematical definition is as follows:
[0027]
[0028] Among them, C(v i ,v j ) indicates item v i With v j The co-occurrence frequency in all user interaction data, C(v i ) represents the frequency of occurrence of item vi in the same data; is the point mutual information (PMI), Normalize its range to [-1,1]; p(v i ,v j ) value is higher, indicating that the project v i With v j The stronger the correlation between the attributes;
[0029] The two-dimensional association architecture combines normalized point mutual information (NPMI) with semantic alignment technology; NPMI characterizes the co-occurrence pattern of attributes between items by aggregating user interaction data and measures the degree of relevance from the perspective of information theory; at the same time, the cosine similarity of pre-trained item embedding vectors is introduced to calculate the semantic similarity c(v i ,v j ), thereby ensuring semantic consistency in the latent feature space; to conduct more in-depth research on semantic relationships, DMKGE uses a series of diverse functions for semantic calculation; in addition to cosine similarity calculation, the present invention also uses Euclidean distance and Manhattan distance as additional metrics;
[0030] s(v i ,v j )=p(v i ,v j )+c(v i ,v j ), (6)
[0031]
[0032] in, Project v i and v jThe conversion vector of; Based on cosine similarity, Euclidean distance and Manhattan distance, c(v i ,v j ),e(v i ,v j ) and m(v i ,v j ) is used to evaluate project v i With v j The attribute correlation in the semantic space, whose value is dynamically updated with the training process; and p(v i ,v j ), the ranges ofc(v i ,v j ),e(v i ,v j ) and m(v i ,v j ) are all in the range of [-1,1]; they are combined with p(v i ,v j ) to form a more credible attribute correlation score s(v i ,v j );
[0033] ② Dynamic attribute migration
[0034] For project v i , a framework for deriving latent attributes is constructed based on the cross-project attribute correlation score η; in order to improve the accuracy of attribute addition, the correlation score adopts a dynamic update strategy, that is, the value of η gradually decreases with the increase of training rounds (0.7<η<0.9); through this adaptive adjustment mechanism, while the system mines latent attributes, it effectively ensures that the newly extracted attributes will not be included in its main knowledge graph middle:
[0035]
[0036] Among them, ∩ represents the intersection operation of sets, and η is a hyperparameter; Refers to entity v in the original knowledge graph i The attribute set of Corresponding entity v j The core idea is that when entity v i and v j When there is a significant attribute correlation between v i The high-quality latent attributes (r, t) should come from v j The attribute set Kj, and the attribute must be not included in v i The new elements in the original knowledge graph, i.e. By unifying the potential attributes All attributes in the data are associated and mapped with their corresponding entities, and finally a potential knowledge graph is constructed. Its formal definition is
[0037] As the preferred technical solution of the present invention, in order to highlight the potential knowledge graph after purification The project attributes added in Divided into two parts: in and Corresponding to the main knowledge graph after purification and the purified latent knowledge graph The properties of the item in the hop, such as, and Corresponding to the main knowledge graph after purification Higher-order properties of items in (i.e., order > 1), such as Next, based on and The aggregation process is performed, which is defined as follows:
[0038]
[0039]
[0040] Among them, || represents the splicing operation; the output results of the L-layer graph convolutional network (GCN) are averaged and pooled, that is, Use e i Indicates project v i knowledge representation; then, e i With the converted Splice to get project v i Comprehensive representation of in
[0041] As a preferred technical solution of the present invention, the system also includes prediction and model optimization, as follows:
[0042] ① Design of loss function
[0043] Cross entropy is used as the loss function to optimize the parameters of DMKGE:
[0044]
[0045] in, Represents the one-hot encoding vector of the true label, N is the number of training data; Apply label smoothing strategy to alleviate overfitting problem;
[0046] ②User-item interaction modeling
[0047] The user tower and item tower are jointly trained using comprehensive item attributes from the interaction graph and knowledge graph to generate a final representation that can simultaneously encode behavioral patterns and semantic knowledge for accurate recommendations.
[0048]
[0049] in, is user u i The initial transformation of They are user u i and Project v i The final transformed representation of ; Represents user u i The set of items that have been interacted with; Indicates project v i The set of users that have interacted; Represents user u i With Project V j The probability of an interaction occurring.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] First, we propose a Dual-Module Knowledge Graph Enhancement (DMKGE) framework to address the knowledge gap problem in knowledge graph-based recommendation systems. This framework systematically addresses the issues of incomplete attributes and uneven attribute distribution by augmenting attributes with two modules: a knowledge selection module and a knowledge transfer module.
[0052] Secondly, to simplify the complexity of the proposed method and improve training efficiency, we first distinguish the task-relevant attributes before transferring them to supplement the knowledge of entities with incomplete information. This differs from EditKG, where knowledge is generated first and then irrelevant attributes are removed.
[0053] Then, we develop a parameterized mechanism for scoring task relevance to dynamically evaluate the relationship between attributes and tasks. This enables the elimination of noisy attributes and attributes irrelevant to the task based on context awareness, thereby improving the quality of candidate attributes for augmentation.
[0054] At the same time, the present invention designs a transfer architecture to explore the potential correlation between attributes based on mutual information and semantic alignment, which enables automatic supplementation of missing attributes of items while maintaining semantic consistency.
[0055] Finally, comprehensive experimental results on two benchmark datasets show that the proposed recommendation system based on the dual-module enhanced knowledge graph framework (DMKGE) significantly outperforms mainstream knowledge graph-based recommendation methods. The proposed framework outperforms the current state-of-the-art baseline methods such as KGCN, KGAT, and KGCL. In terms of algorithmic complexity and training efficiency, DMKGE shows a clear advantage over EditKG. By implementing streamlined modules and parameter optimization, it significantly outperforms the comparison methods in terms of time complexity and achieves efficient training with fewer parameters and a lighter architecture. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is the overall architecture of the Dual Module Enhanced Knowledge Graph Framework (DMKGE).
[0057] Figure 2 Performance comparison between the Last-fm dataset and the Yelp2018 dataset in the first 20 training rounds of the DMKGE model.
[0058] Figure 3 This is a performance comparison of the DMKGE model and some of the current optimal models on the Last-fm and Yelp2018 datasets.
[0059] Figure 4 The mean and best result distribution of DMKGE ablation experiments, as well as their statistical comparison.
[0060] Figure 5 The results show that the semantic modules with four different functions perform well in terms of recall@20 and normalized discounted cumulative gain (NDCG) on the Last.fm and Yelp2018 datasets. DETAILED DESCRIPTION
[0061] The present invention is further described below in conjunction with embodiments and drawings.
[0062] First, the core symbol concepts are introduced, and the definition of the knowledge graph-aware recommendation task is as follows:
[0063] 1. User-item interaction graph: A user's implicit feedback (e.g., clicking or purchasing an item) is represented by a bipartite graph G = {(ui,yui,vi,vi)|ui∈U,vi∈V}, where U is the set of users and V is the set of items. If user ui has interacted with item vi, then yui,vi = 1; otherwise, yui,vi = 0.
[0064] 2. Knowledge Graph: Knowledge graphs (KGs) store a large number of project-related attributes in the form of triples. This structured representation is defined as a heterogeneous graph Gk = {(h, r, t) | h, t∈ε, r∈R}, where ε and R are the entity set and relationship set of the knowledge graph, respectively. More precisely, in each triple (h, r, t), the head entity h and the tail entity t are related to each other through the relationship r. It is worth noting that the project set is a subset of the entity set, for example, For ease of understanding, Gk is called the main knowledge graph.
[0065] 3. Task formulation: The recommendation task based on the knowledge graph (KG) is formulated as follows: Based on the user-item interaction graph G and the main knowledge graph Gk, a model F(ui,vi|G,Gk,Θ) is trained by the following method to predict the probability of user ui adopting item vi, where Θ represents the trainable parameters of model F.
[0066] Based on this, the present invention proposes a recommendation system based on the dual-module enhanced knowledge graph framework (DMKGE). The overall architecture of the dual-module enhanced knowledge graph framework (DMKGE) is as follows: Figure 1 As shown in Figure 1, it integrates two core components: a knowledge selection module and a knowledge transfer module. The knowledge selection module uses a graph attention mechanism to dynamically assign relevance scores to attributes of items in the knowledge graph based on the characteristics of their neighbors and the task context, while filtering out attributes that are irrelevant to the task. However, some low-relevance attributes may still remain in the filtered graph, and direct attribute transfer introduces a significant amount of noise. To address this issue, the knowledge transfer module implements a semantically aware architecture for two-layer attribute selection. It analyzes mutual information using information-theoretic metrics to identify attributes that are highly relevant to user-item interactions and leverages a pre-trained language model to align the semantics of these attributes with item representations. The selected attributes are then embedded into the newly augmented knowledge graph, mitigating the knowledge discrepancy problem by systematically enhancing attribute completeness and semantic consistency. The following section further details the components of this recommender system.
[0067] 1. Design of knowledge selection module
[0068] The neighbors of entities in a knowledge graph often convey critical contextual information, especially for entities with sparse attributes. Recent research has highlighted the advantages of leveraging auxiliary information from neighboring nodes. However, filtering out potential attributes from the original knowledge graph is challenging due to the large amount of noise and task-irrelevant features. This paper introduces a knowledge selection module that identifies and prioritizes task-relevant attributes by assigning attention scores to item attributes based on their contextual relevance and importance.
[0069] All graph attention network (GAN) architectures in DMKGE are applied to a single graph attention layer. Unlike the original graph attention network (GAT) formula, the present invention makes a lightweight modification to its architecture, removes non-core parameters, merges the calculation of edge-related information, and simplifies the processing logic. These optimizations significantly improve computational efficiency while retaining the key attention mechanism for accurately evaluating the importance of neighbors. Specifically, the simplified architecture retains the core GAT formula for calculating the attention coefficient while eliminating redundant operations to reduce space and time complexity. This streamlined design ensures efficient knowledge selection in resource-constrained recommendation scenarios, as follows:
[0070] The input of this layer is a set of node features, denoted as Where N represents the number of nodes and F represents the number of features of each node. The output of this layer is a set of new node features (whose feature dimension may become F′), denoted as
[0071] In order to transform the input features into higher-level representations, at least a learnable linear transformation is required. First, a linear transformation consisting of a weight matrix is applied to all nodes. Parameterized shared linear transformation. Followed by self-attention operation The shared attention mechanism dynamically weighs the contributions of neighboring nodes by calculating the attention coefficient.
[0072]
[0073] These coefficients indicate the importance of node j’s features to node i. In general model formulation, if each node is allowed to pay attention to all other nodes, all structural information will be lost. The graph structure is incorporated into the model through the masked attention mechanism - only the neighborhood nodes of node i are Calculate e ij ,in represents a certain neighborhood of node i in the graph (usually the first-order neighbors including i itself). In order to promote the comparability of attention coefficients between different nodes, the coefficients of all candidate nodes j are normalized using the softmax function:
[0074]
[0075] In DMKGE, the attention mechanism is a single-layer feedforward neural network consisting of a weight vector Parameterized and applied with a LeakyReLU nonlinear activation function with a slope of α = 0.2. After full expansion, the coefficients calculated by the attention mechanism can be expressed as:
[0076]
[0077] Among them, ·T represents transpose, Quantify the transformed features of node i and the contextual correlation between them and the corresponding attention parameters. It measures the degree of alignment between the transformed features of node j and the task-specific attention weights. A new comprehensive relevance score is generated here by summing the contributions from its own representation and neighbor representations.
[0078] After obtaining the normalized attention coefficients, these coefficients are used to calculate the weighted linear combination of the corresponding neighbor features. A nonlinear activation function is applied to the calculation, and the result is the final output representation of each node.
[0079]
[0080] where σ represents the activation function (e.g., LeakyReLU). The combination of normalized weights and neighborhood features ensures that the representation of each node incorporates context-aware contributions from its topological neighbors, while nonlinear transformations introduce the expressive power required to capture complex patterns in the knowledge graph. This design preserves the structural information that is critical for accurate recommendation tasks while maintaining computational efficiency.
[0081] 2. Design of knowledge transfer module
[0082] The core goal of knowledge transfer is to transfer the underlying characteristics of item attributes. Transferring candidate attributes is challenging because these attributes are highly dependent on prior domain-specific knowledge. However, empirical analysis shows that the user-item interaction process itself contains a wealth of prior knowledge. By mining user interaction patterns, it is possible to infer correlations between item attributes. This provides a practical solution for achieving automatic attribute transfer while maintaining methodological rigor and highlights the critical value of user behavior data for knowledge transfer.
[0083] 2.1. Diversity function calculation
[0084] In a knowledge graph, items with high attribute correlation can synergistically enhance each other's characteristics. This correlation can be inferred by analyzing the interaction behavior patterns between users and items. Specifically, this paper draws on the theoretical framework of Normalized Point Mutual Information (NPMI) to develop a correlation measurement model based on the mutual information principle. By integrating user interaction data, the model evaluates the degree of correlation between items and reveals the intrinsic connection between item attributes from the perspective of information theory. Its mathematical definition is as follows:
[0085]
[0086] Among them, C(v i ,v j ) indicates item v i With v j The co-occurrence frequency in all user interaction data, C(v i ) represents the frequency of occurrence of item vi in the same data. is the point mutual information (PMI), Normalize its range to [-1,1]. p(v i ,v j ) value is higher, indicating that the project v i With v j The stronger the correlation between the attributes.
[0087] To address the challenge of accurately migrating latent attributes, this paper proposes a two-dimensional association architecture that combines normalized point mutual information (NPMI) with semantic alignment technology. NPMI characterizes the co-occurrence pattern of attributes between items by aggregating user interaction data and measures the degree of relevance from the perspective of information theory. On this basis, the study introduces the cosine similarity of pre-trained item embedding vectors to calculate the semantic similarity c(v i ,v j ), thereby ensuring semantic consistency within the latent feature space. To further explore semantic relationships, DMKGE employs a diverse set of functions for semantic computation. In addition to cosine similarity, the present invention also uses Euclidean distance and Manhattan distance as additional metrics.
[0088] s(v i ,v j )=p(v i ,v j )+c(v i ,v j ), (6)
[0089]
[0090] in, Project v i and v j Based on cosine similarity, Euclidean distance and Manhattan distance, c(v i ,v j ),e(v i ,v j ) and m(v i ,v j ) is used to evaluate project v i With v j The attribute correlation in the semantic space is dynamically updated with the training process.i ,v j ), the ranges ofc(v i ,v j ),e(v i ,v j ) and m(v i ,v j ) are all in the range of [-1,1]. They are combined with p(v i ,v j ) to form a more credible attribute correlation score s(v i ,v j ).
[0091] 2.2 Dynamic Attribute Migration
[0092] For project v i A framework for deriving latent attributes is constructed based on the cross-project attribute correlation score η. To improve the accuracy of attribute addition, the correlation score adopts a dynamic update strategy, that is, the value of η gradually decreases with the increase of training rounds (0.7<η<0.9). Through this adaptive adjustment mechanism, while the system mines latent attributes, it effectively ensures that the newly extracted attributes will not be incorporated into its main knowledge graph. middle:
[0093]
[0094] Among them, ∩ represents the intersection operation of sets, and η is a hyperparameter. Refers to entity v in the original knowledge graph i The attribute set of Corresponding entity v j The core idea is: when entity v i and v j When there is a significant attribute correlation between v i The high-quality latent attributes (r, t) should come from v j The attribute set Kj, and the attribute must be not included in v i The new elements in the original knowledge graph, i.e. By unifying the potential attributes All attributes in the data are associated and mapped with their corresponding entities, and finally a potential knowledge graph is constructed. Its formal definition is
[0095] 3. Aggregator
[0096] Based on balanced knowledge graph The present invention uses LightGCN to learn the knowledge representation of the project. Specifically, in order to highlight the potential knowledge graph after purification The project attributes added in Divided into two parts: in and Corresponding to the main knowledge graph after purification and the purified latent knowledge graph The properties of the item in the hop, such as, and Corresponding to the main knowledge graph after purification Higher-order properties of items in (i.e., order > 1), such as Next, based on and The aggregation process is performed, which is defined as follows:
[0097]
[0098] Among them, || represents the concatenation operation. The output of the L-layer graph convolutional network (GCN) is average pooled, that is, Use e i Indicates project v i Then, e i With the converted Splice to get project v i Comprehensive representation of in
[0099] 4. Prediction and model optimization
[0100] 4.1 Loss Function Design
[0101] Cross entropy is used as the loss function to optimize the parameters of DMKGE:
[0102]
[0103] in, Represents the one-hot encoding vector of the true label, and N is the number of training data. A label smoothing strategy is applied to alleviate the overfitting problem.
[0104] 4.2 User-Item Interaction Modeling
[0105] The user tower and item tower are jointly trained using comprehensive item attributes in the interaction graph and knowledge graph to generate a final representation that can simultaneously encode behavioral patterns and semantic knowledge for accurate recommendations.
[0106]
[0107] in, is user u i The initial transformation of They are user u i and Project v i The final transformed representation of . Represents user u i The collection of items that have been interacted with. Indicates project v i The collection of users who have interacted. Represents user u i With Project V j The probability of an interaction occurring.
[0108] 5. Experiment
[0109] We conduct comprehensive experiments to evaluate the performance of DMKGE by asking the following research questions:
[0110] RQ1: How does DMKGE perform compared to different types of knowledge-aware recommendation methods?
[0111] RQ2: What are the effects of different DMKGE designs on its overall performance?
[0112] RQ3: What are the results of analyzing various computational functions of DMKGE?
[0113] RQ4: What are the results of the analysis of the space and time complexity of DMKGE?
[0114] 5.1 Experimental Setup
[0115] 5.1.1 Dataset
[0116] To test diverse scenarios, we selected two different real-world datasets as benchmarks: the Last-FM dataset for music recommendations and the Yelp 2018 dataset for business recommendations. We mapped items to Freebase entities and collected their second-order neighbors to construct the main knowledge graph. We used 80% of the dataset for training, 10% for validation, and 10% for testing. Table 1 summarizes the statistics of these two datasets and their main knowledge graphs.
[0117] Table 1: Statistics of the two datasets
[0118]
[0119] 5.1.2 Evaluation Metrics
[0120] We use two widely used evaluation metrics, Recall@N and Normalized Discounted Cumulative Gain@N, to evaluate the performance of DMKGE and all baseline methods. In the experiments, N in the test set is set to 20 according to the default settings of EditKG [G. Tang, X. Gan, J. Wang, B. Lu, L. Wu, L. Fu, C. Zhou, “EditKG: Editing Knowledge Graph for Recommendation,” Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR), 2024, pp. 112–122.].
[0121] 5.1.3 Baseline
[0122] To evaluate the effectiveness of the proposed EDKG recommendation method, we conducted extensive experiments using three types of baseline methods: a general collaborative filtering method, a transfer-based knowledge-aware recommendation method, and a graph neural network (GNN)-based knowledge graph-aware recommendation method. These experiments aimed to compare the performance of EDKG with baseline methods that follow different research approaches.
[0123] ① Recommendation based on collaborative filtering:
[0124] Bayesian Personalized Ranking (BPR) [S. Rendle, C. Freudenthaler, Z. Gantner, L. Schmidt-Thieme, “BPR: Bayesian Personalized Ranking from Implicit Feedback,” arXiv preprint arXiv:1205.2618, 2012.]: This approach applies Bayesian analysis to optimize traditional factorization machine models.
[0125] Graph Convolutional Matrix Completion (GC-MC) [RvdBerg, TNKipf, M.Welling, “Graph Convolutional Matrix Completion,” arXiv preprint arXiv:1706.02263, 2017.]: This method models matrix completion by using a graph autoencoder with differentiable message passing for bipartite graph link prediction, and outperforms the current state-of-the-art (SOTA) with auxiliary data.
[0126] Lightweight Graph Convolutional Network (LightGCN) [X.He, K.Deng, X.Wang, Y.Li, Y.Zhang, M.Wang, “LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation,” Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR), 2020, pp. 639–648.]: This approach uses simplified graph convolutions on collaborative filtering to capture the interactions between users and items, and outperforms the current state-of-the-art methods.
[0127] Simple Graph Learning (SGL) [J.Wu, X.Wang, F.Feng, X.He, L.Chen, J.Lian, X.Xie, “Self-Supervised Graph Learning for Recommendation,” Proceedings of the 44thInternational ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR), 2021, pp.726–735.]: This method addresses the limitations of traditional graph convolutional networks (GCNs) by using self-supervised learning with contrastive learning on user-item graphs to improve recommendation performance.
[0128] ②Recommendation based on Transfer:
[0129] Knowledge-based collaborative embedding (CKE) [U.Schillinger, FL~cke, “Antibacterial activity of Lactobacillus sake isolated from meat,” Applied and EnvironmentalMicrobiology, vol.55, 1989, pp.1901–1906.]: This approach integrates collaborative filtering with structural knowledge, textual knowledge, and visual knowledge into a unified recommendation framework.
[0130] Learning User Preferences with Knowledge Transfer (KTUP) [L.Khalil, Z.Kobti, “RKTUP framework: enhancing recommender systems with compositional relations in knowledgegraphs,” International Symposium on Distributed Computing and ArtificialIntelligence, Springer, 2023, pp. 285–295.]: This approach combines knowledge graph learning and recommendation through a translation-based approach to address data incompleteness, improves the understanding of user preferences, and outperforms the current state-of-the-art (SOTA) technology.
[0131] ③ Recommendation based on graph neural network:
[0132] Knowledge Graph Convolutional Network (KGCN) [H.Wang, M.Zhao, X.Xie, W.Li, M.Guo, “KnowledgeGraph Convolutional Networks for Recommender Systems,” The World Wide Web Conference (WWW), 2019, pp.3307–3313.]: This approach uses the similarity of relationships between different users to assign different weights to neighbors, thereby obtaining a high-level representation of entities.
[0133] Knowledge Graph Attention Network (KGAT) [X.Wang, X.He, Y.Cao, M.Liu, T.-S.Chua, “KGAT:Knowledge Graph Attention Network for Recommendation,” Proceedings of the 25thACM SIGKDDInternational Conference on Knowledge Discovery&Data Mining(KDD), 2019, pp.950–958.]: This method uses a graph attention mechanism to evaluate the importance of different neighbors and derives entity representations for recommendation through a graph neural network.
[0134] Knowledge Graph Interaction Network (KGIN) [X.Wang, T.Huang, D.Wang, Y.Yuan, Z.Liu, X.He, T.-S.Chua, “Learning Intents Behind Interactions with Knowledge Graph for Recommendation,” Proceedings of the Web Conference 2021 (WWW), 2021, pp.878–887.]: This approach improves the accuracy and interpretability of recommendations by modeling user interactions through knowledge graph relations with attention mechanisms and path-aware aggregation.
[0135] Knowledge Graph Contrastive Learning (KGCL) [Y.Yang, C.Huang, L.Xia, C.Li, “Knowledge Graph Contrastive Learning for Recommendation,” Proceedings of the 45thInternational ACM SIGIR Conference on Research and Development in Information Retrieval(SIGIR), 2022, pp.1434–1443.]: This method uses graph augmentation and contrastive learning to suppress noise in knowledge graphs and enhance unbiased user-item interactions.
[0136] Knowledge Graph Recommendation (KGRec) [X.Wang, D.Wang, C.Xu, X.He, Y.Cao, T.-S.Chua, “Explainable Reasoning over Knowledge Graphs for Recommendation,” Proceedingsof the AAAI Conference on Artificial Intelligence(AAAI), 2019, pp.5329–5336.]: This approach uses self-supervised learning on knowledge graphs to generate rationales for recommendations. It improves the accuracy and explainability of recommendations by aligning predictions with explainable knowledge graph paths.
[0137] Editing Knowledge Graph (EditKG) [G.Tang,X.Gan,J.Wang,B.Lu,L.Wu,L.Fu,C.Zhou,“EditKG:Editing Knowledge Graph for Recommendation,”Proceedings of the47thInternational ACM SIGIR Conference on Research and Development in Information Retrieval(SIGIR),2024,pp.112–122.]: This method proposes EditKG, which balances the attribute distribution of items in the knowledge graph by generating or deleting attributes to solve the knowledge imbalance and long tail problems, thereby improving the recommendation effect.
[0138] 5.1.4 Parameter settings
[0139] In the present invention, the EDKD model is implemented using the PyTorch framework. To ensure that the model can start with a good initial state and perform efficient training, the parameters are initialized using the Xavier initializer and optimized using the Adam optimizer. In terms of parameter configuration, the EDKD model sets the single transfer size d to 128 and the batch size to 4096. During the training process, the number of pre-training rounds and the number of transfer rounds are set to 8 and 2, respectively. Through multiple experiments and analysis of the results, the number of graph neural network (GNN) layers L and the parameter η in formula (10) are determined to be 2 and 1.4, respectively. To ensure the accuracy of the results, all baseline methods are evaluated using the provided code and default settings when compared with EDKD.
[0140] 5.2 Performance Comparison (RQ1)
[0141] Table 2: Overall performance comparison
[0142]
[0143] Table 2 shows the performance metrics for all models, where "%Imp" represents the percentage improvement achieved by DMKGE over the best-performing baseline method, and "Avg.Imp" represents the average percentage improvement achieved by DMKGE over all baseline methods. The best result is shown in bold, and the second-best result is underlined. The key conclusions drawn from the results are as follows:
[0144] DMKGE significantly outperforms the baseline methods on all datasets. It shows significant advantages over the baseline methods in terms of average performance improvement. On the Last-FM dataset, in terms of the normalized discounted cumulative gain (NDCG@20) metric, DMKGE achieves an average performance improvement of 38.38% over all baseline methods and a 2.13% performance improvement over the best-performing baseline method. This average improvement highlights its continued improvement in performance over various models. Similarly, it achieves an average performance improvement of 46.02% in the recall (Recall@20) metric. These performance improvements can be attributed to two core factors: (1) The knowledge selection module provides strong support for item representation by comprehensively evaluating latent attributes. (2) The knowledge transfer module optimizes recommendation-related performance by constructing an enhanced knowledge graph to supplement missing attributes.
[0145] In-depth analysis of DMKGE on two datasets ( Figure 2 and Figure 3 ) revealed different evolutionary trends. It achieved significant performance improvements on the Last-FM dataset, while on the Yelp2018 dataset, despite a slight initial performance decrease, performance improved after replacing the cosine similarity function in the semantic calculation with the Euclidean distance. The effectiveness of this adjustment was empirically verified on the Yelp2018 dataset, highlighting the critical impact of the similarity metric on model adaptability.
[0146] In contrast, although DMKGE's performance slightly degrades when directly compared to the best-performing baseline method on the Yelp2018 dataset due to the relatively dense knowledge graph, its average improvement still significantly outperforms all baseline methods. This demonstrates DMKGE's strong generalization capabilities in complex data environments. Notably, DMKGE's performance on the Yelp2018 dataset improves when cosine similarity is replaced by Euclidean distance, revealing a profound connection between similarity metrics and data characteristics. Figure 3 The dynamic performance differences of the models over 20 training rounds are demonstrated. The differences in their performance curves intuitively demonstrate the impact of the aforementioned structural differences on their effectiveness and deepen our understanding of the synergy between knowledge graph sparsity and similarity measurement strategies.
[0147] Analysis of baseline methods shows that knowledge graph-aware methods generally outperform general collaborative filtering models. Knowledge graph-aware methods consistently outperform collaborative filtering methods in terms of average performance. This advantage stems from their ability to alleviate the cold start problem by providing information about external items. Among knowledge graph-aware methods, graph neural network (GNN)-based methods generally outperform transfer-based methods due to their ability to model complex topological features in knowledge graphs and user-item interaction graphs. Furthermore, KGRec and KGCL demonstrate impressive performance by leveraging contrastive learning to provide supplementary supervisory signals for item-related transfer learning. The average performance of these methods further validates their effectiveness compared to other baseline methods.
[0148] 5.3 Ablation Experiment (RQ2)
[0149] This paper conducts ablation experiments on the knowledge selection and knowledge transfer modules of DMKGE from a macro perspective. To compare with DMKGE, this paper designs the following variant models:
[0150] w / o KSE: The knowledge selection module is removed from DMKGE, while the knowledge transfer module adds task-related attributes from the main knowledge graph.
[0151] w / o KTR: The knowledge transfer module is removed from DMKGE, and the main knowledge graph and the latent knowledge graph are directly connected to obtain an enhanced knowledge graph.
[0152] Table 3: Ablation experimental studies
[0153]
[0154] Table 3 and Figure 4 Experimental results are presented. When either the knowledge selection (KSE) module or the knowledge transfer (KTR) module is removed from DMKGE (i.e., the no-KSE and no-KTR configurations), the performance of the DMKGE system degrades significantly. This finding highlights the critical role these two components play in maintaining its effectiveness.
[0155] This paper also explores the effectiveness of the knowledge selection and transfer module from a micro perspective. The corresponding variant model is as follows:
[0156] w / o MIC: Mutual information correlation is removed from the knowledge transfer module, and only semantic correlation is used to generate latent attributes.
[0157] w / o SMC: Semantic correlation is removed from the knowledge transfer module, and only mutual information correlation is utilized to generate latent attributes.
[0158] Table 3 and Figure 4The experimental results are summarized, from which we conclude that DMKGE outperforms variant models that do not employ mutual information correlation (MIC) and semantic correlation (SMC). This advantage stems from the fact that MIC and SMC characterize attribute-based relationships between items from static and dynamic perspectives, respectively. Their combination enables more accurate identification of latent attributes through complementary representation mechanisms.
[0159] 5.4 Analysis of Diversity Calculation Functions (RQ3)
[0160] This paper replaces the semantic similarity calculation module in DMKGE with four different functions: cosine, Euclidean distance, Manhattan distance, and KL divergence. On the Last-FM dataset, DMKGE achieved the best performance when using the cosine function; on the Yelp2018 dataset, Euclidean distance gave DMKGE the best results.
[0161] Table 4: Analysis of results of various calculation functions
[0162]
[0163] In order to more intuitively demonstrate the effects of different functions, the present invention conducts further analysis ( Figure 5 ). Figure 5 The results show that the semantic module using the cosine function achieves the best results on both subsets of the Last-FM dataset. The semantic module using the Euclidean distance performs best on the Yelp2018 dataset, while the semantic module using the Manhattan distance produces suboptimal results.
[0164] These results are due to the fact that in the Last-FM dataset, users mainly make recommendations based on similarities in interests (such as music genres and artists), and cosine similarity is suitable for this kind of "directional matching." In the Yelp 2018 dataset, users are more concerned with differences in ratings (such as the difference between high-rated and low-rated restaurants), and Euclidean distance can more directly reflect this "absolute difference."
[0165] 5.5 Time and Space Complexity Analysis (RQ4)
[0166] The time complexity of DMKGE's data loading part is O(N+E), where N is the number of nodes and E is the number of edges. The time complexity of its similarity calculation is O(I 2*U), where I is the number of items and U is the number of users. The time complexity of its training loop is O(E*I*B*F), where B is the batch size, F is the number of features of the model, E is the number of training rounds (100), and I is the number of iterations. It generates a new knowledge graph (KG) with a time complexity of O(I 2 ). Therefore, its training loop and similarity calculation mainly determine its overall time complexity.
[0167] O(EDKD)=O(E*I*B*F+I 2 *U) (18)
[0168] The data storage space complexity of DMKGE is O(N+E), primarily used to store information about nodes and edges in the graph. The space complexity introduced by model parameters is O(P), where P represents the number of learnable parameters in the model. The space complexity introduced by batch data is O(B), where B represents the batch size. The space complexity introduced by newly introduced knowledge is O(C), where C is the size of the candidate knowledge graph. Therefore, data storage and model parameters jointly dominate its overall space complexity.
[0169] O (EDKD) = O (N + E + P) (19)
[0170] In summary, the present invention can comprehensively solve the problem of knowledge disparity, and its contributions are reflected in the following three aspects:
[0171] (i) Attribute Filtering Mechanism: We propose a knowledge selection module that assigns attention scores to items based on an analysis of their neighborhood features. By integrating these score-correlated features, we develop a context-aware filtering method to eliminate noisy and task-irrelevant attributes, thereby optimizing the selection of candidate attributes.
[0172] (ii) Semantic Transfer Architecture: To address the challenges of attribute transfer, we design a knowledge transfer module that simultaneously explores the correlation between attributes from two perspectives: mutual information and semantic alignment. This dual-perspective correlation analysis guides attribute transfer and enhancement while maintaining semantic consistency.
[0173] (iii) Hybrid-enhanced knowledge representation: A hybrid strategy for data augmentation is adopted to enhance the robustness of knowledge-related features. This approach interpolates item attributes and interactions to generate synthetic training samples, thereby improving the generalization ability of the model without requiring additional domain expertise.
[0174] The above content is merely an example and explanation of the concept of the present invention. Those skilled in the art may make various modifications or additions to the described specific embodiments or replace them in a similar manner. As long as they do not deviate from the concept of the invention or exceed the scope defined by the claims, they should all fall within the scope of protection of the present invention.
Claims
1. A recommendation system based on a dual-module enhanced knowledge graph framework, which alleviates the knowledge gap problem in the recommendation system, characterized by: The dual-module enhanced knowledge graph framework (DMKGE) includes a knowledge selection module and a knowledge transfer module, wherein: The knowledge selection module uses a graph attention mechanism to dynamically assign relevance scores to the attributes of items in the knowledge graph based on the characteristics of the item's neighbors and the task context, while filtering out attributes that are not relevant to the task; The knowledge transfer module implements a semantically aware architecture for two-layer attribute selection. It analyzes mutual information using information-theoretic metrics to identify attributes that are highly relevant to user-item interactions, and aligns the semantics of these attributes with item representations using a pre-trained language model. The selected attributes are then embedded into the newly expanded knowledge graph, alleviating the knowledge gap problem by systematically enhancing the completeness and semantic consistency of the attributes.
2. The recommendation system based on the dual-module enhanced knowledge graph framework according to claim 1, characterized in that: In the knowledge selection module, the core GAT formula for calculating the attention coefficient is retained, while redundant operations are eliminated to reduce space and time complexity; specifically, as follows: The input of this layer is a set of node features, denoted as Among them, N represents the number of nodes, F represents the number of features of each node; the output of this layer is a set of new node features, recorded as In order to transform the input features into a higher-level representation, at least a learnable linear transformation is required; first, a linear transformation consisting of a weight matrix is applied to all nodes. Parameterized shared linear transformation followed by self-attention operation The shared attention mechanism dynamically weighs the contributions of neighboring nodes by calculating the attention coefficient; These coefficients indicate the importance of node j’s features to node i; The graph structure is integrated into the model through the masked attention mechanism—only the neighboring nodes of node i Calculate e ij ,in represents a certain neighborhood of node i in the graph; in order to promote the comparability of attention coefficients between different nodes, the softmax function is used to normalize the coefficients of all candidate nodes j: In DMKGE, the attention mechanism is a single-layer feedforward neural network consisting of a weight vector Parameterized and applying the LeakyReLU nonlinear activation function with a slope of α = 0.2; after full expansion, the coefficients calculated by the attention mechanism are expressed as: Among them, ·T represents transpose, Quantify the transformed features of node i and the contextual correlation between them and the corresponding attention parameters; at the same time, It measures the transformed features of node j and the degree of alignment with the task-specific attention weights; a new comprehensive relevance score is generated here by summing up, which dynamically balances the contributions from its own representation and neighbor representations; After obtaining the normalized attention coefficients, these coefficients are used to calculate the weighted linear combination of the corresponding neighbor features; a nonlinear activation function is applied to the calculation, and the result is the final output representation of each node; where σ represents the activation function; the combination of normalized weights and neighbor features ensures that the representation of each node incorporates context-aware contributions from its topological neighbors, while nonlinear transformations introduce the expressive power required to capture complex patterns in the knowledge graph; this design retains structural information that is critical to accurate recommendation tasks while maintaining computational efficiency.
3. The recommendation system based on the dual-module enhanced knowledge graph framework according to claim 2, characterized in that: In the knowledge transfer module, the correlation between project attributes is inferred by mining user interaction patterns, as follows: ①. Diversity function calculation By integrating user interaction data, the model evaluates the degree of correlation between items and reveals the intrinsic connection between item attributes from the perspective of information theory; its mathematical definition is as follows: Among them, C(v i ,v j ) indicates item v i With v j The co-occurrence frequency in all user interaction data, C(v i ) represents the frequency of occurrence of item vi in the same data; is the point mutual information (PMI), Normalize its range to [-1,1]; p(v i ,v j ) value is higher, indicating that the project v i With v j The stronger the correlation between the attributes; The two-dimensional association architecture combines normalized point mutual information (NPMI) with semantic alignment technology; NPMI characterizes the co-occurrence pattern of attributes between items by aggregating user interaction data and measures the degree of relevance from the perspective of information theory; at the same time, the cosine similarity of pre-trained item embedding vectors is introduced to calculate the semantic similarity c(v i ,v j ), thereby ensuring semantic consistency in the latent feature space; to conduct more in-depth research on semantic relationships, DMKGE uses a series of diverse functions for semantic calculation; in addition to cosine similarity calculation, the present invention also uses Euclidean distance and Manhattan distance as additional metrics; s(v i ,v j )=p(v i ,v j )+c(v i ,v j ), (6) in, Project v i and v j The conversion vector of; Based on cosine similarity, Euclidean distance and Manhattan distance, c(v i ,v j ),e(v i ,v j ) and m(v i ,v j ) is used to evaluate project v i With v j The attribute correlation in the semantic space, whose value is dynamically updated with the training process; and p(v i ,v j ), the ranges of c(v i ,v j ),e(v i ,v j ) and m(v i ,v j ) are all in the range of [-1,1]; they are combined with p(v i ,v j ) to form a more credible attribute correlation score s(v i ,v j ); ② Dynamic attribute migration For project v i , a framework for deriving latent attributes is constructed based on the cross-project attribute correlation score η; in order to improve the accuracy of attribute addition, the correlation score adopts a dynamic update strategy, that is, the value of η gradually decreases with the increase of training rounds (0.7<η<0.9); through this adaptive adjustment mechanism, while the system mines latent attributes, it effectively ensures that the newly extracted attributes will not be included in its main knowledge graph middle: Among them, ∩ represents the intersection operation of sets, and η is a hyperparameter; Refers to entity v in the original knowledge graph i The attribute set of Corresponding entity v j The core idea is that when entity v i and v j When there is a significant attribute correlation between v i The high-quality latent attributes (r, t) should come from v j The attribute set Kj, and the attribute must be not included in v i The new elements in the original knowledge graph, i.e. By unifying the potential attributes All attributes in the data are associated and mapped with their corresponding entities, and finally a potential knowledge graph is constructed. Its formal definition is 4. The recommendation system based on the dual-module enhanced knowledge graph framework according to claim 3, characterized in that: In order to highlight the purified potential knowledge graph The project attributes added in Divided into two parts: in and Corresponding to the main knowledge graph after purification and the purified latent knowledge graph The properties of the item in the hop, such as, and Corresponding to the main knowledge graph after purification Higher-order properties of items in (i.e., order > 1), such as Next, based on and The aggregation process is performed, which is defined as follows: Among them, || represents the splicing operation; the output results of the L-layer graph convolutional network (GCN) are averaged and pooled, that is, Use e i Indicates project v i knowledge representation; then, e i With the converted Splice to get project v i Comprehensive representation of in 5. The recommendation system based on the dual-module enhanced knowledge graph framework according to claim 4, characterized in that: It also includes prediction and model optimization, as follows: ① Design of loss function Cross entropy is used as the loss function to optimize the parameters of DMKGE: in, Represents the one-hot encoding vector of the true label, N is the number of training data; Apply label smoothing strategy to alleviate overfitting problem; ②User-item interaction modeling The user tower and item tower are jointly trained using comprehensive item attributes from the interaction graph and knowledge graph to generate a final representation that can simultaneously encode behavioral patterns and semantic knowledge for accurate recommendations. in, is user u i The initial transformation of They are user u i and Project v i The final transformed representation of Represents user u i The set of items that have been interacted with; Indicates project v i The set of users that have interacted; Represents user u i With Project V j The probability of an interaction occurring.