Abstract
TAP-VL introduces a lightweight, "plug-and-play" OCR adapter that allows Vision-Language Models (VLMs) to effectively "read" text-rich images by preserving spatial layout information. By compressing long OCR sequences into a small, fixed number of embeddings, it significantly boosts performance on document and scene-text tasks while reducing computational overhead by up to 7x compared to standard methods.
Introduction
While Large Vision-Language Models (VLMs) like LLaVA or GPT-4o excel at general scene understanding, they often struggle with text-heavy images such as legal documents, technical charts, or complex signage. Current workarounds typically involve either prepending raw OCR text to prompts—which loses spatial layout and bloats token counts—or scaling to extremely high resolutions, which is computationally prohibitive and requires extensive retraining.
TAP-VL addresses this challenge by introducing a lightweight, "plug-and-play" OCR adapter. This module allows VLMs to process text-rich images by preserving spatial layout information while drastically reducing the number of tokens passed to the Large Language Model (LLM).
Methodology: The TAP-VL Adapter
The core innovation is the TAP-VL Adapter, a transformer-based module that treats OCR data as a distinct modality. It consists of two primary components:
- OCR Encoder: This module processes text tokens alongside their 2D spatial coordinates (bounding boxes), ensuring that the "layout"—the relative positioning of text—is preserved.
- OCR-Q (Compressor): To avoid overwhelming the LLM with thousands of OCR tokens, the OCR-Q module uses a set of learned queries to distill the information into a fixed-length sequence (e.g., 32 tokens).
This architecture allows the model to maintain the precision of OCR while benefiting from the contextual understanding of the vision encoder, all within a manageable computational budget.
Model-Agnostic Pre-training
A key strength of TAP-VL is its pre-training strategy. Before being integrated into a specific VLM, the adapter is pre-trained on 31 million unlabeled document pages from the Industry Document Library (IDL). The pre-training involves three self-supervised tasks designed to align textual and spatial features:
- OCR-Grounded Mask Denoising: Predicting missing words based on layout and surrounding text.
- OCR-Mask Contrastive Learning: Aligning internal query representations with actual text content.
- OCR-Mask Matching: Ensuring the model correctly associates text spans with their spatial locations.
Key Insights and Performance
The research highlights several critical advantages of the TAP-VL approach:
- Layout as a First-Class Citizen: By embedding 2D coordinates directly, the model can navigate complex structures like tables and forms that typically confuse plain-text-based systems.
- Efficiency and Compression: The OCR-Q module acts as an intelligent summarizer. The "TAP-VL_Light" variant, which relies solely on these compressed embeddings without raw OCR text, reduces computational costs (FLOPs) by up to 7x compared to standard baselines.
- Multi-Page Reasoning: Because the adapter produces a fixed-length output per page, the model can handle multi-page documents by simply concatenating these small summaries. This enabled a 4.6% improvement on the DUDE multi-page benchmark in a zero-shot setting.
Results and Conclusion
Empirical results demonstrate significant gains across various benchmarks. Integrating TAP-VL into LLaVA-1.6 led to a +5.5% improvement on DocVQA and a +7.6% jump on InfoVQA. Importantly, these improvements do not come at the cost of general vision capabilities; performance on standard benchmarks like COCO remained stable. TAP-VL provides a scalable and efficient path for enhancing VLMs' document intelligence, offering a robust solution for real-world applications requiring high-precision text and layout understanding.
Summary updated