Next Article in Journal
Efficient and Secure Federated Learning for Financial Applications
Next Article in Special Issue
A Study of Contrastive Learning Algorithms for Sentence Representation Based on Simple Data Augmentation
Previous Article in Journal
Exploring the Impact of AI-Based Cyber Security Financial Sector Management
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Novel Embedding Model for Knowledge Graph Entity Alignment Based on Graph Neural Networks

School of Computer and Communication Engineering, Zhengzhou University of Light Industry, Zhengzhou 450002, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2023, 13(10), 5876; https://doi.org/10.3390/app13105876
Submission received: 7 April 2023 / Revised: 29 April 2023 / Accepted: 4 May 2023 / Published: 10 May 2023

Abstract

:
The objective of the entity alignment (EA) task is to identify entities with identical semantics across distinct knowledge graphs (KGs) situated in the real world, which has garnered extensive recognition in both academic and industrial circles. Within this paper, a pioneering entity alignment framework named PCE-HGTRA is proposed. This framework integrates the relation and property information from varying KGs, along with the heterogeneity information present within the KGs. Firstly, by learning embeddings, this framework captures the similarity that exists between entities present across diverse KGs. Additionally, property triplets in KGs are used to generate property character-level embeddings, facilitating the transfer of entity embeddings from two distinct KGs onto an identical space. Secondly, the framework strengthens the property character-level embeddings using the transitivity rule to increase the count of entity properties. Then, in order to effectively capture the heterogeneous features in the entity neighborhoods, a heterogeneous graph transformer with relation awareness is designed to model the heterogeneous relations in KGs in the framework. Finally, comparative experimental results on four widely recognized real-world datasets demonstrate that PCE-HGTRA performs exceptionally well. In fact, its Hits@1 performance exceeds the best baseline by 7.94%, outperforming seven other state-of-the-art methods.

1. Introduction

As technology for storing complex structured and unstructured data, knowledge base (KB) has been widely applied in various fields relating to artificial intelligence. Among them, knowledge graphs (KGs), as the most common representation of knowledge bases, have made significant progress and have been extensively applied across diverse application scenarios such as recommendation systems, information retrieval, machine translation, and so on, drawing high levels of attention from both industry and academia [1]. However, different institutions and organizations construct knowledge graphs using different technologies and languages for their own purposes, resulting in heterogeneous structures and complementary contents. The same entity can exist in various forms across distinct knowledge graphs. Therefore, how to efficiently organize this redundant information to form a more comprehensive knowledge graph for downstream tasks is an important challenge currently faced by this field. The objective of entity alignment is to establish connections between identical entities present in two distinct knowledge graphs. This facilitates the transfer of valuable information from one KG to its corresponding entity in another KG, thus enriching the content of both and contributing significantly to the performance of downstream applications.
Traditional entity alignment methods [2] typically focus on structured data sources, such as relational databases, and use heuristic or data mining methods to calculate the similarity between different entities, aiming to improve the effectiveness of entity matching. However, with the growth of data, the efficiency of traditional methods for entity matching needs to be improved. Moreover, knowledge graphs are semi-structured data structures, and the accuracy of the traditional entity alignment techniques is limited, while heuristic algorithms are also difficult to generalize.
With the emergence of Word2Vec [3], the task of entity alignment has gradually been bifurcated into approaches that are based on translation and those that are based on graph neural networks [4] (GNNs). The fundamental concept behind both of these approaches is consistent. It involves acquiring an efficient vector representation of the KG within a low-dimensional space and subsequently executing entity alignment tasks based on the learned vector representation. This technique is collectively known as representation learning. A large number of experiments have evinced that translation-based methods are more suitable for link prediction, whereas GNNs excel at incorporating the neighborhood features of nodes. These capabilities can be harnessed to devise pertinent techniques for feature acquisition in entity alignment tasks, thereby enabling the attainment of superior accuracy and generalization capacity [5].
Although GNNs methods have achieved remarkable results, there are still three limitations. Firstly, most methods [6,7,8] regard KGs as homogeneous graphs and do not consider the heterogeneity of edges between different entities, whereas heterogeneous information can augment the accuracy and resilience of the model. Secondly, although many methods consider some semantic information beyond the relational structure, such as entity property information [9], entity description information [10], and entity name information [11], the more semantic information integrated into the methods, the more data are required, which is difficult to satisfy in many practical scenarios where the seed entities are often insufficient. Thirdly, some other works [12] only use the relational structures of different KGs to extract inter-graph information using graph matching networks (GMN) [13] to explore more analogous features between aligned entities. However, the introduction of the matching module throughout the training process results in an increase in the space and time complexity of the model, thereby impacting its efficiency.
The proposed heterogeneous graph transformer with relation awareness (HGTRA) in this paper addresses the first limitation by effectively extracting similar features from aligned entities within their respective heterogeneous structures. To address the aforementioned latter two limitations, a new embedding model is introduced. The model initially generates property embeddings from the knowledge graph’s property information and then relocates the entity embeddings of two knowledge graphs to the same vector space by leveraging the property embeddings. Thus, the similarity of properties between two knowledge graphs is crucial for generating a unified embedding space, which is also a major challenge in knowledge graph alignment tasks. Utilizing property embeddings, the PCE-HGTRA model can reciprocally transform the entity embeddings of both knowledge graphs to the identical vector space, allowing the entity embeddings to capture the property similarity from both knowledge graphs. This paper’s similarity model between entities includes predicate alignment, which renames the predicates of two knowledge graphs to a unified scheme, ensuring that the relation embeddings of both knowledge graphs are also embedded in the identical vector space.
This article further employs the transitivity rule, whereby if there exists  ( A , r 1 , B ) and  ( B , r 1 , C ) it is possible to deduce the existence of  ( A , r 1 , C ) , to enrich the property triples and relation triples used in calculating property embeddings and enhancing relation triples. Therefore, the fundamental concept of this article is to fully exploit the wealth of knowledge graphs by simultaneously evaluating the similarity of entity relationships and property information. By fusing the relationship information and property information, the two complement each other and alleviate the heterogeneity between different types of information when aligning entities.
We have integrated the two approaches mentioned above into an entity alignment framework called PCE-HGTRA, which fully takes into account the heterogeneous information of properties and relations in knowledge graphs. Extensive experimentation on three well-known benchmark datasets has demonstrated that PCE-HGTRA surpasses seven state-of-the-art models in both accuracy and effectiveness, while also exhibiting remarkable robustness and scalability.

