ECCV 2026 · Spotlight

DoCoG: Mask-based Multi-Type
Grounded Chain-of-Thought
for Document QA

1 BharatGen2 IIIT Hyderabad* Equal contribution
Slides arXiv Soon Code Soon Dataset Soon 🤗 Models Soon
ECCV BharatGen IIIT Hyderabad
DoCoG teaser figure

Mask-based Multi-type grounded CoT. Each example shows a QA pair where the model interleaves [GND] tokens within the CoT (2a, 2b) and final answer (2c). Each [GND] predicts a segmentation mask that localizes the evidence used (1, 2).

Paper

Abstract

Existing methods for Visual Document Question Answering (DocVQA) often predict answers without explicit intermediate analysis or produce ungrounded intermediate steps. The few approaches which employ grounding produce rectangular bounding boxes which fail to accurately represent complex structures such as pie-chart wedges, flowchart nodes, and curved text. We present DoCoG, a mask-based multi-type grounded step-wise Chain-of-Thought architecture for Document QA.

The model supports multi-type grounding — it localizes both textual content and fine-grained graphical elements such as legends, pie slices, and flowchart nodes. It generates step-wise intermediate outputs and final answers grounded through precise segmentation masks. DoCoG integrates a Vision-Language Model with a promptable segmenter via a novel Grounding Interaction Module (GIM). During decoding, special [GND] tokens trigger mask prediction, linking each step and the final answer to supporting evidence.

We introduce DoCoG-QA, a large-scale diverse dataset comprising 325K documents and 1.5M step-wise grounded QA pairs. We further release DoCoG-PQA with 20K preference pairs for DPO alignment, and DoCoG-Bench, a human-verified benchmark. Experiments show that DoCoG achieves state-of-the-art performance across multiple benchmarks, improving both answer accuracy and grounding precision.

Architecture

Method

DoCoG architecture overview

DoCoG architecture: Given a document image \(I\) and question \(q\), the VLM 1 encodes visual features and autoregressively generates step-wise outputs interleaved with [GND] tokens 2. Their hidden states 3 pass to GIM 4, which refines them via cross-attention with segmenter features 6 from 5, producing prompt embeddings decoded into evidence masks (2c).

🔗 Decoupled Language & Spatial Grounding

DoCoG decouples language modeling from spatial prediction. The VLM focuses on step-wise reasoning, while a dedicated segmentation module handles fine-grained, geometry-aware mask localization — yielding cleaner text outputs and more precise evidence masks.

🔄 Grounding Interaction Module (GIM)

GIM refines [GND] token embeddings through self-attention and cross-attention with visual features from the segmenter. This ensures grounding tokens remain mutually consistent and spatially aligned with the correct document regions.

Interactive Architecture Walkthrough

Press play to watch the forward pass unfold — tokens flow from the VLM through the Grounding Interaction Module into the segmenter, and each [GND] token lands as an evidence mask on the document.

Step-wise Multi-Type Grounding

DoCoG generates intermediate reasoning steps and final answers, each grounded to supporting evidence spanning textual and graphical elements.

📝

Textual Evidence

Words, lines, paragraphs, table cells, headers, and form fields

📊

Graphical Elements

Chart bars, lines, pie slices, legends, axis labels, and plot marks

🔀

Structural Elements

Flowchart nodes, connectors, arrows, and diagram components

Step-wise CoT with [GND] tokens grounds each reasoning step to pixel-accurate evidence masks

Qualitative Results

Model outputs across charts, flowcharts, tables, and documents — each reasoning step grounded to pixel-level evidence.

Try It Interactively

Step through DoCoG's grounded reasoning — each [GND] token sweeps a mask over the supporting evidence in the image.

Document image

Training Objectives

DoCoG is trained in two stages: SFT on DoCoG-QA, then DPO on DoCoG-PQA.

𝓛total = λlm𝓛lm + λseg𝓛seg + λanchor𝓛anchor

𝓛seg — Segmentation (Dice + BCE)

Supervises mask predictions against pixel-level ground truth for each [GND] token.

𝓛anchor — Anchor Loss

Preserves [GND] token compatibility with the frozen segmenter during DPO, preventing mask degradation.

DPO — Preference Optimization

