Knowledge graph completion system and method for reducing super-relation internal noise

By using a multi-layer network structure in the hyperrelational knowledge graph, the problem of qualifier noise on the main triple is solved, and the accuracy and robustness of the knowledge graph are improved, and the realization of the knowledge graph is achieved. A better knowledge graph completion effect.

CN119046473APending Publication Date: 2024-11-29DALIAN NATIONALITIES UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411006521.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The existing hyperrelational knowledge graph completion method is poor in dealing with the noise problems caused by qualifiers to the main triplets, resulting in weakening of the knowledge graph completion effect and erroneous reasoning.

Method used

Using the method of simultaneously modeling ordinary triplets and hyperrelational facts, through feature learning modules, correlation perception modules and semantic enhancement modules, multi-layer network structures such as convolutional neural networks, heterogeneous graph neural networks and Transformer, learn And fused feature representations to mitigate the noise effect of the qualifier on the main triple.

Benefits of technology

It effectively solves the noise problem caused by the qualifier to the main triplet during prediction, improves the accuracy and robustness of the knowledge graph, and significantly improves the overall effect of knowledge graph completion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046473A_ABST
    Figure CN119046473A_ABST
Patent Text Reader

Abstract

The invention discloses a knowledge graph completion system and method for reducing super-relation internal noise, and belongs to the technical field of natural language processing knowledge graphs. The method comprises the following steps: firstly, respectively processing a common triple fact and a super-relation fact, and constructing a feature enhancement module by using a convolutional neural network and a heterogeneous graph neural network; the feature representation of the main triad in the super relation can be effectively learned and enhanced, so that the understanding and processing capability of the model on super relation knowledge is improved; secondly, constructing a correlation perception module, and processing complex graph structures in the two representations by using a graph attention network so as to construct a fusion feature sequence; then, a semantic enhancement module is constructed, and the correlation between two elements in the sequence is processed by utilizing Transform, so that the fusion feature sequence is updated; and finally, covering the updated feature sequence so as to predict a final covering element result. Therefore, the super-relation internal noise can be effectively reduced, and the task of complementing the super-relation knowledge graph is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of natural language processing knowledge graphs, and specifically relates to a knowledge graph completion system and method that reduces super-relation internal noise. Background Art

[0002] Knowledge graph is a kind of large-scale graph structure that learns the relationships between various entities in the real world. However, for complex information in the real world, traditional knowledge graph is no longer sufficient to fully learn the complex knowledge information within it. Therefore, hyper-relational knowledge graph came into being, which expands the ordinary triple form to a form with main triples and several qualifiers. Such a complex form enables hyper-relational knowledge graph to have a strong learning ability. However, the inevitable problem of both traditional knowledge graph and hyper-relational knowledge graph is the lack of information. This makes hyper-relational knowledge graph completion a research hotspot in this direction.

[0003] The existing hyper-relational knowledge graph completion methods can be roughly divided into two stages. The first stage is the early research on hyper-relational knowledge graph completion methods. This stage mainly treats triples and hyper-relational knowledge pairs equally. However, this form of treatment does not take into account the incompatibility between the main triples and qualifiers. As a result, the methods in this stage have not been greatly improved. Therefore, in order to solve this kind of problem, the HINGE model was proposed in 2020, which defines a hyper-relation as a main triple (h, r, t) and several qualifiers (q ri ,q re ). This has brought the hyper-relational knowledge graph completion method into a new stage.

[0004] However, although existing hyper-relational knowledge graph completion methods make full use of qualifiers to enhance the accuracy of predictions, they often overlook a key issue: qualifiers may have different interpretations in different contexts, which may lead to the introduction of irrelevant or even misleading noise to the main triples during the prediction process. The accumulation of such noise may weaken the overall effect of knowledge graph completion and may even lead to erroneous reasoning and conclusions. Therefore, in order to further improve the quality and accuracy of hyper-relational knowledge graphs, it is particularly important to propose a hyper-relational knowledge graph completion method that can solve the noise problem caused by qualifiers on the main triples. Summary of the invention

[0005] The technical problems that the present invention needs and can solve are:

[0006] The present invention aims to solve the problem that the previous technology cannot effectively handle the noise caused by qualifiers to the main triples, and proposes a knowledge graph completion system and method to reduce the internal noise of super relations. The method of simultaneously modeling ordinary triple facts and super relation facts is used to limit the noise in the qualifiers, and then the graph attention network and Transformer method are used to learn the two fact features, so that the present invention can not only effectively learn complex and diverse facts, but also effectively solve the noise problem caused by qualifiers to the main triples during prediction.