2. Related Work

Entity Alignment based on Translation. This methodology presented in this study is chiefly rooted in TransE [14] and certain of its adaptations, with the core idea of representing the relationship between two entities as the transformation between their embedded representations in order to ensure that entities with analogous structures in different KGs are in close proximity in the embedding space, achieving the goal of preserving entity structural information. MtransE [15] is the first work to introduce embeddings in a multilingual setting. This work models entities and relationships using TransE, embedding each entity and relationship in different embedding spaces in each knowledge graph, and based on pre-aligned entities, the transformation between the two vector spaces is evaluated. The model includes a knowledge module for encoding and an alignment module for learning. This work proposes three learning strategies, including linear transformations, translation vectors, and distance-based axis alignment, with linear transformations having the best performance. JAPE [16] utilizes embeddings of relations and properties to optimize the embedding effect of the knowledge graph. Specifically, the method jointly embeds two distinct knowledge graphs into a shared vector space and improves the effect by embedding property information. In addition, customized data preprocessing techniques are used to facilitate the sharing of the same or similar embeddings among aligned entities in the seed alignment, allowing the model to achieve cross-lingual entity alignment. IPTransE [17] adopts semi-supervised learning and a margin-based loss function and uses bootstrapping techniques to add newly aligned entities to the seed entities, thereby expanding the number of available resources while ensuring quality. This model improves upon the underlying TransE method with PTransE, which captures indirectly connected entities by observing the paths between entities and constructing transformations between entities based on the path information composed of relation predicates connecting multiple entities. This model relies on seed entities and divides the transformation between the embedding spaces of both knowledge graphs into three strategies: translation, linear transformation, and parameter sharing, with parameter sharing being the most effective.
Entity alignment based on GNNs. The main approach for entity alignment using graph attention networks (GATs) and graph convolutional networks (GCNs) involves aggregating the neighborhood features of each entity to obtain neighborhood similarities between the corresponding aligned entities. GCN_align [6] was the first GNN-based EA study, which achieved alignment through the margin-based loss function. This study treated property triplets as relation triplets, learned entity embeddings from structural information, and used two GCNs to embed entities from two knowledge graphs into a unified space with a shared weight matrix. RDGCN [7], also a margin-based loss function, integrated relation information through an attentional interaction mechanism and extended GCNs with relation information and a high-speed gating mechanism to capture neighborhood structural information, similar to HGCN [11]. SEA [18] achieved alignment by utilizing cyclic consistency constraints and aligning unaligned entities.
Entity alignment based on heterogeneous GNNs. Recently, numerous academic studies have attempted to apply graph neural networks (GNNs) for modeling heterogeneous graphs. Among them, RGCNs [19] and RGATs [20] describe heterogeneous graphs by utilizing weight matrices for each relationship. HAN [21] has innovatively proposed a hierarchical attention mechanism, learning weights of nodes and meta-paths from both the node level and semantic level. Meanwhile, HetGNN [22] employs various recurrent neural networks (RNNs) to integrate multimodal features to deal with various types of nodes. However, due to the existence of a large number of relations in knowledge graphs (KG), the application of these methods to KG models results in high training complexity. Recently, HGT [23] and RHGT [24] have attempted to describe heterogeneity using heterogeneous graph transformers. Nevertheless, these methods are not specifically designed to capture neighbor similarities; thus, they are not directly applicable to entity alignment tasks. Consequently, we propose an enhanced heterogeneous graph transformer that takes into account the heterogeneity of knowledge graphs and provides high-quality entity embeddings for entity alignment tasks.
Self-Supervised learning models for knowledge graphs. To capture the semantic discrepancies between entities and relationships in knowledge graphs, contrastive learning has emerged as a viable technique. Cutting-edge research has recently merged knowledge graph representation with contrastive learning, giving rise to the development of a universal knowledge graph contrastive learning framework, KGCL [25]. The framework aims to reduce noise in the underlying data supporting recommendation systems and provides stronger knowledge representation capabilities. The CKGC [26] method differentiates between descriptive attributes and traditional relationships in the knowledge graph, connecting the remaining parts as a structure to broaden the descriptive information scope of the knowledge graph.

3. Proposed Framework

3.1. Problem Definition

As a type of graph structure, in a knowledge graph entities are represented as nodes and the relations between entities are represented as edges. However, the symbolic features of triples make processing difficult. Obtaining more effective entity embedding representations has become a major challenge in entity alignment tasks. For generality, this paper uses uppercase letters to represent sets and lowercase letters to represent vectors. Let  G = ( E , R , P , V , T ) represent a knowledge graph, where  E represents the set of all entities;  R represents the set of relationship predicates;  P represents the set of property predicates;  V represents the set of property values; and  T represents the set of triples that relate entities and their properties.  T = T r   T p , where  T r represents relationship triples  ( h , r , t ) in the knowledge graph—where  h stands for head entity,  t stands for tail entity, and  r stands for relationship (predicate) between them— T p represents property triples  ( e , p , v ) —where  e stands for entity,  p stands for property name, and  v stands for property value. Entity alignment endeavors to unearth the corresponding entities across divergent knowledge graphs.
Given two knowledge graphs,  G 1 = ( E 1 , R 1 , P 1 , V 1 , T 1 ) and  G 2 = ( E 2 , R 2 , P 2 , V 2 , T 2 ) , we aim to discover  ( e 1 ,   e 2 ) , where  e 1 E 1 ,   e 2 E 2 , and  e 1 e 2 , indicating that  e 1 and  e 2 denote the identical real-world entity, with  indicating an equivalence relation. We employ an embedding-based model to assign a continuous representation to every element of two types of triples  ( h , r , t ) and  ( e , p , v ) , represented in bold font  ( h , r , t ) ( e , p , v ) .

