## 4 Experiments
### Ablation Study  
In this section, we conduct ablation experiments on the NYT dataset to demonstrate the effectiveness of various components in the proposed method. The specific results are shown in Table 9.  
We conducted five sets of experiments, with the first set being our proposed complete model. In the second set, we removed the multi-head tensor dot-product operation and only used the scores obtained from the multi-head self-attention as the final result. Compared to the first group, the \(F1\) score decreased by 0.2%. Although a simpler structure improved the efficiency of the model, it could not fully utilize the semantic information in the language model, resulting in fewer identifiable triples. This was also the reason for the decrease in precision and the increase in recall. Therefore, the addition of additional sentence features is beneficial to this model. In the second group, we removed the multi-head self-attention module from the encoder, resulting in a decrease of 0.3% in the \(F1\) score. This indicates that the internal attention mechanism in the BERT encoder plays an important role in the filling framework. In the third group, we did not use the focal loss function but instead used the traditional binary loss function, resulting in a decrease of 0.4% in the \(F1\) score. In Figure 4, we can observe that whether using the focal loss or the cross-entropy loss, the models converged after around 10,000 steps. However, training with cross-entropy loss (green line) resulted in a significantly slower convergence speed. This is because focal \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multirow{2}{*}{**Element**} & \multicolumn{4}{c}{**NYT\({}^{*}\)**} & \multicolumn{4}{c}{**WebNLG\({}^{*}\)**} \\ \cline{3-8}  & & **Prec.** & **Rec.** & **F1** & **Prec.** & **Rec.** & **F1** \\ \hline \multirow{3}{*}{CasRel} & \((h,t)\) & 89.2 & 90.1 & 89.7 & 95.3 & 91.7 & 93.5 \\ \cline{2-8}  & \(r\) & 96.0 & 93.8 & 94.9 & 96.6 & 91.5 & 94.0 \\ \cline{2-8}  & \((h,r,t)\) & 89.7 & 89.5 & 89.6 & 93.4 & 90.1 & 91.8 \\ \hline \multirow{3}{*}{PRGC} & \((h,t)\) & **94.0** & 92.3 & 93.1 & 96.0 & 93.4 & 94.7 \\ \cline{2-8}  & \(r\) & 95.3 & 96.3 & 95.8 & 92.8 & 96.2 & 94.5 \\ \cline{2-8}  & \((h,r,t)\) & 93.3 & 91.9 & 92.6 & 94.0 & 92.1 & 93.0 \\ \cline{2-8}  & \((h,t)\) & 93.3 & 93.4 & 93.3 & 96.2 & **96.5** & **96.3** \\ \cline{2-8}  & \(r\) & 96.7 & **96.9** & **96.8** & 96.7 & **97.0** & **96.8** \\ \cline{2-8}  & \((h,r,t)\) & 92.8 & 92.9 & 92.8 & 94.1 & **94.4** & **94.3** \\ \hline \multirow{3}{*}{Ours} & \((h,t)\) & 93.9 & **93.5** & **93.7** & **96.2** & 94.6 & 95.4 \\ \cline{2-8}  & \(r\) & **97.0** & 95.7 & 96.3 & **96.9** & 95.7 & 96.3 \\ \cline{1-1} \cline{2-8}  & \((h,r,t)\) & **93.7** & **92.9** & **93.3** & **94.7** & 93.6 & 94.1 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Experimental results on subtasks, where \((h,t)\) represents an entity pair, \(r\) represents a relation contained in a sentence, and \((h,r,t)\) represents a complete relation triple. The best is bold. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multicolumn{4}{c}{**NYT**} \\ \cline{2-5}  & **Params** & **Training Time(s)** & **Memory (M)** & **Inference (ms)** \\ \hline TPLinker & **109,602,962** & 1641 & 4388 & 47.6 \\ OneRel & 112,072,800 & 1758 & 21,254 & **14.4** \\ Ours & 114,810,624 & **1078** & **4246** & 28.3 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: The efficiency comparison of the model on the NYT dataset. Params represents the number of parameters of the encoder in the model. Training time refers to the time required to train an epoch, inference indicates the time required to infer a sentence, and memory indicates the video memory occupied during training. The batch size is set to 8. The best is bold. loss assigns more weight to hard samples, making the model pay more attention to them, which is very helpful for this table-filling method.