Trained on DoCoG-PQA (20K pairs) to align step quality, answer accuracy, and grounding fidelity jointly.

Data

DoCoG-QA Dataset & Benchmark

Dataset release coming soon. We are preparing DoCoG-QA, DoCoG-PQA, and DoCoG-Bench for public release.

📦 DoCoG-QA

Large-scale training dataset with step-wise grounded Chain-of-Thought, built through a unified data engine across diverse document types with pixel-level mask supervision.

325K
Documents
1.5M
QA Pairs
Step
Wise CoT
Mask
Grounding
ChartsTablesFlowchartsDocumentsCurved textFormsReportsWebpages

📊 DoCoG-Bench

Human-verified benchmark for jointly evaluating answer accuracy, step-wise CoT quality, and mask-level grounding fidelity across diverse document types.

3K
Documents
10K
QA Pairs
Human
Verified
4
Doc Types
AQ (Answer Quality)CQ (CoT Quality)GQ (Grounding Quality)G-Eval

🎯 DoCoG-PQA

20K preference pairs for Direct Preference Optimization (DPO), constructed using a reward function combining AQ, CQ, and GQ scores to select chosen/rejected samples for alignment training.

Evaluation

Results

DoCoG consistently outperforms both commercial and open-source baselines. While commercial models achieve competitive answer accuracy, their grounding quality remains substantially lower.

85.8
AQ (All)
DoCoG-Bench
82.0
CQ (All)
DoCoG-Bench
81.9
GQfa (All)
DoCoG-Bench

Hover bars for score · Sorted by performance (high → low)

Unified Evaluation on DoCoG-Bench

AQ and GQfa per split. "All" reports AQ, Geval, CQ, GQall, and GQfa.

ModelParamsChartsFlowchartsDocsTablesAll
AQGQfaAQGQfaAQGQfaAQGQfaAQGevalCQGQallGQfa
GPT-582.43.878.14.086.75.084.36.482.984.876.82.44.8
Sonnet 4.579.15.775.313.383.86.881.62.679.980.571.33.37.1
Gemini 3 Pro83.211.279.410.188.111.786.012.684.284.175.215.411.4
Gemini 3 Flash79.612.775.812.584.535.382.433.980.682.873.432.823.6
InternVL 3.58B73.44.167.21.577.17.278.03.273.978.233.22.94.0
Qwen3-VL8B75.23.969.411.078.66.379.50.975.777.635.93.55.5
VisualCoT7B52.35.544.63.959.73.655.41.053.052.151.22.43.5
InternVL 3.5 FT8B74.665.068.867.982.064.379.161.276.180.472.261.464.6
Qwen3-VL FT8B75.863.970.266.983.461.280.655.677.579.874.857.861.9
DoCoG (Ours)9B83.580.382.279.289.785.487.882.785.885.282.078.281.9SOTA

Domain-Specific Benchmark Results

Click the metric pills to switch charts. Each domain card shows detailed per-benchmark breakdowns.

📊 Charts

Hover for score · sorted high → low

ModelChartQACQA-ProChartBenchCharXivBench AQ
GPT-589.042.769.476.382.4
Chart-R191.044.034.146.274.2
InternVL 3.586.734.751.468.873.4
Qwen3-VL89.632.965.364.775.2
DoCoG92.752.179.473.183.5
🔀 Flowcharts

Hover for score · sorted high → low

ModelFlowVQAAI2DMISS-QABench AQBench GQfa
GPT-591.989.571.778.14.0
InternVL 3.578.484.048.567.21.5
Qwen3-VL81.085.746.269.411.0
DoCoG85.588.378.482.279.2
📋 Tables

Hover for score · sorted high → low

ModelTabFactWTQTabMWPBench AQBench GQfa
GPT-587.778.893.784.36.4
InternVL 3.578.155.655.778.03.2
Qwen3-VL81.857.465.679.50.9
DoCoG89.464.480.787.882.7
📄 Documents

Hover for score · sorted high → low

ModelDOGR F1gMMDB IoUVCoTBD F1gBench AQ
GPT-53.69.389.75.486.7
Gemini 3 Pro65.355.487.473.588.1
Qwen3-VL27.628.786.744.578.6
DoCoG75.470.588.985.489.7