# FA-RCNet: A Fused Feature Attention Network for Relationship Classification
## 3 Methodology
### Embedded Layers  
In the embedding layer, the data in the dataset are preprocessed and the two entities in the sentence are annotated by \"S\" and \"#\", respectively. For example, in the following sentence, entity I corresponds to \"woman\" and entity II corresponds to \"village\".  
The $ woman $ was born in the # village #.  
The pre-processed data are embedded by word embedding, location embedding, and segmentation embedding to obtain the embedding vector. The role of word embedding is to convert the text into vectors. The text information is fed into the feature extraction model in the form of vectors. In this paper, word embeddings obtained from pre-training are used. It was shown that word embeddings obtained by training with unlabeled samples have better results than randomly generated word embeddings in the task of relation extraction and relation classification [35].  
The word embedding contains only the information corresponding to a word and does not record the information on the position of the word appearing in the sentence. In this paper, each sentence as a whole is numbered sequentially from 0 according to the order of word occurrences in the sentence. This allows the position of words in the sentence  
\begin{table}
\begin{tabular}{l l} \hline \hline
**Symbol** & **Definition** \\ \hline \(E_{1}\),\(E_{2}\) & The two entities correspond to the hidden layer input fusion vectors. \\ \(\epsilon_{1}^{24}\),\(\epsilon_{1}^{24}\) & The last hidden layer output of the two entities. \\ \(T_{1}\),\(T_{2}\) & \(E_{1}\),\(E_{2}\) is summed with the last hidden layer output to obtain the fusion \\ vector. \\ \(e_{0}\) & The global feature vector output by the last hidden layer. \\ \(e_{0}^{\prime}\) & The output of \(e_{0}\) after passing through the fully connected layer. \\ \(\mu_{B}\),\(\sigma_{B}\) & The mean and variance of a set of eigenvalues. \\ \(T_{1-out}\),\(T_{2-out}\) & Feature amplification attention module’s entity feature output. \\ \(\epsilon_{0-out}\) & Global feature output of the feature amplification attention module. \\ \(T_{1-out}^{\prime}\),\(T_{2-out}^{\prime}\) & The fully connected layer output of \(T_{1-out}\),\(T_{2-out}\). \\ \(\epsilon_{0-out}^{\prime}\) & The fully connected layer output of \(e_{0-out}\). \\ \(T\) & The feature vector after cascading. \\ \(p\) & The probability vector used for classification. \\ \hline \hline \end{tabular}
\end{table}
Table 2: Symbols and definitions.  
Figure 1: The general architecture of the FA-RCNet model.  
to be mapped to numbers. The order of the numbers by their size enables the model to accurately identify the position of the words in the sentence.  
In a practical relational classification task, two entities may appear in two sentences. The same entity in two sentences may have an impact on the meaning of the entities. Even the different order of appearance of two entities in a sentence may have this problem. In this case, it is necessary to use split embedding to distinguish the two sentences. The purpose is to allow the model to obtain an accurate correspondence between entities and clauses. Figure 2 shows the flow of the embedding layer.