## 4 Experiments
### Main Results  
Table 4 summarizes the results of our model compared to other baseline methods on the two datasets. We evaluated the models using precision, recall, and \(F1\) score, considering the extracted triples were correct only when the subject, object, and relationship matched the gold standard annotations completely. We selected several classic and efficient models from the past three years for comparison:  
1. CasRel [8] uses a cascaded framework for sequential extraction, which is relatively slow. Our model can extract all triplets in the text at once. 2. TPLinker [10] uses a one-stage token-linking approach for joint relation triplet extraction but requires multiple supporting modules. Our model only needs one module to extract complete triplets. 3. PRGC [25] divides joint relation triplet extraction into three subtasks, which can lead to exposure bias. In contrast, our model treats it as a holistic table-filling task, avoiding exposure bias. 4. EmRel [30] represents relations as embedding vectors but still requires multiple components. It refines the representation of entities and relations through an attention-based fusion module. 5. GRTE [12] is the state-of-the-art method for the NYT dataset, but it requires multiple class labels to determine a complete entity pair. Our method only requires binary classification. 6. OneRel [11] is the state-of-the-art method for the WebNLG dataset, achieving improved triplet recognition efficiency through a one-stage single-model approach. However, it still requires triplet extraction in a three-dimensional table, whereas ours only requires extraction in a two-dimensional table, reducing memory usage. All the experimental results of the baselines were directly sourced from the original literature, and the performance of each model was compared using precision (Prec. ), recall (Rec. ), and \(F1\) score. Their calculation formulas are as follows:  
\[Precision=\frac{TP}{TP+FP} \tag{12}\]  
\[Recall=\frac{TP}{TP+FN} \tag{13}\]  
\[F1=\frac{2\times Precision\times Recall}{Precision+Recall} \tag{14}\]  
where \(TP\) represents instances correctly predicted as positive by the model, \(FP\) represents instances incorrectly predicted as positive by the model but are actually negative, and \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Dataset**} & \multicolumn{5}{c}{**Triples in Test Set**} & \multicolumn{5}{c}{**Number of Triplets**} \\ \cline{2-7}  & **Normal** & **SEO** & **EPO** & **SOO** & **N = 1** & **N > 1** \\ \hline NYT* & 3266 & 1297 & 978 & 45 & 3244 & 1756 \\ NYT & 3222 & 1273 & 969 & 117 & 3089 & 1911 \\ WebNLG* & 245 & 457 & 26 & 84 & 266 & 437 \\ WebNLG & 239 & 448 & 6 & 85 & 256 & 447 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Statistics on the number of triples in the test set, where N represents the number of triples in a sentence \(FN\) represents instances incorrectly predicted as negative by the model but are actually positive. The experimental results show that our model achieved the highest \(F1\) score and precision on the NYT and WebNLG datasets, outperforming the \(F1\) score of the second-highest GTE model by 0.3% and its precision by 0.8% and 0.6%, respectively. However, recall was slightly lower than the GTE model. This indicates that our model performed best when the number of relations was relatively small. On the WebNLG dataset, our model achieved a slightly lower \(F1\) score by 0.2% compared to the previous best model, OneRel, but achieved higher precision by 0.6%, maintaining competitiveness. We believe that the main reason for this is that the model's prediction accuracy primarily comes from the attention mechanism, both internal and external to the BERT encoder. The WebNLG* dataset contains up to 171 relations, and when combined with the original input text, the total sequence length exceeds 300. However, the attention calculation and multi-head tensor dot-product methods did not excel in handling long texts.