Knowledge graph entity alignment method fusing relation completion and mismatching detection
Through the method of relationship completion and mismatch detection, combined with the graph convolution network and the relationship perception attention aggregation layer, the problem of failure to fully consider structural information differences and relationship information in the existing technology is solved, and more accurate entity alignment is achieved and consistency improves the reliability of solid embedding quality and alignment results.
Patent Information
- Application Number
- CN202411217364.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2025-01-07
AI Technical Summary
The existing entity alignment methods fail to fully consider the differences in knowledge graph structure information, ignore the important role of relationships and description information on entity alignment, and fail to effectively identify mismatched entities, resulting in misjudgment and inaccuracy of the alignment results.
Using the method of relationship completion and mismatch detection, the knowledge graph relationship is completed through AMIE+ mining Hall rules and inverse reasoning rules, and using graph convolution networks and fully connected layers to learn structures and relationship vectors, combined with relational perception attention aggregation layer to learn Entity text vectors, and entity similarity is calculated by Euclidean distance and Jaro-Winkler distance, identify and filter unmatched entities, and finally generate accurate entity alignment results.
Improve the accuracy and consistency of entity alignment, improve the quality of entity embedding by completing structural information and utilizing relational constraints, identify and deal with unmatched entities, avoid mismatch, and enhance the reliability of alignment results.
Smart Images

