TL;DR
This paper introduces "ConvStem," a lightweight convolutional module that acts as a visual encoder for Table Structure Recognition (TSR). By balancing receptive field and sequence length, ConvStem achieves performance comparable to complex CNN backbones but with significantly reduced model size and computational cost, paving the way for more efficient and potentially self-supervised TSR models.
What Problem Does This Paper Address?
Table Structure Recognition (TSR) is the task of converting an image of a table into a machine-readable format, typically HTML. Current state-of-the-art methods often employ a hybrid architecture: a Convolutional Neural Network (CNN) as a visual encoder to extract image features, followed by a Transformer as a textual decoder to generate the table's structure. While effective, this CNN backbone is a significant bottleneck. It accounts for nearly half of the model's parameters, drastically slows down training and inference, and hinders the adoption of self-supervised learning techniques that have proven beneficial in other vision tasks. The authors aim to find a more efficient visual encoder that can match the performance of traditional CNNs without their associated computational burden.
Methods
The core contribution of this paper is the Convolutional Stem (ConvStem), a lightweight visual encoder designed for TSR. The authors experimented with replacing the CNN backbone with a simple linear projection (as seen in Vision Transformers), but this led to a noticeable performance drop. To bridge this gap, they reintroduced a few early convolutional layers, forming the ConvStem.
The ConvStem is designed to strike an optimal balance between two critical factors for TSR:
- Receptive Field (RF) Ratio: This measures how much of the input image influences the visual encoder's output. A larger RF allows the model to "see" a broader context of the table.
- Sequence Length: This refers to the length of the input sequence fed into the Transformer decoder. A longer sequence generally allows the Transformer to capture more complex structural information.
ConvStem achieves this balance by using a few early convolutional layers with specific kernel sizes and strides. This allows it to build a larger receptive field than a simple linear projection while maintaining a manageable sequence length for the subsequent Transformer. The authors also compare their ConvStem against standard CNN backbones (like ResNet) and linear projections, providing detailed ablation studies.
Datasets
The paper uses the PubTabNet dataset for training and evaluation. PubTabNet is described as one of the largest publicly accessible TSR datasets, containing approximately 509,000 annotated tabular images. The evaluation metric used is the Tree-Edit-Distance-based Similarity (TEDS) score, which measures the similarity between the predicted and ground truth table structures represented as trees. Tables are categorized into "simple" (no row/column spans) and "complex" (with spans) for more granular analysis.
Key Insights and Ideas
- Early Convolutions Matter for Structure: The paper strongly suggests that even a few early convolutional layers provide crucial inductive biases (like locality) that are beneficial for understanding image structure, especially for tasks like TSR, which require capturing spatial relationships.
- The RF-Sequence Length Trade-off: For Transformer-based models, there's an inherent trade-off between receptive field and sequence length. Larger receptive fields (e.g., larger patches in linear projection) often lead to shorter sequences, and vice-versa. ConvStem effectively navigates this trade-off.
- Lightweight Encoders Enable Efficiency: By demonstrating that a ConvStem can match CNN performance with significantly fewer parameters and computations, the paper highlights the potential for more efficient TSR models. This efficiency is crucial for faster training, inference, and potentially enabling self-supervised learning.
- ConvStem Outperforms Linear Projection for TSR: While linear projections have shown promise in general image classification (ViT), they struggle with the intricate structural information required for TSR, as evidenced by the performance drop when using them alone.
Key Results
- Performance Match: The proposed ConvStem achieves performance comparable to, and in some cases slightly better than, a ResNet-18 CNN backbone on the TEDS score for both simple and complex tables.
- Significant Complexity Reduction: ConvStem reduces the model complexity of ResNet-18 by approximately 4.62 million parameters and halves the Multiply-Add Operations (MAC) from 42.22G to 22.36G.
- Bridging the Gap: ConvStem effectively bridges the performance gap observed when replacing a CNN backbone with a simple linear projection, which suffered an ~8 pp drop in TEDS for complex tables.
- Qualitative Improvements: Visualizations of cross-attention maps show that ConvStem more accurately captures spanning cells and transitions between table rows compared to both ResNet-18 and Linear Projection.
Limitations and Future Work
- Reproducibility: The authors emphasize the importance of reproducible research and have open-sourced their code and detailed experimental setups to facilitate this.
- Future Directions: The paper suggests that the efficiency gains from ConvStem could pave the way for self-supervised learning in TSR, which is currently hindered by the computational cost of traditional CNN backbones. The authors also believe that tables are a promising modality for representation learning, implying further research in this area.
Summary updated