A Knowledge-Enhanced Recommendation Method Based on Multi-Spatial Interaction Modeling of Graph Neural Networks
By adopting a multi-space interactive modeling method based on graph neural networks in the knowledge-enhanced recommendation system, the problem that the existing technology is difficult to capture the hierarchical structure of complex graph data is solved, and higher recommendation accuracy and interpretability are achieved.
Patent Information
- Application Number
- CN202310828670.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2043-07-07
AI Technical Summary
The prior art is difficult to effectively capture the hierarchical structure and multiple structural types of complex graph data in knowledge-enhanced recommendation systems, resulting in limited accuracy and interpretability of recommendation results.
Using a multi-space interactive modeling method based on graph neural network, we adaptively fuse embedded information in different geometric spaces by constructing a unified knowledge graph and learning node embedding in European and hyperbolic spaces, combining edge-level relationship path perception and node-level distance perception attention aggregation mechanism.
It significantly improves the accuracy of the recommendation task, can effectively capture the complex structure and various structural types of the graph network, and improves the accuracy and interpretability of the recommendation results.
Smart Images

Figure CN116842260B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of data mining and graph topology analysis, and specifically proposes a knowledge-enhanced recommendation method. Background Art
[0002] With the rapid development of e-commerce software on the Internet, the quantity and variety of commodities are increasing rapidly. This situation makes it difficult for users facing the problem of information overload to select their favorite products. As an intelligent platform for filtering massive data in social systems and mining user preferences, the recommendation system provides a win-win situation for e-commerce developers and customers. The traditional recommendation system based on collaborative filtering method [1] is one of the most popular algorithms in recommendation algorithms. Its basic idea is to assign corresponding low-dimensional vectors based on user and item IDs in a shared latent space, and then use specific operations to simulate their interactions. However, this method usually faces various problems such as data sparsity and cold start [2], [3], and the lack of reasons for explaining why items are recommended.
[0003] Introducing a knowledge graph containing a large amount of objective facts as auxiliary information into the recommendation system can not only alleviate the above problems, but also improve the accuracy, diversity, and interpretability of the recommendation results. This type of recommendation has attracted much attention in recent years and is called a knowledge-enhanced recommendation system. Learning high-quality embeddings of users and items based on two types of data sources, namely, the user interaction history and the knowledge graph composed of item attributes, is the core of the knowledge-enhanced recommendation system. These learned embeddings can effectively estimate user preferences for items by explicitly capturing the similarity between users and items.
[0004] Early studies on knowledge-enhanced recommendation methods include embedding-based methods and path-based methods. The embedding-based method preprocesses the knowledge graph through a knowledge graph embedding algorithm to obtain latent feature embeddings of entities and relationships, and then adds these learned embeddings to the recommendation task. Reference [4] learns the semantic information of items in the knowledge graph through the TransR algorithm, and then adds it to the collaborative filtering framework to learn item embeddings as representations of item aspects. Although this method is simple and effective in introducing knowledge entities and their relationships, it ignores the high-order connection history of interactions, limiting the accuracy and interpretability of recommendations. The path-based method takes a heterogeneous information network as input and defines the types and quantity information of high-order meta-paths carried in it. Then, recommendation paths are generated along the heterogeneous information network. Reference [5] designs an end-to-end framework based on preference propagation for modeling the interaction between users and items and mining users' latent interests in the water wave concentration. Since the generated paths have clear semantic interpretations, the path-based method can explain to users the reasons for recommending items. However, this method requires domain experts to design manually, which is not only time-consuming and laborious but also difficult to adopt in practice.
[0005] With the rapid development of graph neural networks, it has become intuitive in recent years to learn knowledge from the perspective of graphs to enhance information in recommendation tasks. The quality of node feature embedding is determined by the degree of matching between the geometric shape of the embedding space and the data structure. Previous work has proposed methods based on different embedding spaces, such as Euclidean space and hyperbolic space. Due to the powerful simplicity and efficiency of Euclidean space and its strong ability to capture chain structures, early graph neural network-based methods focused on learning node embeddings in Euclidean space, which grows at a polynomial level. Some work designs interpretable attention scores to aggregate sampled neighbor nodes with a fixed receptive field to improve the embedding quality of users and items. References [6] and [7] obtain the final item embedding based on the item itself and its first-order neighbors with a fixed sample size. The scoring function for node aggregation depends on the Euclidean similarity between the user and a specific relationship, which is regarded as propagating user preferences in the knowledge graph. Inspired by the translation principle in the knowledge graph embedding task, References [8] and [9] assign weights according to the Euclidean distance between linked entities in the relational space to spread more information to closer entities. Reference
[10] combines the collaborative propagation strategy with the knowledge graph propagation strategy to implement the scoring function through an attention mechanism, further improving the performance. Although Euclidean space is suitable for embedding chain-like or regular data, it cannot accurately represent data with complex structures. Recent research has shown that complex graph data in knowledge-enhanced recommendation networks has a potential hierarchical structure, such as the subordinate structure exhibited by entities in the knowledge graph and the power-law distribution presented by user-item interaction data. As a geometric prior for hierarchical structures, learning node embeddings in hyperbolic space, where nodes grow exponentially with the change of curvature, has achieved great success. This approach uses hyperbolic graph neural operations to improve recommendation performance. Reference
[11] designs a method based on hyperbolic graph neural networks and uses a knowledge-aware attention mechanism to determine the influence of each node in the graph. However, for non-hierarchical data, the performance of models working in hyperbolic space will be limited, and many beneficial geometric properties of hyperbolic space have not been clearly explored. In addition, the data in real knowledge-enhanced recommendation networks does not always show a strictly uniform structure. It usually contains various structural types, such as chain and hierarchical structures.
[0006] [References]
[0007] [1]S.Rendle, C.Freudenthaler, Z.Gantner, and L.Schmidt-Thieme, “BPR: Bayesian Personalized Ranking from Implicit Feedback,” 2009.
[0008] [2]Y. Hu, Y. Koren, and C. Volinsky, “Collaborative Filtering for Implicit Feedback Datasets,” in 2008 Eighth IEEE International Conference on Data Mining, Pisa, Italy: IEEE, Dec. 2008, pp. 263–272. doi:10.1109 / ICDM.2008.22.
[0009] [3]W. Fu, Z. Peng, S. Wang, Y. Xu, and J. Li, “Deeply Fusing Reviews and Contents for Cold Start Users in Cross-Domain Recommendation Systems,” AAAI, vol. 33, no. 01, pp. 94–101, Jul. 2019, doi:10.1609 / aaai.v33i01.330194.
[0010] [4]F. Zhang, N. J. Yuan, D. Lian, X. Xie, and W.-Y. Ma, “Collaborative Knowledge Base Embedding for Recommender Systems,” in Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco California USA: ACM, Aug. 2016, pp. 353–362. doi:10.1145 / 2939672.2939673.
[0011] [5]H.Wang et al.,“RippleNet:Propagating User Preferences on the Knowledge Graph for Recommender Systems,”in Proceedings of the 27th ACM International Conference on Information and Knowledge Management,Oct.2018,pp.417–426.doi:10.1145 / 3269206.3271739.
[0012] [6]H.Wang,M.Zhao,X.Xie,W.Li,and M.Guo,“Knowledge Graph Convolutional Networks for Recommender Systems,”in The World Wide Web Conference,May 2019,pp.3307–3313.doi:10.1145 / 3308558.3313417.
[0013] [7]H.Wang et al.,“Knowledge-aware Graph Neural Networks with Label Smoothness Regularization for Recommender Systems,”in Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining,Anchorage AK USA:ACM,Jul.2019,pp.968–977.doi:10.1145 / 3292500.3330836.
[0014] [8]X. Wang, X. He, Y. Cao, M. Liu, and T.-S. Chua, “KGAT: Knowledge Graph Attention Network for Recommendation,” in Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Jul. 2019, pp. 950–958. doi:10.1145 / 3292500.3330989.
[0015] [9]K. Tu et al., “Conditional Attention Networks for Distilling Knowledge Graphs in Recommendation.” arXiv, Nov. 03, 2021. Accessed: Aug. 20, 2022. [Online]. Available: http: / / arxiv.org / abs / 2111.02100
[0016]
[10] Z. Wang, G. Lin, H. Tan, Q. Chen, and X. Liu, “CKAN: Collaborative Knowledge-aware Attentive Network for Recommender Systems,” in Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, Virtual Event China: ACM, Jul. 2020, pp. 219–228. doi:10.1145 / 3397271.3401141.
[0017]
[11] Y.Chen et al.,“Modeling Scale-free Graphs with Hyperbolic Geometry for Knowledge-aware Recommendation.”arXiv,Jan.02,2022.Accessed:Oct.10,2022.[Online].Available:http: / / arxiv.org / abs / 2108.06468
[0018]
[12] O.-E.Ganea,G.Bécigneul,and T.Hofmann,“Hyperbolic Neural Networks.”arXiv,Jun.28,2018.Accessed:Jul.06,2023.[Online].Available:http: / / arxiv.org / abs / 1805.09112 Summary of the Invention
[0019] In view of the above deficiencies in the prior art, the present invention provides a knowledge graph recommendation method based on multi-space interaction modeling of graph neural networks. The technical solution is as follows:
[0020] A knowledge-enhanced recommendation method based on multi-space interaction modeling of graph neural networks, comprising the following steps:
[0021] Step 1, construct a user-item bipartite graph G rec and an item knowledge graph G kg separately from different data sources for knowledge-enhanced recommendation;
[0022] Step 2, connect the user-item bipartite graph G rec generated in Step 1 and the item knowledge graph G kg to construct a unified knowledge graph: align each item v in G rec with the relevant entities in G kg , regard the user node as a new entity, regard the interaction between the user and the item as an additional relationship and add it to the knowledge graph and update it to the unified knowledge graph G; describe the knowledge-enhanced recommendation problem based on graph neural networks as: given the user-item bipartite graph G rec and the item knowledge graph G kg , the knowledge-enhanced recommendation problem based on graph neural networks is transformed into given graph G, and the goal is to judge the potential interest of the user in un-interacted items through the prediction score of the user-item embedding, where represents the predicted preference of the user for the item;
[0023] Step 3: Input the unified knowledge graph network constructed in step 2 into the geometric projection coding module to parse the relevant embeddings contained in the user and item attribute information to obtain the Euclidean primitive node embedding and the hyperbolic primitive node embedding;
[0024] Step 4, a knowledge attention encoding module is used to learn the initial Euclidean embedding and initial hyperbolic embedding of the encoded features received from the geometric projection encoding module described in step 3; this module includes two mechanisms: an edge-level relationship path-aware attention aggregation mechanism and a node-level distance-aware attention aggregation mechanism; the former considers explicit modeling of relationship nodes, integrates relationship paths from neighboring nodes to generate node embeddings, and retains the overall semantics of relationship paths in Euclidean space; the latter aggregates through the distance-guided attention mechanism in the hyperbolic space, and generates node representations at the node level in the hyperbolic space, making full use of the properties of the geometric space; the Euclidean embedding in step 3 is used to extract features through a graph neural network (GNN), and the low-dimensional vector representation of aggregated neighbor node information is used as the output of the graph neural network;
[0025] Step 5, the knowledge attention encoding module, whose node-level distance-aware attention aggregation mechanism receives the initial hyperbolic embedding vector from the geometric projection encoding module described in step 3; the node-level distance-aware attention aggregation mechanism extracts the features of the hyperbolic embedding in step 3 through a hyperbolic graph neural network (HGNN), and uses the low-dimensional vector representation of the aggregated neighbor node information as the output of the hyperbolic graph neural network;
[0026] Step 6: The dual embedding interaction module adaptively fuses the Euclidean and hyperbolic space embedding information learned from the knowledge-aware attention aggregation module based on the similarity of the two embeddings. After L layers of interaction, two fused geometric embeddings for each node are obtained, and a hyperparameter factor is used to dynamically adjust the weighted calculation of the proportions of the two fused geometric embeddings to obtain the final single embedding.
[0027] Step 7: The prediction layer concatenates the L-layer user node embedding and item node embedding obtained in step 6, and calculates the similarity score based on the two final feature embeddings. This rating will determine whether the product is worth recommending to the user.
[0028] Furthermore, in step 1, the user-item bipartite graph G rec 、Item Knowledge Graph G kg The construction method of graph G is as follows:
[0029] User set exists With item set The behavior of users selecting items on electronic platforms to show their interest preferences is defined as the user interaction matrix In the user interaction matrix Y, y uv= 1 represents that user u is interested in item v, which is an implicit feedback, otherwise it is 0; according to the user interaction matrix, three types of information, namely user ID, item ID, and interaction record, are obtained. Regarding users and items as nodes and interaction records as edges, a user-item bipartite graph G is constructed rec , and the storage form is a triple of (user, interaction (0 / 1), item);
[0030] Regarding each item v in the item set as a node, different relationship attributes are designed to establish connections between the nodes to construct an item knowledge graph G in the related field kg , where entities in this knowledge graph represent nodes, and relationship attributes represent edges. The storage form is a triple of (head entity, relationship, tail entity).
[0031] Furthermore, the operation steps of the geometric projection encoding module in step 3 are as follows:
[0032] 3-1) Perform an embedding lookup operation in the Euclidean space. The input network features are sampled from a multivariate Gaussian distribution and are explicitly encoded as d-dimensional continuous vectors in the Euclidean space, obtaining the initial Euclidean embeddings of all node attributes and edge attributes of the randomly initialized unified knowledge graph;
[0033] 3-2) Relate the hyperbolic space to the corresponding tangent space, i.e., the Euclidean space, through exponential mapping and logarithmic mapping. For the hyperbolic space, the Poincaré ball model is adopted. The initial Euclidean embeddings generated in step 3-1) are transformed into the hyperbolic space through the exponential mapping operation, thereby obtaining the initial hyperbolic embeddings of the nodes and edges.
[0034] Furthermore, step 4 includes a relational attention aggregation layer, a feature fusion layer, and an information diffusion layer. The specific operations are as follows:
[0035] 4-1) The relational attention aggregation layer receives the initial Euclidean embeddings of users and items output by the geometric projection encoding module; first, determine the neighborhood information of each node: with the node itself as the center, the first-order nodes connected to it and the edges connected between the nodes are used as the neighbors of the node; design an attention structure with a weight score of π(h,r) to measure the important contribution of the neighborhood information to the central node, and use the softmax function to normalize the coefficients of all relationships related to the central node to obtain On the basis of adding relational embedding information, use as the weight coefficient to perform a weighted linear combination calculation on the first-order connected structure to obtain the node neighborhood feature embedding;
[0036] 4-2) For each node, the feature fusion layer performs feature transformation and aggregation operations on its own node Euclidean embedding in step 3-1) and the neighbor feature embeddings obtained in step 4-1) in the Euclidean space, and the result obtained is used as the Euclidean space attribute vector of the node;
[0037] 4-3) The information diffusion layer repeats the Euclidean neighborhood aggregation operation L times according to the operations in step 4-1) to step 4-2), further stacks more attention aggregation layers to collect information propagated from multi-hop neighbors, and finally obtains the L-layer node Euclidean feature embeddings.
[0038] Furthermore, step 5 includes four steps: a space conversion layer, a distance attention aggregation layer, and a hyperbolic feature fusion layer. The specific operations are as follows:
[0039] 5-1) The space conversion layer applies a base mapping operation to project the hyperbolic embedding onto the tangent space to prepare for subsequent aggregation operations;
[0040] 5-2) The distance attention aggregation layer receives the initial hyperbolic embeddings of users and items output by the geometric projection encoding module. First, it determines the neighborhood information of each node: taking the node itself as the center, the first-order nodes connected to it are used as the neighbors of the node; based on the hyperbolic embedding distance of the node pair design an attention structure with a weight score of α(i,j) to measure the similarity between the neighbor node and the central node, and use the softmax function for normalization, where the similarity between nodes is positively correlated with the weight score. The weighted linear combination calculation is performed on the first-order adjacent nodes using α(i,j) to obtain the hyperbolic embedding of the node neighbor features;
[0041] 5-3) For each node, the hyperbolic feature fusion layer combines the initial hyperbolic embedding of its own node in step 3) and the neighbor feature embeddings obtained in step 5-2) in the hyperbolic space to perform feature transformation and hyperbolic aggregation operations, and the result obtained is used as the hyperbolic space attribute vector of the node; 5-4) The information diffusion layer repeats the hyperbolic neighborhood aggregation operation L times according to the operations in step 5-2) to step 5-3), and finally obtains the L-layer node hyperbolic feature embeddings.
[0042] Compared with the prior art, the beneficial effects of the present invention are:
[0043] The knowledge-enhanced recommendation method based on multi-space interaction modeling of graph neural networks proposed in the present invention presents a multi-geometric embedding learning framework, which learns the complex structure of the graph network to achieve accurate and effective representation. By using graph neural networks (GNNs) and hyperbolic graph neural networks (HGNNs) in Euclidean space and hyperbolic space respectively, the contributions of adjacent nodes are automatically measured based on semantic relationships and hyperbolic distances, and coherent information aggregation schemes are generated in the two geometric spaces. A dual-embedding interaction module is developed to adaptively extract useful information to promote interaction between different geometric graphs. The node features and hierarchical structures are effectively fused to obtain high-level node representations of the graph. In the present invention, the nodes in the network are embedded into multi-geometric spaces, and the chain and hierarchical structure information of the network is retained, thus solving the problem of embedding distortion in a single space. The present invention significantly improves the accuracy of the recommendation task. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is the flowchart of the knowledge-enhanced recommendation system of the present invention.
[0045] Figure 2 is the overall framework diagram of the knowledge-enhanced recommendation method based on multi-space interaction modeling of graph neural networks of the present invention.
[0046] Figure 3 is the accuracy of the method proposed in the present invention and the comparison with the single-embedding space method. Figure 3 (a) represents the metrics for the Top-K task, Figure 3 (b) represents the metrics for the CTR task. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0047] In view of the above deficiencies in the prior art, the present invention provides a knowledge graph recommendation method based on multi-space interaction modeling of graph neural networks, and the flowchart is as Figure 1As shown in the figure. Specifically, in view of the problem that the existing knowledge-enhanced recommendation method based on graph neural network only relies on a single space and cannot capture the complex hybrid structure exhibited in the real network, resulting in highly distorted information, etc., the present invention proposes a multi-geometric graph embedding learning framework that combines the advantages of Euclidean space and hyperbolic space to model and learn the complex features of users, items, and knowledge graph entities. The method of the present invention mainly constructs a unified knowledge graph network as the input according to two data sources: user interaction records and domain knowledge graph information; the input passes through a multi-geometric attention interaction network to obtain the learned user and item node feature embeddings. The multi-geometric attention interaction network includes three modules, which operate on the input in sequence: 1) The geometric projection encoding module is used to learn the original node embeddings randomly initialized in two spaces of the input network; 2) The knowledge attention aggregation module measures the importance between various node features and guides the message to propagate in different layers. The knowledge attention aggregation module is used to improve the embedding accuracy of itself by aggregating neighbor node information; 3) The node double-embedding interaction module across different spaces adaptively extracts the useful information learned by the knowledge attention aggregation module and promotes the interaction between different geometries. Finally, the prediction layer is used to splice and multiply the learned multi-layer user and item node embeddings respectively to obtain the final prediction scoring function to infer whether the user will select the recommended item. The following further describes the present invention in conjunction with the accompanying drawings and specific embodiments, but the following embodiments are by no means any limitation to the present invention. The overall framework diagram is as shown in Figure 2 As shown, the specific steps of the present invention are as follows:
[0048] Step 1, construct a user-item bipartite graph and an item knowledge graph respectively starting from different data sources of knowledge-enhanced recommendation. The specific operations are as follows:
[0049] 1-1) In the recommendation system, there is a user set and an item set The behavior of a user selecting an item on an electronic platform to show their interest preference is defined as a user interaction matrix In the user interaction matrix Y, y uv =1 represents that user u is interested in item v, that is, implicit feedback, otherwise it is 0. According to the user interaction matrix, three types of information, namely user ID, item ID, and interaction records, are obtained. Regarding users and items as nodes and interaction records as edges, a user-item bipartite graph is constructed, and the storage form is a (user, interaction (0 / 1), item) triple. The network of the item knowledge graph is defined as follows:
[0050]
[0051] In formula (1), is the set of user nodes, is the set of item nodes, r* is the set of interaction relationship edges;
[0052] 1-2) Collect the items Each item v in is taken as a node, and different relationship attributes are designed between nodes to establish connections and build a knowledge graph of related field items. In this knowledge graph, entities represent nodes, and relationship attributes represent edges. The storage form is a triple of (head entity, relationship, tail entity). The network definition is as follows:
[0053]
[0054] In formula (2), ε is the entity set, Represents a relationship set, h and t represent the head entity and the tail entity respectively.
[0055] Step 2: Connect the user-item bipartite graph G generated in step 1 rec and item knowledge graph G kg Construct a unified knowledge graph. The specific operation is to convert G rec Each item v in G is aligned kg The user node is regarded as a new entity, and the interaction between the user and the item is regarded as an additional relationship, added to the knowledge graph and updated to a unified knowledge graph. The unified knowledge graph is stored in the triple form described in step 1-2), and its network is defined as:
[0056]
[0057] In formula (3), ε' is the node set, represents the edge set, Finally, we describe the knowledge-enhanced recommendation problem based on graph neural networks as:
[0058] Given a user-item bipartite graph G rec and item knowledge graph G kg , which can be formalized into a heterogeneous network - unified knowledge graph in Therefore, the knowledge-enhanced recommendation problem based on graph neural networks is transformed into a given graph G, and the goal is to predict the scores through user-item embeddings To determine the user's potential interest in items that have not been interacted with (such as missing links in the figure), Represents the user's predicted preference for items.
[0059] Step 3: Input the unified knowledge graph network constructed in step 2 into the geometric projection coding module to parse the relevant embeddings contained in the user and item attribute information, and obtain the Euclidean original node embedding and the hyperbolic original node embedding. The operation steps of the geometric projection coding module are as follows:
[0060] 3-1) Perform embedding search operation in Euclidean space. Input network features are sampled from multivariate Gaussian distribution and explicitly encoded as d-dimensional continuous vectors in Euclidean space. Finally, the initial Euclidean embedding of all node attributes and edge attributes of the randomly initialized unified knowledge graph is obtained.
[0061] 3-2) Reference
[12] firstly The form of the rotation vector space is combined with the Riemannian geometry of the Poincare sphere model of the hyperbolic space to generalize the basic operations in the neural network to the hyperbolic space, bridging the gap between the hyperbolic space and the Euclidean space. Exponential mapping and logarithmic mapping can link the hyperbolic space with the corresponding tangent space (Euclidean space). Given any point and the tangent vector Cut Space The features can be transformed into hyperbolic space by exponential mapping Conversely, the logarithmic map transforms the hyperbolic space Mapping to tangent space For hyperbolic space, we use the Poincare sphere model which is locally conformally flat and suitable for gradient-based optimization The initial Euclidean embedding of the attribute network generated in step 3-1) All network features are transformed into hyperbolic space through exponential mapping operations to obtain the initial hyperbolic embeddings of nodes and edges. The formula is as follows:
[0062]
[0063] In formula (4), represents the exponential mapping operation, K represents the hyperbolic space curvature, and is set to 1.
[0064] Step 4, the knowledge attention encoding module is used to learn the initial Euclidean embedding and initial hyperbolic embedding of the encoded features received from the geometric projection encoding module described in step 3. This module contains two mechanisms: an edge-level relationship path-aware attention aggregation mechanism and a node-level distance-aware attention aggregation mechanism. The former considers explicit modeling of relationship nodes, integrates relationship paths from neighborhood nodes to generate node embeddings, and retains the overall semantics of relationship paths in Euclidean space. The latter aggregates the attention mechanism through the distance in the hyperbolic space, and generates node representations at the node level in the hyperbolic space, making full use of the properties of the geometric space. First, the Euclidean embedding in step 3-1) is used to extract the features therein through a graph neural network (GNN), and the low-dimensional vector representation of the aggregated neighbor node information is used as the output of the graph neural network. It can be mainly divided into three steps: relationship attention aggregation layer, feature fusion layer, and information diffusion layer. Where e represents the distance in step 3-1) Specifically,
[0065] 4-1) The relational attention aggregation layer receives the initial Euclidean embeddings of users and items output by the geometric projection encoding module. First, determine the neighborhood information N of each node h ={(r, t) | (h, r, t) ∈ G}: Taking the own node h as the center, the first-order nodes connected to it and the edges connecting the nodes are used as the neighbors of the node; design a weight score as (where is the d-dimensional embedding vector of h, r) to measure the important contribution of neighbor information to the central node, and use the softmax function to normalize the coefficients of all relationships related to the central node to obtain On the basis of adding the relational embedding information e r , use as the weight coefficient to perform a weighted linear combination calculation on the first-order connected structure to obtain the node neighbor feature embedding where is the d-dimensional embedding vector of N h , t, and ⊙ is the element-wise product.
[0066] 4-2) For each node, the feature fusion layer uses the aggregation function f agg (,): to perform a feature transformation and aggregation operation on the own node Euclidean embedding in step 3-1) and the neighbor feature embedding obtained in the Euclidean space in step 4-1) The result obtained is used as the Euclidean space attribute vector of the first layer of the node LeakyReLU is the activation function, and W1 is the trainable weight matrix for extracting useful propagation information, with a dimension of d'×d, where d' is the dimension size of the transformation;
[0067] 4-3) The information diffusion layer repeats the Euclidean neighborhood aggregation operation L times according to the operations in steps 4-1) to 4-2), and further stacks more relational attention aggregation layers to collect information propagated from multi-hop neighbors, and finally obtains the L-layer node Euclidean feature embeddings. In the l-th layer, the representation of the entity is
[0068] Step 5. The node-level distance-aware attention aggregation mechanism in the knowledge attention encoding module receives the initial hyperbolic embedding vectors from the geometric projection encoding module described in Step 3. The hyperbolic distance conforms to the triangle inequality criterion, and the number of nodes in the space increases exponentially with the increase of the distance between the root node and the node. This property can well simulate the information conveyed by hierarchical data. The node-level distance-aware attention aggregation mechanism extracts features from the hyperbolic embedding in Step 3-1) through a hyperbolic graph neural network (HGNN), and takes the low-dimensional vector representation of the aggregated neighbor node information as the output of the hyperbolic graph neural network. Analogous to Step 5, it can be mainly divided into four steps: the space transformation layer, the distance attention aggregation layer, the hyperbolic feature fusion layer, and the information diffusion layer. h represents including:
[0069] 5-1) Different from the Euclidean space, the hyperbolic space does not have the concept of vector space structure, so matrix operations cannot be performed in this space. The space transformation layer applies the base mapping operation log o () to project the hyperbolic embedding into the tangent space to prepare for subsequent aggregation operations:
[0070] 5-2) The distance attention aggregation layer receives the initial hyperbolic embeddings of users and items output by the geometric projection encoding module First, determine the neighborhood information of each node i Taking the node itself as the center, the first-order nodes connected to it are used as the neighbors of the node; based on the hyperbolic embedding distance of the node pair (i, j) design the weight score. represents the Möbius addition. Specifically, the calculation operation is: Use the softmax function for normalization to obtain The attention structure of is used to measure the similarity between neighbor nodes and the central node. The similarity between nodes is positively correlated with the weight score. When the attention coefficient is large, it means that the similarity between nodes i and j is higher. Then, a weighted linear combination calculation is performed on the first-order adjacent nodes using α(i, j) to obtain the hyperbolic embedding of the node neighbor features
[0071] 5-3) To obtain the final hyperbolic embedding of each node feature, for each node, the hyperbolic feature fusion layer uses the hyperbolic aggregation function Combined with the initial hyperbolic embedding of the node itself in Step 3-2) and the neighbor feature embedding obtained in the hyperbolic space in Step 5-2) perform feature transformation and hyperbolic aggregation operations The obtained result is used as the first-layer hyperbolic space attribute vector of the node W2 is a trainable weight matrix for extracting useful propagation information, with dimensions d'×d, where d' is the dimension size of the transformation. ⊙ K is the scalar multiplication operation in the hyperbolic space is the matrix multiplication operation in the hyperbolic space As shown in Equation (7):
[0072]
[0073]
[0074]
[0075] 5-4) Information diffusion layer. Repeat the hyperbolic neighborhood aggregation operation L times according to the operations in steps 5-2) to 5-3) to finally obtain the L-layer node hyperbolic feature embedding. In the l-th layer, the representation of the entity is
[0076] Step 6. By aggregating the neighbor information in the Euclidean and hyperbolic spaces through steps 4 and 5, the knowledge-aware attention aggregation module realizes the information propagation process, generating L-layer node embeddings with two geometric features for the network. After completing the message propagation in the graph structure, the node embeddings will undergo adjustments from the two spaces to promote the interaction between different geometric structures. Specifically, the dual-embedding interaction module adaptively fuses the Euclidean and hyperbolic space embedding information learned from the knowledge-aware attention aggregation module based on the similarity of the two embeddings. After L layers of interaction, two fused geometric embeddings of each node will be obtained, and a hyperparameter factor is used to dynamically adjust the proportion of the two fused geometric embeddings for weighted calculation to obtain the final single embedding of the node Specific implementation is as follows
[0077] 6-1) Use exp o () to map the Euclidean embedding obtained in step 4 to the hyperbolic space and log o () to map the hyperbolic embedding obtained in step 4 to the Euclidean space to establish the interaction between the two geometric spaces. The two fused geometric embeddings are given by the following formula
[0078]
[0079] 6-2) Adaptively adjust the information ratio in each space obtained in step 6-1) through geometric interaction to finally obtain the multi-space and fused embedding given by the following formula
[0080]
[0081] In formula (9), β is a hyperparameter that controls the importance of different geometric information.
[0082] At this point, each node has obtained the embedding vectors of L layers.
[0083] Step 7: The prediction layer combines the L-layer user node embeddings and item node embeddings obtained in Step 6 respectively into a single embedding, and calculates the similarity score based on the two final feature embeddings This score will determine whether the product is worthy of recommendation to the user.
[0084] At this point, from Step 1 to Step 7, the knowledge-enhanced recommendation method based on multi-space interaction modeling of graph neural networks is completed. First, a unified knowledge graph is constructed as the network input; then, a multi-geometric attention interaction network is designed to mine node embedding information, which includes: a geometric embedding projection module, a knowledge attention aggregation module, and a bi-embedding interaction module. The geometric projection encoding module transforms the original node features of the unified knowledge graph into the Euclidean space and the hyperbolic space respectively to obtain the corresponding embedding information. The knowledge attention aggregation module receives the initial Euclidean and hyperbolic embeddings from the geometric embedding projection module, and learns node embeddings by iteratively aggregating local information from multi-hop neighbors. In addition, the bi-embedding interaction module adaptively fuses the Euclidean and hyperbolic node embedding information learned from the knowledge-aware attention aggregation module. Finally, the prediction layer performs an inner product operation on the final user embedding and item embedding, and outputs the classification result to complete the item recommendation process.
[0085] The method of the present invention belongs to supervised learning. First, the model needs to be supervised and trained. After obtaining the best model through training, new data is used for prediction.
[0086] The first step: Construct a unified knowledge graph according to user interaction records and domain knowledge graph information.
[0087] The second step: Use the unified knowledge graph as the input of the model for the supervised learning of the model. Adjust the model parameters. As the number of model training iterations increases, the value of the BCE loss function gradually decreases and reaches stability. At this time, the predicted value of the recommended items output by the model fits well and stably with the true value (0 / 1). After the model training is completed, save the model structure and parameters.
[0088] Step 3: When predicting whether to recommend a certain item, first train it according to the above method based on its historical data, and then input the current item data into the trained model, and run the model to obtain the prediction output.
[0089] The simulation experiment of the method of the present invention is as follows:
[0090] Experiments were carried out on four public real-world recommendation datasets, Last.FM, Book-Crossing, MovieLens-20M, and Dianping-Food. The training set, validation set, and test set were randomly divided in a ratio of 6:2:2. Each experiment was repeated 5 times, and the average value was taken as the experimental result. Four popular evaluation metrics were selected to measure the recommendation performance: Recall@K, NDCG@K for the Top-K recommendation task, and AUC, F1 for the click-through rate prediction task. We applied Xavier to initialize the model parameters and Adam to optimize each model. This method effectively integrates node features and hierarchical structures and obtains high-level node representations of the graph. In the present invention, the nodes in the network are embedded into a multi-geometric space, and the chain and hierarchical structure information of the network is retained, thus solving the problem of embedding distortion in a single space. The present invention significantly improves the accuracy of the recommendation task. As Figure 3 shown, the results show that the recall rate index in the TOP-20 recommendation task has increased by 1.30% to 13.38%.
Claims
1. A knowledge-enhanced recommendation method based on multi-space interaction modeling of graph neural networks, comprising the following steps: Step 1: Construct the user-item bipartite graph G from different data sources of knowledge-enhanced recommendation rec and item knowledge graph G kg ; Step 2: Connect the user-item bipartite graph G generated in step 1 rec and item knowledge graph G kg Constructing a unified knowledge graph: G rec Each item v in G is aligned kg The user node is regarded as a new entity, and the interaction between users and items is regarded as an additional relationship, added to the knowledge graph and updated to a unified knowledge graph G; the knowledge enhancement recommendation problem based on graph neural network is described as: given a user-item bipartite graph G rec and item knowledge graph G kg , the knowledge-enhanced recommendation problem based on graph neural networks is transformed into a given graph G, and the goal is to predict the scores through user-item embeddings To determine the user's potential interest in items that have not been interacted with, Represents the user's predicted preference for items; Step 3: Input the unified knowledge graph network constructed in Step 2 into the geometric projection encoding module to parse the relevant embeddings contained in the user and item attribute information, and obtain the Euclidean original node embeddings and hyperbolic original node embeddings; Step 4: The knowledge attention encoding module is used to learn the initial Euclidean embedding and initial hyperbolic embedding of the encoded features received from the geometric projection encoding module described in Step 3; this module includes two mechanisms: the edge-level relationship path-aware attention aggregation mechanism and the node-level distance-aware attention aggregation mechanism; the former considers explicit modeling of relationship nodes, integrates the relationship paths from neighboring nodes to generate node embeddings, and preserves the overall semantics of the relationship paths in the Euclidean space; the latter aggregates through the distance-guided attention mechanism in the hyperbolic space and generates node representations by node-level aggregation in the hyperbolic space, making full use of the attributes of the geometric space; extract the features of the Euclidean embedding in Step 3 through a graph neural network (GNN), and use the low-dimensional vector representation that aggregates the neighbor node information as the output of this graph neural network; Step 5: The knowledge attention encoding module, whose node-level distance-aware attention aggregation mechanism receives the initial hyperbolic embedding vector from the geometric projection encoding module described in Step 3; the node-level distance-aware attention aggregation mechanism extracts the features of the hyperbolic embedding in Step 3 through a hyperbolic graph neural network (HGNN), and uses the low-dimensional vector representation that aggregates the neighbor node information as the output of this hyperbolic graph neural network; Step 6: The dual-embedding interaction module adaptively fuses the Euclidean and hyperbolic space embedding information learned from the knowledge-aware attention aggregation module based on the similarity of the two embeddings; After L layers of interaction, two fused geometric embeddings of each node will be obtained, and a hyperparameter factor is used to dynamically adjust the proportion of the two fused geometric embeddings for weighted calculation to obtain the final single embedding; Step 7: The prediction layer concatenates the L-layer user node embeddings and item node embeddings obtained in Step 6 respectively, and calculates the similarity score based on the two final feature embeddings. This score will determine whether the product is worthy of recommendation to the user.
2. The knowledge enhancement recommendation method according to claim 1, characterized in that: In step 1, the user-item bipartite graph G rec , the item knowledge graph G kg and the construction method of graph G are as follows: There exists a user set and an item set The behavior of a user selecting items on an electronic platform to show their interest preferences is defined as the user interaction matrix In the user interaction matrix Y, y uv = 1 indicates that user u is interested in item v, which is an implicit feedback, otherwise it is 0; according to the user interaction matrix, three types of information, namely user ID, item ID, and interaction records, are obtained. Regarding users and items as nodes and interaction records as edges, a user-item bipartite graph G rec is constructed, and the storage form is a triple of (user, interaction (0 / 1), item); An item set Each item v in is regarded as a node, and different relational attributes are designed to establish connections between the nodes to construct an item knowledge graph G in the relevant field kg , where entities in the knowledge graph represent nodes, relational attributes represent edges, and the storage form is a triple of (head entity, relation, tail entity).
3. The knowledge enhancement recommendation method according to claim 1, characterized in that: The operation steps of the geometric projection encoding module in Step 3 are as follows: 3-1) Perform an embedding lookup operation in the Euclidean space. The input network features are sampled from a multivariate Gaussian distribution and explicitly encoded as d-dimensional continuous vectors in the Euclidean space to obtain the initial Euclidean embeddings of all node attributes and edge attributes of the randomly initialized unified knowledge graph; 3-2) Connect the hyperbolic space with the corresponding tangent space, i.e., the Euclidean space, through exponential mapping and logarithmic mapping. For the hyperbolic space, the Poincaré ball model is adopted, and the initial Euclidean embeddings generated in Step 3-1) are transformed into the hyperbolic space through the exponential mapping operation to obtain the initial hyperbolic embeddings of the nodes and edges.
4. The knowledge enhancement recommendation method according to claim 1, characterized in that: Step 4 includes a relationship attention aggregation layer, a feature fusion layer, and an information diffusion layer. The specific operations are as follows: 4-1) The relational attention aggregation layer receives the initial Euclidean embeddings of users and items output by the geometric projection encoding module; first, determine the neighborhood information of each node: with the node itself as the center, the first-order nodes connected to it and the edges connecting the nodes are used as the neighbors of the node; design an attention structure with a weight score of π(h,r) to measure the important contribution of the neighbor information to the central node, and use the softmax function to normalize the coefficients of all relationships related to the central node to obtain On the basis of adding relational embedding information, use as the weight coefficient to perform a weighted linear combination calculation on the first-order connected structure to obtain the node neighbor feature embedding; 4-2) For each node, the feature fusion layer performs feature transformation and aggregation operations on the self-node Euclidean embedding in Step 3-1) and the neighbor feature embeddings obtained in Step 4-1) in the Euclidean space, and the result obtained is used as the Euclidean space attribute vector of the node; 4-3) The information diffusion layer repeats the Euclidean neighborhood aggregation operation L times according to the operations in steps 4-1) to 4-2), further stacks more attention aggregation layers to collect the information propagated from multi-hop neighbors, and finally obtains the L-layer node Euclidean feature embedding.
5. The knowledge enhancement recommendation method according to claim 1, characterized in that: Step 5 includes four steps: a spatial transformation layer, a distance attention aggregation layer, and a hyperbolic feature fusion layer. The specific operations are as follows: 5-1) The spatial transformation layer applies the base mapping operation to project the hyperbolic embedding into the tangent space to prepare for subsequent aggregation operations; 5-2) The distance attention aggregation layer receives the initial hyperbolic embeddings of users and items output by the geometric projection encoding module, and first determines the neighborhood information of each node: with the node itself as the center, the first-order nodes connected to it are used as the neighbors of the node. Hyperbolic Embedding Distance Based on Node Pairs Design an attention structure with weight score α(i, j) to measure the similarity between neighbor nodes and the central node, and use the softmax function for normalization, where the similarity between nodes is positively correlated with the weight score; perform a weighted linear combination calculation on the first-order adjacent nodes using α(i, j) to obtain the hyperbolic embedding of the node neighbor features; 5-3) For each node, the hyperbolic feature fusion layer combines the initial hyperbolic embedding of the node itself in step 3) with the neighbor feature embedding obtained in step 5-2) in the hyperbolic space to perform feature transformation and hyperbolic aggregation operations, and the result obtained is used as the hyperbolic space attribute vector of the node; 5-4) The information diffusion layer repeats the hyperbolic neighborhood aggregation operation L times according to the operations in steps 5-2) to 5-3), and finally obtains the L-layer node hyperbolic feature embedding.
Citation Information
Patent Citations
Network abnormal point detection method based on hyperbolic space
CN115664970A
Article cold start recommendation method based on knowledge graph and meta learning
CN116244527A