Figure CN119272860A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of natural language processing, and in particular relates to a knowledge graph entity alignment method that integrates relationship completion and mismatch detection. Background Art
[0002] Knowledge graphs usually come from multiple heterogeneous data sources. Different data sources may contain different fragments of information about the same entity. Therefore, the information about the same entity in different knowledge graphs is complementary. Through entity alignment, these fragments can be integrated to form a more complete and comprehensive entity representation. In addition, in multiple knowledge graphs, the same entity may have duplicate information. Entity alignment can identify and merge these duplicate entities, eliminate redundancy, and ensure the consistency and accuracy of the knowledge graph. However, existing entity alignment methods have the following problems:
[0003] (1) Failure to fully consider the differences in structural information between knowledge graphs. For example, Figure 1 The two knowledge graphs to be aligned in show the characteristics of structural heterogeneity. Due to the asymmetric relationship between the two knowledge graphs, it is easy to mistakenly believe that the entity "Liu Chan" in KG1 is equivalent to the entity "Liu Yao" in KG2. One of the reasons for this misjudgment is that they share the same neighbor entities "Mrs. Gan" and "Liu Bei".
[0004] (2) Ignoring the important role of relational and descriptive information in entity alignment. When learning the vector representation of entities, the relational semantics is not considered and the descriptive information of the entities is not fully mined. In addition, the influence of relational constraints in the process of learning entity description embedding is ignored.
[0005] (3) Failure to identify mismatched entities: Assuming that all entities to be aligned can find corresponding matches, incorrect correspondences may appear in the entity alignment results, affecting the accuracy of entity alignment.
[0006] Zeng Weixin et al.'s paper: Entity alignment for the open world: an unsupervised approach. The steps of this technical solution are as follows: first, the information contained in the entity name is mined from the semantic and string levels; then, the unmatched entities are filtered out and preliminary alignment results are generated. These preliminary results are regarded as pseudo-labeled data and passed to the progressive learning framework to generate structural representations; finally, the progressive learning framework enriches the pseudo-labeled data by utilizing the alignment results of the previous round. However, this method still has some limitations: it cannot effectively deal with the alignment of knowledge graph entities with asymmetric structures; it does not consider the important role of relational information in distinguishing misaligned entities; when learning text vector representations, it does not consider entity description information, and ignores the impact of relational constraints on entity description embedding. Summary of the invention
[0007] The present invention aims to solve the above problems existing in the prior art and provide a knowledge graph entity alignment method integrating relationship completion and mismatch detection.
[0008] The technical solution of the present invention is: a knowledge graph entity alignment method integrating relationship completion and mismatch detection, taking the knowledge graph to be aligned as input, and performing the following steps:
[0009] Step 1. Relationship completion
[0010] Step 1.1 Use the association rule mining algorithm AMIE+ to mine Hall rules from the knowledge graph;
[0011] Step 1.2: Use inverse reasoning rules and inverse rules to enhance the rules, filter the rules based on partial completeness assumptions, and then complete the missing relationships in the knowledge graph;
[0012] Step 2. Vector encoding
[0013] Step 2.1 Use graph convolutional network to learn the structure vector H of knowledge graph s ;
[0014] Step 2.2 Use the fully connected layer to learn the relationship vector H of the knowledge graph r ;
[0015] Step 2.3 Use the relation-aware attention aggregation layer to learn the text vector H of the entity t ;
[0016] Step 2.4: The obtained structure vector H s , relationship vector H r and the text vector H t Perform vector concatenation to obtain the entity joint vector H j ;
[0017] Step 3. Entity alignment
[0018] Step 3.1 Based on the entity joint vector H j The similarity between the source entity and all target entities is ranked by using the Euclidean distance and the embedding-based entity similarity. The entity ranked first is considered as the alignment entity to obtain the preliminary entity alignment result.
[0019] Step 3.2 predicts unmatched entities;
[0020] Step 3.3 filters out unmatched entities in the preliminary entity alignment results to obtain the final entity alignment results.
[0021] The step 2.1 is to aggregate the information of neighbor nodes through the layer-by-layer convolution operation of the graph convolutional network. The structure vector output by the lth layer is expressed as:
[0022]
[0023] in, is the adjacency matrix, I is the identity matrix; yes The diagonal node degree matrix of W; σ(·) is the ReLU function; W (l) is the weight matrix;
[0024] The relationship vector of step 2.2 is expressed as:
[0025]
[0026] in, is the ReLU function; W r is the weight parameter; X r Represents relationship characteristics; b r is the bias parameter;
[0027] In step 2.3, the entity name and entity description are first concatenated into a word sequence, and then the word sequence is converted into a word embedding sequence using FastText. The text vector calculation formula of the entity is as follows:
[0028]
[0029] Where k is the length of the word sequence; v is the parameter used to calculate the attention score; δ(·) is the tanh function; W1 is the weight parameter; Z r is the attention parameter related to the relation; w e,i is the embedding of the i-th word in the description of entity e; [;] is the vector concatenation operation; b1 is the bias parameter;
[0030] The step 3.1 is based on the entity joint vector H j And Euclidean distance, calculate the similarity of entities based on embedding, which uses Euclidean distance to calculate the distance between two entities in the vector space, thereby calculating the similarity based on embedding; in n-dimensional space, the calculation formula of Euclidean distance is as follows:
[0031]
[0032] Among them, p and q are the n-dimensional feature vectors of the two entities;
[0033] The step 3.2 is to fuse the embedding-based entity similarity and the string-based entity similarity. If the fused entity similarity is higher than the set threshold, it is an entity that can be matched, otherwise it is an unmatched entity. The string-based entity similarity uses the Jaro-Winkler distance to measure the similarity between entity name strings.
[0034] Further, the model is trained using a margin-based loss function, wherein the loss function is as follows:
[0035]
[0036] Among them, γ is the margin parameter, which represents the margin between positive examples and negative examples; L' represents the negative example set of L, using nearest neighbor negative sampling.
[0037] Compared with the prior art, the present invention has the following advantages:
[0038] (1) By completing the missing relationships in the knowledge graph, the negative impact of the structural differences in the knowledge graph is reduced, making the structure of the knowledge graph more complete and consistent, thereby improving the accuracy of entity alignment.
[0039] (2) It combines structural representation, relation representation, and text representation based on relation-specific constraints to improve the quality of entity embedding.
[0040] (3) Entity alignment in open world scenes is considered. By identifying and processing unmatched entities, mismatches that may be caused by forced alignment are avoided, thereby improving the accuracy and reliability of the alignment results. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a schematic diagram of the existing knowledge graphs KG1 and KG2.
[0042] Figure 2 is a flow chart of an embodiment of the present invention.
[0043] Figure 3 It is a model structure diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to better understand the present invention, some relevant knowledge and its definitions used in the embodiments of the present invention are explained as follows:
[0045] (1) Knowledge graph: Knowledge graph is a general description framework for formalized semantic knowledge, which is used to describe entities, relationships and attributes.
[0046] (2) Entity: An entity refers to things or objects in the objective world.
[0047] (3) Entity alignment: Entity alignment refers to linking equivalent entities from different knowledge graphs to establish semantic associations between equivalent entities.
[0048] (4) Graph Convolutional Network: Graph Convolutional Network is an extension of Convolutional Neural Network and is used to process graph data.
[0049] (5) Embedding: Embedding refers to the process of mapping high-dimensional data representation into a low-dimensional continuous vector space.
[0050] (6) Attention: Attention in deep learning simulates the attention allocation process in human vision and perception, allowing the model to selectively focus on specific parts of the input data.
[0051] (7) Euclidean distance: Euclidean distance is also called Euclidean distance. It is calculated by subtracting all corresponding elements of two vectors, adding the squares of the differences, and finally taking the square root.
[0052] (8) Loss function: The loss function is a function used to measure the difference or error between the model's predicted value and the true value.
[0053] A knowledge graph entity alignment method integrating relationship completion and mismatch detection provided by an embodiment of the present invention is described in detail below. The knowledge graph to be aligned is used as input. Figure 2 , Figure 3 As shown, follow the steps below:
[0054] Step 1. Relationship completion: Complete the missing relationships in the knowledge graph to make the structures of the two knowledge graphs symmetrical, thereby providing a more comprehensive and accurate data foundation and reducing the negative impact of differences in structural information. The specific steps are as follows:
[0055] Step 1.1 Use AMIE+ to mine Horn rules from the knowledge graph;
[0056] Step 1.2: Use inverse reasoning rules and inverse rules to enhance the rules, filter the rules based on partial completeness assumptions, and complete the missing relationships in the knowledge graph through logical rules;
[0057] Examples of reverse reasoning rules:
[0058] For the rules By reverse reasoning, we can get the following rules:
[0059] For the rules The inverse rule is:
[0060] Rule filtering:
[0061] In order to avoid introducing too much noise, the present invention scores the rules through the Partial Completeness Assumption (PCA) and filters all the rules whose scores are less than a set threshold (proposed to be set to 0.01).
[0062] Step 2. Vector encoding: The core task is to encode the structure, relationship and text information into vector representations and fuse these information to generate a joint vector of entities. The specific steps are as follows:
[0063] Step 2.1 Use graph convolutional network to learn the structure vector H of knowledge graph s ;
[0064] It uses the graph convolutional network (GCN) to learn the topological structure information of the knowledge graph; the information of neighbor nodes is aggregated through the layer-by-layer convolution operation of the graph convolutional network, and the structure vector output by the lth layer is expressed as:
[0065]
[0066] in, is the adjacency matrix, I is the identity matrix; yes The diagonal node degree matrix of W; σ(·) is the ReLU function; W (l) is the weight matrix;
[0067] Step 2.2 Use the fully connected layer to learn the relationship vector H of the knowledge graph r , relationship vector H r It is expressed as:
[0068]
[0069] in, is the ReLU function; W r is the weight parameter; X r Represents relationship characteristics; b r is the bias parameter;
[0070] Step 2.3 Use the relation-aware attention aggregation layer to learn the text vector H of the entity t ;
[0071] First, the entity name and entity description are concatenated into a word sequence, and then FastText is used to convert the word sequence into a word embedding sequence. Through the relationship-aware attention aggregation layer, in the entity description text, words related to the relationship will be assigned more attention, while words unrelated to the relationship will be assigned less attention. The text vector calculation formula of the entity is as follows:
[0072]
[0073] Where k is the length of the word sequence; v is the parameter used to calculate the attention score; δ(·) is the tanh function; W1 is the weight parameter; Z r is the attention parameter related to the relation; we,i is the embedding of the i-th word in the description of entity e; [;] is the vector concatenation operation; b1 is the bias parameter;
[0074] Step 2.4: The obtained structure vector H s , relationship vector H r and the text vector H t Perform vector concatenation to obtain the entity joint vector H j ;
[0075] Step 3. Entity alignment
[0076] Step 3.1 First, based on the entity joint vector H j and Euclidean distance, calculate the entity similarity based on embedding, the present invention is based on the entity joint vector H j , is to use Euclidean distance to calculate the distance between two entities in the vector space, thereby calculating the similarity based on embedding; in n-dimensional space, the calculation formula of Euclidean distance is as follows:
[0077]
[0078] Among them, p and q are the n-dimensional feature vectors of the two entities;
[0079] Then, the similarities between the test source entity and all target entities are ranked, and the entity ranked first is regarded as the alignment entity to obtain the preliminary entity alignment result;
[0080] Step 3.2 predicts unmatched entities;
[0081] In the two knowledge graphs to be aligned, there may be some entities that cannot be aligned. The present invention identifies these entities that cannot be aligned based on similarity measurement. Specifically, the entity similarity based on embedding and the entity similarity based on string are fused. If the fused entity similarity is higher than the set threshold, it is an entity that can be matched, otherwise it is an unmatched entity; the entity similarity based on string uses the Jaro-Winkler distance to measure the similarity between entity name strings.
[0082] Step 3.3: Filter out the unmatched entities in the preliminary entity alignment results to obtain the final entity alignment results;
[0083] Step 4. Train the model using a margin-based loss function, which is as follows:
[0084]
[0085] Wherein, γ is a margin parameter, representing the margin between positive examples and negative examples; L' represents the negative example set of L. The present invention adopts nearest neighbor negative sampling, which can limit the candidate set to a certain range, thereby better controlling the quality of negative examples.
Claims
1. A knowledge graph entity alignment method integrating relation completion and mismatch detection, taking the knowledge graph to be aligned as input, characterized in that Follow these steps: Step 1. Relationship completion Step 1.1 Use the association rule mining algorithm AMIE+ to mine Hall rules from the knowledge graph; Step 1.2: Use inverse reasoning rules and inverse rules to enhance the rules, filter the rules based on partial completeness assumptions, and then complete the missing relationships in the knowledge graph; Step 2. Vector encoding Step 2.1 Use graph convolutional network to learn the structure vector H of knowledge graph s ; Step 2.2 Use the fully connected layer to learn the relationship vector H of the knowledge graph r ; Step 2.3 Use the relation-aware attention aggregation layer to learn the text vector H of the entity t ; Step 2.4: The obtained structure vector H s , relationship vector H r and the text vector H t Perform vector concatenation to obtain the entity joint vector H j ; Step 3. Entity alignment Step 3.1 Based on the entity joint vector H j The similarity between the source entity and all target entities is ranked by using the Euclidean distance and the embedding-based entity similarity. The entity ranked first is considered as the alignment entity to obtain the preliminary entity alignment result. Step 3.2 predicts unmatched entities; Step 3.3 filters out unmatched entities in the preliminary entity alignment results to obtain the final entity alignment results.
2. The knowledge graph entity alignment method integrating relationship completion and mismatch detection according to claim 1 is characterized by: The step 2.1 is to aggregate the information of neighbor nodes through the layer-by-layer convolution operation of the graph convolutional network. The structure vector output by the lth layer is expressed as: in, is the adjacency matrix, I is the identity matrix; yes The diagonal node degree matrix of W; σ(·) is the ReLU function; W (l) is the weight matrix; The relationship vector of step 2.2 is expressed as: in, is the ReLU function; W r is the weight parameter; X r Represents relationship characteristics; b r is the bias parameter; The step 2.3 is to first concatenate the entity name and entity description into a word sequence, and then use FastText to convert the word sequence into a word embedding sequence. The text vector calculation formula of the entity is as follows: Where k is the length of the word sequence; v is the parameter used to calculate the attention score; δ(·) is the tanh function; W1 is the weight parameter; Z r is the attention parameter related to the relation; w e,i is the embedding of the i-th word in the description of entity e; [;] is the vector concatenation operation; b1 is the bias parameter.
3. The knowledge graph entity alignment method integrating relationship completion and mismatch detection according to claim 2 is characterized by: The step 3.1 is based on the entity joint vector H j And Euclidean distance, calculate the similarity of entities based on embedding, which uses Euclidean distance to calculate the distance between two entities in the vector space, thereby calculating the similarity based on embedding; in n-dimensional space, the calculation formula of Euclidean distance is as follows: Among them, p and q are the n-dimensional feature vectors of the two entities.
4. The knowledge graph entity alignment method integrating relationship completion and mismatch detection according to claim 3 is characterized by: The step 3.2 is to fuse the embedding-based entity similarity and the string-based entity similarity. If the fused entity similarity is higher than the set threshold, it is an entity that can be matched, otherwise it is an unmatched entity. The string-based entity similarity uses the Jaro-Winkler distance to measure the similarity between entity name strings.
5. The knowledge graph entity alignment method integrating relationship completion and mismatch detection according to claim 4 is characterized by: It also includes training the model using a margin-based loss function, which is as follows: Among them, γ is the margin parameter, which represents the margin between positive examples and negative examples; L' represents the negative example set of L, using nearest neighbor negative sampling.
Citation Information
Cited By
Anti-noise entity alignment method based on multi-modal industrial chain supply chain knowledge graph
CN120541533A