## 2 Materials and Methods
### Multi-Turn Vector Resampling Module  
The multi-turn vector resampling module is designed to extract feature words and optimize the capturing effect of the input by changing the output scale of all of the vectors in V. This module selects a number of k indexes for the feature words with loops of \(\mathrm{t}(0\leq\mathrm{t}<\mathrm{k})\). These positions can represent the corresponding feature words, so as to regard them as self-information enhancement. Using a brand-new multi-loop method, the encoder can collect different semantic states in all t steps as the next inputs. When \(\mathrm{t}=0\), we choose \(\mathrm{v_{cls}}\) as \(\mathrm{v_{cur}}\) and a zero vector as \(\mathrm{v_{pre}}\). These vectors are combined into a new sequence, which is the input of a two-layer transformer network. It outputs a re-encoded fusion result \(h_{\mathrm{T}}\) from the source representing the semantic information that can be viewed  
Figure 3: The structure of SAFW. The sequence \(S=\left\{w1,\ w2,\ \dots,\ wn\right\}\) is converted into relation-encoded sequence \(V^{r}\) and entity encoded sequence \(V^{e}\) by the multi-turn vector resampling module and linear mapping function. Then, the two sequences are merged with the union-type candidates to select the entities used to form the relation quintuples. The resampling selects \(t\) feature words within \(t\) times. The mask only contains 1 and 0, indicating whether the corresponding words are available or not (green means available, while red means not available). The available indexes are all tokens, except [CLS] and [SEP], and are masked one by one until the time \(t\) or all-covered. as a transition from the previous state to the current state. Note that the equations with (t) are calculated in the loop and with the process of the t turn, as follows:  
\[h_{T}(t)=Transformer\Big{(}V_{pre(t)},V_{cur(t)}\Big{)} \tag{1}\]  
\[V_{pre(t+1)}=h_{T}(t) \tag{2}\]  
where \(h_{T}\) is copied n times as \(nh_{T}\), so that they can be merged and keep the same length as the input data. In the t + 1 stage, the value will be fed into vpre. In time t = 0, we also set a 0 vector within V length as the initial sequence mask M(t). If a word is selected, the mask at the corresponding position changes to 1 in the next round, which means that the word is masked in the calculation. The pointer attention decoder reallocates weights for all of the vectors in the sequence, which is the key solution for feature word extraction rendered by the samples. With the progress of training, the weights of SAFW become more and more reasonable, and the vector selection is adjusted appropriately at each time step. This novel strategy ensures that the newly generated probability distribution depends on the previous step value, thus improving the fault tolerance of capturing an uncertain number of keywords. We employ a linear mapping function to transform all of the inputs into the same shape. In this way, the result will be bound with V (without vcls and vsep) and sent into a nonlinear activation function to obtain the possibility. The maximum value of the possibility points to the selected position in the current round, leaving the next stage result, and adding it to the probability group \(\alpha\) as \(\alpha\)(t). The max-pointer position represents the extracted words, while the source represents all of the basic vectors, implemented by scatter and max functions and changing the \(\alpha\) to one-hot form, as follows:  
\[h_{p}(t)=W_{p}concat(ch_{T}(t),V)+b_{p} \tag{3}\]  
\[\alpha(t)=Softmax\big{(}M(t)+W_{x}\big{(}tanh\big{(}h_{p}(t)\big{)}\big{)}+b_{ x}\big{)} \tag{4}\]  
\[onehota(t)=scatter(max(\alpha(t))) \tag{5}\]  
\[M(t+1)=M(t)+onehota(t) \tag{6}\]  
where Wp is the mapping trainable parameters of the linear function and Wx is the trainable weights for integrating the sum of the two source vectors. Here, M(t) is updated by one\(h\)tot\(\alpha\)(t). This mask growth mechanism is an unsupervised way to prevent the model from selecting the words that it has selected before.