Research · Document AI

Grounding Every Step of a Document Answer

DoCoG (ECCV 2026, Spotlight) writes a chain of thought in which every step that reads the page also marks what it read, with a pixel mask. Doing that well takes a small module between the language model and the segmenter, and a preference stage that is careful not to break the masks.

Document AIGrounded reasoningVision-language models

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

A photographed medical bill. Each reasoning step highlights the regions it read: the Cost header, the Blood Test row and its $50 cost, the 5% discount footnote, the Premium plan badge, the Claim header and the $20 claim.

Q: How much should I pay for the blood test?

    DoCoG's output on a photographed bill, shown on the project page. [GND] chips are grounding tokens; each one becomes a mask on the page. Steps S4 and S7 are arithmetic and emit no mask. Step S5 points again at the $50 it read in S1. The highlighted outlines are polygon traces of the evidence regions, redrawn for this figure.

    The post follows the order of the talk behind it. Each step answers the question the step before it raises.

    1. 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).
    2. The idea. Make every step that reads the page point at the page, with a pixel mask (What a step can point at).
    3. 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.
    4. 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).
    5. 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).
    6. 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.

    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.

    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

    Output

    Q: Does the Net Sales total equal the sum of the Net Sales values?

      The grounded chain is DoCoG's output on this table. A grounded answer alone can only point at the printed total. An ungrounded chain states the six values but not which cells they came from, so a reviewer has to find them again. The grounded chain makes every read checkable by looking.

      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

        Chains are DoCoG outputs from the project page and talk. Blue masks are textual evidence, orange are graphical elements, green are structural elements. Note how steps reuse earlier evidence: in the flowchart, S3 starts from the same “No” arrow that S2 ended on. Outlines are polygon traces redrawn for interactivity.

        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.

        Each part answers a weakness of how grounding is usually done.

        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

        Data flow in DoCoG: the VLM writes a chain with three grounding tokens; their hidden states go to GIM, which runs self-attention among them and cross-attention to SAM's image features for three layers; the refined prompts go to SAM's prompt encoder and mask decoder, which draw three masks that agree: the HDFC Bank legend entry, its wedge and its 8.84% value.

        The camera follows the active stage. Trained parts are outlined in orange; parts that stay frozen in both training stages are grey, following the project's architecture walkthrough. Within GIM, self-attention is unmasked: every pointer reads every other pointer, in both directions.

        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.

        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

        Setting

        Left: an illustration of the failure each setting tends to produce, not a model output. Right: measured scores from the paper's ablation table (DoCoG-Bench and MMDocBench). The black tick on each bar marks the full model.

        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

        The DoCoG data engine: documents with element metadata and mask IDs; a language model writes a chain citing IDs; IDs map to masks; four filters check structure, answer correctness with gpt-oss-120B, chain quality with ROSCOE, and grounding with OCR and graphic-text correspondence; the result is DoCoG-QA with 1.5M pairs on 325K documents, and DoCoG-Bench with 10K human-verified pairs on 3K documents.

        The engine cites element IDs, never coordinates. The paper does not report how many pairs each filter removed, so the figure shows the gates without counts.
        1. Structure. Each pair must have a valid final answer and at least one grounding reference.
        2. 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.
        3. Chain quality. ROSCOE, a suite of metrics for step-by-step reasoning, scores step correctness, coherence and consistency with the final answer.
        4. 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:

        Lsft = λlm Llm + λseg Lseg
        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.

        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:

        LDPO = − log σ( β [ log πθ(y+ | I, q) ⁄ πref(y+ | I, q) − log πθ(y− | I, q) ⁄ πref(y− | I, q) ] ) πθ is the model being trained. πref is a frozen copy of the SFT model. β sets how hard the pair is pushed apart. Every π is a probability of writing a chain as tokens, computed by the language-model head.

        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.

        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 SFT model samples several chains for the bill question. One fails the format check. The rest are scored on answer, chain and grounding quality. Chain A, every read right, gets the highest reward and is chosen. Chain B, the right answer with a mask on the X-Ray row and an uncited step, gets the lowest and is rejected. DPO then raises the likelihood of A relative to B, updating only the language model.

        Reward bars are illustrative; the paper does not publish per-sample rewards. The two chains follow the example in the talk. Note that both chains give the same final answer: chain B loses on its evidence, which is exactly what supervised fine-tuning could not express.

        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:

        Lanchor = (1/K) ∑k=1K ‖ Gkθ − Gkref ‖22     Lopt = LDPO + λanchor Lanchor Gkref: the k-th GIM-refined prompt embedding from the frozen SFT model. Gkθ: the same from the model DPO is training. λanchor = 1. The DPO stage uses a reduced learning rate of 10−6.

        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

        Left: a sketch of the space of refined grounding embeddings, with the region the frozen segmenter was trained on. Under DPO the embeddings drift out of that region and the masks blur; the anchor loss ties each embedding to its SFT value, the embeddings return, and the masks stay sharp while the text keeps improving.

        The embedding plane on the left is a two-dimensional sketch, not a projection of real embeddings. The numbers are measured: mask IoU on MMDocBench and final-answer grounding (GQfa) on DoCoG-Bench, with and without the anchor loss.

        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

        Split
        Scatter plot of answer quality against final-answer grounding on DoCoG-Bench. Commercial models sit at the bottom right: good answers, grounding below 36. Fine-tuned 8B backbones sit in the middle. DoCoG sits alone at the top right in every split.

        All values from Table 6 of the paper. Zero-shot open models are grey circles, commercial models are grey squares, backbones fine-tuned on DoCoG-QA are blue diamonds, DoCoG is the orange point. Kosmos-2.5 and zero-shot LISA++ score below 35 AQ and are omitted for scale; DocOwl 2 produces no grounding.

        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.

        DoCoG on public benchmarks (official metrics; numbers from Tables 2 to 5 of the paper; open baselines range from 3B to 18B)
        BenchmarkTypeDoCoG (9B)Best open baselineBest commercial
        ChartQAcharts92.791.0 (Chart-R1)89.0 (GPT-5)
        ChartQA-Procharts52.144.0 (Chart-R1)51.1 (Gemini 3 Pro)
        ChartBenchcharts79.467.9 (ChartPoint)69.4 (GPT-5)
        CharXivcharts73.168.8 (InternVL3.5)80.3 (Gemini 3 Pro)
        FlowVQAflowcharts85.581.0 (Qwen3-VL)91.9 (GPT-5)
        AI2Ddiagrams88.385.7 (Qwen3-VL)91.2 (Gemini 3 Pro)
        MISS-QAschematics78.463.8 (Kimi-VL)71.7 (GPT-5)
        TabFacttables89.485.2 (InternLM-XComposer 2.5)88.5 (Gemini 3 Pro)
        WTQtables64.457.4 (Qwen3-VL)78.8 (GPT-5)
        TabMWPtable math80.788.3 (SynTab-LLaVA)93.7 (GPT-5)
        DOGR, grounding F1documents75.466.4 (DOGR)65.3 (Gemini 3 Pro)
        MMDocBench, IoUdocuments70.528.7 (Qwen3-VL)55.4 (Gemini 3 Pro)
        MMDocBench, EMdocuments73.169.8 (Qwen3-VL)83.8 (Gemini 3 Pro)
        VisualCoT-Benchdocuments88.986.7 (Qwen3-VL)89.7 (GPT-5)
        BoundingDocs, grounding F1documents85.444.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

        Values from Table 7 of the paper. MMDB is MMDocBench (EM, F1 and mask IoU); CharXiv, FlowVQA and WTQ use official metrics; the last five columns are DoCoG-Bench. A dash means the metric is undefined for that variant (no masks, or no steps). Clicking a variant pauses the animation.

        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.

        Grounded reasoning and grounded document QA, compared
        MethodWhat is groundedGrounding formEvidence typesDomainPointers interactBeyond SFT
        LLaVA-CoTnothing (reasoning stages only)nonenonegeneral imagesn/astage-wise search at test time
        Chart-R1nothingnonenonechartsn/areinforcement learning
        Visual CoTone key region before the answerbox as texttextgeneral and documentsnonot reported
        BoundingDocsanswer (dataset)boxtextdocumentsn/an/a
        DOGRanswer and referred textbox as texttextcharts, posters, PDFsnonot reported
        DLaVAanswerbox via region IDstextdocumentsnotraining-free
        DocVXQAanswer contextrelevance heatmaptext and layoutdocumentsnoexplainability objectives
        ChartPointeach stepboxtext and graphicschartsnoreflection on re-rendered charts
        GCoT, GRITeach stepbox as textobjectsnatural imagesnoGRIT: reinforcement learning
        LISA, GLaMM, LISA++phrases or the answermask via SAMobjectsnatural imagesnonot reported
        M3Grounderanswer spans (multi-span)mask via SAM, three granularitiestext and graphicsdocumentsno (one token, three heads)SFT with bleed and hierarchy losses
        DoCoGeach step and the answermask via GIM and SAMtext, graphics, structurecharts, tables, flowcharts, documentsyes (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

        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.

        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

        References

        Grouped by topic. Every entry links to its primary source.

        The paper

        Sibling papers in this series

        Segmentation and mask grounding