# A Novel Embedding Model for Knowledge Graph Entity Alignment Based on Graph Neural Networks
## 3 Proposed Framework
### 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 \"[PERSON]\" and \"[PERSON]\" 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 \(Tp\) is defined as \(h+r\approx f_{p}(p)\). Here, \(f_{p}(p)\) is a composite function, and \(p\) is the property value, \(p\ =\{a_{1},a_{2},\ldots,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}+\ldots+a_{t} \tag{1}\]  
The characters \(a_{1}\), \(a_{2}\), \(\cdots\), \(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_{lstm}(a_{1},a_{2},\ldots,a_{t}) \tag{2}\]  
**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  
Figure 1: Overview of the framework of PCE-HGTRA. property value as the vector representation. The definition of the N-gram-based composite function is shown as follows:  
\[f_{p}(p)=\sum_{n=1}^{N}\left(\frac{\sum_{i=1}^{t}\sum_{j=i}^{n}a_{j}}{t-i-1}\right) \tag{3}\]  
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}=\sum_{t_{p}\in T_{p}}\sum_{t_{p}^{\prime}\in T_{p}^{\prime}}max\left(0, \left[\gamma+\alpha\left(f\left(t_{p}\right)-f\left(t_{p}^{\prime}\right) \right)\right]\right) \tag{4}\]  
The detailed definitions of \(T_{p}\) and \(T_{p}^{\prime}\) are as follows:  
\[T_{p}=\left\{\left\langle h,r,p\right\rangle\in G\right\};f\left(t_{p}\right) =||h+r-f_{p}(p)\,|| \tag{5}\]  
\[T_{p}^{\prime}=\left\{\left\langle h^{\prime},r,p\right\rangle\left|h^{\prime }\in E\right\}\cup\left\{\left\langle h,r,p^{\prime}\right\rangle\left|p^{ \prime}\in A\right\}\right. \tag{6}\]  
where \(T_{p}\) denotes the collection of authentic property triplets within the training dataset; and \(T_{p}^{\prime}\) represents the collection of defective property triplets (where A signifies the collection of properties in G).