3.2. Overview Framework of PCE-HGTRA

In this chapter, we will present our novel and robust entity alignment (EA) framework, the PCE-HGTRA, which incorporates property character embedding and heterogeneous graph transformers with relation awareness. PCE-HGTRA consists of three main modules, as shown in Figure 1 PCE-HGTRA framework overview: (1) property character-level embedding (PCE), which proposes a novel embedding approach to locate partially similar predicates and uses a unified naming scheme for renaming; (2) heterogeneous graph transformer with relation awareness (HGTRA), where we have designed HGTRA with the aim of capturing distinctive pattern features of relations and properties while utilizing fewer parameters. This involves incorporating the heterogeneous neighborhood features of aligned entities in both relations and properties; and (3) alignment learning, which computes the loss function of entity embeddings by taking into account both their properties and relations and, subsequently, evaluating the likelihood of entity alignment (EA).

3.3. Property Character Embedding

After applying the TransE algorithm, we proceeded with the property character-level embedding. Here, the predicate  r is interpreted as the transformation from the head entity ( h ) to the property value ( p ) within the context of this paper. However, in the two knowledge graphs, the same property value  p may manifest in different forms, for example, as 20.445 and 20.445444 in financial data, or as “Li Bai” and “Qinglian Jushi” in personal names. Therefore, to encode the property values, a composite function is used in this paper, and the relationship for each element in the  T p is defined as  h + r f p ( p ) . Here,  f p ( p ) is a composite function, and  p is the property value,  p   = { a 1 , a 2 , , a t } . The composite function is employed in this paper to encode the property values into a single vector while mapping similar property values to similar vector representations. Three composite functions are defined in this paper.
Summation composite function (SUM). The initial composite function pertains to the summation function (SUM), which is defined as the total sum of all character embeddings of the property values. The definition of the summation composite function is as follows:
f p ( p ) = a 1 + a 2 + + a t
The characters  a 1 ,   a 2 , , p t represent the character embeddings of the property value. However, this composite function is not without limitations. Its inadequacy lies in the fact that when two strings share the same character set but in different orders, they will have identical vector representations. For instance, the values “20.18” and “18.02” would result in the same vector representation, rendering the function less effective.
Composite function based on LSTM (LSTM). In order to surmount the restrictions posed by the SUM composite function, this paper puts forth a novel composite function founded on Long Short-Term Memory (LSTM). This function employs an LSTM network to encode the character sequence of the property value into a solitary vector. The ultimate hidden state of the LSTM network is utilized as the vector representation of the property value. The composite function based on LSTM is delineated as follows:
f p ( p ) = f l s t m ( a 1 , a 2 , , a t )
N-gram-based composite function (N-gram). This paper further proposes an N-gram-based composite function as a viable solution to mitigate the limitations of the SUM composite function. Specifically, this function uses the sum of all n-tuples (N-grams) in the property value as the vector representation. The definition of the N-gram-based composite function is shown as follows:
f p ( p ) = n = 1 N ( i = 1 t j = i n a j t i 1 )
where N represents the upper limit of N-gram combinations utilized (in this study, N = 15); and t signifies the length of the property value.
To acquire the property character embedding, the following objective function is minimized in this study, the detailed definition of  J A is as follows:
J A = t p T p t p T p m a x ( 0 , [ γ + α ( f ( t p ) f ( t p ) ) ] )
The detailed definitions of  T p and  T p are as follows:
T p = { h , r , p G } ; f ( t p ) = || h + r f p ( p ) ||
T p = { h , r , p | h E }   { h , r , p | p A }
where  T p denotes the collection of authentic property triplets within the training dataset; and  T p represents the collection of defective property triplets (where A signifies the collection of properties in G). The erroneous triplets serve as negative samples, where a random entity replaces the head entity or a random property value replaces the property.  f ( t p ) symbolizes the confidence score of the vector representation of the property value, which is rooted in the embedding of the head entity “h”, the embedding of the relationship “r”, and the vector representation of the property value derived via the composite function  f p ( p ) .

3.4. Heterogeneous Graph Transformer with Relation Awareness (HGTRA)

