# Multi-Modal Entity Alignment Method Based on Feature Enhancement
## 2 Materials and Methods
### Neighborhood Structure Embedding  
Most entity alignment models use graph convolutional networks (GCNs) or graph attention networks (GATs) to structurally model the relationship triples of entities. The formula for using a vanilla GAT [14] to obtain entity structure embedding is shown as follows:  
\[e_{ij}=LeakyReLU\left(\overset{\rightarrow}{\boldsymbol{a}}^{T}\left[ \left.\overset{\rightarrow}{\boldsymbol{W}h_{i}}\right|\left|\left|\overset{ \rightarrow}{\boldsymbol{W}h_{j}}\right.\right]\right) \tag{1}\]  
\[\alpha_{ij}=softmax(e_{ij})=\frac{exp(e_{ij})}{\sum\limits_{k\in N_{i}}exp(e_{ ik})} \tag{2}\]  
\[h_{i}^{g}=\sigma\left(\sum\limits_{j\in N_{i}}\alpha_{ij}h_{j}^{g}\right) \tag{3}\]  
where \(\overset{\rightarrow}{h_{i}}\) is the original feature of \(entity_{i}\); \(e_{ij}\) means similarity coefficient between entities; \(\boldsymbol{W}\) is the shared weight matrix; \(\overset{\rightarrow}{\boldsymbol{a}}^{T}\) is the single-layer feed forward neural network; \(\sigma\) is the activation function; \(||\) means matrix splicing; \(\alpha_{ij}\) means the importance of \(entity_{i}\); \(e_{ij}\) is \(h_{i}^{g}\) is the hidden state of \(entity_{i}\) by aggregating all its one-hop neighbors \(N_{i}\); and \(softmax\) and \(LeakyReLU\) are corresponding nonlinear functions. However, when applied to the entity alignment task, the vanilla graph attention network has two problems: the shared weight matrix and the static property. Figure 2: The model architecture of MEAFE. Taking use of MEAFE to align Chinese and English multi-modal knowledge graphs as an example. Firstly, in the entity alignment task, there are often significant differences between the entity nodes in the knowledge graph and their adjacent nodes. For example, the target entity node and its attribute nodes usually have significant structural differences. Applying shared weight matrices to different types of nodes can make it difficult for the model to correctly distinguish between entity nodes and adjacent nodes, resulting in a reduction in the model's representational capacity. To address this problem, MEAFE uses two different weight matrices, \(\mathbf{W_{1}}\) and \(\mathbf{W_{2}}\), to calculate different entity nodes, which enhances the discrimination ability of the GAT for nodes, and then the network can better extract features. The modified attention coefficient calculation formula is as follows:  
\[e_{ij}=LeakyReLU\left(\overset{\rightarrow}{\mathbf{a}}^{T}\left[\mathbf{W_{1}} \overset{\rightarrow}{h_{i}}\left|\left|\mathbf{W_{2}}\overset{\rightarrow}{h_{j} }\right|\right.\right)\right. \tag{4}\]  
\[\alpha_{ij}=softmax(LeakyReLU\left(\overset{\rightarrow}{\mathbf{a}}^{T}\left[ \mathbf{W_{1}}\overset{\rightarrow}{h_{i}}\left|\left|\mathbf{W_{2}}\overset{ \rightarrow}{h_{j}}\right|\right.\right)\right) \tag{5}\]  
Secondly, from the finiteness of the relationship between adjacent nodes and entity nodes and the monotonicity of _softmax_ and _LeakyReLU_, it can be seen that there exists node \(j\) for any node \(i\) to maximize \(\overset{\rightarrow}{\mathbf{a}}^{T}\left[\mathbf{W}\overset{\rightarrow}{h_{j}} \right]\), so that the vanilla graph attention network always tends to give node \(j\) the largest attention coefficient while ignoring the different relationships between different input nodes; that is, given a group of nodes and a pre-trained GAT layer, the attention function \(\alpha\) has the same maximum tendency node \(j\), so the vanilla GAT is more suitable for mapping all inputs to the constant mapping of the same output. However, it is difficult to build a better model when different query inputs have different correlations with different nodes in the entity alignment task.