[0007] Specific technical solution of the present invention:

[0008] In order to solve the above technical problems, the present invention provides a knowledge graph completion system that reduces the internal noise of hyper-relationships. According to the data set required by the method, a common knowledge graph and a hypergraph are constructed, which includes three main related modules:

[0009] Module 1: Feature learning module, which consists of two layers. The traditional triple feature representation layer and the hyper-relation feature representation layer are constructed by the constructed common knowledge graph and hyper-graph, so as to learn two feature representations;

[0010] Module 2: Correlation perception module, which is used for the two feature representations obtained above, so that they can be more effectively and accurately fused, and a feature sequence that fuses the two feature representations is constructed; combined with a hypergraph, the fused feature sequence of the two feature representations is learned, so that the present invention can process the two features more accurately and effectively;

[0011] Module 3: Semantic enhancement module, which uses the fused feature sequence to learn the complex semantic information inside it and enhance the fused feature sequence to capture the semantic information of the feature sequence represented by the fused feature, so that the semantic information in the two complex features can be captured more comprehensively and accurately, thereby obtaining an updated semantic sequence;

[0012] Combining the above three modules, we get a more comprehensive and specific semantic sequence. Next, we mask the elements in this sequence one by one. When masking, we use the [MASK] tag to mask the entities and relationships.

[0013] Finally, the prediction results are ranked using the commonly used evaluation indicators for link prediction. The present invention uses the average reciprocal ranking MRR, the average proportion of Hits@1 for rankings less than or equal to 1, the average proportion of Hits@5 for rankings less than or equal to 5, and the average proportion of Hits@10 for rankings less than or equal to 10 as the final evaluation indicators.

[0014] Furthermore, for module 1, a convolutional neural network (CNN) is used to capture the common triple feature representation, and a heterogeneous graph neural network (HGNN) is used to capture the hyper-relation feature representation. The two feature representations are concatenated to obtain a simple feature sequence.

[0015] Furthermore, for module 2, a two-layer graph attention network (GATv2) is used to capture a more comprehensive and accurate feature sequence. First, the feature sequence and the hyperedge embedding in the constructed hypergraph are fed into the first layer of GATv2 to update the hyperedge embedding, and then the updated hyperedge embedding and feature sequence are fed into the second layer of GATv2 to use the updated hyperedge embedding to more accurately fuse the two features to obtain a feature sequence that fuses the two feature representations.

[0016] Furthermore, for module three, Transformer is used to learn the semantic information of the feature sequence to obtain a more comprehensive and specific semantic sequence, and finally obtain an updated feature sequence.

[0017] Then, the [MASK] label is used to mask the final prediction, and the MLP network is used to predict the final result.

[0018] Then, the final results are ranked using the evaluation indicators MRR, Hits@1, Hits@5, and Hits@10, which are specifically expressed as follows:

[0019]

[0020] The present invention also includes a knowledge graph completion method for reducing the internal noise of a super relation, the steps of which are as follows:

[0021] Step 1: Data preprocessing: Use a dataset with hyper-relational facts to filter entity embeddings and relation embeddings, and build a knowledge graph based on ordinary triples and a hypergraph based on hyper-relationships.

[0022] Step 2: Capture common triple fact feature representation;

[0023] Step 3: Capture the hyper-relational fact feature representation;

[0024] Step 4: Combine the two features to obtain a fused feature representation, and then combine it with the original hyperedge embedding to obtain a fused feature representation sequence;

[0025] Step 5: Learn the fused feature representation sequence again to capture the complex semantic information in the two features to obtain an updated feature sequence;

[0026] Step 6: Finally, mask the learned feature sequence to perform the link prediction task;

[0027] Then, the data with hyper-relational facts are processed with respect to step 1. First, all entities and relations are extracted, and a dictionary containing all entities and relations is generated. Next, the embedding vectors for each entity and relation are initialized using this dictionary and the relationship chains in the original data. Using these embedding vectors, two graph structures can be further constructed, one is a knowledge graph containing only ordinary triple information, and the other is a hypergraph containing hyper-relational information. The ordinary triple knowledge graph reflects the direct relationship between entities, while the hypergraph can represent complex patterns involving multiple entities and multiple relations. In the hypergraph, the hyperedge is a core concept that represents a hyper-relational fact. Specifically, a hyperedge is a hyper-relational fact embedding that connects multiple entities and describes the complex relationships between these entities. Finally, the ordinary triple fact embedding and hyper-relational fact embedding required by the present invention will be obtained;

