TL;DR
While open-source Multimodal Large Language Models (MLLMs) have advanced rapidly, they still lag behind closed-source giants like GPT-4V and Gemini on text-rich visual tasks due to a scarcity of high-quality instruction data. TextSquare bridges this gap by introducing Square-10M, an instruction-tuning dataset containing nearly 10 million filtered QA pairs with explicit rationale traces synthesized from 3.8 million text-rich images. Trained on this dataset, the resulting 8.6B-parameter TextSquare model matches or surpasses closed-source models across multiple text-centric vision benchmarks and demonstrates clear logarithmic scaling laws during instruction tuning.
What Problem Does This Paper Address?
Text-centric Visual Question Answering (VQA)—interpreting text embedded in documents, charts, tables, receipts, and natural scenes—is critical for real-world document intelligence. While closed-source models (e.g., GPT-4V, Gemini) excel here, open-source models consistently underperform. Previous data-synthesis attempts were limited: they focused on image captioning rather than targeted question answering, lacked step-by-step reasoning, were restricted in volume, or suffered from high hallucination rates. The authors set out to determine whether scaling up massive, high-quality, reasoning-rich instruction data can close this gap.
Methods
- The SQUARE Data Generation Pipeline: Using Gemini Pro as the base generator across 3.8 million text-rich images, the team established a four-step pipeline:
- Self-Questioning: The model examines an image (with extracted OCR text supplied in the prompt) and proposes meaningful, diverse questions.
- Answering: Gemini answers questions using Chain-of-Thought and few-shot prompting to encourage concise, accurate answers.
- Reasoning: The model explicitly outputs step-by-step rationales connecting textual cues to visual regions, reducing hallucinations and anchoring answers.
- Evaluation & Filtering: Rigorous multi-stage filtering discards ~10.2 million questionable QA pairs:
- Self-Evaluation: An MLLM acts as a judge of QA validity.
- Multi-Prompt Consistency: Discards QA pairs that yield semantic discrepancies under varied phrasing.
- Multi-Context Consistency: Tests answers across naive, reasoning-prepended, and in-context settings.
- Model Architecture & Training:
- TextSquare builds upon InternLM-Xcomposer2, featuring an InternLM2-7B-Chat backbone and a modified OpenAI CLIP ViT-L vision encoder.
- Training follows a 3-stage curriculum using 64 A100 GPUs: full-parameter fine-tuning at resolution 490, resolution scaling to 700 (training ViT only), and final full-parameter fine-tuning at 700×700 image resolution.
Datasets
- Square-10M (Newly Introduced): 9.8 million distilled QA pairs and reasoning chains derived from 3.8 million images across nine text-rich domains (Charts, PDFs/Documents, Slides, Tables, Receipts, Screenshots, Street-View scenes, Web Images, and E-commerce products).
- Evaluation Benchmarks:
- Document & Chart VQA: DocVQA, ChartQA, InfographicVQA.
- Scene Text & Diagrams: TextVQA, AI2D.
- Table Comprehension: Wiki Table Questions (WTQ), TabFact.
- Key Information Extraction (KIE): SROIE, POIE.
- Comprehensive OCR: OCRBench (29 sub-tasks).
- General VQA & Hallucination: VQAv2, GQA, VizWiz, POPE.
- Multilingual Zero-Shot: MTVQA (9 languages).
Key Insights and Ideas
- Instruction Tuning Scaling Law: Model performance is directly proportional to the logarithm of the instruction tuning data volume ($y = 3.366 \log_{10}(x) + 49.621$), while convergence training loss decreases linearly with the logarithm of dataset scale. Small datasets can activate basic instruction following, but continuous scaling on high-quality data is required for top-tier visual reasoning.
- Reasoning Mitigates Hallucination: Incorporating detailed reasoning steps into instruction tuning does more than boost accuracy (+1.4% on DocVQA); it significantly suppresses model hallucination, yielding a +2.7% boost on POPE and +3.2% on VizWiz.
- Domain Specialization Matters: Ablation studies show that table understanding is sensitive: removing table data caused WTQ accuracy to crater from 49.7% to 35.9%, proving that general visual data cannot substitute for structural table data.
Key Results
TextSquare achieves an average ranking of 2.2 across ten text-centric benchmarks, outperforming GPT-4V (2.4) and Gemini Pro (3.5):
- OCRBench: TextSquare sets a new high among models under 10B parameters with 62.2% (surpassing open-source SOTAs such as DocOwl 1.5 at 59.7% and Monkey at 51.4%).
- Document & Table Understanding: Achieves 84.3% on DocVQA, 79.4% on ChartQA (surpassing GPT-4V’s 78.5%), and 49.7% on WTQ (beating GPT-4V’s 45.5%).
- Key Information Extraction: Scores 53.2% on SROIE and 71.8% on POIE (a zero-shot +20% leap over existing open-source baselines).
- Robustness & Generalization: Achieved 86.6% on POPE (adversarial) and leads open-source models on zero-shot multilingual evaluation (MTVQA average of 13.6% across 9 languages).
Limitations and Future Work
- High Compute Footprint: Training on millions of instances across multiple stages required ~29,000 A100 GPU hours.
- Resolution Ceiling: The model operates at a fixed 700×700 resolution. Many tiny-text documents require higher or dynamic patch-based resolutions for maximum legibility.
- Synthetic Data Imperfections: Even with strict filtering, synthetic data falls short of expert human annotation in complex nuances and real-world edge cases. Future work points toward exploring dynamic resolution architectures and extending multi-turn visual dialogue data.
Summary updated