The process by which the graph transformer assimilates all the neighboring features of node “h” can be elegantly formulated as follows:
e h ( l ) ( A t t e n t i o n ( h , t ) · M e s s a g e ( h , t ) ) t N ( h ) A g g r e g a t e
In this equation,  A t t e n t i o n is used to calculate the importance of each neighboring node;  M e s s a g e extracts features from each neighboring node; and  A g g r e g a t e aggregates neighbor information using attention weights. However, as illustrated in Equation (7), the graph transformer fails to consider edge features. To address this, we designed a novel heterogeneous graph transformer with relation awareness (HGTRA) in this paper, inspired by previous work [26]. The proposed HGTRA enables our model to differentiate between the heterogeneous features of relations and properties, thus facilitating a better capture of neighborhood similarities among aligned entities. Let  E ( l ) represents the output of the  ( l ) -th layer of HGTRA, which also serves as the input to the  ( l + 1 ) -th layer. At first, the value of  E ( 0 ) is equal to  E ( n ) .When HGTRA takes a relation triplet as input, the output is relation-based embedding. When it takes a property triplet as input, the output is property-based embedding. HGTRA mainly consists of the following four layers, as shown in Figure 2:
(a) Relation Embedding. Considering the possible similarity between the aligned relation and the head entity and tail entity, this paper generates relation features by combining the relevant entity features. In particular, the relation embedding  r is approximately calculated by taking an average of the embeddings of its related head entity  H r and tail entity  T r , as demonstrated in the subsequent formula:
R l ( r ) = σ [ e i ϵ H r b h e i ( l 1 ) | H r | || e j ϵ T r b t e j ( l 1 ) | T r | ]
In this equation,  | · | denotes the size of a set;  b h and  b t are attention vectors;   [ · ] denotes the operation of concatenation; and  σ denotes the activation function Rectified Linear Unit (ReLU);
(b) Heterogeneous Attention. In this work, entity  h is mapped to a key vector  K i ( h ) , and its neighboring entity  t is mapped to a query vector  Q i ( t ) . In contrast to other methods, this work uses the dot product of their concatenation and  R l ( r ) as the value of attention, rather than directly using the dot product of the key and query vectors.  R l ( r ) is derived from the feature aggregation of the related head and tail entities (refer to Equation (8)), hence it does not stray too far from the embeddings of its linked entities. In addition,  R l ( r ) signifies the heterogeneous feature of the edge, thereby causing distinct effects on the contribution of neighboring pairs linked to different edges towards the entity  h . More specifically, this work calculates the multi-head attention of each neighbor relation  ( h , r , t ) , evaluated in the following manner in this study:
H A t t e n t i o n ( h , r , t ) = S i [ 1 , h n ] ( r , t ) R N ( h ) | | o f t m a x ( H A T T h e a d i ( h , r , t ) )  
Among them, the detailed expression of  H A T T h e a d i ( h , r , t ) is as follows:
H A T T h e a d i ( h , r , t ) = a T ( [ K i ( h ) | | Q i ( t ) ] R l ( r ) ) d / h n
where  K i ( h ) = K _ L i n e a r i ( e h ( l 1 ) ) ;   Q i ( t ) = Q _ L i n e a r i ( e t ( l 1 ) ) ; the symbol  R N ( h ) denotes the set of entities neighboring  h ; the parameter  a is the attention parameter of dimensionality  d / h n × 1 , where  h n denotes the number of attention heads. It should be noted that the Softmax operation ensures that the sum of attention weights assigned to all neighboring entities is equal to one;
(c) Heterogeneous Message. Likewise, this paper aims to integrate relationships into the message-passing mechanism in order to differentiate the disparities between diverse categories of edges. For any given  ( h , r , t ) t , the calculation of its multi-head message is carried out as follows:
H M e s s a g e ( h , r , t ) = H i [ 1 , h n ] | | M S G h e a d i ( h , r , t )
The detailed expression of  H M S G h e a d i ( h , r , t ) is shown below:
H M S G h e a d i ( h , r , t ) = [ V L i n e a r i ( e t ( l 1 ) ) | | R ( l ) ( r ) ]
In order to obtain the  ( i ) -th message head,  H M S G h e a d i ( h , r , t ) , this paper first applies the linear projection  V _ L i n e a r i to project the characteristics of the tail entity  t . Subsequently, it concatenates the features of  t and the relation  r , and connects all  h n message heads to obtain the final heterogeneous message;
(d) Heterogeneous Aggregation. The final step is heterogeneous aggregation, depicted in Figure 2d, where the heterogeneous multi-head attention and messages are merged into entities. By using attention coefficients to weigh the messages of neighboring entities, we can aggregate information from neighbors with different features and update the vector representation of entity  h . The specific formula is shown below:
e h ˜ ( l ) = ( r , t ) R N ( h ) H A t t e n t i o n ( h , r , t ) · H M e s s a g e ( h , r , t )
In this context, the symbol  represents the operation of superimposition. In order to combine the characteristics of names and the features derived from a multi-layer neural network, we employ residual connections [27] to create the ultimate modified embedding, as demonstrated in the subsequent equation:
e h ( l ) = ϖ β A L i n e a r ( e h ˜ ( l ) ) + ( 1 ϖ β ) N L i n e a r ( e h ( l 1 ) )
where  ϖ β is a trainable weight; and  A _ L i n e a r ( · ) and  N _ L i n e a r ( · ) are linear projections. Finally, based on the entire relation structure  T r e l and the property structure  T a t t r , this paper can generate relation-based embedding  E r e l and property-based embedding  E a t t r , respectively, and employ them for end-to-end entity alignment tasks.

3.5. Learning Alignment

Upon obtaining the ultimate entity representations, this paper uses the Manhattan distance to gauge the similarity among potential pairs of entities. The more negligible the distance, the greater the likelihood of entity alignment. To calculate the similarity between candidate entity pairs, this paper uses  E r e l and  E a t t r , and the specific equation is stated as follows:
d f ( e i 1 , e j 1 ) = || e f , i 1 e f , i 2 || L 1
where  f = { r e l , a t t r } L 1 denotes the Manhattan distance.
Previous methods generally concatenated the embeddings of entities from multiple sources and employed them directly in the loss function to capture the entity features comprehensively. Nevertheless, we opine that relation-based embedding and property-based embedding may contribute to EA differently, since these two entities’ structures may have notable dissimilarities. Hence, we did not embrace the concatenation embedding method outright. Instead, we allotted distinct weights to these two embeddings to differentiate their contributions during training. Bearing this in mind, we integrated a margin-based ranking loss function in the model training process, intended to reduce the embedding distance of positive pairs and enlarge that of negative pairs. The particular equation is stated as follows:
ξ = ( p , q ) L , ( p , q ) L r e l [ d r e l ( p , q ) d r e l ( p , q ) + γ 1 ]
+ Θ ( ( p , q ) L , ( p , q ) L a t t r [ d a t t r ( p , q ) d a t t r ( p , q ) + γ 2 ] )
Here  [ · ] + = m a x { · , 0 } ;   L r e l and  L a t t r represent negative pairs based on relation and property embeddings, correspondingly;  γ 1 and  γ 2 (both > 0) are the margin hyperparameters that separate positive and negative pairs.

3.6. Enriching Triplets with Transitivity Rules

Although the relational embeddings implicitly learn the information of relation transitivity, incorporating this information explicitly augments the number of properties and related entities for each entity, thereby facilitating the identification of similarities between entities. For instance, let us consider the triplet  z h e n g z h o u , l o c a t e d I n , H e N a n and  H e N a n , c o u n t r y , C h i n a , from this, we can infer the existence of a relationship, namely, “ l o c a t e d I n C o u n t r y ”, between the entities “ z h e n g z h o u ” and “ C h i n a ”. In actuality, this information can be leveraged to enhance the relevant entities “ z h e n g z h o u ”. This paper addresses the handling of single-hop transitive relations as follows: Given the relationship triplets  h 1 , r 1 , t 1 and  t 1 , r 2 , t 2 , we interpret  r 1 and  r 2 as the relationships from the head entity  h 1 to the tail entity  t 2 . Therefore, the relationships between these transitive triplets are defined as  h 1 + ( r 1 . r 2 ) t 2 , and by replacing the relationship vector  r with  r 1 . r 2 , we can obtain the relationship between  h 1 and  t 2 .

