# An Ante Hoc Enhancement Method for Image-Based Complex Financial Table Extraction
## 4 Experiments
### Complex Financial Table Extraction Experiment  
After obtaining the semantic matching model, we conducted a complex financial table extraction experiment on dataset B, which consisted of 107 images with 1127 table rows. Three state-of-the-art table extraction methods were employed in the experiment: GrabTab [40], PPstructureV2 [13], and Table Transformer [41]. GrabTab is a commercial table extraction method proposed by Tencent AI Lab in 2023 [40], which is currently the best-performing method according to the scientific complex table datasets SCI-TSR [12] and \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Cross-Encoder** & **Dual-Encoder A** & **Dual-Encoder B** \\ \hline BERT & 0.975 & 0.681 & 0.693 \\ M-BERT & 0.979 & 0.698 & 0.756 \\ RoBERTa & 0.973 & 0.657 & 0.635 \\ ERNIE-2.0 & 0.981 & 0.703 & 0.714 \\ ERNIE-3.0 & 0.983 & 0.705 & 0.723 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Results of the semantic matching experiment. Figure 7: The architecture of the dual encoder. PubTabNet [35]. PPstructureV2 is an open-source method proposed by Baidu AI Lab in 2022 [13]; its performance currently ranks second on PubTabNet [35], after GrabTab. Table Transformer is an open-source table extraction method proposed by Microsoft in 2022 as a baseline for PubTables [41]. In the evaluation process, methods were manually assessed at the row level. A row in the table extraction result was labeled as a true positive if it matched the ground truth of the table, and labeled as a false positive otherwise. We used four evaluation metrics; these were recall score, precision score, F1 score, and TEDS (tree edit distance similarity), as shown in Equations (6)-(9), respectively. In the equations, \(\mathrm{T_{a}}\) and \(\mathrm{T_{b}}\) denote the table extraction result and its corresponding ground truth, respectively; EditDistance is the number of steps needed to transform \(\mathrm{T_{a}}\) to \(\mathrm{T_{b}}\); and \(\mathrm{\mid T\mid}\) is the number of nodes in T. Examples are illustrated in Figure 8 and Supplementary Materials. \[\mathrm{recall}=\frac{\sum\mathrm{true\ positive}}{\sum\mathrm{true\ number\ of\ rows\ of\ the\ table}} \tag{6}\]  
\[\mathrm{precision}=\frac{\sum\mathrm{true\ positive}}{\sum(\mathrm{true\ positive}+\mathrm{false\ positive})} \tag{7}\]  
\[\mathrm{F1}=\frac{2\ \times\ \mathrm{recall\ \times\ precision}}{(\mathrm{ recall}+\mathrm{precision})} \tag{8}\]  
\[\mathrm{TEDS}=1-\frac{\mathrm{EditDistance(T_{a},T_{b})}}{\mathrm{max}(| \mathrm{T_{a}}|,|\mathrm{T_{b}}|)} \tag{9}\]  
The experimental results in Table 2 show that our proposed ACTE method significantly improved the performance of these state-of-the-art table extraction methods. To be specific, ACTE increased the F1 score for ppstructure by 14.36, for Table Transformer by 11.39, and for GrabTab by 5.10. Theoretically, ACTE is applicable to all table extraction methods that take table demarcation lines as features, but not to methods that do not consider demarcation lines, such as GraphTSR [12] and GFTE [22]. To further evaluate ACTE's performance, we carried out a quantitative analysis of the extraction results obtained using GrabTab. We divided the condition of the extraction results into four kinds: successfully extracted rows with correct demarcation lines that were generated by ACTE; successfully extracted rows with incorrect demarcation lines;  
Figure 8: An example of the complex financial table extraction experiment. (**a**) The recognized table of the original image obtained using Table Transformer, in which only three rows are consistent with the ground truth of the table; (**b**) the recognized table of the preprocessed image obtained using Table Transformer, which is completely consistent with the ground truth of the table. unsuccessfully extracted rows with correct demarcation lines; and unsuccessfully extracted rows with incorrect demarcation lines.