[0028] Furthermore, for step 2, a common triple fact learning layer is constructed to capture the common triple fact feature representation. The triple fact embedding is learned using a convolutional neural network (CNN) to capture the triple feature vector;

[0029] Furthermore, for step 3, a hyper-relational fact learning layer is constructed to capture the feature representation of hyper-relational facts. The hyper-relational entity embedding and hyper-edge embedding are combined using heterogeneous graph neural network (HGNN) to obtain the hyper-relational feature vector;

[0030] Furthermore, for step 4, a correlation perception module is constructed to capture the fused feature sequence. The ordinary triple feature vector is combined with the hyper-relation feature vector, and the two-layer graph attention network is used to fuse it with the original hyper-edge embedding to obtain the fused feature representation sequence;

[0031] Then, for step 5, in order to capture a more comprehensive and specific feature sequence, a semantic enhancement module is constructed. The Transformer method is used to learn the fusion feature representation sequence to obtain the updated feature sequence;

[0032] Then, for step 6, each element in the updated feature sequence is masked in turn and sent to the MLP network to obtain the final prediction result. Finally, the common link prediction evaluation indicators MRR, Hits@1, Hits@5, and Hits@10 are used to evaluate the model performance.

[0033] Beneficial effects of the present invention:

[0034] Compared with the prior art, the knowledge graph completion system and method for reducing the internal noise of super relations described in the present invention solves the problem that the previous technology cannot effectively eliminate the irrelevant noise brought by qualifiers to the main triples; the present invention uses a multi-layer network structure to reduce the noise brought by qualifiers to the main triples; and it can not only effectively process super-relation facts, but also process ordinary triple facts on this basis, so that the present invention can effectively learn the complex and diverse information in the two feature representations; the knowledge graph completion system and method for reducing the internal noise of super relations described in the present invention perform well in the actual application of knowledge graph completion, and have a certain robustness to feature enhancement; the present invention can accurately reduce the noise problem within the super relation and demonstrate good performance in the knowledge graph completion task. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more accurately illustrate the overall implementation scheme of the present invention, the following will be combined with the accompanying drawings and specific implementation methods to describe in detail a knowledge graph completion system and method for reducing super-relation internal noise of the present invention. It can be seen that the following drawings are only descriptions of the implementation scheme of the present invention. For technicians of this research method, other drawings can be obtained based on the following drawings without creative labor. Among them:

[0036] Figure 1 The overall flow chart of the invention is as follows;

[0037] Figure 2 It is the overall framework diagram of the present invention;

[0038] Figure 3 This is a flow chart of the feature enhancement module of the present invention;

[0039] Figure 4 This is a flow chart of the correlation perception module of the present invention;

[0040] Figure 5 This is a flow chart of the semantic enhancement module of the present invention;

[0041] Figure 6 This is a feature enhancement analysis diagram of the present invention. DETAILED DESCRIPTION

[0042] In order to clearly illustrate the technical solution and purpose of the present invention, the present invention will be further described and explained in conjunction with the accompanying drawings and the following embodiments. It should be understood that the specific embodiments of the present invention are only used to explain the present invention and do not limit the present invention.

[0043] The following will refer to the attached Figure 1-6 The specific implementation steps of a knowledge graph completion system and method for reducing super-relation internal noise of the present invention are described in more detail.

[0044] Figure 1It is the overall flow chart of the present invention, which is divided into five steps:

[0045] Step 1 first processes the data with super-relational facts to obtain the super-relational fact embedding and the common triple fact embedding required by the present invention;

[0046] Step 2 uses two embedding vectors to learn its feature representation. Specifically, convolutional neural network and heterogeneous graph neural network are used to process ordinary triple fact embedding and super relation fact embedding respectively, and finally construct feature representation based on these two embeddings;

[0047] Step 3 fuses the two feature representations and combines them with hyperedge embedding to learn the fused feature sequence using the graph attention network;

[0048] Step 4 finally learns the complex semantic information in the fusion features to construct the final prediction sequence;

