Entity alignment and knowledge base normalization method based on synonymous embedding space
By adopting a synonymous embedding space-based method in the knowledge graph, combining GAT network and RotatE technology, multi-task joint learning and synonymous seed generation, the problem of poor knowledge base integration in the existing technology is solved, and efficient and accurate entity alignment and standardization are achieved.
Patent Information
- Application Number
- CN202510151806.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-03-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology lacks a deep collaborative optimization mechanism in terms of entity alignment of knowledge graphs and knowledge base standardization, resulting in limited knowledge base integration effect, especially in terms of semantic consistency and cross-border correlation.
Using a method based on synonymous embedding space, the synonymous relationship embedding space is defined by defining the shared synonymous relationship embedding space with GAT network and RotatE, combining multi-task joint learning and dynamic synonymous seed generation, and iteratively optimizing synonymous relationships to achieve synonymous optimization of CKB entity alignment and OKB normalization.
Improve the efficiency and accuracy of knowledge integration, generate synonymous entity representations with high consistency and matching across knowledge bases, and improve the accuracy of entity alignment and normalization.
Smart Images

Figure CN119599117A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for entity alignment and knowledge base normalization, and belongs to the technical field of entity alignment and knowledge base normalization. Background Art
[0002] Entity alignment refers to identifying and matching entities that represent the same concept or object in different data sources in a knowledge graph or knowledge base (OKB). It is a semantic-based entity matching technology that aims to determine whether entities in two or more knowledge bases are the same object by analyzing the characteristics, context, and semantic information of the entity, thereby achieving data integration and consistency across knowledge bases.
[0003] Knowledge base normalization refers to normalizing synonymous entities in different forms of expression in an open knowledge base and aggregating them into a standardized unique representation. By analyzing the semantic relationships and features of entities in an open knowledge base, synonymous or similar entities are identified and normalized to reduce data redundancy and improve the query consistency and accuracy of the knowledge base.
[0004] Synonymous embedding space refers to a representation method that focuses only on synonymous relations in the embedding space. By constructing such an embedding space, the model can represent entities with the same or similar meanings as close vectors, thereby classifying them as synonymous entities at the semantic level. The goal of the synonymous embedding space is to use the seed data of synonymous relations and the rotation embedding technology to enable the entity alignment task and the knowledge base normalization task to capture synonymous entities in a shared semantic space.
[0005] In the construction and application of knowledge graphs, CKB entity alignment and OKB normalization are two key tasks to achieve knowledge integration among multiple knowledge bases. CKB (Closed Knowledge Base) refers to a closed database, usually a knowledge base in a specific field, such as medicine and biology. CKB entity alignment is committed to identifying and aligning semantically identical entities in multiple knowledge bases to break information silos and achieve information sharing across knowledge bases; while the purpose of OKB normalization is to unify and normalize entity expressions from different sources to ensure the consistency and accuracy of data within the knowledge base. Although these two tasks are closely related in terms of goals, and can even improve the overall effect of knowledge integration by sharing information, most existing studies only propose solutions for a single task.
[0006] In existing methods, the tasks of CKB entity alignment and OKB normalization are usually handled separately, and only achieve preliminary integration through surface-level interaction, lacking a deep collaborative optimization mechanism. This approach makes it impossible to fully utilize the semantic association between the two, resulting in limited results in knowledge base integration, especially in terms of semantic consistency and cross-database relevance, where there is much room for improvement.
[0007] In addition, existing methods mostly rely on high-quality labeled data and manual rules. Once faced with data scarcity or new entity types, their performance will drop significantly, making it difficult to meet the development needs of dynamic knowledge graphs. Summary of the invention
[0008] In view of the deficiencies in the prior art, the present invention proposes an entity alignment and knowledge base normalization method based on synonymous embedding space, which effectively improves the efficiency of knowledge integration and the accuracy of entity alignment and normalization.
[0009] The entity alignment and knowledge base normalization method based on synonymous embedding space of the present invention comprises the following steps: (1) Define the GAT network; (2) Based on the GAT network defined in step (1) combined with RotatE, a shared synonymous relationship is initialized The embedding space of (3) Based on step (2), construct a synonymous relationship The embedding space of the system is optimized by using multi-task joint learning to iteratively train the CKB entity alignment task and the OKB (knowledge base) normalization task to optimize the synonymous embedding space. (4) CKB entity alignment and OKB normalization synonym seed generation; Based on step (3), the CKB entity alignment task and OKB normalization task are jointly trained to generate new synonym seeds and optimize synonym relationships. ; (5) Based on the new synonymous seeds generated in step (4), further refine the synonymous relationship constructed in step (2) based on RotatE training Embedding space, iteratively optimize synonymous relations ; (6) Synonymous relationship based on iterative optimization in step (5) , perform CKB entity alignment task and OKB normalization task.
[0010] The specific implementation process of step (1) is as follows: ①Construct a directed graph structure; Knowledge Base The triple represents the head entity , relation and tail entity , converting the triples into directed graph structures , which contains nodes (entities), directed edges (relationships) and relationship type information. The process is expressed as: , in, Represents the graph structure, is the set of nodes in the graph, Indicates entity nodes, Indicates the total number of entities; , is the set of directed edges of the graph, Represents the head node Through relationships Point to the tail node , head node and tail node It is the node representation of entities h and t in the graph structure; is the set of relationship types of the graph, Indicates Types of relationships, is the total number of different relationship types; ② Obtain the embedded representation of entities in the knowledge base; Directed Graph Nodes (entities) in The feature vector containing the embedding of each node is obtained by encoding the word vector model (such as Word2Vec) , the process is expressed as: ; in, represents the word vector model, Represents the first The embedding representation of each word; ③ Aggregate in-degree characteristics; For each in-degree neighbor node of the target node, the attention weights of the neighbor nodes are calculated, and the features of the neighbor nodes are weighted summed using these weights to obtain the aggregated feature representation of the target node; the aggregated features of the target node are activated to generate the final node feature representation. The process is expressed as:
[0011] in, Is a node The updated feature representation is represents the activation function, represents neighbor nodes, Representation Node The in-degree neighbor set of ; , is a learnable vector, Represents two dimensions as The space after the feature vectors are concatenated, represents the field of real numbers, Represents the dimension of the node feature vector; represents the vector concatenation operation, Representation Node Eigenvector, is a learnable weight matrix; The specific implementation process of step (2) is as follows: ① Randomly initialize a synonym relationship vector , used to represent the rotation transformation of synonymous relations; ② Initialize the synonymous seed set ; The initial synonym seed set contains annotated synonymous entity pairs. Indicates a synonymous relationship (Synonymous relations and synonymous relation vectors have the same meaning. The head entity of and tail entity , the process is expressed as: , in, Represents a pair of synonymous entities, satisfying the synonymous relationship ; ③Expansion of synonymous seed sets; On the basis of the annotated synonym seed set, the synonym seed set is further expanded through side information, and the entity pairs with high similarity are determined by the overlap of high IDF (a common statistical indicator for information retrieval, which represents the inverse document frequency and measures the importance of a word in a document set) terms, and high-confidence interpretation pairs are extracted from the PPDB database (a semantic-based interpretation pair database used to verify whether two entities or phrases have semantic similarity) to expand the initial synonym seed set. The process is expressed as: , in, represents the expanded set of synonymous seeds, A set of synonymous seeds representing side information; ④Define rotation transformation; For a synonym seed (entity pair), that is, the head entity and tail entity , first project the vectors of the head entity and the tail entity into the complex space, and then specify the head entity Through the relationship vector After the rotation, the tail entity is obtained , the process is expressed as: , in: Represents rotation operations on complex numbers; ⑤Construct training objectives and initialize synonym embedding space; The training objective is to make the distances of entity pairs with synonymous relationships close, while making the distances of entity pairs with non-synonymous relationships far apart. The process is expressed as:
[0012] in, and Synonymous seed pairs representing the aggregated relation structure information after GAT encoding, and represents the sampled negative samples, is the margin hyperparameter, which is used to control the distance between positive and negative samples.
[0013] The specific implementation process of step (3) is as follows: ①Multi-task joint learning; A unified loss function is defined, where the total loss is composed of the loss parts of these two tasks to simultaneously optimize CKB entity alignment and OKB normalization. The process is expressed as: , in, represents the loss function of CKB entity alignment learning, represents the loss function of OKB normalized learning; ② CKB entity alignment learning; Given a set of synonymous alignment seeds from multiple CKBs , where entity and They come from different CKBs and are identified as having synonymous relationships. , in order to make synonymous entity pairs close in the embedding space and push non-synonymous pairs apart, a loss function for contrastive learning is designed. The process is expressed as: , in, represents the balance factor, , is a margin hyperparameter that specifies the minimum distance between synonymous pairs and non-synonymous pairs. Represents a set of negative samples, by using random entities and Replace positive samples Entities in and generate, represents the distance between synonymous pairs in the embedding space, represents the distance of negative samples, Indicates the rotation operation of complex numbers; + means to ensure the non-negative result, only >0, it will contribute to the loss function; ③OKB standardized learning; Synonymous entity aggregation from OKB , where every two phrases and All come from the same OKB and are identified as having a synonymous relationship ; In order to make synonymous entity pairs close in the embedding space and push non-synonymous pairs apart, a contrastive learning loss function is designed; the process is expressed as: , in, represents the balance factor, is a margin hyperparameter that specifies the minimum distance between synonymous pairs and non-synonymous pairs. Represents the negative sample set, by using random phrases and Replace positive samples Phrases in and generate, represents the distance between synonymous pairs in the embedding space, represents the distance of negative samples, Indicates the rotation operation of complex numbers; + means to ensure the non-negative result, only >0, it will contribute to the loss function.
[0014] The specific implementation process of step (4) is as follows: ① CKB entity alignment synonymous seed selection; Design an entity alignment metric based on weighted similarity differences to evaluate the confidence of alignment pairs and select synonymous seeds for the CKB entity alignment task; Calculating similarity scores , for each candidate entity , using cosine similarity to calculate its embedding similarity score , the process is expressed as: , in, and Represent entities and The embedding vector of represents the dot product of vectors, and represents the norm of a vector and defines ; Representation vector and The angle in high-dimensional space has a value range of [-1,1]; Calculating structural similarity scores , computing entity and Neighborhood embedding in the knowledge base, obtain structural embedding, and calculate its structural similarity score ; First, calculate the entity and The neighborhood embedding in the knowledge base obtains the structural embedding of the entity. The process is expressed as: , in, Is Entity (The entity e here does not only refer to , including the head entity and tail entity ) structure embedding, represents the activation function, represents the normalized adjacency matrix, Indicates The node feature matrix of the layer, Indicates The weight matrix of the layer; Second, calculate the structural similarity score , the process is expressed as: , in, and Represents two entities, where and They come from different CKBs. yes Candidate synonym entities for and Respectively and The structure embedding vector of and Respectively represent vectors and The norm of , and define .
[0015] We design an entity alignment metric based on weighted similarity difference to evaluate the confidence of the alignment pairs and use it to select synonymous seeds for the CKB entity alignment task. The process is described as follows: , in, Represents entity pair The alignment confidence of Represents entity pair The similarity score of Represents entity pair The structural similarity score of Representation and Entity The candidate entity with the second highest similarity score The similarity score of and represents the weight coefficient, represents the sigmoid function, Expressed as a small positive number to prevent the denominator from being zero.
[0016] ② CKB entity alignment synonymous seed generation; Entity alignment measurement method based on step ① , in the CKB entity alignment task, calculate the entities in CKB1 Entities in CKB2 Confidence, the entity pair with the highest confidence (for example: , ) are considered as a pair of synonymous seeds.
[0017] In the At the iteration, the generated synonymous seed set is expressed as , and add it to the original synonymous seed set , get the updated synonymous seed set , the process is expressed as: ; ③OKB standardized synonymous seed selection; Design clustering silhouette coefficient and quality score methods, select high-quality synonymous seed clusters, and analyze the similarity distribution of entity pairs within the cluster to judge the clustering quality; A. Clustering metrics based on distance distribution deviation; Calculate the mean distance of all phrase pairs within a cluster. The process is expressed as:
[0018] in, represents the mean distance, It is clustering The number of entities in Express phrase and distance; Calculate the distance variance of all phrase pairs within a cluster. The process is expressed as:
[0019] in, represents the distance variance; Calculate distance distribution deviation score, clustering Quality Score is the inverse of the distance distribution deviation, and the process is expressed as:
[0020] B. Based on cluster silhouette coefficient; For each cluster, calculate its silhouette coefficient, the process is expressed as:
[0021] in, represents the average value of the silhouette coefficient of all points in the cluster, Indicate point The average distance to other points in the same cluster, Indicate point The average distance to the nearest other cluster; C. OKB standardized synonymous seed screening; Screen out high-quality synonymous seed clusters and define comprehensive scores , and set the threshold , select the comprehensive score The clustering of is regarded as high-quality synonymous seed clustering, and the process is expressed as: , , in, and represents the weight coefficient, represents the quality score of the cluster, represents the silhouette coefficient of clustering, represents the mean of the comprehensive score, is the standard deviation, represents a hyperparameter; ④OKB standardized synonymous seed generation; Based on the synonymous seed clustering screening method in step ③, select the comprehensive score The clustering of is used as a high-quality synonym seed clustering; in the OKB normalization task, assuming that a given phrase set Comprehensive score , then construct a corresponding synonymous cluster , for clustering , the generated synonymous seed pairs are: ; In the At the iteration, the generated synonymous seed set is expressed as , and add it to the original synonymous seed set , get the updated synonymous seed set , the process is expressed as: .
[0022] The specific implementation process of step (5) is as follows: Iterate CKB entity alignment and OKB normalization The generated synonymous seeds are added to the initialized synonymous seed set , refine the synonym embedding space, iteratively optimize the synonym relationship , the process is expressed as: , in, express Synonymous relations for iterative optimization , Represents the learning rate, controls the update step size, and They represent the control of the CKB entity alignment task and the OKB normalization task on synonymous relations. The optimization contribution of and Respectively represent In the iteration, the loss from the CKB entity alignment task and the OKB normalization task is gradient.
[0023] The specific implementation process of step (6) is as follows: ①Perform CKB entity alignment task; Given a set of candidate entity pairs , based on optimized synonymous relationships , testing a given set of entities ,in The entity with the smallest score is regarded as the entity of the same concept or object, completing the entity alignment.
[0024] ②Perform OKB standardization tasks; Given a set of phrases , based on optimized synonymous relationships , testing a given set of phrase pairs ,in The phrases with the smallest scores are regarded as similar phrases and aggregated into phrase clusters to form a normalized phrase set.
[0025] The present invention jointly trains the CKB entity alignment and OKB normalization tasks, and generates highly consistent and cross-knowledge base matchable synonymous entity representations by alternating entity alignment and normalization training in the synonymous embedding space, thereby improving the efficiency and accuracy of knowledge integration. At the same time, based on dynamic synonymous seed generation and quality-controlled embedding space optimization, high-quality synonymous seed pairs are continuously generated, and the synonymous relationship of the synonymous embedding space is gradually optimized, thereby effectively improving the accuracy of entity alignment and normalization. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a processing flow chart of the entity alignment and knowledge base normalization method based on synonymous embedding space of the present invention.
[0027] Figure 2 It is an overview diagram of the entity alignment and knowledge base normalization method based on synonymous embedding space of the present invention.
[0028] Figure 3 It is a flowchart of the specific steps of the entity alignment and knowledge base normalization method based on synonymous embedding space of the present invention. DETAILED DESCRIPTION
[0029] The following combination Figure 1 , Figure 2 and Figure 3 The specific steps of the entity alignment and knowledge base normalization method based on synonymous embedding space of the present invention are described in detail.
[0030] 1. Define the GAT network.
[0031] 1. Construct a directed graph structure.
[0032] Knowledge Base The triple represents the head entity , relation and tail entity . Convert triples into directed graph structures , which contains nodes (entities), directed edges (relationships) and relationship type information. The process can be expressed as: , in, Represents the graph structure, is the set of nodes in the graph, Indicates entity nodes, Indicates the total number of entities; is the set of directed edges of the graph, Represents the head node Through relationships Point to the tail node ; is the set of relationship types of the graph, Indicates Types of relationships, is the total number of different relationship types.
[0033] 2. Obtain the embedding representation of entities in the knowledge base.
[0034] Directed Graph Nodes (entities) in The feature vector containing the embedding of each node is obtained by encoding the word vector model (such as Word2Vec) . The process can be expressed as: , in, represents the word vector model, Represents the first The embedding representation of words.
[0035] 3. Aggregate in-degree characteristics.
[0036] For each in-degree neighbor node of the target node, the attention weight of the neighbor node is calculated, and then the features of the neighbor nodes are weighted summed using these weights to obtain the aggregate feature representation of the target node. Next, the aggregate features of the target node are activated to generate the final node feature representation. This process can be expressed as:
[0037] in, Is a node The updated feature representation is represents the activation function, represents neighbor nodes, Representation Node The in-degree neighbor set of ; is a learnable vector where represents the field of real numbers, represents the dimension of the node feature vector, Represents two dimensions as The space after the feature vectors are concatenated; represents the vector concatenation operation, Representation Node Eigenvector, is a learnable weight matrix.
[0038] 2. Initialize a shared synonymous relationship based on the defined GAT network combined with RotatE The embedding space.
[0039] 1. Initialize synonymous relationship vector . Randomly initialize a synonym relationship vector , used to represent the rotation transformation of synonymous relations. The synonymous relation vector and the synonymous relation representation have the same meaning. The synonymous relation is an abstract concept, and the synonymous relation vector is the vector representation of the synonymous relation. Bold indicates synonymous relationship vector, non-bold indicates R Synonymous relationship.
[0040] 2. Initialize the synonymous seed set .
[0041] The initial synonym seed set contains annotated synonymous entity pairs. Indicates a synonymous relationship Head entity and tail entity . The process can be expressed as:
[0042] in, Represents a pair of synonymous entities, satisfying the synonymous relationship .
[0043] 3. Expansion of synonymous seed set.
[0044] Based on the annotated synonym seed set, the synonym seed set is further expanded through side information, and the entity pairs with high similarity are determined through the overlap of high IDF terms and the interpretation pairs with high confidence are extracted from the PPDB database to expand the initial synonym seed set. This process can be expressed as: , in, represents the expanded set of synonymous seeds, A set of synonymous seeds representing side information.
[0045] 4. Define the rotation transformation.
[0046] For a synonym seed (entity pair), that is, the head entity and tail entity First, the vectors of the head entity and the tail entity are projected into the complex space, and then the head entity is specified Through the relationship vector After the rotation, the tail entity is obtained . The process can be expressed as: , in, Represents a complex number rotation operation.
[0047] 5. Construct training objectives and initialize synonym embedding space.
[0048] The training objective is to make the distances of entity pairs with synonymous relationships as close as possible, while the distances of entity pairs with non-synonymous relationships as far as possible. The process can be expressed as: , in, and Synonymous seed pairs representing the aggregated relation structure information after GAT encoding, and represents the sampled negative samples, is the margin hyperparameter, which is used to control the distance between positive and negative samples.
[0049] 3. Based on the construction of synonymous relationship The embedding space of CKB entity alignment and OKB normalization tasks are complementary in nature. A multi-task joint learning approach is adopted to iteratively train the CKB entity alignment task and the OKB normalization task to optimize the synonymous embedding space.
[0050] 1. Multi-task joint learning.
[0051] Define a unified loss function, where the total loss is composed of the loss parts of these two tasks, to optimize CKB entity alignment and OKB normalization simultaneously. The process can be expressed as: , in, represents the loss function of CKB entity alignment learning, Represents the loss function of OKB regularization learning.
[0052] 2.CKB entity alignment learning.
[0053] Given a set of synonymous alignment seeds from multiple CKBs , where entity and They come from different CKBs and are identified as having synonymous relationships. In order to bring synonymous entity pairs close together in the embedding space and push non-synonymous pairs apart, a contrastive learning loss function is designed. The process can be expressed as:
[0054] in, represents the balance factor, is a margin hyperparameter that specifies the minimum distance between synonymous pairs and non-synonymous pairs. Represents a set of negative samples, by using random entities and Replace positive samples Entities in and generate, represents the distance between synonymous pairs in the embedding space, Represents the distance of negative samples.
[0055] only >0, it will contribute to the loss function.
[0056] 3.OKB standardized learning.
[0057] Synonymous entity aggregation from OKB , where every two phrases and All come from the same OKB and are identified as having a synonymous relationship In order to bring synonymous entity pairs close together in the embedding space and push non-synonymous pairs apart, a contrastive learning loss function is designed. The process can be expressed as: , in, represents the balance factor, is a margin hyperparameter that specifies the minimum distance between synonymous pairs and non-synonymous pairs. Represents a set of negative samples, by using random phrases and Replace positive samples Phrases in and generate, represents the distance between synonymous pairs in the embedding space, represents the distance of negative samples, Indicates the rotation operation of complex numbers; + means to ensure the non-negativity of the result, only >0, it will contribute to the loss function.
[0058] 4. CKB entity alignment and OKB normalized synonymous seed generation.
[0059] Based on joint training of CKB entity alignment task and OKB normalization task, new synonym seeds are generated and synonym relationships are optimized. .
[0060] 1. Synonymous seed selection for CKB entity alignment.
[0061] Design an entity alignment metric based on weighted similarity difference to evaluate the confidence of alignment pairs and select synonymous seeds for the CKB entity alignment task.
[0062] Calculating similarity scores For each candidate entity , using cosine similarity to calculate its embedding similarity score . The process can be expressed as:
[0063] in, and Represent entities and The embedding vector of represents the dot product of vectors, and represents the norm of a vector and defines ; Representation vector and The angle in high-dimensional space ranges from [-1,1].
[0064] Calculating structural similarity scores . Computational Entity and Neighborhood embedding in the knowledge base, obtain structural embedding, and calculate its structural similarity score .
[0065] First, calculate the entity and The neighborhood embedding in the knowledge base obtains the structural embedding of the entity. The process can be expressed as: , in, Is Entity The structural embedding of represents the activation function, represents the normalized adjacency matrix, Indicates The node feature matrix of the layer, Indicates The weight matrix of the layer.
[0066] Calculating structural similarity scores . The process can be expressed as:
[0067] in, and Represents two entities, where and They come from different CKBs. yes Candidate synonym entities. and Respectively and The structure embedding vector of and Respectively represent vectors and The norm of , and define .
[0068] Design an entity alignment metric based on weighted similarity difference to evaluate the confidence of the alignment pair and use it to select synonymous seeds for the CKB entity alignment task. The process can be described as:
[0069] in, Represents entity pair The alignment confidence of Represents entity pair The similarity score of Represents entity pair The structural similarity score of Representation and Entity The candidate entity with the second highest similarity score The similarity score of and represents the weight coefficient, represents the sigmoid function, Expressed as a small positive number to prevent the denominator from being zero.
[0070] 2. CKB entity alignment synonymous seed generation.
[0071] Entity alignment based metric , in the CKB entity alignment task, calculate the entities in CKB1 Entities in CKB2 Confidence, the entity pair with the highest confidence (for example: , ) are considered as a pair of synonymous seeds.
[0072] In the At the iteration, the generated synonymous seed set is expressed as , and add it to the original synonymous seed set , get the updated synonymous seed set . The process can be expressed as: .
[0073] 3.OKB normalizes synonymous seed selection.
[0074] Design clustering silhouette coefficient and quality score methods, select high-quality synonymous seed clusters, and analyze the similarity distribution of entity pairs within the cluster to judge the clustering quality.
[0075] (1) Clustering metrics based on distance distribution deviation; Calculate the mean distance of all phrase pairs within the cluster. This process can be expressed as:
[0076] in, represents the mean distance, It is clustering The number of entities in Express phrase and distance.
[0077] Calculate the distance variance of all phrase pairs within the cluster. This process can be expressed as:
[0078] in, Represents the distance variance.
[0079] Calculates the distance distribution deviation score. Clustering Quality Score is the inverse of the distance distribution deviation. The process can be expressed as:
[0080] (2) Based on clustering silhouette coefficient.
[0081] For each cluster, calculate its silhouette coefficient. This process can be expressed as:
[0082] in, represents the average value of the silhouette coefficient of all points in the cluster, Indicate point The average distance to other points in the same cluster, Indicate point The average distance to the nearest other cluster.
[0083] (3) OKB standardized synonymous seed screening.
[0084] Screen out high-quality synonymous seed clusters and define comprehensive scores , and set the threshold , select the comprehensive score The clustering of is regarded as high-quality synonymous seed clustering. The process can be expressed as: , , in, and represents the weight coefficient, represents the quality score of the cluster, represents the silhouette coefficient of clustering, represents the mean of the comprehensive score, is the standard deviation, Represents a hyperparameter.
[0085] 4.OKB standardized synonymous seed generation.
[0086] Based on the synonymous seed clustering screening method, the comprehensive score is selected The clusters of are used as high-quality synonymous seed clusters. In the OKB normalization task, assuming that a given phrase set Comprehensive score , we can construct a corresponding synonymous cluster , for clustering , generating all possible synonymous seed pairs as: .
[0087] In the At the iteration, the generated synonymous seed set is expressed as , and add it to the original synonymous seed set , get the updated synonymous seed set . The process can be expressed as: , 5. Based on the generated new synonym seeds, further refine the constructed RotatE training based on synonymous relations Embedding space, iteratively optimize synonymous relations .
[0088] 1. Refine the synonym embedding space.
[0089] Iterate CKB entity alignment and OKB normalization The generated synonymous seeds are added to the initialized synonymous seed set , refine the synonym embedding space, iteratively optimize the synonym relationship . The process can be expressed as: , in, express Synonymous relations for iterative optimization , Represents the learning rate, controls the update step size, and They represent the control of the CKB entity alignment task and the OKB normalization task on synonymous relations. The optimization contribution of and Respectively represent In the iteration, the loss from the CKB entity alignment task and the OKB normalization task is gradient.
[0090] 6. Synonymous relations based on iterative optimization , perform CKB entity alignment task and OKB normalization task.
[0091] 1. Perform CKB entity alignment task.
[0092] Given a set of candidate entity pairs , based on optimized synonymous relationships , testing a given set of entities ,in The entity with the smallest score is regarded as the entity of the same concept or object, completing the entity alignment.
[0093] 2. Perform OKB normalization tasks.
[0094] Given a set of phrases , based on optimized synonymous relationships , testing a given set of phrase pairs ,in The phrases with the smallest scores are regarded as similar phrases and aggregated into phrase clusters to form a normalized phrase set.
Claims
1. A method for entity alignment and knowledge base normalization based on synonymous embedding space, characterized by: The following steps are involved: (1) Define the GAT network; (2) Based on the GAT network defined in step (1) combined with RotatE, a shared synonymous relationship is initialized The embedding space of (3) Based on step (2), construct a synonymous relationship The embedding space of the CKB entity alignment task and the OKB normalization task are iteratively trained to optimize the synonymous embedding space by adopting a multi-task joint learning approach. (4) CKB entity alignment and OKB normalization synonym seed generation; Based on step (3), the CKB entity alignment task and OKB normalization task are jointly trained to generate new synonym seeds and optimize synonym relationships. ; (5) Based on the new synonymous seeds generated in step (4), further refine the synonymous relationship constructed in step (2) based on RotatE training Embedding space, iteratively optimize synonymous relations ; (6) Synonymous relationship based on iterative optimization in step (5) , perform CKB entity alignment task and OKB normalization task.
2. The entity alignment and knowledge base normalization method based on synonymous embedding space according to claim 1 is characterized in that: The specific implementation process of step (1) is as follows: ①Construct a directed graph structure; Knowledge Base The triple represents the head entity , relation and tail entity , converting the triples into directed graph structures , which contains nodes, directed edges and relationship type information. The process is expressed as: , in, Represents the graph structure, is the set of nodes in the graph, Indicates entity nodes, Indicates the total number of entities; , is the set of directed edges of the graph, Represents the head node Through relationships Point to the tail node , head node and tail node It is the node representation of entities h and t in the graph structure; is the set of relationship types of the graph, Indicates Types of relationships, is the total number of different relationship types; ② Obtain the embedded representation of entities in the knowledge base; Directed Graph Nodes in The feature vector containing the embedding of each node is obtained by encoding the word vector model , the process is expressed as: ; in, represents the word vector model, Represents the first The embedding representation of each word; ③ Aggregate in-degree characteristics; For each in-degree neighbor node of the target node, the attention weights of the neighbor nodes are calculated, and the features of the neighbor nodes are weighted summed using these weights to obtain the aggregated feature representation of the target node; the aggregated features of the target node are activated to generate the final node feature representation. The process is expressed as: in, Is a node The updated feature representation is represents the activation function, represents neighbor nodes, Representation Node The in-degree neighbor set of ; , is a learnable vector, Represents two dimensions as The space after the feature vectors are concatenated, represents the field of real numbers, Represents the dimension of the node feature vector; represents the vector concatenation operation, Representation Node Eigenvector, is a learnable weight matrix.
3. The entity alignment and knowledge base normalization method based on synonymous embedding space according to claim 1 is characterized in that: The specific implementation process of step (2) is as follows: ① Randomly initialize a synonym relationship vector , used to represent the rotation transformation of synonymous relations; ② Initialize the synonymous seed set ; The initial synonym seed set contains annotated synonymous entity pairs. Indicates a synonymous relationship Head entity and tail entity , the process is expressed as: , in, Represents a pair of synonymous entities, satisfying the synonymous relationship ; ③Expansion of synonymous seed sets; On the basis of the annotated synonym seed set, the synonym seed set is further expanded through side information, and the entity pairs with high similarity are determined by the overlap of high IDF terms and the interpretation pairs with high confidence are extracted from the PPDB database to expand the initial synonym seed set. The process is expressed as: , in, represents the expanded set of synonymous seeds, A set of synonymous seeds representing side information; ④Define rotation transformation; For a synonym seed, i.e. the head entity and tail entity , first project the vectors of the head entity and the tail entity into the complex space, and then specify the head entity Through the relationship vector After the rotation, the tail entity is obtained , the process is expressed as: , in: Represents rotation operations on complex numbers; ⑤Construct training objectives and initialize synonym embedding space; The training objective is to make the distances of entity pairs with synonymous relationships close, while making the distances of entity pairs with non-synonymous relationships far apart. The process is expressed as: in, and Synonymous seed pairs representing the aggregated relational structure information after GAT encoding, and represents the sampled negative samples, is the margin hyperparameter, which is used to control the distance between positive and negative samples.
4. The entity alignment and knowledge base normalization method based on synonymous embedding space according to claim 1 is characterized in that: The specific implementation process of step (3) is as follows: ①Multi-task joint learning; A unified loss function is defined, where the total loss is composed of the loss parts of these two tasks to simultaneously optimize CKB entity alignment and OKB normalization. The process is expressed as: , in, represents the loss function of CKB entity alignment learning, represents the loss function of OKB normalized learning; ② CKB entity alignment learning; Given a set of synonymous alignment seeds from multiple CKBs , where entity and They come from different CKBs and are identified as having synonymous relationships. , in order to make synonymous entity pairs close in the embedding space and push non-synonymous pairs apart, a loss function for contrastive learning is designed. The process is expressed as: , in, represents the balance factor, , is a margin hyperparameter that specifies the minimum distance between synonymous pairs and non-synonymous pairs. Represents a set of negative samples, by using random entities and Replace positive samples Entities in and generate, represents the distance between synonymous pairs in the embedding space, represents the distance of negative samples, Indicates the rotation operation of complex numbers; + means to ensure the non-negative result, only >0, it will contribute to the loss function; ③OKB standardized learning; Synonymous entity aggregation from OKB , where every two phrases and All come from the same OKB and are identified as having a synonymous relationship ; In order to make synonymous entity pairs close in the embedding space and push non-synonymous pairs apart, a contrastive learning loss function is designed; the process is expressed as: , in, represents the balance factor, is a margin hyperparameter that specifies the minimum distance between synonymous pairs and non-synonymous pairs. Represents a set of negative samples, by using random phrases and Replace positive samples Phrases in and generate, represents the distance between synonymous pairs in the embedding space, represents the distance of negative samples, Indicates the rotation operation of complex numbers; + means to ensure the non-negative result, only >0, it will contribute to the loss function.
5. The entity alignment and knowledge base normalization method based on synonymous embedding space according to claim 1 is characterized in that: The specific implementation process of step (4) is as follows: ① CKB entity alignment synonymous seed selection; Design an entity alignment metric based on weighted similarity differences to evaluate the confidence of alignment pairs and select synonymous seeds for the CKB entity alignment task; Calculating similarity scores , for each candidate entity , using cosine similarity to calculate its embedding similarity score , the process is expressed as: , in, and Represent entities and The embedding vector of represents the dot product of vectors, and represents the norm of a vector and defines ; Representation vector and The angle in high-dimensional space has a value range of [-1,1]; Calculating structural similarity scores , computing entity and Neighborhood embedding in the knowledge base, obtain structural embedding, and calculate its structural similarity score ; First, calculate the entity and The neighborhood embedding in the knowledge base obtains the structural embedding of the entity. The process is expressed as: , in, Is Entity The structural embedding of represents the activation function, represents the normalized adjacency matrix, Indicates The node feature matrix of the layer, Indicates The weight matrix of the layer; Second, calculate the structural similarity score , the process is expressed as: , in, and Represents two entities, where and They come from different CKBs. yes Candidate synonym entities for and Respectively and The structure embedding vector of and Respectively represent vectors and The norm of , and define ; We design an entity alignment metric based on weighted similarity difference to evaluate the confidence of the alignment pairs and use it to select synonymous seeds for the CKB entity alignment task. The process is described as follows: , in, Represents entity pair The alignment confidence of Represents entity pair The similarity score of Represents entity pair The structural similarity score of Representation and Entity The candidate entity with the second highest similarity score The similarity score of and represents the weight coefficient, represents the sigmoid function, Expressed as a small positive number to prevent the denominator from being zero; ② CKB entity alignment synonymous seed generation; Entity alignment measurement method based on step ① , in the CKB entity alignment task, calculate the entities in CKB1 Entities in CKB2 Confidence: the entity pair with the highest confidence is regarded as a pair of synonymous seeds; In the At the iteration, the generated synonymous seed set is expressed as , and add it to the original synonymous seed set , get the updated synonymous seed set , the process is expressed as: ; ③OKB standardized synonymous seed selection; Design clustering silhouette coefficient and quality score methods, select high-quality synonymous seed clusters, and analyze the similarity distribution of entity pairs within the cluster to judge the clustering quality; A. Clustering metrics based on distance distribution deviation; Calculate the mean distance of all phrase pairs within a cluster. The process is expressed as: in, represents the mean distance, It is clustering The number of entities in Express phrase and distance; Calculate the distance variance of all phrase pairs within a cluster. The process is expressed as: in, represents the distance variance; Calculate distance distribution deviation score, clustering Quality Score is the inverse of the distance distribution deviation, and the process is expressed as: B. Based on cluster silhouette coefficient; For each cluster, calculate its silhouette coefficient, the process is expressed as: in, represents the average value of the silhouette coefficient of all points in the cluster, Indicate point The average distance to other points in the same cluster, Indicate point The average distance to the nearest other cluster; C. OKB standardized synonymous seed screening; Screen out high-quality synonymous seed clusters and define comprehensive scores , and set the threshold , select the comprehensive score The clustering of is regarded as high-quality synonymous seed clustering, and the process is expressed as: , , in, and represents the weight coefficient, represents the quality score of the cluster, represents the silhouette coefficient of clustering, represents the mean of the comprehensive score, is the standard deviation, represents a hyperparameter; ④OKB standardized synonymous seed generation; Based on the synonymous seed clustering screening method in step ③, select the comprehensive score The clustering of is used as a high-quality synonym seed clustering; in the OKB normalization task, assuming that a given phrase set Comprehensive score , then construct a corresponding synonymous cluster , for clustering , the generated synonymous seed pairs are: ; In the At the iteration, the generated synonymous seed set is expressed as , and add it to the original synonymous seed set , get the updated synonymous seed set , the process is expressed as: 。 6. The entity alignment and knowledge base normalization method based on synonymous embedding space according to claim 1 is characterized in that: The specific implementation process of step (5) is as follows: Iterate CKB entity alignment and OKB normalization The generated synonymous seeds are added to the initialized synonymous seed set , refine the synonym embedding space, iteratively optimize the synonym relationship , the process is expressed as: , in, express Synonymous relations for iterative optimization , Represents the learning rate, controls the update step size, and They represent the control of the CKB entity alignment task and the OKB normalization task on synonymous relations. The optimization contribution of and Respectively represent In the iteration, the loss from the CKB entity alignment task and the OKB normalization task is gradient.
7. The entity alignment and knowledge base normalization method based on synonymous embedding space according to claim 1 is characterized in that: The specific implementation process of step (6) is as follows: ①Perform CKB entity alignment task; Given a set of candidate entity pairs , based on optimized synonymous relationships , testing a given set of entities ,in The entity with the smallest score is regarded as the same concept or object, completing entity alignment; ②Perform OKB standardization tasks; Given a set of phrases , based on optimized synonymous relationships , testing a given set of phrase pairs ,in The phrases with the smallest scores are regarded as similar phrases and aggregated into phrase clusters to form a normalized phrase set.
Citation Information
Cited By
Digital teaching material intelligent generation system based on digital education
CN120146203A