# Entity-Alignment Interaction Model Based on Chinese RoBERTa
## 3 Methodology
### The Model Framework
#### 3.2.2 RoBERTa-Based Interaction Model
\(X^{r}(B_{i})\) for all rows is then averaged into a row-based similarity embedding \(v^{r}(N(e),N(e^{\prime}))\), as follows:  
\[b_{i}^{max}=max_{j=0}^{n}\{b_{i0},\ldots,b_{ij},\ldots,b_{in}\} \tag{4}\] \[X_{k}\big{(}b_{i}^{max}\big{)}=exp\Big{[}-\frac{\big{(}b_{i}^{ max}-\mu_{k}\big{)}^{2}}{2\sigma_{k}^{2}}\Big{]}\] \[X^{r}(B_{i})=\big{[}X_{1}\big{(}b_{i}^{max}\big{)},\ldots,X_{k} \big{(}b_{i}^{max}\big{)},\ldots,X_{k}\big{(}b_{i}^{max}\big{)}\big{]}\] \[v^{r}(N(e),N(e^{\prime}))=\frac{1}{|N(e)|}\sum\limits_{i=1}^{|N( e)|}logX^{r}(B_{i})\]  
where \(n\) is the maximum number of neighbors, \(K\) denotes the number of RBF kernels, and \(r\) denotes row aggregation. If the number of \(|N(e)|\) is less than \(n\), \(B\) will be filled with values of 0. The kernel function is used to convert one-dimensional similarity to k-dimensional similarity for enhanced differentiation, where the kernel function with \(\mu=1\) and \(\sigma\to 0\) only considers exact matching between neighbors, while the other kernel functions capture semantic matching between neighbors. Features are aggregated along rows in the above process to reflect the degree of similarity of each neighbor \(e_{i}\in N(e)\) with the neighbors \(N(e^{\prime})\) of \(e^{\prime}\). Similarly, we also aggregated features along the columns to obtain the degree of similarity of each neighbor \(e^{\prime}_{j}\in N(e^{\prime})\) with the neighbors \(N(e)\) of \(e\). Finally, the row-aggregation vector \(v^{r}\) is spliced with the column aggregation vector \(v^{e}\) as the final similarity embedding, as follows:  
\[v\big{(}N(e),N\big{(}e^{\prime}\big{)}\big{)}=v^{r}\big{(}N(e),N\big{(}e^{\prime }\big{)}\big{)}\oplus v^{e}\big{(}N(e),N\big{(}e^{\prime}\big{)}\big{)} \tag{5}\]  
where \(\oplus\) denotes the splice operation and \(c\) denotes column aggregation, the neighbor interaction is shown in Figure 3. First, we computed the similarity matrix between neighbors \(N(e)\) and \(N(e^{\prime})\), and then applied the maximum pooling operation to each row to obtain the maximum similarity \(b^{max}_{i}\) between each neighbor and the most similar neighbor. Then \(b^{max}_{i}\) is converted into a row-based feature vector \(X^{r}(B_{i})\), and the RBF kernel function is used to enhance the distinguishing ability of the features. Different kernel functions are used here to capture the exact match and semantic similarity between neighbors. Finally, the row aggregate feature vector \(v^{r}(N(e),N(e^{\prime}))\) and the column aggregate feature vector \(v^{e}(N(e),N(e^{\prime}))\) are concatenated as the final neighbor similarity representation. In addition, in order to consider the influence of neighbor relationships, the similarity matrix \(M\) between neighbor relationships is also calculated, and it is element-wise multiplied with the entity similarity matrix to enhance the support of similar neighbor relationships for entity alignment. We explain the similarity matrix \(M\) between neighbor relationships below. **Neighboring Relationship Mask Matrix. ** For entities \(e\) and \(e^{\prime}\), their neighbor triples are \((e,r_{i},e_{i})\) and \(\Big{(}e^{\prime},r^{\prime}_{j},e^{\prime}_{j}\Big{)}\), respectively, entities \(e\) and \(e^{\prime}\) are more likely to be aligned if the neighbor entities \(e_{i}\) and \(e^{\prime}_{j}\) are similar and the relationships \(r_{i}\) and \(r^{\prime}_{j}\) are also similar. Based on the above assumptions, we computed not only the similarity matrix between neighbor entities \(B\), but also the similarity matrix between neighbor relationships \(M\). \(M\) was regarded as a mask matrix and was multiplied by \(B\), i.e., \(B=B\otimes M\), where \(\otimes\) denotes the product of elements. To compute \(M\), we needed to embed each neighbor relationship. We averaged \(T(e)\) over all associated head and tail entities and joined them to represent the relationship. **Interactions Between Multi-hop Neighbors. ** One-hop neighbor interaction may miss some important information because it is limited to a single path of information transfer.