[0049] Step 5 uses the final semantic sequence to perform link prediction tasks to evaluate the performance of the final method.

[0050] In view of the above implementation steps, the present invention is proposed, a knowledge graph completion method that reduces the internal noise of super relations, Figure 2 It is the overall model framework, which includes the construction of three main modules:

[0051] Module 1: Construction of feature enhancement module;

[0052] Module 2: Construction of relevance perception module;

[0053] Module 3: Construction of semantic enhancement module;

[0054] For module 1, it is mainly used to construct common triple feature representation and super relation feature representation, so this module will be divided into common triple feature learning layer and super relation feature learning layer. The specific process is as follows Figure 3 shown.

[0055] The specific implementation steps of the common triple feature learning layer are as follows:

[0056] Step 1: Data Preprocessing

[0057] First, the triple (h, r, t) is initialized as an embedding vector Here d represents the embedding dimension. The initialized embedding vector contains the potential information of entities and relations in the triple.

[0058] Step 2: Convolution operation

[0059] The initialized embedding vector is fed into the 3×3 convolution filter to extract the correlation between the head entity, relation and tail entity. And the convolution operation slides on the embedding vector to extract a series of local features, thereby constructing a feature map. Each position in the feature map represents a local feature in the input.

[0060] Step 3: Feature invariance operation

[0061] Flatten the feature map into a feature vector through pooling operation This feature vector contains the comprehensive representation of the head entity, relation, and tail entity in the triple.

[0062] The specific implementation steps of the super-relation feature learning layer are as follows:

[0063] Step 1: Data Preprocessing

[0064] First, the entities in the hyperrelational fact are initialized as node embeddings N 0 =(n v1 ......n vm ), since a hypergraph can be represented as G = (ε, E, W), where ε is the entity set, E is the hyperedge set, and W is the edge weight. A hyperrelational fact can be defined as:

[0065]

[0066] Where h represents the head entity, r represents the relationship, t represents the tail entity, and q ri represents the i-th qualifier relation, q ei represents the i-th qualifier entity, m represents the number of qualifiers, and R represents the relationship set.

[0067] Therefore, the hypergraph on the hyperrelation can be represented as G H =(ε H ,E H ,W H ), which contains the entity set ε H , hyperedge set E H and the hyperedge weight matrix W H , for W H Each element in can be expressed as:

[0068]

[0069] where v∈ε H , e∈E H , so the hypergraph is initialized as a hyperedge embedding In this way, we construct a hyperedge cluster W H Together with the node embedding, it serves as the input of this layer.

[0070] Step 2: Learning entity feature representation

[0071] Embed the nodes into N 0 With hyperedge embedding h ei It is sent into HGNN to construct the message passing of each layer, which is expressed as:

[0072] N (L+1) =N (L) +σ(WN (L) Θ (L+1) +b (L+1) ) (Formula 3)

[0073] Among them, N (L+1) represents the message passing of layer L+1, It is a learnable parameter used to perform matrix transformation on node embedding. is the bias, σ is the nonlinear activation function, and W is the weight matrix of the hyperedge cluster, which can be expressed as:

[0074]

[0075] here, represents the diagonal matrix of node degrees, It represents the diagonal matrix of hyperedge degree, which is expressed as follows:

[0076]

[0077] Step 3: Constructing hyper-relational fact feature representation

[0078] The output N of the Lth layer of HGNN L The final entity representation is obtained by merging with the input, and then combined with the relationship to construct a super-relational fact feature representation. Finally, the common triple feature representation is combined with the super-relation feature representation to obtain the fusion feature representation X = X i +X j .

[0079] For module 2, it is mainly used to construct a fusion feature sequence. The specific process is as follows: Figure 4 As shown. It uses the graph attention network GATv2 to update the hyperedge and fusion feature representation, so that the present invention can capture a more comprehensive feature sequence. The specific steps are as follows:

[0080] Step 1: Update hyperedge embedding

[0081] Since the two feature representations are fused, the hyperedge embedding is not enough to express the existing feature representation. Therefore, the fused feature representation and the hyperedge embedding are sent to the graph attention network to calculate the attention between the feature and the hyperedge. In this way, the hyperedge embedding is updated to adapt to the existing feature representation. The updated hyperedge representation is as follows:

[0082]

