# TRUST: An Accurate and End-to-End Table Structure Recognizer Using Splitting-based Transformers

> TRUST proposes an end-to-end split-merge transformer for table structure recognition, using a Query-Based Splitting Module for multi-oriented separator prediction and a Vertex-Based Merging Module for spanning cell recovery.

- Authors: Hunter Heidenreich
- Published: 2022-08-31
- Updated: 2026-03-24
- Paper: Preprint (arXiv) <https://arxiv.org/abs/2208.14687>
- Source: Bevaya Labs, <https://labs.bevaya.ai/>

---


## TL;DR

TRUST is a split-merge table structure recognizer from Baidu that introduces two transformer-based modules: a Query-Based Splitting Module that predicts multi-oriented row/column separators, and a Vertex-Based Merging Module that uses cross-attention between row and column features to determine which grid cells should be merged into spanning cells. The system runs at 10 FPS on an A100 and achieves 97.1% Str-TEDS and 96.2% TEDS on PubTabNet at the time of publication.

## What kind of paper is this?

**Dominant:** $\Psi\_{\text{Method}}$: The core contribution is a two-module architecture for TSR. The paper is structured around specific architectural choices, ablation tables validating each component, and comparison against published baselines. No new dataset or benchmark is introduced, and no formal theoretical analysis is provided.

**Secondary:** None significant.

## What is the motivation?

Table structure recognition requires parsing both the physical coordinates of cells and their logical row/column indices simultaneously. Four challenges make this difficult in practice: spanning cells that occupy multiple rows or columns, unlined or partially-lined tables with no explicit visual delimiters, empty cells that are easily missed, and tables with rotation or linear perspective distortion.

Prior work falls into three families, each with weaknesses. Component-based methods (DeepDeSRT, TableNet, LGPMA) struggle with empty cells and boundary ambiguity in borderless tables. Sequence-based methods (EDD) require large amounts of training data and tend to produce inaccurate cell bounding boxes. Earlier splitting-based methods (SPLERGE, SEM) are promising but inefficient: SEM uses slow RoI operations and BERT-based cell text encoding, while SPLERGE trains its split and merge models independently, which complicates optimization. Neither handles rotated tables reliably.

TRUST targets all four challenges within a single end-to-end trainable framework that keeps the split-merge decomposition while replacing both stages with transformer-based modules.

## What is the novelty?

The core innovation is a pair of transformer-based modules replacing the projection-based splitter of SPLERGE and the region-proposal cell encoder of SEM.

**Query-Based Splitting Module (QBS):** Row and column separators are predicted as a fixed set of $N$ row queries and $M$ column queries. Learnable position embeddings indexed $(0, 1, \ldots, N-1)$ for rows and $(0, 1, \ldots, M-1)$ for columns serve as Transformer decoder queries; flattened CNN feature maps $F^V \in \mathbb{R}^{(H \times W) \times d}$ serve as keys and values. Each query predicts a triple $(c, o, a)$: a binary classification score $c$ indicating whether a separator is present, a spatial offset $o$ from the predefined query position to the separator's starting point on the table boundary, and a rotation angle $a \in [-45^\circ, +45^\circ]$ encoded as a 91-class categorical output. These define a parallelogram-shaped separator, which can represent tilted dividing lines naturally.

**Vertex-Based Merging Module (VBM):** Each intersection of a predicted horizontal and vertical separator forms a vertex. Its feature is constructed by fusing the corresponding row feature $F^r \in \mathbb{R}^{N \times d}$ and column feature $F^c \in \mathbb{R}^{M \times d}$ from QBS. Before fusion, cross-feature enhancement applies cross-attention: row features attend over column features and vice versa, propagating context across both spatial axes. Each of the $N \times M$ vertices then predicts four binary merge decisions, one per adjacent grid pair (top-left/top-right, bottom-left/bottom-right, top-left/bottom-left, top-right/bottom-right).

The combined training loss is:

$$
\begin{aligned}
L = \frac{1}{N\_r} L\_{bce}(y\_{row}, c\_{row}) + \frac{1}{N\_c} L\_{bce}(y\_{col}, c\_{col}) \\\\
+ \frac{1}{N\_{pos}} L\_{ce}(y\_{ang}, c\_{ang}) + \frac{1}{N\_{pos}} L\_{loc}(\hat{s}, s) \\\\
+ \frac{1}{N\_{vtx}} L\_{bce}(y\_{lnk}, c\_{lnk})
\end{aligned}
$$

Row/column classification and link classification each use binary cross-entropy. Rotation angle prediction uses cross-entropy over 91 angle classes. Separator start-point regression uses Smooth L1. Online Hard Example Mining (OHEM) is applied to the classification losses.

## What experiments were performed?

**Datasets:** PubTabNet (500,777 train / 9,115 val / 9,138 test, scientific documents, predominantly simple three-line tables with some multi-span tables) and SynthTable (1,000 train / 1,000 test, synthetic, four difficulty categories: C1 standard with visible lines, C2 standard borderless, C3 spanning-cell, C4 rotated and perspective-distorted). For SynthTable, the authors retrain EDD and SPLERGE themselves for a controlled comparison.

