Abstract
Tabular data is frequently captured in image form across a wide range of real-world scenarios such as financial reports, handwritten records, and document scans. These visual representations pose unique challenges for machine understanding, as they combine both structural and visual complexities. While recent advances in Multimodal Large Language Models (MLLMs) show promising results in table understanding, they typically assume the relevant table is readily available. However, a more practical scenario involves identifying and reasoning over relevant tables from large-scale collections to answer user queries. To address this gap, we propose TabRAG, a framework that enables MLLMs to answer queries over large collections of table images. Our approach first retrieves candidate tables using jointly trained visual-text foundation models, then leverages MLLMs to perform fine-grained reranking of these candidates, and finally employs MLLMs to reason over the selected tables for answer generation. Through extensive experiments on a newly constructed dataset comprising 88,161 training and 9,819 testing samples across 8 benchmarks with 48,504 unique tables, we demonstrate that our framework significantly outperforms existing methods by 7.0% in retrieval recall and 6.1% in answer accuracy, offering a practical solution for real-world table understanding tasks.
Introduction
In real-world applications, tabular data is often embedded within images, such as PDF scans of financial reports or screenshots of spreadsheets. While state-of-the-art Multimodal Large Language Models (MLLMs) like GPT-4o or LLaVA demonstrate impressive capabilities in reasoning over a single provided table image, they face a significant "needle in a haystack" challenge when tasked with finding relevant information within a database containing thousands of images.
Existing research often assumes the relevant table is already identified, or relies on OCR-based text conversion which frequently destroys crucial visual structures like merged cells and color highlights. TabRAG addresses these limitations by providing an end-to-end pipeline designed for large-scale table retrieval and reasoning directly from visual representations.
The TabRAG Framework
TabRAG utilizes a three-stage "Retrieve-Rerank-Generate" architecture to ensure both efficiency and accuracy:
- Bi-Encoder Retrieval: To handle large-scale collections, the system employs a fast initial retrieval stage. By jointly fine-tuning LayoutLMv3 (for image processing) and GTE-large (for text queries) using a contrastive loss, the framework maps queries and table images into a shared embedding space. This allows for millisecond-level searches across thousands of tables using vector search libraries like FAISS.
- Cross-Encoder Reranking: While retrieval is fast, it can be coarse. In the second stage, an MLLM (based on Mistral-7B and CLIP) acts as a cross-encoder "judge." It evaluates the user query alongside the top-10 candidate images to calculate the probability of relevance, effectively filtering out "hard negatives" that may appear visually similar but contain incorrect data.
- Answer Generation: The final stage uses the MLLM to reason over the top-ranked table image and the original query to generate a natural language response.
Experimental Evaluation
To evaluate TabRAG, we constructed a specialized version of the MMTab dataset. Many existing datasets contain generic questions (e.g., "How many rows are there?") that do not adequately test retrieval capabilities. We filtered and refined the data to create a high-quality set of 88,161 training and 9,819 testing samples. The evaluation spans eight diverse benchmarks, including WikiTableQuestions (WTQ), HiTab (hierarchical tables), and TabFact (fact verification), encompassing over 48,000 unique table images.
Key Results
Retrieval Superiority
As shown in the performance metrics, TabRAG significantly outperforms strong baselines such as CLIP, ImageBind, and ColPali. It maintains a consistent lead in both Mean Reciprocal Rank (MRR) and Recall across all $k$ values. The MLLM-based reranker proved to be the "secret sauce," bridging the gap between coarse retrieval and precise identification.
End-to-End Performance
On the WTQ benchmark, TabRAG achieved an end-to-end accuracy of 19.19%, a substantial improvement over the 1.24% observed in standard LLaVA v1.5 baselines. Furthermore, in tasks like ToTTo, TabRAG’s performance using retrieved tables was nearly identical to models provided with manually selected "gold" tables, demonstrating the robustness of the retrieval and reranking pipeline.
Conclusion
TabRAG demonstrates that treating tables as first-class visual citizens is superior to OCR-based text conversion. By leveraging visual features like borders and alignment, MLLMs can reason more intuitively over complex data. While challenges remain regarding extremely low-resolution scans or massive tables that exceed vision encoder limits, TabRAG provides a practical and efficient framework for real-world document intelligence tasks.
Summary updated