[0083] Among them, σ is the linear activation function, W is the weight matrix, and α ik Then it is feature x i For the hyperedge e j The attention is expressed as:

[0084]

[0085] in, represents the hyperedge embedding, Represents feature embedding.

[0086] Step 2: Update feature representation

[0087] The above process can obtain the updated hyperedge embedding. In order to capture the two feature representations more accurately, the updated hyperedge embedding is combined with the feature representation again and sent to the graph attention network to learn the updated fusion feature representation, which is expressed as follows:

[0088]

[0089] Similarly, σ is a linear activation function, W is a weight matrix, and β ik Then it is the updated hyperedge embedding For feature x j The attention is expressed as:

[0090]

[0091] Step 3: Construct fusion feature sequence

[0092] The above steps will obtain the feature representation of all fused features, which will be integrated to construct a fused feature sequence By integrating these two features, we can more comprehensively and accurately capture the complex semantic information within the knowledge graph in the next task, thereby improving our understanding of the knowledge graph.

[0093] Module 3 is mainly used to learn the complex semantic information in the two sequences to update the fusion feature sequence. The specific process is as follows: Figure 5 As shown. It mainly uses the Transformer method to calculate the importance between every two elements in all sequences. The specific steps are as follows.

[0094] Step 1: Learning to fuse feature sequences

[0095] First, the fused feature sequence is input into the Transformer to calculate the importance between every two elements in the fused feature sequence, thereby constructing an updated semantic feature sequence, which is expressed as follows:

[0096]

[0097] in, and are the weight and bias of the value, respectively, ik The importance between each two elements in the fusion feature is expressed as follows:

[0098]

[0099] Where d is the embedding dimension, are the weights of the query and key, is the bias of query and key. In summary, the learned fusion feature sequence is

[0100] Step 2: Construct the prediction sequence

[0101] The updated fused feature sequence is masked with the [MASK] label to predict the masked part, thereby improving the generalization ability of the model. Finally, an MLP network is used to predict each masked element. In order to make the model more efficient in calculating the loss, the cross entropy loss function is used, and the AdamW optimizer is used to minimize the loss. The final loss is calculated as:

[0102]

[0103] Among them, y t is the entry of the tth target label, p t is the probability distribution of the predicted t-th entry, which is expressed as follows:

[0104]

[0105] Among them, K is the initial element embedding matrix, which can complete the corresponding entities or relationships according to the missing element types, thereby constructing the final prediction sequence.

[0106] Combining the above three modules, a knowledge graph completion method that reduces the internal noise of hyper-relationships is constructed. In order to test the effectiveness of this model, a link prediction task is performed on it. For the link prediction task in the hyper-relationship knowledge graph, the entity or relationship is masked during prediction to predict the masked part. Due to the complex form of hyper-relationships, it is necessary to predict not only the information in the main triple but also the information in the qualifier during the prediction stage. This allows the missing object to be predicted by the elements in the main triple.

[0107] (?,r,t,q r ,q e ) or (h,?,t,q r ,q e ), and can also be an element in the qualifier (h, r, t, ?, q e ) or (h,r,t,q r ,? ). In order to measure the prediction results, the commonly used evaluation indicators of link prediction are used, including the average reciprocal ranking MRR, the average proportion of Hits@1 with a ranking less than or equal to 1, the average proportion of Hits@5 with a ranking less than or equal to 5, and the average proportion of Hits@10 with a ranking less than or equal to 10. Their calculation formulas are as follows:

[0108]

[0109] Among them, |S| represents the number of facts; for the value of n in Hits@n, it is n={1,5,10}, where Ⅱ is the indicator function, when Ⅱ(rank i ≤n) takes 1 when the condition is met, and takes 0 when it is not met; rank i Represents the connection prediction ranking of the i-th super relation, rank |S| It represents the connection prediction ranking of the Sth super relation.

[0110] Example 1

