An answer that is printed nowhere
Hand a vision-language model a medical bill and ask: “How much should I pay for the blood test?” The right answer is $27.50. Now ask the model to show where on the bill it found that number.
It cannot, because $27.50 is not on the bill. The bill lists the blood test at $50. A footnote says premium members get a 5% discount. A badge says the plan is premium. The claim column says $20 is covered. The answer is computed from four facts in four places: 50 minus 5% is 47.50, and 47.50 minus 20 is 27.50.
This is the kind of question this post is about. It needs reading in several places and arithmetic between the reads. The earlier post on M3Grounder showed how to ground an answer with masks: the model emits a grounding token after each cited span, and a segmenter turns that token into a mask on the page. That works when the answer is on the page. Here it is not. A mask for “$27.50” has nothing to cover.
So the question is: how do we make a model whose reasoning, not only its answer, can be checked against the page? DoCoG, our ECCV 2026 Spotlight paper, answers it with a chain of thought in which every step that reads the document marks what it read with a pixel mask. Steps that only do arithmetic mark nothing. Figure 1 shows a real output on this bill.
Figure 1 · A grounded chain of thought on a medical bill
Q: How much should I pay for the blood test?
The post follows the order of the talk behind it. Each step answers the question the step before it raises.
- The problem. A harder question is answered in steps, and a right answer can rest on a wrong read (Why grounding the answer is not enough).
- The idea. Make every step that reads the page point at the page, with a pixel mask (What a step can point at).
- Why both. Grounding alone has nothing to point at for a computed answer. Chain of thought alone cannot be checked. Each fills the other's gap.
- What is new. The pointers of one chain depend on each other, so a Grounding Interaction Module (GIM) sits between the language model and the segmenter (The architecture and Why a separate module).
- How it is taught. Supervised training on 1.5M grounded chains teaches the format. Preference training then teaches the model to prefer a chain whose evidence is right, with an anchor loss so the masks survive (data, stage 1, stage 2, the anchor).
- What it buys. Results and ablations come last, along with what I think the work teaches beyond this paper (Results, ablations).
Why grounding the answer is not enough
Start with the simplest version of grounding: the model answers, then points at the region that supports the answer. For “What is the due date?” that is enough. The answer is a string on the page. A reviewer looks at the highlighted region, sees the date, and is done.
Multi-step questions break this in three ways.
- The answer may not exist on the page. $27.50 is computed. A box or mask for it has no honest target. A model forced to ground it will either point at nothing or point at something misleading.
- The answer may be a judgement. “Is the Net Sales total correct?” has the answer “no”. You can ground the printed total. But the reason it is wrong is six other cells that sum to something else.
- A correct answer can rest on wrong reads. A model can read the X-Ray cost instead of the blood test cost, make a second mistake that cancels it, and land on the right number. An answer check passes. Only a check of each step catches it.
Take the second break as a small example. The question is “Is the Net Sales total in this image correct?” A system cannot answer it by reading one place, so it answers in steps.
- S1 Look at the Net Sales column.
- S2 Read the values: 20, 20, 20, 50, 30, 20.
- S3 They sum to 160.
- Sf The printed total is 150, so no, it is wrong.
This chain is shortened from the real output in Figure 2. It is a good chain, but every line is a claim about the page that the reader must take on trust.
The natural next step is chain-of-thought: let the model write its reasoning before the answer (see Thinking in Tokens for why this helps). That gives the reviewer the steps. But it does not give them the evidence for each step. “The values are 20, 20, 20, 50, 30 and 20” is a claim about six cells. To check it, the reviewer has to find those six cells again. On a scanned statement with dozens of numbers, that is most of the work.
So each half fails alone, and the two failures are opposite. Grounding alone has nothing to point at for $27.50. Chain of thought alone says “the cost is $50” and gives no way to tell which cell it read. Chain of thought says what the model concluded. Masks say where it read. Each covers the gap in the other.
This suggests one question. What if every step pointed at the image? In the Net Sales chain, S2 would mark the six cells it read and Sf would mark the printed total. The chain is the same. Now every value points home.
What we want is the combination: a chain of reasoning in which every step that reads the page shows what it read. Then each read can be checked by looking, each arithmetic step can be checked by computing, and the answer follows from checked parts. Figure 2 compares the three options on one table. Switch between them and watch what a reviewer can verify.
Figure 2 · What a reviewer can check under three kinds of output
Q: Does the Net Sales total equal the sum of the Net Sales values?
Grounding the steps does more than make the output auditable. It turns out to make the answers better too. In the paper's progressive ablation, a model trained with chain-of-thought but no grounding reaches 78.1 answer quality on DoCoG-Bench. Adding grounding for the final answer raises it to 81.5. Grounding the intermediate steps as well raises it to 84.1. Step consistency (the CoT quality score) rises in the same order: 74.6, 77.9, 80.4.
What existing approaches ground
Several lines of work touch parts of this problem. It helps to sort them by two questions. What do they ground: the answer only, or each step? And how do they ground it: as a box typed in text, as a heatmap, or as a mask?
Reasoning without grounding
Chain-of-thought began as a prompting technique for language models (Wei et al., 2022). Multimodal chain-of-thought (Zhang et al., 2023) and LLaVA-CoT (Xu et al., 2024) carried it to vision-language models. LLaVA-CoT, for example, trains a model to write explicit stages (summary, caption, reasoning, conclusion) and adds a search over stages at test time. Chart-R1 (Chen et al., 2025) does chain-of-thought supervision followed by reinforcement learning for charts. These models reason well. None of them says where on the image a step looked.
Grounding the answer, with boxes
Document grounding work mostly grounds the answer. BoundingDocs (Giovannini et al., 2025) attaches an answer bounding box to existing document QA datasets. DOGR (Zhou et al., 2025) builds a data engine for grounding and referring on charts, posters and PDFs, with boxes. DLaVA (Mohammadshirazi et al., 2024) localises the answer with boxes by tagging text regions with box IDs. Visual CoT (Shao et al., 2024) first predicts a box around the key region, then answers from it. All of these ground one thing, the answer or the region for it, and all of them use rectangles. Most of them ground only text.
Grounding the steps, with boxes
Closer to DoCoG is work that grounds the reasoning itself. ChartPoint (Xu et al., ICCV 2025) adds bounding-box reflection to chain-of-thought for charts, checking steps against re-rendered charts. It is the one prior method in the paper's comparison that grounds steps over both text and graphics, but it is limited to charts and to boxes. On natural images, Grounded Chain-of-Thought (Wu et al., 2025) and GRIT (Fan et al., 2025) interleave box coordinates with reasoning text; GRIT trains this with reinforcement learning. The series post on thinking with images covers that line in more depth.
Masks, but not documents and not steps
Masks come from a different line. LISA (Lai et al., 2023) joined a multimodal language model to SAM through a special segmentation token. GLaMM (Rasheed et al., 2024) interleaves phrases with masks in a grounded conversation. LISA++ (Yang et al., 2023) adds instance masks inside dialogue. These are built for natural images, where the evidence is usually one object. DocVXQA (Souibgui et al., 2025) produces relevance heatmaps for document QA, learned with explainability objectives, but it explains the answer, not a chain of steps. And M3Grounder, the previous paper in this series, grounds document answers with masks at three granularities, but it grounds the answer, not the reasoning.
So the gap is specific. Step-wise grounded reasoning exists on natural images and on charts, with boxes. Mask grounding exists on natural images and on document answers. No prior method grounded each step of a chain with masks across the different kinds of documents. That combination is what DoCoG adds. The paper's Table 1 makes the same point across 18 datasets: only ChartPoint and DoCoG-QA have grounded chains of thought, and only DoCoG-QA has masks.
What a step can point at
Documents mix kinds of evidence on one page. A question may need purely textual evidence, such as a field value. It may need purely graphical evidence, such as the line for one team in a chart. Or it may need both together, such as matching a legend entry to the wedge it describes. The paper calls this multi-type grounding: evidence may come from textual elements, from graphical elements, or jointly from both.
The project page splits the graphical side further. Textual evidence covers words, lines, paragraphs, table cells, headers and form fields. Graphical elements covers chart bars, lines, pie slices, legends, axis labels and plot marks. Structural elements covers flowchart nodes, connectors, arrows and diagram parts. The distinction matters for the shape of the evidence. A table cell is close to a rectangle. A chart line is a thin diagonal stroke. A connector in a flowchart is an L-shaped arrow. A box around a diagonal line covers mostly empty space, and a box around an arrow covers the nodes it connects.
This is the reason for masks rather than boxes, which the hub post argues in general: document evidence is better modelled as a highlighter stroke than as a point or a rectangle. In a chain it matters even more. A step that says “follow the No arrow” has to point at the arrow, not at the box around two nodes.
Figure 3 lets you explore real DoCoG outputs. Pick a document, then click a step to see what it grounds, or click a single [GND] chip to see one mask. Colours show the evidence type.
Figure 3 · Step explorer: real grounded chains on six documents
Two patterns stand out when you click through. First, one step often holds several pointers. In the chart example, step S2 grounds three legend entries and three lines in one sentence. Second, pointers in different steps are related. The legend entry for Team Aurora and the line for Team Aurora must refer to the same series. In the flowchart, the “No” arrow at the end of S2 is the starting point of S3. These relations are where the architecture comes in.
The architecture
DoCoG has three parts, and each does one job.
- A vision-language model (Qwen3-VL-8B) reads the page and the question and writes the chain: steps S1, …, Sn and a final answer Sf. Whenever a step cites evidence, it emits a special [GND] token, which was added to the vocabulary. A step can contain several.
- The Grounding Interaction Module (GIM), a three-layer transformer encoder, takes the final-layer hidden states of all emitted [GND] tokens, written G̃ = {G̃1, …, G̃K}. It alternates self-attention among them with cross-attention to the segmenter's image features x = Fenc(I). It outputs refined grounding embeddings G = GIM(G̃, x).
- A promptable segmenter (SAM) treats each refined embedding as a prompt. Its prompt encoder and mask decoder turn prompt Gk and the image features into mask M̂k. If no step cites evidence, the set of masks is empty.
Each part answers a weakness of how grounding is usually done.
- A grounding token, not a written box. A written box costs many tokens per span. It is only a next-token prediction, so nothing ties it to the page and it can be hallucinated. A [GND] token costs one token and carries its meaning in its hidden state.
- A mask, not a rectangle. Rectangles overshoot pie wedges, curved text and diagram parts. Evidence is also plural: one box cannot stand for two places.
- GIM, between the two. The pointers of a chain depend on each other, and nothing makes independently projected pointers agree. The next section gives the full argument.
Nothing in this path is a coordinate. The language model never writes a number for a position. It writes a token that means “evidence here”, and the content of “here” lives in that token's hidden state. Figure 4 follows one forward pass on the example from the talk: a question about stock holdings in a donut chart, where step one points at the label “HDFC Bank” and at its wedge, and step two points at its value, 8.84%.
Figure 4 · One forward pass through DoCoG
Who does what in DoCoG
- Vision-language model
- reasons step by step, decides which steps need evidence, and writes a [GND] token for each piece of evidence
- [GND] hidden state
- the message: what this step is pointing at
- GIM
- makes the pointers of one chain consistent with each other, and checks each against the segmenter's view of the pixels
- SAM
- the highlighter: draws one mask per refined pointer, at any shape
This is the same split of work as the rest of the series. The language model decides what to ground. The segmenter decides where the pixels are. The new piece is the middle: something that decides how the pointers of one chain relate before they become masks. In M3Grounder, each grounding token went to SAM on its own through small projection heads. That was enough, because one answer span produced its masks from one token. In a chain, the tokens depend on each other.
Why a separate module, and not a bigger language model
The quickest way to see the need is to set DoCoG beside M3Grounder.
- M3Grounder: one answer, independent pointers. The model writes the answer and a grounding token after each cited span. Small heads project each token to SAM on its own. That is fine for one answer span, because its three masks (phrase, line and block) come from one token.
- DoCoG: a chain of pointers that depend on each other. Step 1 points at the label “HDFC Bank” and at its wedge. Step 2 points at its value, 8.84%, which must sit on that same wedge. Projected one by one, nothing makes these pointers agree.
The hub post gives the short answer to this. Here is the longer one, with the evidence for each part.
Start with what the pointers need. In the donut example, three [GND] tokens must land on three regions that belong together: the legend label, the wedge whose colour matches it, and the percentage printed next to that wedge. The paper describes such tokens as “related, complementary, or mutually constraining”. If each token is turned into a prompt on its own, nothing makes them agree. The wedge pointer can land on the neighbouring wedge, which has a similar colour, while the label pointer is correct.
A causal decoder can only look backwards
Could the language model make them agree by itself? Partly. Its attention is causal. When it writes the second pointer, it can attend to the first. But when it writes the first pointer, the second does not exist yet. The hidden state of the first [GND] is fixed at the moment it is written, and nothing later in the chain can revise it. Consistency inside a decoder is one-directional.
Making the decoder bigger does not change this. A larger causal model still computes each hidden state from the tokens before it. GIM's self-attention has no causal mask. Every pointer reads every other pointer in the chain, in both directions, and is refined in that context. That is what lets the label pointer and the wedge pointer settle on the same series even though the label was written first.
The decoder sees the page through a different lens
The second reason is about representation. The language model's hidden state is built for predicting the next word. It sees the image through its own vision encoder, at its own resolution, merged into visual tokens. SAM's mask decoder reads prompts in SAM's prompt space and reads the image through SAM's own encoder, which keeps fine spatial detail. A pointer computed in the language model's space has to be translated into SAM's space somewhere.
GIM's cross-attention does that translation with the pixels in view. Each pointer attends directly to the features SAM will decode from. So before a pointer becomes a prompt, it has been checked against the exact representation of the page that will draw its mask. The project slides put it as “cross-attention aligns tokens to the segmenter's space.” A bigger language model would still be working from its own view of the image.
The ablation separates the two halves
The paper tests both reasons. Removing GIM drops final-answer grounding from 81.9 to 69.6 and grounding over all steps from 78.2 to 66.5. Keeping GIM but removing its cross-attention to image features (so only the pointer-to-pointer self-attention remains) recovers part of the loss: 77.0 and 73.5. Figure 5 lets you switch between the three settings.
Figure 5 · Switching GIM's two kinds of attention on and off
There is also a practical reason to keep this work out of the language model. GIM is three layers and runs over only the K grounding tokens of a chain (plus the image features they attend to). A larger language model costs more on every token it writes, grounding or not. And because GIM and SAM sit after the language model as a separate path, they can be frozen while the language model is trained further. The preference stage below depends on exactly that.
Building 1.5M grounded chains
None of this can be trained without data in which every step of a chain is tied to a mask. Prior grounded document QA datasets are restricted to one document type, ground the final answer, and use boxes. So the paper builds DoCoG-QA: 325K documents and 1.5M question-answer pairs, each with step-wise reasoning, a final answer and grounding linked to the supporting elements.
The document mix is deliberate: 75K charts, 75K tables, 75K flowcharts and 100K diverse documents (reports, scientific papers, forms, webpages, infographics, timelines). The questions cover extraction, comparison, aggregation, validation, interpretation and multi-step analysis.
The key design decision is the same one the hub post describes for all three grounding papers: never ask a model to write coordinates. Each document comes with structured metadata that lists its elements with precise bounding boxes, from which masks and attributes are derived. Each mask gets a unique ID. A language model reads the metadata and writes a question and a step-wise chain that cites mask IDs as evidence. The IDs then map back to masks. A chain written this way cannot contain a hallucinated coordinate, because it contains no coordinates.
Generation is only half the job. Every pair then passes four filters, shown in Figure 6.
Figure 6 · The data engine and its four filters
- Structure. Each pair must have a valid final answer and at least one grounding reference.
- Answer correctness. gpt-oss-120B judges whether the answer is supported by the document metadata and the question. Pairs below a threshold are dropped. The verifier is deliberately from a different model family than the Qwen3-VL backbone.
- Chain quality. ROSCOE, a suite of metrics for step-by-step reasoning, scores step correctness, coherence and consistency with the final answer.
- Grounding. For textual elements, OCR is run inside the referenced mask and compared with the answer span. For graphical elements, the graphic-to-text correspondence in the metadata is checked. Masks for graphical elements come from a state-of-the-art segmentation model (SAM 3), and a stratified subset of 33,500 masks across domains and element types was checked by hand.
The same engine and filters, followed by two-stage human verification, produce DoCoG-Bench: 3K document images and 10K QA pairs across charts, tables, reports, webpages, infographics, flowcharts and documents with curved or complex text. Annotators trained on the mask protocol checked answer correctness, grounding relevance and mask boundaries.
Stage 1: supervised fine-tuning
Training happens in two stages. The first teaches the format and the skill. The whole model learns, end to end, to write grounded chains and to turn each [GND] into the right mask. The loss is a weighted sum of a language-modelling term and a segmentation term:
Lseg = ∑k=1K [ λdice ℓdice(M̂k, Mk) + λbce ℓbce(M̂k, Mk) ] Llm is cross-entropy over the generated chain. Each predicted mask M̂k is compared with its ground truth Mk by Dice loss (overlap, robust to small regions) and binary cross-entropy (per pixel). Weights: λlm = 1, λseg = 2, λdice = λbce = 1.
Why two mask terms? Binary cross-entropy treats each pixel independently, so for a thin chart line, where almost every pixel is background, it can be small even when the line is missed. Dice measures overlap of the whole region, so it does not let a small target vanish. The pair is the standard choice for this reason, and it suits documents, where many evidence regions are small.
The mask loss flows back through SAM's decoder, through GIM and into the language model. That is what teaches the language model to put into each [GND] hidden state the information GIM and SAM need. Training uses AdamW at a learning rate of 10−5, 3% linear warmup and cosine decay, on 32 H100 GPUs with DeepSpeed ZeRO-3 and an effective batch of 256. Besides DoCoG-QA, the stage mixes in subsets of existing document, chart, table and flowchart datasets, so the model keeps its general document QA ability.
Supervised fine-tuning has one blind spot that matters here. It scores the model token by token against one reference chain. A chain that reaches the right answer through a wrong read is not penalised as a chain; each token is just compared with the reference. And the model never sees its own better and worse attempts side by side. The second stage adds that.
Stage 2: preferring better chains
Stage 1 teaches the format and the skill. It does not teach the model to prefer a well-supported chain over a lucky one. To see the gap, take two chains for the bill question.
- Chain A: every step right. It reads the blood test cost ($50), the premium discount, the premium badge and the $20 claim, each with a mask on the right place. It answers $27.50.
- Chain B: right answer, broken trail. It also answers $27.50. But its first mask sits on the X-Ray row, and its third step claims the plan is premium without citing any evidence.
Measured by the answer, A and B are equal. Measured by the evidence, A is clearly better. Supervised fine-tuning cannot tell them apart. It checks one token at a time against one reference chain, and nothing scores a whole chain. So a right answer reached through wrong evidence is never penalised as a chain. Preference training can: it compares two whole chains for the same question and pushes the model toward the better one.
DoCoG uses Direct Preference Optimization (DPO). The preference post derives it from the RLHF objective; here is the result. For a chosen chain y+ and a rejected chain y− for the same image I and question q:
In RLHF, people say which output is better. Here a scorer stands in for them and checks each sampled chain against the reference.
Building the pairs is the interesting part. For each image and question, the SFT model samples N grounded chains. A reward then ranks them. It has four parts, and they are the same quantities DoCoG-Bench reports at test time.
- Format (FR) is a gate. The steps, the final answer and the evidence references from [GND] tokens must all parse. If not, FR = 0 and the sample is rejected before scoring.
- Answer quality (AQ) is positive when the predicted answer matches the ground truth after text normalisation, with a tolerance for numbers.
- CoT quality (CQ) first computes a normalised ROSCOE score. Below a threshold, CQ = 0. Otherwise the predicted steps are matched to the reference steps by maximum bipartite matching on semantic similarity and numeric consistency, and CQ is the F1 of that matching.
- Grounding quality (GQ) matches each predicted mask to the nearest ground-truth mask. A match counts only if IoU ≥ 0.5, the element type matches (text span, table cell, chart wedge) and it appears in the right step. GQall is the F1 over masks from all steps and the answer. GQfa uses only the masks needed for the final answer. GQ is their average.
In plain terms, the reward asks three questions of each chain after the format gate. Is the final answer correct? Do the steps match the reference? Are the masks on the right evidence? The best chain by that score is like chain A. The worst is like chain B.
The highest-reward sample becomes the chosen chain and the lowest-reward sample the rejected one. That yields DoCoG-PQA, 20K preference pairs. Figure 7 walks through one pair.
Figure 7 · From sampled chains to a preference pair
The paper describes this, to the best of the authors' knowledge, as the first application of DPO to grounded document VQA. What it adds is measurable. Going from the SFT model with grounded steps to the DPO model raises answer quality from 84.1 to 85.8, CoT quality from 80.4 to 82.0 and final-answer grounding from 80.3 to 81.9. The largest single jump in the ablation table is on FlowVQA, a flowchart benchmark: 74.0 to 85.5.
Preference training without breaking the masks
In short: train the language model, freeze GIM and the segmenter, and hold the hand-off between them in place.
Look again at the DPO loss. Every term is a likelihood of text. There is no mask in it. That is not an oversight. A preference between two masks needs a likelihood of each mask, and the mask decoder does not give one: it outputs one mask, not a distribution over masks. And several masks can validly cover the same evidence, so “mask A is better than mask B” is often ill-posed. So DoCoG applies DPO to the text only. Only the language model's weights are updated. GIM and SAM are frozen.
That sounds safe. It is not, and the reason is subtle. Freezing GIM and SAM freezes their weights, not their inputs. Their input is the [GND] hidden state of the language model, and DPO is changing the language model. As its weights move, its hidden states move with them. The frozen GIM and SAM now receive inputs unlike anything they were trained on, and they produce worse masks. DPO's reference term does not help: πref keeps the text distribution near the SFT model, but places no constraint on the hidden states that the mask path reads.
The ablation shows how bad this gets. Without a fix, mask IoU on MMDocBench falls from 70.5 to 40.3 and final-answer grounding on DoCoG-Bench from 81.9 to 41.7. The masks collapse into blobs.
The fix is an anchor loss on the interface itself. Run the frozen SFT model and the model being trained on the same input. Pass both sets of [GND] states through the same frozen GIM. Then penalise the distance between the two sets of refined embeddings, which are exactly what SAM's prompt encoder consumes:
The text is free to move toward better chains. The grounding interface is not. Drift becomes a differentiable penalty, so DPO improves the reasoning only in directions that keep the pointers where the frozen modules expect them. With the anchor, mask IoU stays at 70.5. Figure 8 animates the problem and the fix.
Figure 8 · Drift under preference training, and the anchor that stops it
Notice where the anchor sits. The paper's text speaks of keeping the [GND] hidden states close to the SFT model's, but the loss is measured after the frozen GIM, on the refined embeddings. That is the more precise target. Two hidden states can differ in directions GIM ignores; what matters to SAM is only what comes out of GIM. Anchoring there constrains exactly what the mask decoder sees, and leaves the language model free in every other direction.
Results
DoCoG-Bench reports the reward components as metrics: answer quality (AQ), a G-Eval score from an LLM judge, CoT quality (CQ), and grounding (GQall over all steps, GQfa for the final answer). For models that output boxes, each box is converted to a mask before computing IoU. For benchmarks with box annotations, DoCoG's masks are converted to their tightest enclosing box.
The headline is a pattern, not a number. Commercial models answer well and ground badly. In the talk, the corner they occupy is labelled “fluent but unverifiable”: high answer quality, almost no grounding. Figure 9 plots answer quality against final-answer grounding for every model in the paper's main table, per document type.
Figure 9 · Answer quality against grounding on DoCoG-Bench
Across all document types, DoCoG reaches 85.8 AQ and 81.9 GQfa. Gemini 3 Pro reaches 84.2 AQ and 11.4 GQfa. GPT-5 reaches 82.9 and 4.8. Claude Sonnet 4.5 reaches 79.9 and 7.1. The best commercial grounding comes from Gemini 3 Flash, at 23.6. Per split, DoCoG scores 83.5 / 80.3 on charts, 82.2 / 79.2 on flowcharts, 89.7 / 85.4 on documents and 87.8 / 82.7 on tables (AQ / GQfa).
The fairest comparison is with the same backbones trained on the same data. The paper also fine-tunes Qwen3-VL-8B, InternVL3.5-8B and LISA++ on DoCoG-QA under the same training protocol as DoCoG. Qwen3-VL-8B goes from 5.5 GQfa zero-shot to 61.9 after fine-tuning on DoCoG-QA. InternVL3.5-8B goes from 4.0 to 64.6. DoCoG, on the same Qwen3-VL-8B backbone, reaches 81.9. Data brings the backbone into the task; the architecture and training recipe close most of the remaining gap. The hub post shows the same pattern for all three grounding papers.
Public benchmarks
DoCoG is also evaluated on public chart, flowchart, table and document benchmarks with their official metrics. The table lists DoCoG next to the best open baseline in the paper and the best commercial model on each.
| Benchmark | Type | DoCoG (9B) | Best open baseline | Best commercial |
|---|---|---|---|---|
| ChartQA | charts | 92.7 | 91.0 (Chart-R1) | 89.0 (GPT-5) |
| ChartQA-Pro | charts | 52.1 | 44.0 (Chart-R1) | 51.1 (Gemini 3 Pro) |
| ChartBench | charts | 79.4 | 67.9 (ChartPoint) | 69.4 (GPT-5) |
| CharXiv | charts | 73.1 | 68.8 (InternVL3.5) | 80.3 (Gemini 3 Pro) |
| FlowVQA | flowcharts | 85.5 | 81.0 (Qwen3-VL) | 91.9 (GPT-5) |
| AI2D | diagrams | 88.3 | 85.7 (Qwen3-VL) | 91.2 (Gemini 3 Pro) |
| MISS-QA | schematics | 78.4 | 63.8 (Kimi-VL) | 71.7 (GPT-5) |
| TabFact | tables | 89.4 | 85.2 (InternLM-XComposer 2.5) | 88.5 (Gemini 3 Pro) |
| WTQ | tables | 64.4 | 57.4 (Qwen3-VL) | 78.8 (GPT-5) |
| TabMWP | table math | 80.7 | 88.3 (SynTab-LLaVA) | 93.7 (GPT-5) |
| DOGR, grounding F1 | documents | 75.4 | 66.4 (DOGR) | 65.3 (Gemini 3 Pro) |
| MMDocBench, IoU | documents | 70.5 | 28.7 (Qwen3-VL) | 55.4 (Gemini 3 Pro) |
| MMDocBench, EM | documents | 73.1 | 69.8 (Qwen3-VL) | 83.8 (Gemini 3 Pro) |
| VisualCoT-Bench | documents | 88.9 | 86.7 (Qwen3-VL) | 89.7 (GPT-5) |
| BoundingDocs, grounding F1 | documents | 85.4 | 44.5 (Qwen3-VL) | 73.5 (Gemini 3 Pro) |
How to read this table: bold marks the best column on each row. DoCoG beats the best open baseline on every row except TabMWP, where SynTab-LLaVA, a table specialist, scores 88.3. It leads every grounding metric outright, including against specialists such as Chart-R1 and ChartPoint on charts. On pure answer accuracy, commercial models still win several benchmarks, mostly ones that reward broad knowledge or heavy arithmetic (CharXiv, WTQ, TabMWP).
The cost is modest. On one H100, DoCoG runs at 580 ms latency, 24.08 GB of memory and 1.72 samples per second.
What the ablations teach
The ablation table is where most of the lessons are. Figure 10 steps through every row against the full model. Each bar is the ablated model; the black tick is DoCoG.
Figure 10 · Every ablation against the full model
Reasoning and grounding help each other
Read three rows together. A model that answers directly, with grounding but no chain of thought, reaches 69.3 final-answer grounding. A model that reasons first and grounds only the final answer reaches 77.8. Reasoning, even ungrounded, improves where the final answer points. In the other direction, as shown earlier, grounding improves the reasoning: 78.1 AQ with no grounding, 81.5 with final-answer grounding, 84.1 with grounded steps.
Full fine-tuning is needed for a new interface token
Training with LoRA instead of full fine-tuning underperforms everywhere, and most on grounding: mask IoU falls to 23.0 and answer quality to 68.6. The paper's explanation is that low-rank updates cannot change the model enough to produce the [GND] representation. The language model has to learn a new token whose hidden state drives another network; that is a larger change than adapting its writing style. The LoRA post explains what a low-rank update can and cannot express.
The two training stages have different jobs
The DPO row against the step-grounded SFT row shows what preference training adds: modest gains on DoCoG-Bench (AQ 84.1 to 85.8) and a large gain on FlowVQA. The anchor row shows what it costs if done naively: half the grounding. Together they say the second stage is worth doing only with the interface protected.
How DoCoG compares with prior work
The table collects the approaches discussed above along the aspects this post introduced: whether steps are grounded, the form of the grounding, the evidence types, the document types, whether pointers interact before they are drawn, and what training follows supervised fine-tuning.
| Method | What is grounded | Grounding form | Evidence types | Domain | Pointers interact | Beyond SFT |
|---|---|---|---|---|---|---|
| LLaVA-CoT | nothing (reasoning stages only) | none | none | general images | n/a | stage-wise search at test time |
| Chart-R1 | nothing | none | none | charts | n/a | reinforcement learning |
| Visual CoT | one key region before the answer | box as text | text | general and documents | no | not reported |
| BoundingDocs | answer (dataset) | box | text | documents | n/a | n/a |
| DOGR | answer and referred text | box as text | text | charts, posters, PDFs | no | not reported |
| DLaVA | answer | box via region IDs | text | documents | no | training-free |
| DocVXQA | answer context | relevance heatmap | text and layout | documents | no | explainability objectives |
| ChartPoint | each step | box | text and graphics | charts | no | reflection on re-rendered charts |
| GCoT, GRIT | each step | box as text | objects | natural images | no | GRIT: reinforcement learning |
| LISA, GLaMM, LISA++ | phrases or the answer | mask via SAM | objects | natural images | no | not reported |
| M3Grounder | answer spans (multi-span) | mask via SAM, three granularities | text and graphics | documents | no (one token, three heads) | SFT with bleed and hierarchy losses |
| DoCoG | each step and the answer | mask via GIM and SAM | text, graphics, structure | charts, tables, flowcharts, documents | yes (GIM self- and cross-attention) | DPO on chains with an anchor loss |
How to read this table: go column by column and look for the first row that fills each cell the way DoCoG does. Step grounding appears with ChartPoint and GRIT, masks with LISA and M3Grounder, multiple document types with Visual CoT and DOGR. DoCoG is the first row where all of them meet, and the only one where pointers interact before they are drawn. “Not reported” means the post did not find such a stage in the method's paper.
What and where
The talk ends this paper on one question: where or what, pick one? A reader checking a document answer wants both. The what is the claim itself, such as “the cost is $50” or “x = 5”. The where is the pixels that the claim was read from.
Earlier systems gave one of the two. A chain of thought states the what and leaves the where to the reader. A grounded answer gives a where, but only for the final answer, and a computed answer has no place to point. DoCoG gives both. Every value in the chain points to its pixels, and the chain says what was concluded and computed from them.
The ablations earlier support this pairing. Reasoning first improves where the final answer points, and grounding each step improves the reasoning. The one gap is the arithmetic between the reads, which carries a what and no where. That is the first open problem below.
Limitations and open problems
- Arithmetic steps are not verified. A grounded read can be checked by looking. A computation like “47.50 − 20 = 27.50” carries no mask and no check. A natural extension is to route such steps to a calculator or a program, so every step of the chain is either grounded or executed.
- Masks are left out of preference training. DPO improves which chains are chosen, and the reward includes grounding, but no gradient from the preference loss reaches GIM or SAM. A preference signal for masks would need either a mask likelihood or a ranking that tolerates several valid masks. That remains open.
- Chain quality is measured against one reference. CQ matches predicted steps to a reference chain. A valid chain that takes a different route can score low. This affects both the reward and the benchmark.
- One page at a time. The questions and masks live on a single image. Reasoning that crosses pages, such as checking a total against a line item on another page, is not covered.
- Release. At the time of writing, the project page lists the code and the datasets (DoCoG-QA, DoCoG-PQA and DoCoG-Bench) as coming soon; a model and a demo are on Hugging Face.
Where DoCoG sits in the series
The hub post argues that grounding should be a mask drawn by a segmenter, prompted by a language model that decides what to ground, and that the interesting design choice is how the grounding tokens relate before they reach the segmenter. The three grounding papers answer that choice three ways.
- M3Grounder: tokens do not interact. Each answer span's token goes through three small heads to give phrase, line and block masks.
- DoCoG: tokens interact along a chain. GIM lets every pointer in a reasoning chain read every other pointer and the segmenter's features.
- DocLayout-VL: tokens interact along a tree. Its Hierarchical Grounding Contextualizer restricts attention to parents, children and siblings, so regions in different branches do not merge.
The data side follows the same principle in every paper: build the document's structure first, then let a language model cite element IDs, never coordinates. And the division of labour is the thread through all of it. The language model reasons and decides what needs evidence. GIM makes the pointers agree. SAM draws. The anchor loss exists because that division is real: once the parts are separate, training one of them has to respect the interface to the others.
The next post, on DocLayout-VL, takes the grounding tokens from a chain to a tree, and from answering questions about a page to parsing the page itself.
Key insights and nuances
- Grounding the answer is not enough for multi-step questions. The answer may be computed and printed nowhere, and a right answer can rest on a wrong read. Only grounded steps make each read checkable. (Section 2)
- Reasoning and grounding train each other. Grounded steps raise answer quality from 78.1 to 84.1; reasoning first raises final-answer grounding from 69.3 to 77.8. (Section 12)
- Pointers in a chain must be refined together, against the segmenter's features. A causal decoder cannot revise an earlier pointer, and its features are not the segmenter's. GIM's self-attention recovers 7.4 of 12.3 lost grounding points; cross-attention the other 4.9. (Section 6)
- “Module beats scale” is supported for this interface, not proven in general. No larger-backbone ablation was run; the evidence is structural plus the GIM ablation and the fine-tuned-baseline gap. (Section 6)
- Put evidence into the preference reward. A reward with grounding quality ranks a lucky right answer below a well-supported one, which supervised fine-tuning cannot express. (Section 9)
- Freezing a module does not freeze its inputs. DPO on the language model alone halves grounding (81.9 to 41.7) through hidden-state drift. Anchor the hand-off representation where the frozen module reads it. (Section 10)
- Without the anchor, the answers suffer too. AQ falls to 78.1, the no-grounding level, and the paper does not explain why. (Section 10)
- Answer accuracy and grounding come apart in frontier models, but part of the gap is box-versus-mask format; on box benchmarks Gemini 3 Pro grounds far better. (Section 11)
- Grounding does not fix arithmetic. Math-heavy table QA still favours frontier models; computation steps need their own verification. (Section 11)
References
Grouped by topic. Every entry links to its primary source.
The paper
- DoCoG: Mask-based Multi-Type Grounded Chain-of-Thought for Document QA · Gunda, Jinka, Rachakonda, Jain, Venna, Srinivasan, Sarvadevabhatla, ECCV 2026, Spotlight (paper, proceedings, slides, architecture walkthrough)
- Building Grounded Document Intelligence (talk deck) · Srinivasan, 2026
Sibling papers in this series
- M3Grounder: Mask-Based Multi-Span and Multi-Granular Grounding for Document QA · Venna, Gunda, Jinka, Rachakonda, Srinivasan, Sarvadevabhatla, CVPR 2026
- DocLayout-VL: A Foundational Model for Hierarchical, Open-set, and Promptable Document Layout Segmentation · Srinivasan, Venna, Bandarupalli, Raghuveer, Gunda, Sarvadevabhatla, ECCV 2026
Chain-of-thought and visual reasoning
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models · Wei et al., 2022
- Multimodal Chain-of-Thought Reasoning in Language Models · Zhang et al., 2023
- LLaVA-CoT: Let Vision Language Models Reason Step-by-Step · Xu et al., 2024
- Chart-R1: Chain-of-Thought Supervision and Reinforcement for Advanced Chart Reasoner · Chen et al., 2025
- ROSCOE: A Suite of Metrics for Scoring Step-by-Step Reasoning · Golovneva et al., ICLR 2023
Grounded reasoning
- Visual CoT: Advancing Multi-Modal Language Models with a Comprehensive Dataset and Benchmark for Chain-of-Thought Reasoning · Shao et al., NeurIPS 2024
- ChartPoint: Guiding MLLMs with Grounding Reflection for Chart Reasoning · Xu et al., ICCV 2025
- Grounded Chain-of-Thought for Multimodal Large Language Models · Wu et al., 2025
- GRIT: Teaching MLLMs to Think with Images · Fan et al., 2025
Document grounding
- BoundingDocs: a Unified Dataset for Document Question Answering with Spatial Annotations · Giovannini et al., IJDAR 2025
- DOGR: Towards Versatile Visual Document Grounding and Referring · Zhou et al., ICCV 2025
- DLaVA: Document Language and Vision Assistant for Answer Localization with Enhanced Interpretability and Trustworthiness · Mohammadshirazi et al., 2024
- DocVXQA: Context-Aware Visual Explanations for Document Question Answering · Souibgui et al., 2025
Segmentation and mask grounding
- Segment Anything · Kirillov et al., ICCV 2023
- SAM 3: Segment Anything with Concepts · Carion et al., 2025
- LISA: Reasoning Segmentation via Large Language Model · Lai et al., CVPR 2024
- GLaMM: Pixel Grounding Large Multimodal Model · Rasheed et al., CVPR 2024
- LISA++: An Improved Baseline for Reasoning Segmentation with Large Language Model · Yang et al., 2023
Backbones, preference training and evaluation
- Qwen3-VL Technical Report · Qwen Team, 2025
- InternVL3.5: Advancing Open-Source Multimodal Models in Versatility, Reasoning, and Efficiency · Wang et al., 2025
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model · Rafailov et al., NeurIPS 2023
- gpt-oss-120b & gpt-oss-20b Model Card · OpenAI, 2025
- G-Eval: NLG Evaluation using GPT-4 with Better Human Alignment · Liu et al., EMNLP 2023
- Text Embeddings by Weakly-Supervised Contrastive Pre-training (E5) · Wang et al., 2022