DocVAL: Validated Chain-of-Thought Distillation for Grounded Document VQA

Ahmad Mohammadshirazi, Pinaki Prasad Guha Neogi, Dheeraj Kulshrestha, Rajiv Ramnath · DOI

TL;DR

DocVAL is a novel distillation framework that transfers complex spatial reasoning from massive Vision-Language Models (VLMs) like Gemini 2.5 Pro into compact, deployable student models like Gemma-3 12B. By employing a "validated" Chain-of-Thought (CoT) approach and an iterative feedback loop, DocVAL enables small models to achieve state-of-the-art accuracy in document understanding without requiring expensive OCR or text detection at runtime.

The Challenge: Bridging the Spatial Reasoning Gap

Document Visual Question Answering (DocVQA) requires models to simultaneously comprehend text and its physical layout (e.g., identifying the "Total Due" on a complex invoice). While massive frontier models excel at this, their high latency and cost make them impractical for high-volume production.

Smaller models (under 15B parameters) offer the necessary speed but often suffer from a "spatial reasoning gap." They may correctly identify the text of an answer but fail at "grounding"—precisely locating the answer on the page. This failure stems from the difficulty of mapping visual pixels to coordinate systems without external scaffolding like OCR engines.

The DocVAL Framework

To address these limitations, the researchers developed DocVAL, a multi-phase pipeline designed to instill spatial intuition directly into the student model's visual representations.

The DocVAL three-phase pipeline: Teacher Data Generation, Student Fine-Tuning, and Iterative Instruction Tuning.

Methodology

  1. Phase A: Teacher Data Generation: A large teacher model (Gemini 2.5 Pro) generates "Chain-of-Thought" (CoT) traces—step-by-step explanations of its reasoning process. These traces are passed through a VAL Filter that uses rule-based logic and text detection to discard examples containing hallucinated coordinates.
  2. Phase B1: Supervised CoT Learning: The student model (Gemma-3 12B) is trained on these verified traces. Crucially, the student is "blind" to the underlying text detection data, forcing it to learn navigation using only internal visual features.
  3. Phase B2: Iterative Refinement: In this "coaching" phase, the student generates predictions that are evaluated by a VAL Verifier. This verifier provides detailed, pixel-level feedback (e.g., "Move bounding box 250px left"), and the student is retrained on these corrected examples.
  4. Phase C: Deployment: The final model operates as a "pure" VLM. It requires no separate OCR engine or text detector, significantly simplifying the deployment stack.

The core innovation is the VAL (Validator) system, a rule-based engine comprising five modules that verify OCR grounding, answer correctness, bounding box precision, and logical consistency.

Experimental Results

DocVAL was evaluated across five major benchmarks: DocVQA (general documents), VisualMRC (reading comprehension), FUNSD (forms), and CORD/SROIE (receipts/invoices).

Performance comparison of DocVAL against prior work and other Vision-Language Models across five document benchmarks.

Key Findings

  • State-of-the-Art Performance: On the DocVQA benchmark, the Gemma-3 12B student achieved 91.4% ANLS (textual accuracy) and 82.4% mAP (localization accuracy), outperforming models nearly twice its size.
  • The Power of Iteration: The iterative refinement phase (Phase B2) was critical, contributing a 9.7 mAP improvement over baseline training. This proves that targeted error correction is more effective than simple binary data filtering.
  • Efficiency and Trust: By enforcing geometric consistency, DocVAL ensures that models can "show their work." If a model provides an answer, it can accurately point to the source location on the document, closing the trust gap in automated document processing.

Limitations and Future Work

Despite its success, DocVAL faces challenges with multi-line entities (e.g., addresses spanning several lines) and handwritten text, where OCR-based validation signals are less reliable. Future research will likely focus on improving multi-box support and enhancing validation for non-digital text layouts. Nevertheless, DocVAL represents a significant step toward high-performance, compact document intelligence.

Summary updated

BibTeX
@inproceedings{mohammadshirazi2026docval,
  author = {Ahmad Mohammadshirazi and Pinaki Prasad Guha Neogi and Dheeraj Kulshrestha and Rajiv Ramnath},
  title = {{DocVAL: Validated Chain-of-Thought Distillation for Grounded Document VQA}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=Ygg3KJPeT6},
}
Figure