[0111] In the embodiment, a knowledge graph completion method for reducing internal noise of a hyper-relationship in the present invention is applied to three existing hyper-relationship knowledge graph datasets for training and prediction. They are JF17k, Wikipeople and WD50K. First of all, each of these three datasets has different characteristics and scales. As a subset of Freebase, JF17K contains relatively few entity and relationship types, but it is enough to reflect the complexity of the hyper-relationship knowledge graph. Wikipeople comes from the human type dataset Wikidata. Although the number of entity and relationship types it contains is less than the number of entities in JF17K, the relationship type is more focused on human-related knowledge. WD50K is a high-quality and large-scale hyper-relationship dataset, and its rich hyper-relationship facts provide greater challenges and opportunities for knowledge graph completion. During the training process, the model showed good robustness and was able to maintain consistent hyperparameter settings on different datasets. By setting the number of training iterations to 300 rounds, the batch size to 512, the learning rate to 5e-4, the embedding dimension to 256, and the number of attention heads to 4, the model can effectively learn from the data and capture complex patterns in the hyper-relationship knowledge graph. In addition, the AdamW optimizer is used to update the model parameters, which further improves the stability and efficiency of training. In the prediction stage, the model has achieved advanced performance on all three datasets. Whether on JF17K, Wikipeople or WD50K, the model can accurately predict hyper-relational facts on the test set, proving its generalization ability on hyper-relational knowledge graphs of different scales and complexities. It is particularly worth mentioning that on the high-quality and large-scale WD50K dataset, the model can still maintain high performance, which further verifies its effectiveness in practical applications.

[0112] Example 2

[0113] In Example 2, in order to verify that the present invention can effectively and accurately reduce the noise problem within the super relation, a feature enhancement analysis experiment was conducted. Figure 6As shown in the figure, when processing the Wikipeople dataset, this dataset contains a large number of hyper-relational facts. As the amount of data increases, it can be found that the MRR (mean reciprocal rank) for the main triple entity shows a continuous upward trend and eventually surpasses the MRR value of all entities. In contrast, when predicting all entities, the growth of MRR is relatively slow, and even decreases in some cases. This phenomenon shows that the prediction performance of the main triple entity has been significantly improved in the hyper-relation-rich dataset. However, when predicting the JF17K dataset, the situation is different. This dataset contains relatively few hyper-relational facts. Here, it can be found that the MRR of all entities has not decreased due to the increase in data volume, but is ultimately higher than the prediction of the main triple. This shows that in the dataset with sparse hyper-relationships, the prediction performance of the main triple entity is not always better than the prediction of the overall entity. This difference may be related to the triple feature embedding added by this model. However, the final overall prediction performance is not greatly affected. This proves that this model has successfully found a balance point, which can not only eliminate the noise brought by the qualifier to the main triple, but also retain the beneficial effects brought by the qualifier. Therefore, when predicting the main triples, the model can effectively reduce the potential impact of the qualifier, thereby improving the accuracy of the prediction. This also shows that the present invention has a certain robustness for feature enhancement.

[0114] The present invention discloses a knowledge graph completion system and method for reducing super-relation internal noise, which belongs to the field of natural language processing knowledge graph technology. First, ordinary triple facts and super-relation facts are processed separately, and a feature enhancement module is constructed using convolutional neural networks and heterogeneous graph neural networks; this module can effectively learn and enhance the feature representation of the main triples in the super-relation, thereby improving the model's understanding and processing capabilities of super-relation knowledge; secondly, in order to more effectively combine the two sequence representations, a correlation perception module is constructed, and the graph attention network is used to process the complex graph structure in the two representations, so as to construct a fused feature sequence; thereafter, in order to effectively capture the complex semantic information in the fused feature sequence, a semantic enhancement module is constructed, and the Transformer is used to process the correlation between the two elements in the sequence, so as to update the fused feature sequence; finally, the updated feature sequence is masked to predict the result of the final masked element. Therefore, the present invention can effectively reduce the internal noise of the super-relation and solve the task of super-relation knowledge graph completion.

[0115] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical solutions and inventive concepts of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A knowledge graph completion system for reducing super-relation internal noise, characterized in that: Based on the hyper-relational knowledge graph data, a knowledge graph of common triple facts and a hyper-relational fact hyper-graph are constructed; it includes the following three modules: Module 1: Feature enhancement module, which is composed of the constructed common triple feature representation layer and super relation feature representation layer, learns the common triple fact feature representation and super relation fact feature representation, so as to use the common triple feature to reduce the noise brought by the qualifier in the super relation to the main triple; Module 2: Relevance perception module, which is composed of the above-mentioned ordinary triple feature representation layer and super-relation feature representation layer, combined with the hypergraph, to learn the fusion feature sequence of the two feature representations; Module 3: Semantic enhancement module, which uses the fused feature sequence to learn its complex semantic information and enhance the fused feature sequence to construct the final semantic sequence; According to the hyper-relational knowledge graph link prediction task, each element in the final semantic sequence is masked with the [MASK] label to predict the masked part; the prediction results are finally sorted, and the commonly used evaluation indicators for link prediction, such as average reciprocal ranking MRR, average proportion Hits@1 of ranking less than or equal to 1, average proportion Hits@5 of ranking less than or equal to 5, and average proportion Hits@10 of ranking less than or equal to 10, are used as evaluation indicators.

