Paper Recommendation Method and System Based on a Cross-Community Knowledge Graph in Hyperbolic Space
By performing the fusion of cross-community knowledge graphs and node feature representation learning in hyperbolic space, the lack of cross-community fusion and node aggregation distortion in the existing technology is solved, and the performance and interpretability of paper recommendations are significantly improved.
Patent Information
- Application Number
- CN202411907017.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The existing paper recommendation methods lack cross-community knowledge fusion, and it is easy to cause distortion problems when aggregating knowledge graph nodes in traditional European spaces, affecting the recommendation performance.
The cross-community knowledge graph method based on hyperbolic space is adopted to integrate the paper information between different structural communities, reduce node embedding distortion through the knowledge aggregation scheme in hyperbolic space, build a cross-community academic knowledge graph, and use LightGCN for node feature representation learning.
Cross-community knowledge fusion is achieved, node embedding distortion is reduced, and the performance and interpretability of paper recommendations are improved.
Smart Images

Figure CN119357409B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of paper recommendation, and particularly to a paper recommendation method and system based on a cross-community knowledge graph in a hyperbolic space. Background Art
[0002] The purpose of paper recommendation is to recommend high-quality academic papers that are the same as or related to the research direction of researchers. However, with the rapid development of scientific research, a large number of literature materials (such as published papers) have brought serious information overload problems to researchers. This makes researchers sometimes need to spend a lot of time looking for papers in their relevant directions. For those beginners who have just entered a certain research field, due to their lack of understanding of their own research directions and the large number and uneven quality of literature materials, it is even more difficult for them to retrieve high-quality papers through keyword searches on literature retrieval websites. This makes them spend a lot of unnecessary time on paper screening. Therefore, how to analyze the vast amount of literature data on the Internet, construct a paper recommendation model, and quickly recommend high-quality papers to researchers has become an important research issue in current paper recommendation.
[0003] Traditional paper recommendation methods mainly include two types: query text-based and graph structure-based. Among them, query text-based methods mainly define user characteristics by using text information such as query text, user history records, and user profiles. Similarly, text features are extracted from paper manuscripts, and the similarity between the two is further calculated, and then the paper recommendation work is carried out. However, sometimes it is not possible to retrieve the desired articles well only through the query text, and once user information such as user preferences or historical records is involved, there will be problems in obtaining user information. Therefore, relying solely on query text for paper recommendation has certain limitations. The graph structure-based paper recommendation method is to utilize the meaningful relationships and semantics between one or more entities to better learn the relationships between nodes such as the query author, query text, and papers. However, most current graph structure-based paper recommendation methods mainly construct a heterogeneous graph between users, query texts, papers, and paper authors to learn the correlations between vertices and then conduct paper recommendations, or conduct similar paper recommendations based on the citation link network of papers.
[0004] In recent years, Knowledge Graph (KG) has demonstrated impressive capabilities in alleviating the cold start problem and improving the interpretability of recommendations, leading to the emergence of many KG-based recommendation methods. However, the inventors have found that information related to paper recommendations may be latent in different communities, and existing methods do not integrate this information, i.e., there is a lack of cross-community knowledge fusion. In addition, it is not easy to accurately represent the nodes in the knowledge graph due to its complex topological structure, especially in the case of a cross-community knowledge graph, where feature aggregation in the traditional Euclidean space is likely to cause node distortion. Summary of the Invention
[0005] To address the deficiencies of the prior art, the present invention provides a paper recommendation method and system based on a cross-community knowledge graph in hyperbolic space, which fuses paper information between different structural communities and adopts a knowledge aggregation scheme in hyperbolic space to reduce the problem of node embedding distortion, thereby improving the performance of the paper recommendation task.
[0006] On the one hand, a paper recommendation method based on a cross-community knowledge graph in hyperbolic space is provided, including: obtaining a paper recommendation query task and a cross-community academic knowledge graph; inputting the paper recommendation query task and the cross-community academic knowledge graph into a trained paper recommendation model, and the paper recommendation model outputs the recommended papers;
[0007] Among them, the trained paper recommendation model is used to extract the initial structural feature vector and the initial text feature vector of each paper node in the input cross-community academic knowledge graph, hierarchically aggregate the initial structural feature vector, perform similarity aggregation and upward aggregation on the hierarchical aggregation results respectively, perform feature fusion on the similarity aggregation and upward aggregation results to obtain the final structural feature vector; perform text aggregation operations on the initial text feature vectors to obtain the final text feature vectors; perform a concatenation operation on the final structural feature vector and the final text feature vector to obtain the final feature vector of each node in the cross-community academic knowledge graph; calculate the similarity between the feature vector of the paper recommendation query task and the feature vectors of each paper node in the cross-community academic knowledge graph, and output the paper recommendation result according to the similarity.
[0008] On the other hand, a paper recommendation system based on a cross-community knowledge graph in hyperbolic space is provided, including: an acquisition module configured to acquire a paper recommendation query task and a cross-community academic knowledge graph; a recommendation module configured to input the paper recommendation query task and the cross-community academic knowledge graph into a trained paper recommendation model, and the paper recommendation model outputs the recommended papers; wherein, the trained paper recommendation model is used to extract the initial structural feature vector and the initial text feature vector of each paper node in the knowledge graph from the input cross-community academic knowledge graph, hierarchically aggregate the initial structural feature vectors, respectively perform similarity aggregation and upward aggregation on the hierarchical aggregation results, perform feature fusion on the similarity aggregation and upward aggregation results to obtain the final structural feature vector; perform text aggregation operation on the initial text feature vector to obtain the final text feature vector; perform a concatenation operation on the final structural feature vector and the final text feature vector to obtain the final feature vector of each node in the cross-community academic knowledge graph; calculate the similarity between the feature vector of the paper recommendation query task and the feature vectors of each paper node in the cross-community academic knowledge graph, and output the paper recommendation result according to the similarity.
[0009] The above technical solution has the following advantages or beneficial effects: (1) By collecting and analyzing the paper-related information in different structural academic communities, the present disclosure mines the correlation relationships between paper information in different communities, thereby performing cross-community knowledge fusion to further learn the feature representation of papers, and then making better paper recommendations for specific tasks.
[0010] (2) Based on the constructed cross-community academic knowledge graph data, the present disclosure uses the method of knowledge graph to learn the structural features of task nodes and paper nodes, and adopts a hierarchical aggregation scheme for different structural communities to better learn the knowledge between different communities. By using LightGCN to perform text feature representation learning of nodes, the structural features and text features are further fused to obtain a richer node feature representation, thereby improving the performance of the paper recommendation task.
[0011] (3) Aiming at the distortion problem existing in the aggregation of knowledge graph nodes in the traditional Euclidean space, the present disclosure adopts a knowledge propagation strategy based on hyperbolic space. By utilizing the advantage of small distortion of hyperbolic space when embedding scale-free and hierarchical graphs, the representation learning of knowledge graph nodes is better carried out. And aiming at the superior-subordinate relationship between tasks, an upward aggregation method is introduced to capture a finer-grained representation of the upper-level tasks. Thereby improving the performance of paper recommendation. Description of the Drawings
[0012] The accompanying drawings forming a part of this invention are used to provide a further understanding of the invention. The schematic embodiments and descriptions thereof of the invention are used to explain the invention and do not constitute an improper limitation of the invention.
[0013] Figure 1 It is a flowchart of the method for the first embodiment. Specific implementation manners
[0014] It should be noted that the following detailed descriptions are all exemplary and are intended to provide further explanations of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.
[0015] The first embodiment is as Figure 1 shown. This embodiment provides a paper recommendation method based on a cross-community knowledge graph in hyperbolic space, including: S101: Obtain a paper recommendation query task and a cross-community academic knowledge graph; S102: Input the paper recommendation query task and the cross-community academic knowledge graph into a trained paper recommendation model, and the paper recommendation model outputs the recommended papers; wherein, the trained paper recommendation model is used to extract the initial structural feature vector and the initial text feature vector of each paper node in the knowledge graph for the input cross-community academic knowledge graph, perform hierarchical aggregation on the initial structural feature vector, perform similarity aggregation and upward aggregation on the hierarchical aggregation results respectively, perform feature fusion on the similarity aggregation and upward aggregation results to obtain the final structural feature vector; perform text aggregation operation on the initial text feature vector to obtain the final text feature vector; perform a splicing operation on the final structural feature vector and the final text feature vector to obtain the final feature vector of each node in the cross-community academic knowledge graph; calculate the similarity between the feature vector of the paper recommendation query task and the feature vectors of each paper node in the cross-community academic knowledge graph, and output the paper recommendation result according to the similarity.
[0016] Furthermore, in S101: Obtain a paper recommendation query task and a cross-community academic knowledge graph, wherein the paper recommendation query task, for example: a machine learning task or a machine vision task, etc.
[0017] Furthermore, the specific construction process of the cross-community academic knowledge graph includes: obtaining the paper-related information of multiple academic communities, preprocessing the paper-related information, and constructing a cross-community academic knowledge graph according to the association relationship between papers in different academic communities.
[0018] During the construction process, each paper is regarded as a node in the knowledge graph, and each paper query task is also regarded as a node in the knowledge graph. If there is an association relationship between papers, such as using the same dataset, then the paper nodes are connected to each other through the same dataset as an attribute node. If there is an association relationship between a paper and a paper query task, then there is an edge connecting the paper node and the paper query task node.
[0019] The multiple academic communities refer to multiple paper databases, such as Wanfang Database and CNKI Database; the paper-related information includes: paper title, paper author, paper abstract, and paper retrieval terms. Based on the obtained paper attribute information between different academic communities, and through the associated entities between different academic communities (the paper attribute information shared between two academic communities), a cross-community academic knowledge graph is constructed. The academic community, for example, refers to the CSDN community or the GITHUB community, and the academic community refers to an academic website.
[0020] Furthermore, for the input cross-community academic knowledge graph, the initial structural feature vector and the initial text feature vector of each paper node in the knowledge graph are extracted. Among them, the extraction process of the initial structural feature vector includes: obtaining the paper node, the paper query task node, and the relevant paper attribute information from the constructed cross-community academic knowledge graph, and passing through the structural feature embedding layer , using a one-layer linear layer as layer to obtain the node structural feature vector in the Euclidean space : , where is the representation of the corresponding node in the knowledge graph.
[0021] Map the obtained node structural feature vector in the Euclidean space to the Lorentz manifold, and denote the Lorentz manifold with negative curvature of as , let , and and represent the Euclidean embedding and the embedding in the transformed hyperbolic space, is mapped as follows: ; where is the -dimensional vector in the tangent space, is defined as the origin in , is used as a reference vector to perform tangent space operations, is the two-norm of is the exponential mapping function, and They are the hyperbolic sine function and the hyperbolic cosine function respectively.
[0022] It should be understood that based on the node structure feature vector in the Euclidean space, through the exponential mapping function it is mapped to the Lorentz manifold to better perform knowledge dissemination of hierarchical structure data such as cross-community knowledge graphs.
[0023] The reason for choosing the Lorentz model is that the Lorentz model is a typical equivalent model that can well describe hyperbolic geometry and has unique simplicity and numerical stability. For the convenience of expression, in this embodiment, the Lorentz manifold with negative curvature of is denoted as in terms of vectors centered at the dimensional Euclidean tangent space is denoted as is the local first-order approximation of the Lorentz manifold at
[0024] which is very useful for performing graph convolution operations in hyperbolic space. and the logarithmic mapping to convert.
[0025] Given and .
[0026] Through the exponential mapping maps to the hyperbolic space, and conversely, through the logarithmic mapping maps to the tangent space centered at.
[0027] ;
[0028] ;
[0029] where is the norm of is the curvature-aware inner product in the hyperbolic space, is the in the hyperbolic space the measured distance between two points, and their calculation methods are as follows respectively: ;
[0030] .
[0031] Further, for the input cross-community academic knowledge graph, the initial structural feature vectors and initial text feature vectors of each node in the knowledge graph are extracted. Among them, the extraction of the initial text feature vectors is carried out using the text pre-training model BGE, which can convert words, phrases or entire sentences into vector forms for extracting the initial text feature vectors of each node in the knowledge graph.
[0032] It should be understood that BGE is an open-source Chinese-English semantic vector model, and the BGE model is pre-trained on Chinese-English datasets using the RetroMAE method. The English datasets are Pile, Wikipedia, and msmarco, while the Chinese dataset comes from wudao. 24 A100 (40G) are used for training.
[0033] Further, the hierarchical aggregation of the initial structural feature vectors includes: (1) learning the attention weights of the nodes connected by the relationship and the edges between the nodes by considering the structural information of the triple : ; where is the relationship weight matrix, and are the embeddings of and in the hyperbolic space respectively, and are mapped to the tangent space using the function. Then, through the softmax function, it is further normalized on all the edges connected to to obtain : : .
[0034] (2) Based on the neighbor node weight calculation formula, first, a knowledge propagation process of neighbor node information is carried out for the task node. Let be the first-order neighbor set of the task node in , and this set is composed only of paper nodes. Therefore, the embedding of the neighbor information of the task node can be defined as follows: ; where is the normalized attention weight of the corresponding edge , and are the embeddings of and in the hyperbolic space respectively;
[0035] (3) Similarly, for the paper node , a similar neighbor information aggregation operation is performed. Let be the first-order task node neighbor set of the paper node , For the paper node In the first-order other entity neighbor set of, the embedding of the neighbor information of the paper node is defined as:
[0036] .
[0037] (4)To further obtain higher-order neighbor information in the cross-community academic knowledge graph, perform multi-hop operations in the knowledge graph on the paper node for neighbor sampling, let represent the entity neighbor set at the th hop; then, update the embedding of the entity in through the neighbors of the entity in ;
[0038] ;
[0039] Among them, is the normalized attention weight corresponding to the edge , and are the embedding representations of the entities and in the hyperbolic space respectively.
[0040] (5) There may be associated entities in, which are defined as , where is the set of associated entities; when performing neighbor information embedding on the entity in , first consider whether there are associated entities in its neighbor set; if there are associated entities, first perform neighbor aggregation on the associated entity on , and then put the associated entity obtaining higher-order knowledge in into to further perform neighbor information embedding learning;
[0041] When obtaining higher-order neighbor information on the associated entity on , different neighbor sampling sizes and aggregation layers are adopted; let represent in the Set of entity neighbors that jump down;
[0042] 。
[0043] (6) After obtaining the multi-hop neighbor information embedding, use it to update the embedding representations of the task nodes and paper nodes. Adopt the Sum Aggregator method. By summing the embedding of the target node itself and the neighbor information embedding, and performing a non-linear transformation, then perform non-linear activation in the hyperbolic space to obtain the updated embedding representation.
[0044] ;
[0045] where and are the trainable weights and biases defined in the relevant tangent space, and are the linear transformations in the hyperbolic space, is the hyperbolic activation function, which are respectively defined as:
[0046] ; ;
[0047] ;
[0048] where, , and are exponential functions, and are logarithmic functions, is the hyperbolic tangent activation function;
[0049] So far, the obtained is the final structural embedding representation of the paper node 。
[0050] It should be understood that the interactive nodes in the cross-community academic knowledge graph are feature-embedded to obtain the node structure feature vectors in the Euclidean space, and based on the obtained node structure feature vectors in the Euclidean space, map them to the hyperbolic space through the exponential mapping function for better knowledge dissemination of hierarchical structure data. Perform the multi-hop knowledge dissemination process on the structural feature vectors mapped to the hyperbolic space to aggregate the information of neighbor nodes. Specifically, map them to the corresponding tangent space through the logarithmic mapping function and calculate the weights of neighbor nodes according to the triple.
[0051] It should be understood that based on the structural feature vectors in hyperbolic space, a multi-hop knowledge propagation process is carried out to aggregate the information of multi-hop neighbor nodes. A hierarchical aggregation scheme is designed for academic communities with different structures, and different hop numbers and neighbor sampling sizes are adopted to better learn the paper knowledge between different communities. Different aggregation strategies are also taken for the distribution problems of task nodes and paper nodes in the cross-community knowledge graph.
[0052] It should be understood that before propagating the information of neighbor nodes, the attention weights of neighbor nodes need to be calculated in the tangent space first. According to the different connection relationships between neighbor nodes and the target node, the contributions to the target node will also vary. Therefore, it is very important to distinguish different relationships by learning different attention weights.
[0053] Based on the obtained structural embeddings of task nodes , a task similarity graph is constructed according to the number of papers jointly interacted between tasks, and on this basis, a similarity aggregation operation of task nodes is carried out. At the same time, a task hierarchy graph is constructed according to the superior-subordinate relationship between tasks, and on this basis, an upward aggregation operation of task nodes is carried out.
[0054] Furthermore, the similarity aggregation and upward aggregation are respectively performed on the hierarchical aggregation results. The specific steps of similarity aggregation include: First, a task similarity graph is constructed according to the number of papers jointly interacted between tasks. Define as the number of papers jointly interacted between task node and task node . For each task node , only consider the top task nodes that have the most papers with the same interaction as it. If task belongs to the top task of task node , then the weight of its edge is , otherwise it is 0.
[0055] .
[0056] The softmax function is used to calculate the weights for aggregating adjacent tasks of task nodes, so as to better aggregate adjacent task nodes with the most papers having the same interaction. Among them, is the top neighbor task nodes of task .
[0057] .
[0058] It should be understood that after obtaining the structural feature vectors in the hyperbolic space, similarity aggregation is performed among the task nodes according to the number of papers jointly interacted between the task nodes. The more papers jointly interacted between tasks, the more similar they are.
[0059] Furthermore, similarity aggregation and upward aggregation are respectively performed on the hierarchical aggregation results. The specific steps of upward aggregation include: constructing a task hierarchy graph according to the superior-subordinate relationship between task nodes. If task node is a subtask of task node , the weight of this edge is 1. If task node is not a subtask of task node , it is 0, that is, this edge does not exist:
[0060] ;
[0061] Based on the task hierarchy graph, obtain the task representation after upward aggregation :
[0062] ;
[0063] where is the set of subtasks of task .
[0064] For example, object recognition is a subtask of computer vision, so there is an edge from object recognition to computer vision. While the recommendation system is not a subtask of computer vision, so there is no edge.
[0065] It should be understood that according to the superior-subordinate relationship between tasks, information aggregation operations of subtasks are performed on the superior tasks to capture more fine-grained representation information.
[0066] Furthermore, feature fusion is performed on the similarity aggregation and upward aggregation results to obtain the final structural feature vectors, including:
[0067] Based on the obtained task nodes 's and , perform a weighted fusion operation on them in the tangent space to obtain a dual representation containing similarity information and superior-subordinate information. The attention weight is initialized to 0.1;
[0068] ;
[0069] For the self-structure embedding of task node and the neighbor task node information embedding Sum and perform a non - linear transformation, and then perform non - linear activation in the hyperbolic space to obtain the structural embedding representation of the final task node :
[0070] ;
[0071] Wherein, and are trainable weights and biases defined in the relevant tangent space, and are linear transformations in the hyperbolic space, is the hyperbolic activation function.
[0072] It should be understood that feature fusion performs feature - weighted fusion on the similarity aggregation result and the upward aggregation result to obtain the final structural feature vector. Further, a concatenation operation is performed on the finally obtained node structural feature vector and the text feature vector to obtain the final feature embedding vector of the node.
[0073] It should be understood that the structural embedding vector obtained in the Euclidean space is projected onto the Lorentz manifold through the hyperbolic space embedding layer, and a multi - hop knowledge propagation operation of the knowledge graph nodes is performed in the tangent space of the Lorentz manifold, where the Sum Aggregator method is used to aggregate multi - hop neighbor information. At the same time, a hierarchical aggregation scheme is proposed for different structures of the community, and different hop numbers and neighbor sampling sizes are adopted for different - structured communities to better learn the paper knowledge under different communities.
[0074] The paper node structural vector obtained after multi - hop propagation is used as its final structural embedding vector, while the obtained task node structural embedding vector needs to further perform similarity aggregation and upward aggregation operations under the task isomorphic graph, and then perform a weighted fusion operation, and the task node structural embedding vector after further weighted fusion is used as its final structural embedding vector.
[0075] Furthermore, the operation of performing text aggregation on the initial text feature vector to obtain the final text feature vector includes: using LightGCN to encode:
[0076] ;
[0077] ;
[0078] Wherein, and are the one - hop neighbor sets of the task node and the paper node respectively, and Initialized by a text pre-training model; Used to normalize the text features learned in each layer; to avoid continuous scale expansion.
[0079] Furthermore, according to the aggregation process, after L layers of data propagation, each node will obtain L + 1 text feature vectors. By performing a weighted sum on the obtained L + 1 text feature vector representations, the final text embedding representation is obtained: ; .
[0080] It should be understood that although using a knowledge graph can effectively retain structural information, it lacks descriptive information about entities. To better improve the recommendation effect, this embodiment takes into account text information such as task descriptions and paper abstracts, and performs text aggregation in the constructed task-paper interaction graph to better learn the interaction relationship between task nodes and paper nodes. The LightGCN method simplifies graph convolution operations by removing feature transformation and non-linear activation modules to improve recommendation performance.
[0081] It should be understood that text embedding operations are performed on the initially obtained text embedding vectors such as task descriptions and paper abstracts. Specifically, first, the initial text feature vectors of the nodes are obtained through a text pre-training model, and then the LightGCN method is used for multiple neighbor aggregations of text information in the task-paper interaction graph. The so-called task-paper interaction graph includes task nodes and paper nodes. If there is an association relationship between a task and a paper, there is an interconnected edge between the corresponding task node and paper node. After L layers of data propagation, by performing a weighted sum on the representations obtained from each GCN layer, the final text embedding representation of the node is obtained.
[0082] The obtained initial node text feature vectors are subjected to text feature aggregation operations using the LightGCN method on the constructed task-paper interaction graph to obtain the final text feature vectors, so as to better learn the semantic relationship between interaction nodes.
[0083] Furthermore, the final structure feature vector and the final text feature vector are concatenated. The final feature vector of each node in the cross-community academic knowledge graph includes: based on the structural embedding representation of the paper node and the structural embedding representation of the task node , as well as the text embedding representations of the paper node and the task node , . The structural embedding representation and the text embedding representation are concatenated through the concat operation to better utilize these two different types of information, thereby obtaining the final node feature embedding vector.
[0084] Since the current structure embedding representation is in the hyperbolic space, it is first mapped to the tangent space and then concatenated.
[0085] 。 。
[0086] Among them, is the concat operation.
[0087] Furthermore, the method further includes: at the same time, using the trained paper recommendation model, extracting the feature vector of the to-be-recommended paper query task for the to-be-recommended paper query task node.
[0088] Furthermore, calculating the similarity between the feature vector of the to-be-recommended paper query task and the feature vector of each paper node in the cross-community academic knowledge graph includes: after obtaining the final feature representations of the task node and the paper node, calculating the matching score between them by using the L2 distance in the matching model: ; among them, is the sigmoid function, the higher the score, the more likely it indicates to recommend a paper for the task.
[0089] After obtaining the final node structure embedding vector and text embedding vector, in order to better utilize these two different types of information, the structure embedding vector in the hyperbolic space is mapped to the tangent space and then concatenated to obtain the final representation vector of the task node and the paper node; according to the final feature embedding vectors of the task node and the paper node, the matching score between them is calculated by constructing a softmax scoring function.
[0090] Furthermore, in S102: calculating the similarity between the feature vector of the to-be-recommended paper query task and the feature vector of each node in the cross-community academic knowledge graph, and according to the similarity, outputting the paper recommendation result, and outputting the top N papers with the highest similarity as the recommended papers.
[0091] Further, in step S102: input the paper recommendation task to be queried and the cross-community academic knowledge graph into the trained paper recommendation model, and the paper recommendation model outputs the recommended papers. Among them, for the trained paper recommendation model, the training process includes: constructing a training set, where the training set is the cross-community academic knowledge graph with known paper recommendation results; the cross-community academic knowledge graph includes: paper query task nodes and paper nodes; if there is an association relationship between the paper query task nodes and the paper nodes, there is an edge connecting the two; use the cross-community academic knowledge graph and the known paper query tasks as the input values of the paper recommendation model, and use the known paper recommendation results as the output values of the paper recommendation model. When the total loss function value of the paper recommendation model no longer decreases, stop training to obtain the trained paper recommendation model.
[0092] Use cross-entropy as the loss function, and let be the set of positive interaction papers for task node , and let be the set of negative interaction papers with the same number. And in each training process, and are both randomly sampled. Then the loss function is defined as follows:
[0093] ;
[0094] where, is the cross-entropy loss, is the set of trainable parameters and feature embeddings in the model, is the hyperparameter that controls the scale of the L2 regularizer.
[0095] Perform paper click-through rate (CTR) prediction on the test samples and compare the results with the actual situation. In this embodiment, accuracy (ACC) and area under the curve (AUC) are used as evaluation indicators, and the comparison results are shown in Table 1.
[0096] Table 1 Accuracy and AUC of the paper CTR prediction task
[0097]
[0098] And perform Top-K paper recommendation prediction on the test samples and compare the results with the actual situation. In this embodiment, Precision@K, Recall@K, and ndcg@K are used as evaluation indicators.
[0099] Based on the results in Table 1, it can be obtained that the recommendation performance of the paper recommendation model proposed in this embodiment is better than other recommendation methods.
[0100] Meanwhile, regarding the issue of whether the cross-community knowledge graph can effectively improve the recommendation performance, for the recommendation method using the knowledge graph in this embodiment, a validation experiment on the effectiveness of the cross-community knowledge graph was further conducted. The results are shown in Table 2.
[0101] Table 2 Research on the Effectiveness of the Cross-Community Knowledge Graph
[0102]
[0103] Based on the results in Table 2, it shows that the paper recommendation method based on the cross-community knowledge graph proposed in this embodiment plays a certain positive role in improving the recommendation performance.
[0104] After obtaining the final representation vectors of the task and paper nodes, the matching score between them is calculated by using the L2 distance in the matching model, and the matching score is calculated by constructing a softmax function. And by calculating the loss function of the output value of the softmax function, the learning parameters of the model are trained by using the backpropagation algorithm to complete the training of the model.
[0105] Using the loss error between the output value of the softmax scoring function and the label value, the learning parameters of the entire model are trained by using the backpropagation algorithm to complete the training of the model.
[0106] After the model is trained, the data not involved in the training process is used for testing. The test results of the model are compared with the actual situation, and the model is optimized and adjusted to continuously optimize the weight data in the model and continuously improve the accuracy of paper recommendation.
[0107] Exemplarily, first, a large amount of semi-structured paper data on the PapersWithCode platform and the Github platform is collected, and the obtained large amount of paper data is preprocessed, including data cleaning, data definition, and storage, etc. Specifically, a total of 4496 tasks, 64179 papers, and 111809 interactions are collected from the open academic platform PapersWithCode platform. And data cleaning is performed on it, including data deduplication, missing value filling, etc. Finally, 1288 tasks, 28978 papers, and 76605 interactions are retained as data samples. And at the same time, text information such as task descriptions and paper abstracts is collected to further learn the semantic relationship between tasks and papers. Then, according to the 34612 code attribute entities included in the retained papers, other paper information related to them is collected as the core entities in the Github community and stored in a relational database.
[0108] Normalize the obtained massive paper data, and use Protege to perform the ontology modeling task of the cross-community academic knowledge graph, including defining relevant entities in paper recommendation and object properties and numerical properties for each type of entity. Then, convert the relational data into triple format according to the defined ontology model with the help of mapping rules to complete the construction task of the cross-community academic knowledge graph. Finally, use the Neo4j graph database to store the data of the cross-community academic knowledge graph. As shown in Table 3, it is an example of the statistics of the paper dataset, where is the main knowledge graph constructed for the paper information on the PapersWithCode platform, is the auxiliary knowledge graph constructed for the paper information on the Github platform, is the cross-community academic knowledge graph formed by the association of two academic communities. If a certain paper belongs to a certain task, it is said that there is an interaction relationship between them, and the interaction quantity is the number of interactions between the task nodes and paper nodes in the dataset.
[0109] Table 3 Basic statistical information of the paper dataset
[0110]
[0111] Extract various attribute information of papers from the massive paper data obtained from academic communities with different structures; based on the obtained paper attribute information, construct a cross-community academic knowledge graph through associated entities between different communities; respectively obtain the structural embedding vector and text embedding vector of the nodes in the cross-community academic knowledge graph through the embedding layer and the text pre-training model.
[0112] Map the obtained structural embedding vector to the hyperbolic space through the exponential mapping function, and perform knowledge propagation operations through the hierarchical aggregation method. In addition, perform similarity aggregation and upward aggregation on the task nodes on the constructed isomorphic graph, and obtain the final structural feature vector through feature fusion operations.
[0113] Perform text aggregation operations on the constructed interaction graph for the obtained text embedding vector through the LightGCN method to obtain the final text feature vector; splice the structural feature vector and the text feature vector to obtain the final node feature representation vector.
[0114] After obtaining the final representation vectors of the task and paper nodes, calculate the matching scores between them by using the most commonly used L2 distance in the matching model, and the matching scores are calculated by constructing a softmax function; and calculate the loss function of the output value of the softmax function, and use the backpropagation algorithm to train the learning parameters of the model to complete the training of the model.
[0115] The present disclosure fully considers and integrates the paper information among different structural academic communities, and proposes a hierarchical aggregation scheme in hyperbolic space for the problem of node representation learning of large and complex cross-community knowledge graphs, further effectively improving the performance of paper recommendation.
[0116] Embodiment 2: This embodiment provides a paper recommendation system based on a cross-community knowledge graph in hyperbolic space, including: an acquisition module configured to acquire a paper recommendation query task and a cross-community academic knowledge graph; a recommendation module configured to input the paper recommendation query task and the cross-community academic knowledge graph into a trained paper recommendation model, and the paper recommendation model outputs the recommended papers.
[0117] Among them, the trained paper recommendation model is used to extract the initial structural feature vector and the initial text feature vector of each paper node in the input cross-community academic knowledge graph, perform hierarchical aggregation on the initial structural feature vector, perform similarity aggregation and upward aggregation on the hierarchical aggregation results respectively, perform feature fusion on the similarity aggregation and upward aggregation results to obtain the final structural feature vector; perform text aggregation operation on the initial text feature vector to obtain the final text feature vector; perform concatenation operation on the final structural feature vector and the final text feature vector to obtain the final feature vector of each node in the cross-community academic knowledge graph; calculate the similarity between the feature vector of the paper recommendation query task and the feature vectors of each paper node in the cross-community academic knowledge graph, and output the paper recommendation result according to the similarity.
[0118] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A paper recommendation method based on cross-community knowledge graph in hyperbolic space, characterized by: include: Obtain the query task of papers to be recommended and the cross-community academic knowledge graph; Input the query task of the papers to be recommended and the cross-community academic knowledge graph into the trained paper recommendation model, and the paper recommendation model outputs the recommended papers; Among them, the trained paper recommendation model is used to extract the initial structural feature vector and initial text feature vector of each paper node in the input cross-community academic knowledge graph, hierarchically aggregate the initial structural feature vector, perform similarity aggregation and upward aggregation on the hierarchical aggregation results respectively, and perform feature fusion on the similarity aggregation and upward aggregation results to obtain the final structural feature vector; perform text aggregation operation on the initial text feature vector to obtain the final text feature vector; perform splicing operation on the final structural feature vector and the final text feature vector to obtain the final feature vector of each node in the cross-community academic knowledge graph; calculate the similarity between the feature vector of the query task of the paper to be recommended and the feature vector of each paper node in the cross-community academic knowledge graph, and output the paper recommendation result according to the similarity; The input cross-community academic knowledge graph is used to extract the initial structural feature vector and the initial text feature vector of each paper node in the knowledge graph, wherein the extraction process of the initial structural feature vector includes: The paper nodes, paper query task nodes and related paper attribute information are obtained from the constructed cross-community academic knowledge graph, and the structural feature embedding layer , using a linear layer as layer, and obtain the node structure feature vector in Euclidean space : ; in, is the representation of the corresponding node in the knowledge graph; The node structure feature vector obtained in the Euclidean space is mapped to the Lorentz manifold, and the negative curvature is of The Lorentz manifold is denoted by ,make and represents the Euclidean embedding and the transformed hyperbolic embedding, is mapped as follows: ; in, For the tangent space dimensional vector, Defined as The origin in is used as a reference vector to perform tangent space operations, for The second norm of is the exponential mapping function, and are the hyperbolic sine and cosine functions respectively.
2. The paper recommendation method based on cross-community knowledge graph in hyperbolic space as claimed in claim 1 is characterized in that: The step of performing hierarchical aggregation on the initial structural feature vector includes: (1) By considering the triple The structural information of the nodes is used to learn the attention weights of the nodes and edges between the nodes connected by the relationship : ; in, is the relationship weight matrix, and They are and Embedded in hyperbolic space, and using The function maps it into the tangent space; Then, by using the softmax function, The connected edges are further normalized to obtain : ; (2) Based on the neighbor node weight calculation formula, firstly, the knowledge propagation process of neighbor node information is carried out on the task node, and For task nodes exist The first-order neighbor set in the task node is composed only of paper nodes; therefore, The embedding of neighbor information can be defined as follows: ; in, For the corresponding side The normalized attention weights of and They are and Embedding in hyperbolic space; (3) Similarly, for the paper node Perform similar neighbor information aggregation operations, and let For thesis node The first-order task node neighbor set, For thesis node exist The first-order other entity neighbor set in the paper node The embedding of neighbor information is defined as: ; (4) Perform multi-hop operations in the knowledge graph to conduct Neighbor sampling, let represent The The set of entity neighbors that are jumped; then, through Medium Entity Neighbors to update Entities in Embedding ; in, For the corresponding side The normalized attention weights of and Entity and Embedding representation in hyperbolic space; (5) There may be associated entities in , defined as ,in is a collection of related entities; Entities in When embedding neighbor information, first consider whether there is an associated entity in its neighbor set. ; If there is an associated entity, first Related entities Perform neighbor aggregation and then obtain Related entities of medium and high-level knowledge Put into To further Neighborhood information embedding learning; exist Related entities When acquiring high-order neighbor information, different neighbor sampling sizes and aggregation layers are used; represent middle No. The set of neighbors of the entity that jumped off; ; (6) After obtaining the multi-hop neighbor information embedding, it is used to update the embedding representation of the task node and the paper node; the updated embedding representation is obtained by summing the embedding of the target node itself and the neighbor information embedding, performing a nonlinear transformation, and then performing a nonlinear activation in the hyperbolic space: ; in and are trainable weights and biases defined in the relevant tangent space, and is a linear transformation in hyperbolic space, is a hyperbolic activation function, which is defined as: ; ; ; in, , and is an exponential function, and is a logarithmic function, is the hyperbolic tangent activation function; So far, we have obtained For thesis node The final structure embedding representation of .
3. The paper recommendation method based on cross-community knowledge graph in hyperbolic space as claimed in claim 2 is characterized in that: The hierarchical aggregation results are respectively subjected to similarity aggregation and upward aggregation, wherein the specific steps of similarity aggregation include: First, we construct a task similarity graph based on the number of common interactive papers between tasks and define For task nodes With task nodes The number of papers that interact with each other, for each task node , only consider the top candidates with the largest number of interactive papers task nodes, if the task Belongs to the task node Before Tasks , then the weight of its edge is , otherwise 0: ; Use the softmax function to calculate the weights of the neighboring tasks for the aggregation task node: ; in, For the task Before Neighbor task nodes.
4. The paper recommendation method based on cross-community knowledge graph in hyperbolic space as claimed in claim 3 is characterized in that: The hierarchical aggregation results are respectively subjected to similarity aggregation and upward aggregation, wherein the specific steps of upward aggregation include: Construct a task hierarchy diagram based on the hierarchical relationship between task nodes. For task nodes The weight of this edge is 1. If the task node Not a task node The subtask of is 0, that is, the edge does not exist: ; Based on the task hierarchy diagram, the task representation after upward aggregation is obtained : ; in, For the task A collection of subtasks.
5. The paper recommendation method based on cross-community knowledge graph in hyperbolic space as claimed in claim 4 is characterized in that: The similarity aggregation and upward aggregation results are subjected to feature fusion to obtain the final structural feature vector, including: Based on the obtained task nodes of and , perform a weighted fusion operation on the tangent space to obtain a dual representation containing similarity information and superior-subordinate information, and the attention weight Initialized to 0.1; ; For task nodes Embedded in its own structure and neighbor task node information embedding Sum and perform nonlinear transformation, then perform nonlinear activation in hyperbolic space to obtain the final structural embedding representation of the task node : ; in, and are trainable weights and biases defined in the relevant tangent space, and is a linear transformation in hyperbolic space, is a hyperbolic activation function.
6. The paper recommendation method based on cross-community knowledge graph in hyperbolic space as claimed in claim 1 is characterized in that: The text aggregation operation is performed on the initial text feature vector to obtain the final text feature vector, including: right To encode: ; ; in, and Task nodes and paper nodes The set of one-hop neighbors of and Initialized by text pre-training model; Used to normalize the text features learned in each layer; According to the aggregation process, after L layers of data propagation, each node will obtain L+1 text feature vectors. The final text embedding representation is obtained by weighted summing the obtained L+1 text feature vector representations: ; 。 7. The paper recommendation method based on cross-community knowledge graph in hyperbolic space as claimed in claim 6 is characterized in that: The final structural feature vector and the final text feature vector are concatenated to obtain the final feature vector of each node in the cross-community academic knowledge graph, including: Embedding representation based on paper node structure and task node structure embedding representation , and text embedding representations of paper nodes and task nodes , , the structural embedding representation and the text embedding representation are concatenated through the concat operation to obtain the final node feature embedding vector. Since the current structural embedding representation is in the hyperbolic space, it is first mapped to the tangent space and then concatenated: ; ; in, This is the concat operation.
8. The paper recommendation method based on cross-community knowledge graph in hyperbolic space as claimed in claim 7 is characterized in that: The calculation of the similarity between the feature vector of the query task of the paper to be recommended and the feature vector of each paper node in the cross-community academic knowledge graph includes: After obtaining the final feature representation of the task node and the paper node, the matching score between them is calculated by using the L2 distance in the matching model: ; in, is the sigmoid function, The higher the score, the better the task. Recommended Papers The greater the possibility.
9. A paper recommendation system based on a cross-community knowledge graph in a hyperbolic space, characterized by: include: An acquisition module is configured to: acquire a query task of papers to be recommended and a cross-community academic knowledge graph; The recommendation module is configured to: input the query task of the paper to be recommended and the cross-community academic knowledge graph into the trained paper recommendation model, and the paper recommendation model outputs the recommended paper; Among them, the trained paper recommendation model is used to extract the initial structural feature vector and initial text feature vector of each paper node in the input cross-community academic knowledge graph, hierarchically aggregate the initial structural feature vector, perform similarity aggregation and upward aggregation on the hierarchical aggregation results respectively, and perform feature fusion on the similarity aggregation and upward aggregation results to obtain the final structural feature vector; perform text aggregation operation on the initial text feature vector to obtain the final text feature vector; perform splicing operation on the final structural feature vector and the final text feature vector to obtain the final feature vector of each node in the cross-community academic knowledge graph; calculate the similarity between the feature vector of the query task of the paper to be recommended and the feature vector of each paper node in the cross-community academic knowledge graph, and output the paper recommendation result according to the similarity; The input cross-community academic knowledge graph is used to extract the initial structural feature vector and the initial text feature vector of each paper node in the knowledge graph, wherein the extraction process of the initial structural feature vector includes: The paper nodes, paper query task nodes and related paper attribute information are obtained from the constructed cross-community academic knowledge graph, and the structural feature embedding layer , using a linear layer as layer, and obtain the node structure feature vector in Euclidean space : ; in, is the representation of the corresponding node in the knowledge graph; The node structure feature vector obtained in the Euclidean space is mapped to the Lorentz manifold, and the negative curvature is of The Lorentz manifold is denoted by ,make and represents the Euclidean embedding and the transformed hyperbolic embedding, is mapped as follows: ; in, For the tangent space dimensional vector, Defined as The origin in is used as a reference vector to perform tangent space operations, for The second norm of is the exponential mapping function, and are the hyperbolic sine and cosine functions respectively.
Citation Information
Patent Citations
Fault case recommendation method based on knowledge graph
CN116541510A
Knowledge graph recommendation method and system based on double-space information aggregation
CN117808089A