4. Experiments

4.1. Experiment Settings

Environment Information. The experiments were executed on the CentOS 7.5 operating system, utilizing the Intel(R) Xeon(R) CPU E5-2697 v2 @ 2.70 GHz with 256 GB of memory and NVIDIA Quadro K4000 GPU. The programming languages and frameworks employed were Python, TensorFlow, and Torch.
Dataset. This paper uses four 15 K bilingual datasets from OpenEA [28], covering multiple languages including English, French, and German. The data are sourced from well-known knowledge graphs such as YAGO 3 [29], Dbpedia [30], and Wikidata [31]. To assess the performance of the model on datasets of varying densities, OpenEA constructed sparse and dense versions of each dataset. The sparse dataset (V1 version) was directly generated using the IDS algorithm and has features that are more closely aligned with real-world datasets. The dense dataset (V2 version) is based on the V1 version but with low-degree entities (d < 5) removed from the source knowledge graph and then reconstructed using the IDS algorithm, making it more similar to real-world datasets. It should be noted that since the data collection methods for DBpedia, Wikidata, and YAGO 3 are similar, the labels between their entities are highly similar, which may have a certain impact on the evaluation of actual performance. Therefore, in the data preprocessing stage, the label information for the entities was removed. Table 1 presents the statistical details for each dataset, comprising the entity count, relationship count, as well as relationship and property triple counts.
Implementation details. To ensure fairness in the evaluation, this study employed a five-fold cross-validation method. Specifically, the dataset was divided into five non-overlapping parts, with each part accounting for 20% of the total dataset. In each experiment, one part was chosen as the training data, 10% of the remaining data was allocated for validation, and the remaining 70% of the data was used for testing. The hyperparameters were set to a maximum epoch number of 2000; batch size of 5000; embedding dimension of 100; margin of 1.5; and learning rate of 0.001.
Evaluation metrics. In this study, Hits@k (where k = 1, 5, 10) and mean rank (MR) were used as evaluation metrics to measure the performance of aligning entities. These metrics assess the proportion of correctly aligned entities within the top k predicted entities and overall performance: lower MR scores and Higher Hits@k scores indicate superior performance. Specifically, we focus on the Hits@1 performance metric, as it corresponds to the conventional accuracy metric in the field of traditional entity alignment.
Baseline. To evaluate the performance of the proposed PCE-HGTRA model, it was compared against seven contemporary EA models. For an elaborate exposition of the model specifications, please refer to Section 2.

4.2. Main Results and Analysis

Table 2 and Table 3 illustrate the cross-lingual performance of various models, all exhibiting bidirectional best alignment outcomes. The tables provide a breakdown of Hits@k in percentages, with the best results of the baseline denoted in bold, while the PCE-HGTRA model’s superior performance is signified by underlined numbers.
Results of OpenEA: According to the data in Table 2 and Table 3, PCE-HGTRA performed the best on three out of four datasets and still had the best MR index on the fourth dataset. Additionally, it exceeded the best baseline by 1.62% to 7.94% on the Hits@1 indicator. IMUSE’s performance on the OpenEA dataset was almost equivalent to that of PCE-HGTRA, effectively utilizing the properties and relationship information existing in the KG. However, PCE-HGTRA still achieved outstanding performance. The OpenEA model reduced the number of relationships and triplets, challenging the modeling ability of sparse KGs. The PCE-HGTRA achieved significant improvements over both dense and sparse KG baselines. Notably, the improvement achieved by our approach on the Hits@1 metric exceeded that on Hits@5, implying that PCE-HGTRA can more precisely identify true entities among the top five alignment candidates that are difficult to distinguish. The experiments showed that PCE-HGTRA can partially address the problem of neighborhood sparsity for certain entities. It is noteworthy that, despite not being able to precisely identify the top 10 alignment candidates on the EN_FR_15K_V2 dataset, our model still achieved an optimal MR index, highlighting the superior recall performance of our method compared to the baseline.
As expected, GNN-based methods generally achieve good results, while entity alignment models based on TransE perform poorly in the EA task due to embeddings of different KGs residing in different vector spaces and a lack of proper conversion methods. MTransE represents entities across distinct vector spaces, albeit with a potential loss of information during the transformation learning process. IPTransE improves upon TransE by specifying corresponding conversion rules between entities through their paths. Methods that overly rely on the number of seed alignments also perform suboptimally on the dataset. In our model, character-level embeddings of properties accurately preserve the similarity of property strings when mapping them to their vector representations, and the transitivity rule allows for the use of more property information during the alignment process, improving the model’s performance. Our method outperforms existing embedding-based and GNN-based EA models on the EA task.

4.3. Ablation Study of PCE-HGTRA

Table 4 and Table 5 record the results of the ACE-HGTRA model in four different datasets for the ablation study. PCE and HGTRA refer to the property character embedding module and the heterogeneous graph transformer with relation awareness, respectively. The HGTRA module has made significant contributions to the model’s performance improvement, indicating that processing the corresponding heterogeneous graphs inside the knowledge graph is of great help in achieving entity alignment tasks. This also reflects that the knowledge graph stores a large amount of heterogeneous information, and our approach can relatively well address such issues by using the model’s HGTRA module. We also found that the property character embedding module played an important role in the model’s final performance. This module can preliminarily reduce the heterogeneity of the knowledge graph through predicate alignment, providing a foundation for subsequent work. Furthermore, it can further enrich the available triplets by using transitivity rules. The processed relationship triplets can be transferred to the HGTRA module by the PC module, thereby improving the model’s performance. In summary, our model has tried its best to reduce the heterogeneity of the knowledge graph. The experimental results show that the design of these two modules is relatively effective for entity alignment tasks.

4.4. Efficiency Study of Entity Alignment Method