**Metrics:** TEDS (tree-edit-distance similarity, full: structure and content) and Str-TEDS (structure only). OCR on PubTabNet cell content is provided by PSENet (text detection) and MASTER (text recognition) for consistency with prior work.

**Baselines:** EDD, TabStruct-Net, GTE, LGPMA, FLAG-Net on PubTabNet; EDD and SPLERGE on SynthTable.

**Ablations on PubTabNet:**
- Replacing QBS with SPLERGE's split model drops Str-TEDS from 97.1% to 94.8% and TEDS from 96.2% to 93.4%.
- Replacing VBM with heuristic post-processing drops Str-TEDS from 97.1% to 88.3% and TEDS from 96.2% to 85.4%.
- Replacing VBM with SPLERGE's merge model drops Str-TEDS from 97.1% to 96.2% and TEDS from 96.2% to 95.3%.
- Removing cross-feature enhancement from VBM drops Str-TEDS from 97.1% to 90.6% and TEDS from 96.2% to 88.0%.

## What are the outcomes/conclusions?

On PubTabNet, TRUST achieves 97.1% Str-TEDS and 96.2% TEDS, above LGPMA (96.7% / 94.6%) and FLAG-Net (95.1% TEDS). On the rotated SynthTable C4 category, TRUST achieves 92.4% Str-TEDS and 89.2% TEDS, compared to 89.9% / 81.4% for EDD and 85.6% / 74.9% for SPLERGE.

At 10 FPS on an A100, TRUST runs at roughly 5x the throughput of SEM (1.94 FPS) and 10x that of EDD (1 FPS), attributed to the parallel structure of the transformer decoders and the absence of RoI-based operations.

Ablations support the paper's design rationale: both QBS and VBM are meaningful contributors, and cross-feature enhancement within VBM accounts for the majority of the merging quality (an 8.2 percentage point TEDS improvement on PubTabNet when removed).

The main failure mode the authors acknowledge is strong perspective distortion; qualitative results show recognizable degradation in those cases. Additional limitations not discussed in the paper include: SynthTable has only 1,000 training samples, making conclusions about rotated-table handling less robust; the evaluation does not cover FinTabNet, WTW, SciTSR, or ICDAR competition sets used by many contemporaneous methods; no code or weights were released.

## Reproducibility

### Models

- **Backbone:** ResNet-18 pre-trained on ImageNet, with FPN for multi-scale feature merging.
- **Decoder modules:** Standard Transformer decoder layers for the row and column branches of QBS, and for the cross-feature enhancement sub-modules of VBM.
- **Parameter count:** Not reported.
- **Weights:** Not released. No code repository or model hub link is provided.

### Algorithms

- **Framework:** PaddlePaddle (Baidu's deep learning framework). This represents a meaningful barrier to reproduction outside Baidu's ecosystem; porting to PyTorch or JAX is not discussed.
- **Optimizer:** Adam.
- **Learning rate:** 0.0001. No schedule is mentioned.
- **Batch size:** 16.
- **Training duration:** 20 epochs.
- **Input resolution:** Images resized to 640 $\times$ 640 with random scaling.
- **Max query count:** $N$ (row) and $M$ (column) maximum separator counts are predefined but their exact values are not specified.
- **OHEM:** Applied to classification losses; negative-to-positive ratio is not specified.

### Data

- **PubTabNet:** Publicly available; CDLA-Permissive-1.0 annotations; underlying PMCOA images carry mixed per-article licenses.
- **SynthTable:** From the TIES paper (Qasim et al., ICDAR 2019); 1,000 train / 1,000 test. License and download availability are not discussed in the TRUST paper.

### Evaluation

- TEDS and Str-TEDS are the only reported metrics; no error bars, confidence intervals, or multiple-seed results are reported.
- SynthTable baselines were retrained by the TRUST authors rather than using original checkpoints, which introduces uncertainty about baseline fidelity.
- No evaluation on FinTabNet, WTW, SciTSR, or any ICDAR competition benchmark.

### Hardware

- **Training and inference:** NVIDIA Tesla A100 64 GB. The paper uses singular "GPU" throughout, indicating single-device training.
- **Inference speed:** 10 FPS on A100.
- **Training time:** Not reported.
- **Deployment considerations:** The combination of PaddlePaddle dependency and unavailable weights makes independent reproduction require substantial porting effort.

## BibTeX

```bibtex
@article{guo2022trust,
  title={TRUST: An Accurate and End-to-End Table structure Recognizer Using Splitting-based Transformers},
  author={Guo, Zengyuan and Yu, Yuechen and Lv, Pengyuan and Zhang, Chengquan and Li, Haojie and Wang, Zhihui and Yao, Kun and Liu, Jingtuo and Wang, Jingdong},
  journal={arXiv preprint arXiv:2208.14687},
  year={2022}
}
```