2. A knowledge graph completion system for reducing super-relation internal noise according to claim 1, characterized in that: For module one, convolutional neural networks and heterogeneous graph neural networks are used to capture both ordinary triple feature representations and hyper-relation feature representations.

3. A knowledge graph completion system for reducing super-relation internal noise according to claim 1, characterized in that: For module 2, a graph attention neural network is used to combine the two feature representations to construct a fused feature representation sequence.

4. A knowledge graph completion system for reducing super-relation internal noise according to claim 1, characterized in that: For module three, Transformer is used to learn the fusion features to represent the complex semantic information in the sequence.

5. A knowledge graph completion system for reducing super-relation internal noise according to claim 1, characterized in that: For the final prediction, an MLP network is used to predict the results of the masked elements.

6. A knowledge graph completion system for reducing super-relation internal noise according to claim 1, characterized in that: The final results are sorted using the evaluation indicators MRR, Hits@1, Hits@5, and Hits@10, which are specifically expressed as follows: Among them, |S| represents the number of facts; for the value of n in Hits@n, it is n={1,5,10}, where Ⅱ is the indicator function, when Ⅱ(rank i ≤n) takes 1 when the condition is met, and takes 0 when it is not met; rank i Represents the connection prediction ranking of the i-th super relation, rank |S| represents the predicted ranking of the connection of the S-th super relation.

7. A knowledge graph completion method for reducing super-relation internal noise, characterized in that: Here are the steps: S1. Preprocess the data, use the data set with hyper-relation facts, filter the entity embedding and relation embedding, and construct the knowledge graph based on ordinary triples and the hypergraph based on hyper-relation; S2, captures common triple fact feature representation; S3, capturing the feature representation of super-relational facts; S4, combining the two features to obtain a fused feature representation, and then combining it with the original hyperedge embedding to obtain a fused feature representation sequence; S5, learning the fusion feature representation sequence again, capturing the complex semantic information in the two features to obtain an updated feature sequence; S6. Finally, the learned feature sequence is masked to perform the link prediction task.

8. A knowledge graph completion method for reducing super-relation internal noise based on claim 7, characterized in that: For step S1, firstly, entities and associations are extracted according to the hyper-relational knowledge graph data to form a dictionary, which includes entities and relations; then, each entity and association is initialized according to the association between the dictionary and the original data; on this basis, a knowledge graph containing only ordinary triple information and a hypergraph containing hyper-relation are constructed; finally, ordinary triple fact embedding and hyper-relation fact embedding are constructed according to the two graph structures.

9. A knowledge graph completion method for reducing super-relation internal noise based on claim 7, characterized in that: For step S2, a common triple fact learning layer is constructed to capture the common triple fact feature representation; a convolutional neural network is used to learn triple fact embedding to capture the triple feature representation; for step S3, a super relation fact learning layer is constructed to capture the super relation fact feature representation; Heterogeneous graph neural networks are used to combine entity embedding and hyper-edge embedding in hyper-relationships to obtain hyper-relationship feature representation.

10. A knowledge graph completion method for reducing super-relation internal noise based on claim 7, characterized in that: For step S4, a correlation perception module is constructed to capture the fused feature sequence; the ordinary triple feature representation is combined with the hyper-relation feature representation, and the double-layer graph attention network is used to fuse it with the original hyper-edge embedding to obtain the fused feature representation sequence; for step S5, a semantic enhancement module is constructed to capture a more comprehensive and specific feature sequence; the Transformer method is used to learn the fused feature representation sequence to obtain the updated feature sequence; for step S6, each element in the updated feature sequence is masked in turn and sent to the MLP network to obtain the final prediction result; finally, the common link prediction evaluation indicators MRR, Hits@1, Hits@5, and Hits@10 are used to evaluate the model performance.

Citation Information

Cited By

  • Hypergraph representation learning method and device based on heteromorphism adaptive position coding

    CN120951075A