In this section, we conducted a comparative evaluation of the efficiency of various models, and early stopping was applied to all models. Please refer to Table 6 and Table 7 for details.
It is worth mentioning that in Table 6, in order to objectively evaluate the running efficiency of each model, we measured the average execution time of training, validation, and testing during five runs. Among all the methods, MTransE has the lightest implementation with only two layers of entity and relation embeddings and a simpler scoring function, thus it has the shortest running time. Except for MTransE and JAPE, RDGCN achieved the best performance on the four datasets mentioned above due to its utilization of a wider entity neighborhood in the knowledge graph during training. This method requires more training time, i.e., longer epochs, and for specific information please refer to Table 7. However, overall, RDGCN’s efficiency is considerable, and its convergence speed is faster. In addition, RDGCN is faster than our unsupervised method PCE-HGTRA, because PCE-HGTRA needs to iterate multiple times in the character embedding module, using all possible descriptive text values to reinforce the quality of embedding, while the latter can better adapt to situations where seeds are often unavailable in real-world environments. Overall, our method can achieve model convergence with fewer epochs compared to other methods. In terms of total running time, our model does not have an advantage because frequent interactions between the two modules are required, and an iterative mechanism is added to increase the number of available entities to achieve better performance to cope with various complex situations in real-world environments.

5. Conclusions

The translation-based approach typically embeds two different knowledge graphs into separate vector spaces and then uses technical means to transform the content of the two vector spaces into the same space to achieve entity alignment. However, this method generally achieves poor results when faced with entity alignment tasks. This is primarily due to their inadequate consideration of the heterogeneous information present in knowledge graphs and their inability to effectively extract useful heterogeneous information for the alignment of entities. Consequently, we present a novel entity alignment framework, PCE-HGTRA, which capitalizes on relationship and property triplets, as well as other forms of heterogeneous information to fully leverage the inherent information present in the knowledge graph, thereby enhancing alignment accuracy. We improved the heterogeneous model HGTRA for property and relationship structures, enabling the model to better capture heterogeneous neighborhood similarity during entity alignment. Experimental results demonstrate the superior performance of PCE-HGTRA compared to most existing models. Moving forward, we plan to explore more effective methods for mining heterogeneous information in the knowledge graph to improve entity alignment effectiveness.

Author Contributions

Validation, H.L.; Formal analysis, Y.Q.; Resources, H.Z.; Writing—original draft, Z.H. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Project of Science and Technology Tackling Key Problems in Henan Province of China under Grant 222102210234 and 232102210035.

Institutional Review Board Statement

Research does not require ethical approval, which excludes this statement.

Informed Consent Statement

Research not involving humans excludes this statement.

Data Availability Statement

