Abstract
Document understanding (VRDU) in regulated domains is particularly challenging, since scanned documents often contain sensitive, evolving, and domain specific knowledge. This leads to two major challenges: the lack of manual annotations for model adaptation and the difficulty for pretrained models to stay up-to-date with domain-specific facts. While Multimodal Large Language Models (MLLMs) show strong zero-shot abilities, they still suffer from hallucination and limited domain grounding. In contrast, discriminative Vision-Language Pre-trained Models (VLPMs) provide reliable grounding but require costly annotations to cover new domains. We introduce Docs2Synth, a synthetic-supervision framework that enables retrieval-guided inference for private and low-resource domains. Docs2Synth automatically processes raw document collections, generates and verifies diverse QA pairs via an agent-based system, and trains a lightweight visual retriever to extract domain-relevant evidence. During inference, the retriever collaborates with an MLLM through an iterative retrieval--generation loop, reducing hallucination and improving response consistency. We further deliver Docs2Synth as an easy-to-use Python package, enabling plug-and-play deployment across diverse real-world scenarios. Experiments on multiple VRDU benchmarks show that Docs2Synth substantially enhances grounding and domain generalization without requiring human annotations.
What Problem Does This Paper Address?
Extracting information from scanned, visually rich documents (VRDs)—such as handwritten forms, invoices, and receipts—is notoriously difficult. These documents often contain complex layouts, OCR inaccuracies, and highly specific, private domain knowledge.
Currently, there are two main approaches, both with significant drawbacks:
- Multimodal Large Language Models (MLLMs) (like GPT-4o or Gemini) have great zero-shot capabilities but tend to hallucinate and lack grounding when faced with unfamiliar, domain-specific layouts.
- Vision-Language Pre-trained Models (VLPMs) are discriminative models that provide excellent grounding and reliability, but they require massive amounts of costly, manual human annotations to adapt to new domains.
The authors tackle this gap: How can we adapt robust document understanding systems to new, private document collections without the high cost of manual data annotation?
Methods
Docs2Synth solves this problem by using a fully automated, synthetic-supervision pipeline. The framework is broken down into four key steps:
- Document Processing: Raw document images are ingested and processed using standard OCR tools to extract text entities and their spatial bounding boxes.
- Synthetic QA Generation: An MLLM acts as an autonomous agent to generate question-answer pairs based on the extracted text. Crucially, the MLLM also acts as a verifier, double-checking the relevance, clarity, and validity of its own generated QA pairs to ensure high-quality training data.
- Retriever Tuning: The verified synthetic QA pairs are used to fine-tune a lightweight, layout-aware VLPM. This model learns to act as a domain-specific "retriever," predicting which text bounding boxes contain the answer to a given question.
- Iterative Inference: During deployment, the system doesn't just ask the MLLM for an answer. Instead, the tuned retriever finds the top-$k$ most relevant entities and visually highlights their bounding boxes in red on the document image. The MLLM uses this highlighted image to generate an answer. This answer is then fed back into the retriever to refine the search in a continuous, iterative loop.
The authors also packaged this entire pipeline into an open-source, modular Python library, allowing developers to go from raw PDFs to a deployed Retrieval-Augmented Generation (RAG) system with minimal configuration.
Datasets
The framework was evaluated on three benchmark datasets spanning different domains:
- Form-NLU: Financial forms featuring both printed and handwritten formats.
- CORD: A dataset of scanned receipts requiring fine-grained extraction.
- Ephoie: Scanned Chinese exam headers containing handwritten elements.
Key Insights and Ideas
- Synthetic data is sufficient for retriever adaptation: You don't need expensive human annotators to train a highly effective, domain-specific visual retriever. MLLM-generated and self-verified synthetic QA pairs are high enough quality to successfully fine-tune discriminative models.
- Visual highlighting guides MLLM attention: By literally drawing red boxes around retrieved entities on the document image before passing it to the MLLM, the framework effectively forces the generative model to ground its answers in the provided evidence, drastically reducing hallucinations.
- Iterative refinement creates a compounding effect: The bidirectional flow of information is a major "aha" moment. The retriever grounds the MLLM, and the MLLM's partial or initial answers provide better context for the retriever's next search pass. They cover each other's blind spots.
Key Results
Docs2Synth consistently outperformed both strong open-source MLLMs (Qwen2-VL, Idefics2, InternVL2) and proprietary giants (GPT-4o, Gemini 1.5) across the tested VRDU benchmarks. The system showed particularly notable improvements on the FormNLU-printed dataset, suggesting that synthetic data is exceptionally good at capturing the visual and structural characteristics of printed documents.
Despite its complex architecture, the system is computationally lightweight. Retriever training can be done on a CPU (if using API-based LLMs for generation), and the entire end-to-end pipeline runs comfortably on a single consumer-grade RTX 5090 (32 GB) GPU.
Limitations and Future Work
- Limitations: The authors acknowledge that occasional retrieval errors still occur. Because the MLLM relies heavily on the retriever's highlighted bounding boxes, a failure in the retrieval step can bottleneck the final answer generation.
- Future Work: The performance of Docs2Synth is heavily tied to the quality of the underlying OCR and the MLLM used for synthesis. The authors note that as document parsing technologies and data synthesis methods continue to advance, the retriever's accuracy—and the framework's overall performance—will naturally scale alongside them.
Summary updated