Abstract
Pure Transformer models often struggle with Table Structure Recognition (TSR) because they lack the inductive biases inherent in hybrid CNN-Transformer architectures and require massive amounts of data to reach peak performance. This paper introduces a self-supervised pre-training (SSP) method that utilizes masked image modeling to bridge this performance gap. By training a domain-specific VQ-VAE and pre-training a "linear projection" Transformer on unlabeled table images, the proposed model matches or exceeds state-of-the-art results on standard benchmarks like PubTabNet. This approach demonstrates that self-supervision can effectively compensate for the lack of structural priors in pure Transformer architectures for document AI tasks.
Introduction
Table Structure Recognition (TSR) is the task of converting table images into machine-readable formats, such as HTML. Historically, the most effective models have used a hybrid approach: a Convolutional Neural Network (CNN) backbone for feature extraction followed by a Transformer for sequence generation. While pure Transformers (e.g., Vision Transformers) have revolutionized general computer vision, they have lagged behind in TSR.
The primary hurdle is the "data-hungry" nature of Transformers. While general vision models benefit from billions of training images, table-specific datasets are significantly smaller, typically containing around half a million samples. This paper investigates whether self-supervised pre-training can provide the necessary structural understanding to allow pure Transformers to compete with hybrid models without requiring additional manual annotations.
Methodology
The authors propose a two-stage framework centered on Self-Supervised Pre-training (SSP):
- Architecture: The model replaces the traditional CNN backbone with a simple linear projection layer that divides the image into patches. The core architecture consists of a 12-layer Transformer encoder and a 4-layer Transformer decoder.
- Domain-Specific Tokenization: Recognizing that natural image tokenizers (like those in DALL-E) are ill-suited for the structured, high-contrast nature of tables, the authors trained a Vector Quantized-Variational AutoEncoder (VQ-VAE) from scratch on table images. This creates a specialized "visual vocabulary" for tabular data.
- Masked Image Modeling (MIM): During pre-training, the model is tasked with predicting the visual tokens of masked-out regions in a table image. This self-supervised task requires no human labels and teaches the model the underlying "grammar" of table layouts.
- Finetuning: Finally, the pre-trained encoder is combined with a decoder and finetuned on supervised datasets to generate HTML tags representing the table structure.
Experimental Results
The study evaluated the model on the PubTabNet and SynthTabNet datasets. The results confirm that SSP is a critical component for pure Transformer-based TSR.
Key Findings
- Closing the Performance Gap: As shown in the table above, a pure Transformer trained from scratch (LinearProj) achieves a TEDS score of 87.07. With SSP, the performance jumps to 96.81, surpassing the hybrid CNN-transformer (96.45) and TableFormer (96.75).
- Mastery of Complex Tables: The impact of SSP is most pronounced on complex tables (those with spanning cells). The TEDS score for complex tables improved by over 12 points (from 82.61 to 95.11) when using pre-training.
- Encoder Robustness: Even when the visual encoder was "frozen" after pre-training, the model maintained high performance (96.83 TEDS), suggesting that the self-supervised phase successfully captures robust structural features.
Discussion and Conclusion
This research demonstrates that the limitations of pure Transformers in specialized domains like TSR are not architectural but rather a matter of training strategy. By using self-supervised pre-training with domain-specific tokenization, simple linear projection models can overcome the lack of CNN-based inductive biases.
Future work may involve scaling this approach to even larger, unlabelled document collections to further enhance performance. The authors have released their code and models at https://github.com/poloclub/unitable to support the research community.
Summary updated