All the data used in the article can be found in the article.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Zhang, F.; Yang, L.; Li, J.; Cheng, J. A survey of entity alignment research. J. Comput. Sci. 2022, 45, 1195–1225. [Google Scholar]
  2. Zhuang, Y.; Li, G.; Feng, J. A survey on knowledge base entity alignment techniques. J. Comput. Res. Dev. 2016, 53, 165–192. [Google Scholar]
  3. Mikolov, T.; Chen, K.; Corrado, G.; Dean, J. Efficient Estimation of Word Representations in Vector Space. arXiv 2013, arXiv:1301.3781. [Google Scholar]
  4. Meng, P. A survey on entity alignment based on graph neural networks. Mod. Comput. 2020, 2020, 37–40. [Google Scholar]
  5. Xu, Y.; Zhang, H.; Cheng, K.; Liao, X.; Zhang, Z.; Li, L. A survey of knowledge graph embedding. J. Comput. Eng. Appl. 2022, 58, 30–50. [Google Scholar]
  6. Wang, Z.; Lv, Q.; Lan, X.; Zhang, Y. Cross-lingual Knowledge Graph Alignment via Graph Convolutional Networks. In Proceedings of the EMNLP, Brussels, Belgium, 31 October–4 November 2018. [Google Scholar]
  7. Wu, Y.; Liu, X.; Feng, Y.; Wang, Z.; Yan, R.; Zhao, D. Relation-Aware Entity Alignment for Heterogeneous Knowledge Graphs. In Proceedings of the IJCAI, Macao, China, 10–16 August 2019. [Google Scholar]
  8. Sun, Z.; Wang, C.; Hu, W.; Chen, M.; Dai, J.; Zhang, W.; Qu, Y. Knowledge Graph Alignment Network with Gated Multi-Hop Neighborhood Aggregation. In Proceedings of the AAAI, New York, NY, USA, 7–12 February 2020. [Google Scholar]
  9. Teong, K.S.; Soon, L.K.; Su, T.T. Schema-Agnostic Entity Matching using pre-trained Language Models. In Proceedings of the 29th ACM International Conference on Information & Knowledge Management, Virtual Event, Ireland, 19–23 October 2020; pp. 2241–2244. [Google Scholar]
  10. Kang, S.; Ji, L.; Liu, S.; Ding, Y. A Cross-lingual Entity Alignment Model Based on Entity Descriptions and Knowledge Vector Similarity. J. Electron. 2019, 47, 1841–1847. [Google Scholar]
  11. Wu, Y.; Liu, X.; Feng, Y.; Wang, Z.; Zhao, D. Jointly Learning Entity and Relation Representations for Entity Alignment. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), Hong Kong, China, 3–7 November 2019; pp. 240–249. [Google Scholar]
  12. Wu, Y.; Liu, X.; Feng, Y.; Wang, Z.; Zhao, D. Neighborhood Matching Network for Entity Alignment. In Proceedings of the ACL, Online, 5–10 July 2020. [Google Scholar]
  13. Li, Y.; Gu, C.; Dullien, T.; Vinyals, O.; Kohli, P. Graph Matching Networks for Learning the Similarity of Graph Structured Objects. In Proceedings of the ICML, Long Beach, CA, USA, 9–15 June 2019. [Google Scholar]
  14. Bordes, A.; Usunier, N.; Garcia-Duran, A.; Weston, J.; Yakhnenko, O. Translating Embeddings for Modeling Multi-relational Data. In Proceedings of the NeurIPS, Lake Tahoe, Nevada, USA, 5–10 December 2013. [Google Scholar]
  15. Chen, M.; Tian, Y.; Yang, M.; Zaniolo, C. Multilingual Knowledge Graph Embeddings for Cross-lingual Knowledge Alignment. In Proceedings of the IJCAI, Melbourne, Australia, 19–25 August 2017. [Google Scholar]
  16. Sun, Z.; Hu, W.; Li, C. Cross-lingual entity alignment via joint property-preserving embedding. In Proceedings of the International Semantic Web Conference (ISWC), Vienna, Austria, 21–25 October 2017; pp. 628–644. [Google Scholar]
  17. Zhu, H.; Xie, R.; Liu, Z.; Sun, M. Iterative Entity Alignment via Joint Knowledge Embeddings. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, Melbourne, Australia, 19–25 August 2017. [Google Scholar]
  18. Pei, S.; Yu, L.; Hoehndorf, R.; Zhang, X. Semi-supervised entity alignment via knowledge graph embedding with awareness of degree difference. In Proceedings of the WWW, San Francisco, CA, USA, 13–17 May 2019; pp. 3130–3136. [Google Scholar]
  19. Schlichtkrull, M.; Kipf, T.N.; Bloem, P.; Van Den Berg, R.; Titov, I.; Welling, M. Modeling relational data with graph convolutional networks. In Proceedings of the ESWC, Heraklion, Crete, Greece, 3–7 June 2018. [Google Scholar]
  20. Busbridge, D.; Sherburn, D.; Cavallo, P.; Hammerla, N.Y. Relational Graph Attention Networks. In Proceedings of the ICLR, New Orleans, LA, USA, 6–9 May 2019. [Google Scholar]
  21. Wang, X.; Ji, H.; Shi, C.; Wang, B.; Ye, Y.; Cui, P.; Yu, P.S. Heterogeneous Graph Attention Network. In Proceedings of the WWW, San Francisco, CA, USA, 13–17 May 2019. [Google Scholar]
  22. Zhang, C.; Song, D.; Huang, C.; Swami, A.; Chawla, N.V. Heterogeneous Graph Neural Network. In Proceedings of the SIGKDD, Anchorage, AK, USA, 4–8 August 2019. [Google Scholar]
  23. Hu, Z.; Dong, Y.; Wang, K.; Sun, Y. Heterogeneous Graph Transformer. In Proceedings of the WWW, Taiwan, China, 20–24 April 2020. [Google Scholar]
  24. Mei, X.; Cai, X.; Yang, L.; Wang, N. Relation-aware Heterogeneous Graph Transformer based drug repurposing. Expert Syst. Appl. 2022, 190, 116165. [Google Scholar] [CrossRef]
  25. Yang, Y.; Huang, C.; Xia, L.; Li, C. Knowledge Graph Contrastive Learning for Recommendation. In Proceedings of the SIGIR, Madrid, Spain, 11–15 July 2022. [Google Scholar]
  26. Cao, X.; Shi, Y.; Wang, J.; Yu, H.; Wang, X.; Yan, Z. Cross-modal Knowledge Graph Contrastive Learning for Machine Learning Method Recommendation. In Proceedings of the ACM MM, Lisboa, Portugal, 10–14 October 2022. [Google Scholar]
  27. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the CVPR, Las Vegas, NV, USA, 27–30 June 2016. [Google Scholar]
  28. Sun, Z.; Zhang, Q.; Hu, W.; Wang, C.; Chen, M.; Akrami, F.; Li, C. A Benchmarking Study of Embedding-based Entity Alignment for Knowledge Graphs. In Proceedings of the PVLDB, Online, 31 August–4 September 2020. [Google Scholar]
  29. Rebele, T.; Suchanek, F.M.; Hoffart, J.; Biega, J.; Kuzey, E.; Weikum, G. YAGO: A multilingual knowledge base from wikipedia, wordnet, and geonames. In Proceedings of the ISWC, Kobe, Japan, 17–21 October 2016; Volume LNCS 9982, pp. 177–185. [Google Scholar]
  30. Vrandecic, D.; Krotzsch, M. Wikidata: A free collaborative knowledgebase. Commun. ACM 2014, 57, 78–85. [Google Scholar] [CrossRef]
  31. Lehmann, J.; Isele, R.; Jakob, M.; Jentzsch, A.; Kontokostas, D.; Mendes, P.N.; Hellmann, S.; Morsey, M.; van Kleef, P.; Auer, S.; et al. DBpedia–A large-scale, multilingual knowledge base extracted from wikipedia. Semant. Web J. 2015, 6, 167–195. [Google Scholar] [CrossRef]
