Q: “What share does Mumbai hold?” → A: 7.7% — now show the evidence
Too many tokens
hundreds of coordinates per span
Nothing ties them to the page
just next-token predictions — they can be hallucinated
Rectangles overshoot
pie wedges, curved text, diagram parts
Evidence is plural
one box ≠ two places
Paper 1 · In one picture
Any shape, one span or many
(A) one span: <e>River Thames</e>[GROUND] → the curved river itself — no box could do this. The model writes the <e>…</e> span tags itself, then the pointer.(B) multi-span: the logo and three city rows each get their own mask, in one answer.
Paper 1 · In one picture
The same evidence, three granularities
(C1)–(C3) phrase ⊂ line ⊂ block on a bank statement — cite the number, redact the transaction row, or chunk the whole table. Same [GROUND] token, three nested masks.
Paper 1 · The obvious approach first
Why not just chain two tools?
Paper 1 · The idea
Architecture
The VLM answers normally, dropping a [GROUND] after each cited span. Three small heads turn each token’s hidden state into three SAM prompts → three nested masks.
backbones: InternVL3.5-8B / Qwen3-VL-8B · segmenter: SAM, backbone-agnostic · grounding adds +63 ms per sample (supplement)
Paper 1 · Watch it run
The forward pass
Paper 1 · Training
Two document-specific losses
𝓛lmanswer text+𝓛segDice + BCE per mask+0.5 · 𝓛bleednew+0.5 · 𝓛hiernew
𝓛bleed · bleed suppression
SAM spills onto icons and graphics. Penalise every predicted mask pixel outside the ground-truth text.
𝓛hier · hierarchical enclosure
Phrase, line and block are three separate predictions. Penalise a finer mask outside its coarser one: phrase ⊂ line ⊂ block.
Paper 1 · Data engine · recap from Part 1
Every element of a Fid-HTML page is addressable
An LLM can cite e47 instead of writing a coordinate.
Paper 1 · Data engine · the design choice
Why Fid-HTML + LLM makes better QA
so
Perception first, reasoning second — and HTML is what LLMs already read. 2M grounded QA, no coordinate written by a model.
Paper 1 · Data engine · layout documents
Training data: two ways to make grounded QA
Paper 1 · Data engine · pipeline ②
Training data: curved text no REPLICA
The curved text is segmented first (2A) and highlighted (2B); the VLM may only ask about the highlight (2C). The mask exists before the question, so no box-to-mask step is needed.
Paper 1 · Data engine · pipeline ③
Training data: charts no REPLICA
3A–3D · render, intercepted. The plotting library’s renderer is intercepted, so every bar, tick and label is logged with its box and an ID.
3E–3G · write the QA. The VLM sees the chart and its ID-tagged metadata, and writes QA citing element IDs.
3F–3H · post-processing. The cited IDs map back to boxes, and Hi-SAM turns each box into a mask.
“How much should I pay for the blood test?” — where would you draw the box for $27.50? Nowhere: it is printed nowhere on the bill. ×3 = three pointers, three masks in that step
S₁ cost of the Blood Test is $50[GND]×3
S₂ premium members get a 5% discount[GND]
S₃ your plan is premium[GND]
S₄ 5% of 50 is 2.50 — arithmetic, no mask
S₅ discounted cost 50 − 2.50 = 47.50
S₆ the Claim for the Blood Test is $20[GND]×3
S₇ 47.50 − 20 = 27.50 — arithmetic, no mask
Sf you should pay $27.50
Grounding alone
a mask for “$27.50” has nothing to point to
Chain-of-thought alone
“the cost is $50” can’t be checked without knowing which cell it read
Paper 2 · Watch it run
The forward pass
Paper 2 · The new piece
Why DoCoG needs GIM
M3Grounder · one answer, independent pointers
Fine for one answer span: its three masks come from one token.
DoCoG · a chain of pointers that depend on each other
S₁ the label HDFC Bank[GND] and its wedge[GND]
S₂ its value 8.84%[GND] — must be that same wedge
The pointers are “related, complementary, or mutually constraining”. Projected one by one, nothing makes them agree.
Paper 2 · Teaching it
Training data
325K documents · 1.5M step-wise QA
charttableflowchartdocument
Paper 2 · Training stage 2
Why preference training?
chain A · every step right
S₁cost of the Blood Test: $50[GND]✓
S₂premium members get 5% off[GND]✓
S₃your plan is premium[GND]✓
S₄claim for the Blood Test: $20[GND]✓
Sfyou pay $27.50✓
chain B · right answer, broken trail
S₁cost of the Blood Test: $50[GND]mask on the X-Ray row✗
S₂premium members get 5% off[GND]✓
S₃your plan is premium — no evidence cited✗
S₄claim for the Blood Test: $20[GND]✓
Sfyou pay $27.50✓
SFT cannot tell them apart
SFT checks one token at a time against one reference chain. Nothing scores a whole chain, so a right answer reached through wrong evidence is never penalised.
Preference training can
It compares two whole chains for the same question and pushes the model toward the better one.
Paper 2 · Training stage 2
Building the preference pairs
RLHF asks people which output is better. Here a scorer stands in for them, checking each chain against the reference.
20K
preference pairs · DoCoG-PQA
Paper 2 · Training stage 2
Preference training without breaking the masks
Paper 2 · Results
Results
Answer quality vs final-answer grounding on DoCoG-Bench
all document types · higher is better on both axes
85.8 / 81.9
Ours · answer / grounding — best on both
General QA intact
ChartQA92.7
TabFact89.4
DocVQA 93.4
best of its size on 8 of 10 benchmarks
Paper 2 · In the wild
Examples
Autoplays · tabs switch examples · click any [GND] to re-sweep its maskopen standalone ↗
every region pixel-accurate — even a donut-shaped magazine spread
B · open-set labels
the same insurance policy document parsed with generic classes (B1) or insurance-specific ones — “premium breakdown”, “authorization signature” (B2). The prompt defines the vocabulary.
Paper 3 · What it does
The page as a tree
“Give the full hierarchical layout parse for this newspaper” → teaser-strip, masthead and main-grid, down to headlines, media units and image captions — every node with its mask.
Paper 3 · What it does
Promptable: ask for any region in words
“Mask all personally identifiable information of the passport holder”
14 regionsphoto · signature · passport number · surname · given name · date of birth · … · MRZ block
“Find the figure to the left of a table”
a spatial questionFigure 2 — with an explanation: the page has two figures and two tables, and only Figure 2 sits left of one
“Segment all Hindi-language text regions on this cover page — ignore the English”
5 regionsmotto · connector · purpose · main Hindi title · date range
“Segment all numbered section questions that introduce explanatory paragraphs”
2 regions“11. Who should file the returns?” · “12. Where to file or mail OSS returns?”
“Segment all circular official seals — ignore signatures and rectangular stamps”
curved boundariescircular seal × 3
“Segment all vertical text labels along the coloured side bars”
rotated textvertical step label × 4
Prompt track
PromptLay-Docs-Bench · cumulative IoU
Paper 3 · Architecture
Architecture
Same recipe as M3Grounder and DoCoG — except that the [LAY] hidden states now go through HGC (Hierarchical Grounding Contextualizer), which attends along the tree, before the segmenter.
Paper 3 · HGC
Why attention should follow the tree
feature articlerestaurant menugazette
Each [LAY] attends only to its parent, children and siblings — the coloured blocks in the mask.
So a headline stays with its article, an item with its menu section — regions of different branches never merge.