Entity alignment method for knowledge graphs of multiple social media platforms with insufficient prior data
By introducing iterative strategies and embedding distribution alignment strategies and using generative adversarial networks to constrain unlabeled entities, the problem of entity alignment accuracy in knowledge graphs of multiple social media platforms when prior data is insufficient is solved, and efficient entity alignment effects are achieved.
Patent Information
- Application Number
- CN202211075622.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-05
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-09-05
AI Technical Summary
In the absence of sufficient prior data, the accuracy of entity alignment in knowledge graphs of multiple social media platforms is not high, and existing semi-supervised algorithms cannot guarantee accuracy with a small amount of labeled data.
An iterative strategy and an embedding distribution alignment strategy are introduced. By automatically marking entities that may be aligned and adding them to the training set, a generative adversarial network is used to constrain the shape of unlabeled entities in the embedding space, supplementing prior data information and reducing dependence on labeled data.
Without increasing prior data, the accuracy of entity alignment is improved, the dependence on labeled data is reduced, and efficient entity alignment is achieved.
Smart Images

Figure CN115618097B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of machine learning and natural language processing, and in particular to an entity alignment method for knowledge graphs of multiple social media platforms with insufficient prior data. Background Art
[0002] With the continuous development of the internet in recent years, users have become increasingly active on social media platforms. Users can follow the activities and hot news of influential users on Facebook, or add friends on Twitter to chat and share updates. The knowledge graph composed of users' social media data includes a variety of content, including users, events, and topics. Due to the different primary functions of different social media platforms, user data on different social media platforms lacks obvious correlation. The process of determining whether different entities in the knowledge graph constructed by social media platforms refer to the same real-world object is called entity alignment. Achieving entity alignment is crucial for applications such as user profiling and recommendation systems.
[0003] Research on entity alignment based on knowledge graph embedding is gaining increasing attention. Based on the assumption that equivalent entities in different knowledge graphs share similar neighborhood structures, this approach embeds entities into a low-dimensional feature space through representation learning, and calculates vector similarity to identify potential aligned entity pairs. Furthermore, to address data sparsity, many studies are leveraging additional information to enhance entity alignment performance.
[0004] Entity alignment based on knowledge graph embedding relies on annotated prior information, but data annotation is often very expensive, requiring significant time and money. Current semi-supervised entity alignment algorithms cannot guarantee accuracy with small amounts of annotated data. Therefore, it is crucial to reduce reliance on prior information while maintaining high accuracy. Summary of the Invention
[0005] Technical problems to be solved
[0006] To address the low accuracy of entity alignment results across knowledge graphs on multiple social media platforms when prior data is insufficient, this paper provides an entity alignment method for knowledge graphs on multiple social media platforms with insufficient prior data. This model introduces an iterative strategy and an embedding distribution alignment strategy. Newly discovered potential aligned entities are added to the training set during training, achieving dynamic growth of prior data. Simultaneously, an adversarial network is used to constrain the shape of unlabeled entities in the embedding space. This method can supplement the original data, thereby ensuring accurate entity alignment even when prior data is insufficient.
[0007] Technical Solution
[0008] An entity alignment method for knowledge graphs of multiple social media platforms with insufficient prior data, characterized by the following steps:
[0009] S1: Build a knowledge graph based on users’ attributes, data, and interactions on multiple social media platforms;
[0010] S2: Obtain similarity matrices in three dimensions from the knowledge graph, including structure, semantics, and string, and perform feature fusion to obtain initial entity similarity;
[0011] S3: Iteratively add entities with high entity similarity and possible alignment to the training dataset through automatic labeling, and use them as prior data to achieve dynamic growth of prior data;
[0012] S4: Frequency sampling of unlabeled entities is performed to align the embedding distributions of the source knowledge graph and the target knowledge graph in the generative adversarial network, which can reduce the distance between aligned entities.
[0013] S5: Recalculate the similarity of the structure, perform feature fusion, and then obtain the result of entity alignment.
[0014] A further technical solution of the present invention is: in the knowledge graph constructed by S1, the core words of the users, attributes and comment content after word segmentation are all used as entity nodes, and users and users, users and attributes, users and comment core words are grouped in triples.<h,r,t> Build a knowledge graph in a way.
[0015] A further technical solution of the present invention: the calculation of the initial entity similarity by S2 includes three similarity matrices obtained based on the S1 knowledge graph: a similarity matrix of entities in structural features, a similarity matrix of entities in semantic features, and a similarity matrix of entities in string features. The similarity matrices of the three dimensions are integrated to obtain a unified entity similarity matrix.
[0016] A further technical solution of the present invention: In S3, the iteration strategy is specifically:
[0017] S31: Based on the initial entity similarity in S2, for any entity x, when the similarity between entity y and entity x is greater than a threshold, entity y is added to the candidate alignment entities of entity x;
[0018] S32: Use all x and y that meet the conditions to construct a bipartite graph, where nodes represent entities and edges represent the probability of alignment between nodes;
[0019] S33: Find the edges with the largest probability value and no intersection in the bipartite graph, obtain the one-to-one entity pairs that are most likely to be aligned, and mark the entity pairs with alignment labels;
[0020] S34: During the iteration process, an alignment judgment method is used to prevent the marked entities from being repeatedly marked or becoming unmarked;
[0021] S35: Add automatically labeled entity pairs to seed entity pairs, use these entities to connect two knowledge graphs, and enrich the own knowledge graph with information from another entity.
[0022] A further technical solution of the present invention: In S4, the embedding distribution strategy is specifically:
[0023] S41: frequency sampling from all entity pairs;
[0024] S42: Define the GAN indicator to indicate which knowledge graph the entity comes from;
[0025] S43: GAN’s discriminator determines domain features between classified entities;
[0026] S44: Least Squares Generative Adversarial Network LSGAN is used as the adversarial loss. It selects the least squares loss as the discriminator, and the adversarial module adopts the 0-1 encoding method.
[0027] A further technical solution of the present invention is as follows: In S5, the similarity matrices of the three dimensions are re-fused to obtain a unified entity similarity matrix:
[0028] S51: Calculate the similarity of and to obtain the similarity matrix of structural feature embedding;
[0029] S52: Set the weight of each dimension to be the same, and perform weighted averaging to obtain a unified entity similarity matrix.
[0030] Beneficial effects
[0031] The present invention provides an entity alignment method for knowledge graphs of multiple social media platforms with insufficient prior data. The method uses knowledge graph information to supplement the prior information of multiple social media data, thereby improving the accuracy of entity alignment. The present invention introduces an iterative mechanism and adds entities that may be aligned to the prior data set during the iteration process. At the same time, an alignment judgment mechanism is introduced to prevent the continuous accumulation of errors during the iteration process. The present invention also introduces an embedding distribution alignment mechanism, which constrains the shape of unlabeled entities in the embedding space based on an adversarial network, making the entity source embedding and the target embedding distribution approximately isomorphic without the need for more prior data. The present invention provides an entity alignment model architecture that only requires a small amount of prior information to achieve good results, effectively reducing the dependence on data labels. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like parts throughout the drawings.
[0033] Figure 1 This is an example diagram of a knowledge graph for entity alignment methods for knowledge graphs of multiple social media platforms with insufficient prior data.
[0034] Figure 2 Motivation diagram for embedding distribution alignment of entity alignment methods for knowledge graphs of multiple social media platforms with insufficient prior data;
[0035] Figure 3 Model flow chart of the entity alignment method for knowledge graphs of multiple social media platforms with insufficient prior data. DETAILED DESCRIPTION
[0036] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only intended to illustrate the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0037] An entity alignment method for knowledge graphs of multiple social media platforms with insufficient prior data includes the following steps:
[0038] S1. Build a knowledge graph based on users’ attributes, data, and interactions on multiple social media platforms.
[0039] S2. Obtain a similarity matrix of three dimensions from the structure, semantics, and string according to the knowledge graph, and perform feature fusion to obtain the initial entity similarity;
[0040] S3. Iteratively add entities that may be aligned to the training dataset through automatic labeling to achieve dynamic growth of prior data;
[0041] S4. Frequency sampling of unlabeled entities is performed to align the embedding distributions of the source knowledge graph and the target knowledge graph in the generative adversarial network, which can reduce the distance between aligned entities.
[0042] S5. Recalculate the similarity of the structure, perform feature fusion, and then obtain the result of entity alignment.
[0043] The technical solution of the present invention is described in detail below:
[0044] S1. Build a knowledge graph based on users’ attributes, data, and interactions on multiple social media platforms.
[0045] In the constructed knowledge graph, the core words of the users, attributes and comments after word segmentation are all used as entity nodes, and the relationship between users, attributes and comments is represented by triples.<h,r,t> Specifically, user ID, user nickname, user comment topic, and user comment keyword are used as entity nodes, and the knowledge graph is constructed by using <user, friend, user>, <user, nickname, user nickname>, <user, discussion, user comment topic>, <user, comment, user comment keyword>, and <user comment keyword, comment connection, user comment keyword>.
[0046] S2. Obtain a similarity matrix of three dimensions from the structure, semantics, and string according to the knowledge graph, and perform feature fusion to obtain the initial entity similarity;
[0047] The specific process of obtaining the initial entity similarity is:
[0048] Construct a dual relationship graph. The relationship in the graph is expressed as the weight of the two relationships. The weight is expressed as the similarity value of the two relationships. The weight calculation formula is:
[0049]
[0050]
[0051] where r i Represents a relationship in the knowledge graph, r j Represents a relationship in the knowledge graph, H i Represents the relationship r in the knowledge graph i The set of connected head nodes, H j Represents the relationship r in the knowledge graph j The set of connected head nodes, H represents the relationship r i and r j Similarity value of the connected head node, T i Represents the relationship r in the knowledge graph i The set of connected tail nodes, H j Represents the relationship r in the knowledge graph j The set of connected tail nodes, T represents the relationship r i and r j The similarity value of the connected tail node;
[0052]
[0053] in Represents the relationship r in the knowledge graph i and relationship r j The weight of
[0054] Apply the graph attention mechanism to iteratively obtain the node representation e of the dual relationship graph and the original graph;
[0055] The cosine similarity algorithm is used to calculate the similarity between vectors to obtain the structural similarity matrix. The cosine similarity calculation formula is as follows:
[0056]
[0057] where e i Represents the vector representation of node i in the knowledge graph, e j represents the vector representation of node j in the knowledge graph, and sim represents the structural similarity;
[0058] The original data of all users’ comments is segmented and fed into the three pre-trained word vector models: Word2vec, FastText, and GLOVE to train the model.
[0059] Input entities in the knowledge graph into three word vector models to obtain vector representations;
[0060] Use the cosine similarity algorithm to calculate the similarity matrix between vectors to obtain the semantic similarity matrix;
[0061] Use Levenshtein distance to measure the difference between two strings;
[0062] Calculate the Levenshtein ratio to represent the similarity between entity names. The calculation formula is as follows:
[0063]
[0064] where e i Represents the entity name vector representation in the knowledge graph, e j represents the entity name vector representation in the knowledge graph, lev represents the Levenshtein distance between two string vector representations, and r represents the similarity between entity names;
[0065] Assuming that each dimension has equal importance, a unified entity similarity matrix is obtained, and the calculation formula is as follows:
[0066]
[0067] Among them S k Represents string similarity matrix, semantic similarity matrix, structural similarity matrix, mean is the mean function, std is the function for calculating standard deviation, It represents the string similarity normalization matrix, semantic similarity normalization matrix, and structural similarity normalization matrix. * represents the similarity average matrix;
[0068] S3. Iteratively add entities that may be aligned to the training dataset through automatic labeling to achieve dynamic growth of prior data;
[0069] The automatic labeling of entities and adding them to the training dataset are specifically as follows:
[0070] S31: Based on the initial entity similarity calculated in S2, for any entity x, when the similarity between entity y and entity x is greater than a threshold, entity y is added to the candidate alignment entities of entity x; for example, in t rounds of iteration:
[0071] π(y|x;Θ t )=σ(sim(x,y))
[0072] Where x represents any entity in the knowledge graph, y represents any entity in the knowledge graph except x, sim represents the similarity between entities x and y obtained according to the similarity matrix of multi-dimensional features in S1, Θ t It is calculated based on the multi-dimensional features of the tth round, and π represents the probability of assigning labels;
[0073]
[0074]
[0075] Y x '={y|y∈Y'andπ(y|x;Θ t )>γ1}
[0076] where ψ t represents the indicator function, X′ represents the entity set, Y′ x represents the candidate alignment entity of entity x, and max represents the maximum value function;
[0077] S32: Use all x and y that meet the conditions to construct a bipartite graph, where nodes represent entities and edges represent the probability of alignment between nodes;
[0078] S33: Find the edges with the largest probability value and no intersection in the bipartite graph, obtain the one-to-one entity pairs that are most likely to be aligned, and mark the entity pairs with alignment labels;
[0079] S34: During the iteration process, an alignment judgment method is used to prevent the marked entities from being repeatedly marked or becoming unmarked;
[0080] When entities conflict, the model expects to obtain entity pairs with greater probability. The formula for calculating the similarity difference between entity pairs is:
[0081]
[0082] Where x represents any entity, y represents a candidate alignment entity of entity x, y′ represents another candidate alignment entity of entity x, and π represents the probability of assigned labels in the above S21. Represents the difference in similarity between entity pairs;
[0083] S35: Iteratively add automatically labeled entity pairs to seed entity pairs, use these entities to connect two knowledge graphs, and enrich the own knowledge graph with information from the other entity.
[0084] S4. Frequency sampling of unlabeled entities is performed to align the embedding distributions of the source knowledge graph and the target knowledge graph in the generative adversarial network, which can reduce the distance between aligned entities.
[0085] The specific steps are as follows:
[0086] S41: frequency sampling from all entity pairs;
[0087] The calculation formula of the frequency sampling vector is:
[0088]
[0089] where f hi represents the number of entity i as the head entity in all triples, f ti represents the number of entity i as the tail entity in all triples, P i represents the frequency sampling vector of entity i, and E represents the number of nodes in the knowledge graph;
[0090] S42: Define the GAN indicator to indicate which knowledge graph the entity comes from;
[0091] S43: GAN’s discriminator determines domain features between classified entities;
[0092] The optimal discriminator is defined as follows:
[0093]
[0094] Among them KG s Represents the source knowledge graph, KG t represents the target knowledge graph, D * is the best discriminator;
[0095] S44: Least Squares Generative Adversarial Network (LSGAN) is used as the adversarial loss. It selects the least squares loss as the discriminator and the adversarial module adopts the 0-1 encoding method.
[0096] The definitions of D and G are as follows:
[0097]
[0098]
[0099] Where δ represents the label smoothing value, e s represents the input of the generative adversarial network module obtained based on the above S2 structural feature embedding module, e t represents the input of the generative adversarial network module obtained based on the above S2 structural feature embedding module, D represents the discriminator indicating which knowledge graph the entity comes from, G represents the generator trained by the generative adversarial network module, λ1 represents the ratio of the loss function used to correct different structural modules, and P t Represents the target knowledge graph KG t The sampling frequency vector, P s Represents the target knowledge graph KG s The sampling frequency vector of ;
[0100] S5, recalculate the similarity of the structure and perform feature fusion;
[0101] The similarity calculation formula of structural feature embedding is as follows:
[0102] d(Ge s ,e t )=||Ge s -e t ||
[0103] where e s represents the input of the generative adversarial network module obtained based on the above S2 structural feature embedding module, e t represents the input of the generative adversarial network module based on the above S2 structural feature embedding module, G represents the generator trained by the generative adversarial network module, and d represents the similarity of the structural feature embedding;
[0104] Calculate the final entity similarity using the same fusion method as in S1:
[0105] The calculation formula is as follows:
[0106]
[0107]
[0108] Among them S k Represents string similarity matrix, semantic similarity matrix, structural similarity matrix, mean is the mean function, std is the function for calculating standard deviation, It represents the string similarity normalization matrix, semantic similarity normalization matrix, and structural similarity normalization matrix. * represents the similarity average matrix;
[0109] Finally, the entity alignment result is obtained based on the similarity matrix between entities.
[0110] The present invention provides an entity alignment method for knowledge graphs of multiple social media platforms with insufficient prior data. The method collects public data of users from multiple social media platforms and constructs a knowledge graph based on user attributes, interaction behaviors between users, and interaction topic content. Since users and user data of multiple social media platforms are not directly related, a large amount of time and money is required to label samples when performing entity alignment. The present invention proposes an entity alignment method that introduces an iterative strategy and an embedded distribution alignment strategy. The iterative strategy achieves dynamic growth of prior data by adding newly discovered possible alignment entities to the training set during the training process, and at the same time introduces an alignment judgment mechanism to prevent the continuous accumulation of errors during the iteration process; the embedded distribution alignment strategy constrains the shape of unlabeled entities in the embedding space based on an adversarial network, that is, requires their shapes to be as similar as possible, thereby ensuring the accuracy of entity alignment when prior data is insufficient. The present invention utilizes knowledge graph information, introduces an iterative strategy and an embedded distribution alignment strategy, compensates for the insufficient prior data of the original users, and makes the accuracy of entity alignment higher.
[0111] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present invention, and these modifications or replacements should all be included in the scope of protection of the present invention.
Claims
1. An entity alignment method for knowledge graphs of multiple social media platforms with insufficient prior data, characterized by Here are the steps: S1: Build a knowledge graph based on users’ attributes, data, and interactions on multiple social media platforms; In the knowledge graph constructed by S1, the center words of users, attributes, and comment content after word segmentation are all used as entity nodes, and users and users, users and attributes, and users and comment center words are grouped in triples.<h, r, t> Build a knowledge graph in a way that: S2: Obtain similarity matrices in three dimensions from the knowledge graph, including structure, semantics, and string, and perform feature fusion to obtain initial entity similarity; The calculation of the initial entity similarity in S2 includes three similarity matrices obtained based on the knowledge graph of S1: a similarity matrix of entities in structural features, a similarity matrix of entities in semantic features, and a similarity matrix of entities in string features. The similarity matrices of the three dimensions are integrated to obtain a unified entity similarity matrix; S3: Iteratively add entities with high entity similarity and possible alignment to the training dataset through automatic labeling, and use them as prior data to achieve dynamic growth of prior data; In S3, the iteration strategy is specifically as follows: S31: Based on the initial entity similarity in S2, for any entity x, when the similarity between entity y and entity x is greater than a threshold, entity y is added to the candidate alignment entities of entity x; S32: Use all x and y that meet the conditions to construct a bipartite graph, where nodes represent entities and edges represent the probability of alignment between nodes; S33: Find the edges with the largest probability value and no intersection in the bipartite graph, obtain the one-to-one entity pairs that are most likely to be aligned, and mark the entity pairs with alignment labels; S34: During the iteration process, an alignment judgment method is used to prevent the marked entities from being repeatedly marked or becoming unmarked; S35: Add automatically labeled entity pairs to seed entity pairs, use these entities to connect the two knowledge graphs, and enrich the own knowledge graph with information from the other entity; S4: Frequency sampling of unlabeled entities is performed to align the embedding distributions of the source knowledge graph and the target knowledge graph in the generative adversarial network, which can reduce the distance between aligned entities. In S4, the embedding distribution strategy is specifically: S41: frequency sampling from all entity pairs; S42: Define the GAN indicator to indicate which knowledge graph the entity comes from; S43: GAN’s discriminator determines domain features between classified entities; S44: Least Squares Generative Adversarial Network (LSGAN) is used as the adversarial loss. It selects the least squares loss as the discriminator and the adversarial module adopts the 0-1 encoding method. S5: Recalculate the structural similarity, perform feature fusion, and obtain the result of entity alignment; In S5, the similarity matrices of the three dimensions are re-fused to obtain a unified entity similarity matrix: S51: Calculate the similarity of and to obtain the similarity matrix of structural feature embedding; S52: Set the weight of each dimension to be the same, and perform weighted averaging to obtain a unified entity similarity matrix.
Citation Information
Patent Citations
Lao-Chinese bilingual sentence alignment method in combination with similarity and graph matching
CN108549629A
Knowledge graph construction method based on hierarchical category information
CN112115230A
Iterative knowledge graph entity alignment method based on dynamic threshold
CN112131395A
Entity alignment method for sparse neighborhood structure of knowledge graph fusing multi-source data
CN114942998A