Figure 1. Overview of the framework of PCE-HGTRA.
Figure 1. Overview of the framework of PCE-HGTRA.
Applsci 13 05876 g001
Figure 2. Overview of the framework of HGTRA.
Figure 2. Overview of the framework of HGTRA.
Applsci 13 05876 g002
Table 1. Statistics of datasets.
Table 1. Statistics of datasets.
DatasetsKGsEntitiesRelationsRel.TriplesPro.Triples
EN-DE-15K-V1English15,00021547,67683,755
German15,00013150,419156,148
EN-DE-15K-V2English15,00016984,86781,988
German15,0009692,632186,333
EN-FR-15K-V1English15,00026747,33473,121
French15,00021040,86467,167
EN-FR-15K-V2English15,00019396,31852,355
French15,00016680,11256,113
Table 2. Results from the experiments conducted on EN-DE-15K-V1 and EN-DE-15K-V2 datasets.
Table 2. Results from the experiments conducted on EN-DE-15K-V1 and EN-DE-15K-V2 datasets.
DatasetsEN-DE-15K-V1EN-DE-15K-V2
ModelHits@1Hits@5Hits@10MRHits@1Hits@5Hits@10MR
MTransE11.8524.1530.42586.781.95.397.961045.27
JAPE12.8226.8634.13342.672.576.9210.04847.1
IPTransE50.2368.3276.2183.0160.7476.4382.0223.93
RDGCN43.3855.3159.47828.3858.5769.8373.35560.06
SEA53.4572.3180.05125.2560.5578.1484.2316.07
IMUSE61.0175.3880.3376.7563.0378.3282.8219.71
GCN-Align47.0167.8675.05150.4534.9755.0262.89130.81
PCE-HGTRA62.6376.7780.8468.7464.9780.7685.5215.93
Improv.best1.621.390.518.011.942.441.290.14
Table 3. Results from the experiments conducted on EN-FR-15K-V1 and EN-FR-15K-V2 datasets.
Table 3. Results from the experiments conducted on EN-FR-15K-V1 and EN-FR-15K-V2 datasets.
DatasetsEN-FR-15K-V1EN-FR-15K-V2
ModelHits@1Hits@5Hits@10MRHits@1Hits@5Hits@10MR
MTransE18.6737.5646.75284.348.8819.4825.38476.9
JAPE20.9441.6551.28196.1620.1738.9747.73141.81
IPTransE23.0946.5657.63454.6634.0862.7374.4739.65
RDGCN20.1233.2838.271513.9222.7237.743.561209.87
SEA28.6453.6364.91319.9835.2764.3576.432.81
IMUSE54.2069.0075.11121.8134.9760.0870.9934.11
GCN-Align35.4460.9170.01228.3735.6363.8179.9380.27
PCE-HGTRA62.1474.879.0551.9534.6461.9772.8521.99
Improv.best7.945.483.9469.86---10.82
Table 4. Ablation study of PCE-HGTRA on the EN-DE-15K-V1 and EN-DE-15K-V2 datasets.
Table 4. Ablation study of PCE-HGTRA on the EN-DE-15K-V1 and EN-DE-15K-V2 datasets.
DatasetsEN-DE-15K-V1EN-DE-15K-V2
ModelHits@1Hits@5Hits@10MRHits@1Hits@5Hits@10MR
PCE-HGTRA62.6376.7780.8468.7464.9780.7685.5215.93
PCE-HGTRA w/o PCE51.8569.7176.7117562.6878.8784.7220.15
PCE-HGTRA w/o HGTRA43.3855.3159.47828.3858.5769.8373.35560.06
Table 5. Ablation study of PCE-HGTRA on the EN-FR-15K-V1 and EN-FR-15K-V2 datasets.
Table 5. Ablation study of PCE-HGTRA on the EN-FR-15K-V1 and EN-FR-15K-V2 datasets.
DatasetsEN-FR-15K-V1EN-FR-15K-V2
ModelHits@1Hits@5Hits@10MRHits@1Hits@5Hits@10MR
PCE-HGTRA62.1474.879.0551.9534.6461.9772.8521.99
PCE-HGTRA w/o PCE31.0352.3661.57384.833.7564.6276.3327.53
PCE-HGTRA w/o HGTRA20.1233.2838.271513.9522.7237.743.561209.89
Table 6. The train+validation+test time (execution time in seconds) of the method in each dataset.
Table 6. The train+validation+test time (execution time in seconds) of the method in each dataset.
Model/
Datasets
EN-DE-15K-V1EN-DE-15K-V2EN-FR-15K-V1EN-FR-15K-V2
MTransE520.89 + 618.73 + 33.35407.15 + 562.43 + 40.33469.68 + 598.83 + 29.64572.99 + 552.66 + 32.64
JAPE589.79 + 682.37 + 36.61538.12 + 617.01 + 41.19566.28 + 657.26 + 31.01510.89 + 624.47 + 36.02
IPTransE20,783.12 + 20,411.01 + 33.9117,016.05 + 25,541.36 + 40.8712,777.05 + 13,019.38 + 32.5120,759.59 + 21,517.86 + 41.32
RDGCN1911.26 + 6017.83 + 136.294239.44 + 2433.15 + 140.603901.33 + 3782.80 + 132.754206.55 + 7754.57 + 136.24
SEA5035.92 + 6096.29 + 24.225035.92 + 6215.20 + 31.183443.45 + 2947.20 + 22.445780.66 + 3723.51 + 25.69
IMUSE8429.14 + 10,718.46 + 194.779830.71 + 11,757.12 + 207.658375.05 + 10,654.46 + 161.949956.91 + 12,242.45 + 132.78
GCN-Align8276.27 + 9297.59 + 73.616503.66 + 10,508.86 + 100.045395.27 + 6911.49 + 100.016356.06 + 10,320.45 + 104.57
PCE-HGTRA7290.52 + 10,545.98 + 26.567828.82 + 9892.24 + 31.765167.42 + 6095.57 + 25.954524.95 + 7217.73 + 27.88
Table 7. Number of epochs used for training and validation.
Table 7. Number of epochs used for training and validation.
Model/DatasetsEN-DE-15K-V1EN-DE-15K-V2EN-FR-15K-V1EN-FR-15K-V2
MTransE40 + 4030 + 3040 + 4030 + 30
JAPE40 + 4030 + 3040 + 4030 + 30
IPTransE710 + 560410 + 610310 + 210410 + 350
RDGCN70 + 12070 + 6070 + 7070 + 160
SEA270 + 380270 + 290240 + 180330 + 180
IMUSE1000 + 10001000 + 10001000 + 10001000 + 1000
GCN-Align2000 + 20002000 + 20002000 + 20002000 + 2000
PCE-HGTRA360 + 360270 + 280220 + 230170 + 260
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Li, H.; Han, Z.; Zhu, H.; Qian, Y. A Novel Embedding Model for Knowledge Graph Entity Alignment Based on Graph Neural Networks. Appl. Sci. 2023, 13, 5876. https://doi.org/10.3390/app13105876

AMA Style

Li H, Han Z, Zhu H, Qian Y. A Novel Embedding Model for Knowledge Graph Entity Alignment Based on Graph Neural Networks. Applied Sciences. 2023; 13(10):5876. https://doi.org/10.3390/app13105876

Chicago/Turabian Style

Li, Hongchan, Zhaoyang Han, Haodong Zhu, and Yuchao Qian. 2023. "A Novel Embedding Model for Knowledge Graph Entity Alignment Based on Graph Neural Networks" Applied Sciences 13, no. 10: 5876. https://doi.org/10.3390/app13105876

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop