# LORE: Logical Location Regression for Table Structure Recognition

> LORE reframes table structure recognition as regression over logical cell coordinates, using cascade self-attention regressors with inter/intra-cell constraint losses for fast parallel inference.

- Authors: Hunter Heidenreich
- Published: 2023-03-07
- Updated: 2026-03-23
- Paper: Preprint (arXiv) <https://arxiv.org/abs/2303.03730>
- Paper: Published (AAAI 2023) <https://doi.org/10.1609/aaai.v37i3.25402>
- Code: LORE-TSR (Code) <https://github.com/AlibabaResearch/AdvancedLiterateMachinery/tree/main/DocumentUnderstanding/LORE-TSR>
- Model: Pretrained Checkpoint (WTW) <https://github.com/AlibabaResearch/AdvancedLiterateMachinery/tree/main/DocumentUnderstanding/LORE-TSR>
- Model: Pretrained Checkpoint (PubTabNet) <https://github.com/AlibabaResearch/AdvancedLiterateMachinery/tree/main/DocumentUnderstanding/LORE-TSR>
- Model: Pretrained Checkpoint (Wireless/SciTSR+PubTabNet+Chinese) <https://github.com/AlibabaResearch/AdvancedLiterateMachinery/tree/main/DocumentUnderstanding/LORE-TSR>
- Source: Bevaya Labs, <https://labs.bevaya.ai/>

---


## TL;DR

LORE (LOgical location REgression network) addresses table structure recognition (TSR) by directly regressing the logical row/column indices of each cell, rather than predicting adjacency relations or generating markup sequences. A cascade of self-attention regressors, combined with inter-cell and intra-cell constraint losses, captures dependencies between logical locations and achieves parallel inference that is over 30x faster than encoder-decoder baselines while requiring far less training data.

## What kind of paper is this?

**Dominant:** $\Psi\_{\text{Method}}$: the paper proposes a TSR paradigm built around a regression objective, a cascade architecture, and auxiliary constraint losses. The headline contribution is the method design, validated with detailed ablations and cross-paradigm comparisons.

**Secondary:** none.

## What is the motivation?

TSR methods at the time of this work fell into two main paradigms. Adjacency-based models classify pairs of detected cells as horizontally adjacent, vertically adjacent, or unrelated. While effective on clean datasets, recovering a complete grid structure from pairwise relations requires heuristic post-processing or graph optimization, and adjacency metrics can be satisfied by locally consistent predictions that are globally incoherent (the authors demonstrate this with an "shifted structure" example where adjacency F1 is 84% but logical accuracy is only 43%). Markup-sequence models (e.g., EDD) sidestep post-processing by generating HTML token sequences from table images, but they require roughly 17x more training data than LORE and suffer from slow sequential decoding (14.8 seconds per sample vs. 0.45 seconds for LORE on PubTabNet).

A third line of work (TGRNet) approached TSR via ordinal classification of logical indices but treated each cell independently, ignoring the structural dependencies between adjacent cells' coordinates. LORE extends this direction into a regression framework that explicitly models those dependencies.

## What is the novelty?

LORE represents each table cell by four integers: starting row $r\_s$, ending row $r\_e$, starting column $c\_s$, and ending column $c\_e$. Given a table image, the model predicts $\\{(r\_s^{(i)}, r\_e^{(i)}, c\_s^{(i)}, c\_e^{(i)})\\}\_{i=1}^{N}$ jointly with the four spatial corner points $\\{B^{(i)}\\}\_{i=1}^{N}$ for all $N$ detected cells.

**Architecture.** A DLA-34 backbone with output stride $R = 4$ and $d = 256$ channels produces cell center heatmaps and visual features. Cell center locations are detected with CenterNet-style keypoint segmentation, and spatial corner points are regressed directly from those center features.

For logical location prediction, each cell's feature vector is enriched with 2D position embeddings from the four predicted corner points:

$$
\tilde{F}\_{(\hat{x}\_k^{(i)}, \hat{y}\_k^{(i)}, :)} = f\_{(\hat{x}\_k^{(i)}, \hat{y}\_k^{(i)}, :)} + PE(\hat{x}\_k^{(i)}, \hat{y}\_k^{(i)})
$$

These enriched corner features are combined with the center feature via a learned weighted sum to form per-cell representations:

$$
h^{(i)} = f^{(i)} + \sum\_{k=1}^{4} w\_k \tilde{F}\_{(\hat{x}\_k^{(i)}, \hat{y}\_k^{(i)}, :)}
$$

where $[w\_1, w\_2, w\_3, w\_4]$ are learnable scalars. These representations are passed through a self-attention encoder (the **Base Regressor**) to aggregate cross-cell context. The base regressor outputs a first-pass logical coordinate estimate $\hat{l}^{(i)}$.

The **Stacking Regressor** refines this estimate by conditioning on it:

$$
\tilde{l} = F\_s(W\_s \hat{l} + \tilde{h})
$$

where $W\_s \in \mathbb{R}^{4 \times d}$ projects the predicted indices into feature space and $F\_s$ is a second self-attention encoder with independent weights. At inference, predicted indices are rounded to the nearest integer.

**Constraint losses.** Two auxiliary supervision terms enforce structural consistency on the stacking regressor's output. The inter-cell loss penalizes logical overlap between horizontally or vertically adjacent cell pairs:

$$
\begin{aligned}
L\_{\text{inter}} = &\sum\_{(i,j) \in A\_r} \max(\tilde{r}\_e^{(j)} - \tilde{r}\_s^{(i)} + 1,\ 0) \\\\
&+ \sum\_{(i,j) \in A\_c} \max(\tilde{c}\_e^{(j)} - \tilde{c}\_s^{(i)} + 1,\ 0)
\end{aligned}
$$

The intra-cell loss penalizes inconsistency in spanning cell extents across multi-row or multi-column cells:

$$
\begin{aligned}
L\_{\text{intra}} = &\sum\_{i \in M\_r} |\tilde{r}\_s^{(i)} - \tilde{r}\_e^{(i)} - r\_s^{(i)} + r\_e^{(i)}| \\\\
&+ \sum\_{i \in M\_c} |\tilde{c}\_s^{(i)} - \tilde{c}\_e^{(i)} - c\_s^{(i)} + c\_e^{(i)}|
\end{aligned}
$$

The total training objective combines all losses:

$$
L\_{\text{LORE}} = L\_{\text{center}} + L\_{\text{spa}} + L\_{\text{log}} + L\_{\text{I2C}}
$$

where $L\_{\text{I2C}} = L\_{\text{inter}} + L\_{\text{intra}}$, and $L\_{\text{log}}$ is the L1 regression loss computed jointly over both the base and stacking regressor outputs:

$$
L\_{\text{log}} = \frac{1}{N} \sum\_{i=1}^{N} \left( \|\hat{l}^{(i)} - l\_i\|\_1 + \|\tilde{l}^{(i)} - l\_i\|\_1 \right)
$$

## What experiments were performed?

LORE is evaluated across seven benchmarks spanning digital-born and physical table images:

- **ICDAR-2013**: cross-validated (no training split); 238 images.
- **SciTSR-comp**: 716 complex-table test images from the SciTSR split.
- **PubTabNet**: 20,000 training images sampled from the full 339k set; evaluated on TEDS.
- **TableBank**: evaluated on TEDS and BLEU; LORE trained on SciTSR (roughly 1/10 the training size).
- **ICDAR-2019**: scanned documents; adjacency F1.
- **WTW**: wild table photos with distortion; adjacency F1 and logical location accuracy.
- **TableGraph-24K**: used for ablation (logical accuracy metric).

**Baselines span three paradigms:**

1. Logical location: ReS2TIM, TGRNet
2. Adjacency: TabStrNet, LGPMA, TOD, FLAGNet, NCGM
3. Markup sequence: Image2Text, EDD

Adjacency and markup-sequence metrics are derived from LORE's predicted logical coordinates via deterministic transformations, not retrained models.

**Ablation study** (on WTW, Table 4) examines: (a) inter-cell loss only, (b) intra-cell loss only, (c) both, (d) GNN encoder vs. self-attention encoder, (e) single 6-layer regressor vs. cascade of two 3-layer regressors.

## What are the outcomes/conclusions?

Against logical-location baselines, LORE substantially improves accuracy: on WTW it achieves 96.4 cell-detection F1 and 82.9 logical accuracy, compared to TGRNet's 64.7 and 24.3 respectively. Against adjacency baselines, LORE matches or exceeds the top-performing published methods: 99.3 F1 on SciTSR-comp and 95.1 F1 on WTW (vs. NCGM's 94.1). Against markup-sequence baselines, LORE reaches 98.1 TEDS on PubTabNet (vs. EDD's 89.9) using only 20k training images compared to EDD's 339k, and runs inference in 0.45 seconds per image vs. 14.8 seconds for EDD.

Ablation results show that intra-cell supervision contributes more than inter-cell supervision (+1.8% vs. +0.8% accuracy), and the cascade design outperforms a single regressor of equal depth by 3.1% accuracy. Self-attention message passing outperforms graph-based aggregation by about 5.9% accuracy, which the authors attribute to the inductive bias of nearest-neighbor graphs being suboptimal for table structure.

A controlled paradigm comparison (Table 5) is informative: a model retrained under the adjacency paradigm achieves 94.3 F1 on WTW adjacency metrics, but recovers only 51.9% logical accuracy for all cells and 20.2% for spanning cells. LORE (logical paradigm) achieves 95.1 F1 on adjacency metrics while simultaneously achieving 82.9% and 63.8% logical accuracy, underscoring the information loss in purely adjacency-based representations.

**Limitations.** LORE requires OCR text extracted from PDFs for the TEDS evaluation, so it is not fully image-only for all benchmarks. The PubTabNet comparison uses only 20k out of 339k training images; performance with the full training set is not reported. The method is not evaluated on newer complex benchmarks such as FinTabNet.

## Reproducibility

### Models

- Backbone: DLA-34 (Deep Layer Aggregation), 24.2M total parameters, 75.2 GFLOPs at 1024x1024 with 32 cells.
- Output stride $R = 4$, hidden size $d = 256$.
- Self-attention encoder: 3 layers for both base and stacking regressors.
- Corner point estimation added for WTW (following Long et al. 2021).
- Three pretrained checkpoints are released via the Alibaba AdvancedLiterateMachinery GitHub repository under Apache-2.0: `ckpt_wtw` (DLA-34, 1024px, trained on WTW), `ckpt_ptn` (DLA-34, 512px, trained on PubTabNet), and `ckpt_wireless` (ResNet-18, 768px, trained on SciTSR + PubTabNet + Chinese tables). Weights are hosted on Google Drive; a ModelScope version is also available.
- The code base is also released under Apache-2.0, restricted to research use per Alibaba's copyright notice.

### Algorithms

- Optimizer: not stated in the paper.
- Learning rate: $1 \times 10^{-4}$, decayed to $1 \times 10^{-5}$ at epoch 70 and $1 \times 10^{-6}$ at epoch 90.
- Training duration: 100 epochs.
- Input resolution: max side 1024 (512 for SciTSR and PubTabNet).
- Batch size: not stated.
- Runs: 5 seeds, average reported.

### Data

- Seven benchmarks used for training and evaluation; see datasets section above.
- PubTabNet: only 20k randomly sampled training images used (full split is 339k).
- ICDAR-2013: no training split; cross-validation protocol following prior work.
- TableBank: LORE trained on SciTSR for TableBank evaluation (cross-dataset transfer).
- No custom preprocessing or filtering pipelines are described beyond standard image resizing.

### Evaluation

- Logical location accuracy: fraction of cells with all four indices exactly correct; reported separately for row (A-r), column (A-c), and all indices (Acc).
- Adjacency F1: precision/recall on predicted adjacent cell pairs.
- TEDS: tree edit distance similarity on HTML table trees; PDF text extracted following Zheng et al. 2021.
- BLEU (4-gram): used for TableBank markup evaluation.
- No error bars beyond the 5-run average are reported; significance tests not provided.
- Adjacency-based results for LORE are derived post-hoc from predicted logical coordinates, which makes the comparison methodology transparent but means LORE does not optimize directly for adjacency metrics.

### Hardware

- 4x NVIDIA Tesla V100 GPUs.
- GPU-hours and memory requirements not reported.
- Inference time: 0.45 seconds/image on PubTabNet validation set at 1280x1280 (compared to 14.8 seconds for EDD under the same conditions).
- 24.2M parameter count makes the model small enough for practical deployment, though memory requirements at training time are not stated.

## BibTeX

```bibtex
@inproceedings{xing2023lore,
  title={{LORE}: Logical Location Regression Network for Table Structure Recognition},
  author={Xing, Hangdi and Gao, Feiyu and Long, Rujiao and Bu, Jiajun and Zheng, Qi and Li, Liangcheng and Yao, Cong and Yu, Zhi},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  volume={37},
  number={3},
  pages={2992--3000},
  year={2023}
}
```


