What a layout model is for
Before any system can read a document, it has to divide the page into regions and say what each region is. This post is about a model that does that job for any page, in any vocabulary, as a tree of pixel masks you can ask for in words.
Here is the concrete question. You are building the first stage of a document pipeline. It will feed a reconstruction system, a question-answering model, a redaction tool and a retrieval index. What should that first stage output, so that every later stage gets what it needs?
The usual answer is a layout detector. It draws a rectangle around each region and gives it one of a few labels, such as text, title, figure or table. That answer has served the field well on scientific papers. It breaks on real documents. A seal is round. A pie wedge is a wedge. An insurance policy has a "premium breakdown", not a "text block". A newspaper is a masthead and a grid of articles, each with its own headline and captions, not a flat list of boxes.
DocLayout-VL (ECCV 2026) answers the question differently. It treats layout as promptable, open-set, hierarchical segmentation. A vision-language model writes the layout tree. Each node of the tree carries a special [LAY] token. A small module refines those tokens along the tree, and a segmentation model turns each one into a mask. The prompt decides the vocabulary and which regions to return.
A short way to say it is "Segment Anything for documents". SAM takes a prompt and returns the mask of the thing you asked for. DocLayout-VL takes a prompt and returns the masks of the regions you asked for, with names, and with the way they nest. The section SAM for documents says which parts of that comparison hold and which do not.
The route is the one the thesis talk takes. First, why today's layout tools fall short. Second, what a layout model would need. Third, the SAM comparison. Then the model, why attention should follow the tree, the losses, the data and the three-stage curriculum, the benchmark and the results, and last the question people kept asking: does architecture or scale of data matter more?
This is the fifth and last post in a series on grounded document intelligence. The hub post, Building Grounded Document Intelligence, sets out the thesis. REPLICA builds a text form of the page that loses nothing. M3Grounder and DoCoG join a vision-language model (VLM) with SAM so that a model grounds its answers with masks instead of typed coordinates. DocLayout-VL applies the same recipe to the page itself. It also closes the loop: it replaces the ensemble of layout detectors in REPLICA's first stage.
How layout analysis is done today
Document layout analysis (DLA) finds the structural regions of a page. For most of its history it has been framed as object detection. The model sees a page image and predicts a set of boxes. Each box gets one label from a fixed list.
The datasets define that list. PubLayNet, built from medical papers, has 5 classes: text, title, list, table and figure. DocBank has 13. DocLayNet has 11 classes across 6 document types. M6Doc raised the count to 74 classes. D4LA has 27. IndicDLP covers 12 Indian languages with 42 classes. Every one of these datasets annotates rectangles, and almost all of them annotate a flat list.
The models follow the data. Some are general object detectors trained on pages: Faster R-CNN, DETR-style detectors and the YOLO family. DocLayout-YOLO pushed this line far by pretraining on 300K synthetic pages. Others add document pretraining. DiT pretrains a vision transformer on document images. LayoutLMv3 jointly pretrains on text and image. VGT adds a grid of text features. All of them end with a detection head that outputs boxes from a closed set of classes.
Two other lines of work matter here. The first adds hierarchy. DocParser parses a rendered document into a tree of entities and relations. HRDoc reconstructs the hierarchy of a document at the line level. Detect-Order-Construct builds a tree in three steps: detect, order, construct. Graph-based Document Structure Analysis (GraphDoc) and UniHDSA predict relations between detected regions. These methods produce structure, but they still start from boxes and closed taxonomies, and many build the tree with post-hoc heuristics.
The second line uses general vision-language models. A VLM can read any prompt and produce any label. When asked for regions, it writes box coordinates as text, one number at a time. When Language Must Point covers why typed coordinates are brittle. Page parsers such as Dolphin build on this: they first predict layout elements as a sequence and then parse each one.
So the field has open vocabulary in one place (VLMs), hierarchy in another (structure parsers) and precise localization in a third (detectors). None of them has all three, and none of them returns masks.
Where closed-set boxes fall short
It is easiest to see the problem on one page. Figure 1 runs a classic detector on a government circular: a header with an emblem and a Hindi title, two sections, a table, and a footer with a round seal and a signature. Step through it.
Figure 1 · Four ways a closed-set box detector falls short
The four failures are independent. Fixing one does not fix the others.
- Shape. A box is the wrong shape for seals, curved text, wedges, icons and rotated labels. A circle fills only π/4, about 79%, of its bounding box. The other 21% belongs to whatever sits behind it. Boxes of neighbouring irregular regions also overlap, so one pixel can belong to two regions.
- Vocabulary. A fixed label set cannot keep up with real domains. A banking app has status bars and quick-action icons. An exam paper has multiple-choice questions. An insurance policy has a premium breakdown and an authorization signature. A detector trained on five classes calls the seal, the emblem and the signature all "figure".
- Structure. A page is a tree, not a list. A newspaper is a masthead and a grid of articles; each article has a headline, a body and images with captions. A flat list throws that away. Which caption belongs to which photo? Which header opens which section? The output does not say.
- Control. The output is the same for every request. If you need only the Hindi text, only the personal details on a passport, or the figure to the left of a table, you have to filter the boxes after the fact, and the labels usually do not carry the information you need to filter on.
General VLMs fix the vocabulary and the control problems, because they read prompts. They do not fix the other two. On the paper's open-set flat benchmark, small open VLMs reach a reasonable Open mIoU of 50 to 64, but very low instance scores: Qwen3-VL-8B gets 24.3 Open RQ and 5.8 Open AP. On the hierarchical benchmark, Gemini 3 Pro scores 6.9 Open mIoU.
So each family of tools gets part of the way. A detector has the geometry of a box. A VLM has the words. A structure parser has the tree. A better layout model has to have all of them at once.
The task in one formulation
The four failures suggest four requirements. A layout model needs masks, so a region can have any shape. It needs open-set labels, so the prompt names the classes. It needs the page as a tree, so every region is kept together with how it nests. And it needs to be promptable, so you can ask for any region in words. All in one model.
DocLayout-VL states these as four tasks of one formulation. Given a document image d and a prompt P, the model returns three things:
- A · Layout as segmentation. Each node gets a pixel mask, not a box. Masks follow irregular and curved regions, and they do not overlap where regions do not.
- B · Open-set labels. Each node's label comes from a vocabulary the prompt defines. The same insurance policy can be parsed with generic classes (picture, table, section header) or with insurance classes (bank logo, policyholder details, premium breakdown).
- C · Hierarchical layout. The nodes form a tree. A newspaper becomes a teaser strip, a masthead and a main grid, then articles, then headlines, media units and captions.
- D · Promptable layout. The prompt can ask for a targeted extraction ("mask all personally identifiable information of the passport holder") or a spatial question ("find the figure to the left of a table"). The model can explain its choice in X̂.
One property of this formulation is easy to miss. Standard closed-set detection is a special case of it. If the prompt lists PubLayNet's five classes and asks for a flat layout, the model is doing PubLayNet's task. That is why the paper can evaluate DocLayout-VL zero-shot on ten classic benchmarks.
The four requirements also point at a design. Open-set labels and prompts need a language model. A tree of variable size and depth needs a generator that can write structure. Masks of any shape need a segmenter. That is the recipe of the earlier papers in this series: a VLM decides what to ground and at what granularity, and SAM decides where. In the thesis talk, the slide that lists the four requirements ends with "all in one model. Sound familiar?" It should. A promptable model that returns masks is what SAM does for photographs. The next section takes that comparison seriously.
SAM for documents
Start with what SAM, the Segment Anything Model, does for photographs. It is a promptable segmentation model. You give it a prompt, such as a click on an object, and it returns the mask of that object. It does not say what the object is. It is class-free. The talk's slide on SAM lists three properties: promptable, class-free and 1B masks of training data.
Now picture the same interface on a page. You write "parse this page" and get back a mask for every region. You write "mask all personally identifiable information of the passport holder" and get back only those regions. The slide in the talk draws it as one click on the left and one prompt on the right: SAM returns that one object; the document model returns every region, and the tree that holds them.
Some of SAM's properties carry over and some do not. Table 1 sorts them.
| Property | SAM on natural images | DocLayout-VL on pages | Carries over? |
|---|---|---|---|
| Interface | Promptable: a prompt picks what to segment. A click is the standard example. | Promptable: a request in words picks what to return, from "parse this page" to "find the figure to the left of a table". | Yes. The prompt changes from a click to language. |
| Output | A mask for the prompted object | A mask for every region the prompt selects, one per [LAY] token | Yes. Masks, not boxes. |
| Names | Class-free: the mask carries no label | Open-set: each region carries a label from the vocabulary the prompt defines | No. A page needs to say "premium breakdown", so names are added. |
| Relations | None: the objects in a photo are a pile | A tree: every region has a parent, children and siblings | No. This is the new part. |
| Recipe | A promptable task, one model and a data engine | The same three: promptable layout, one model, and a data engine that reconstructs pages first | Yes. |
| Training masks | 1B masks (the talk's SAM slide) | 80M masks on 2.5M pages | Different scale and domain. |
How to read this table: the first and last rows are what makes the comparison fair. The middle rows are where documents ask for more. Names and relations are the two things a page needs that a photograph does not.
The analogy breaks in one place, and that place is the point of the paper. The objects in a photo are a pile. A dog and a bench do not contain each other. The regions of a page do. A headline belongs to an article, the article to a grid, the grid to the page. Segmenting every region is not enough. The model has to keep how they nest.
There is also a literal side to the name. SAM is a part of the model. DocLayout-VL uses SAM's image encoder, prompt encoder and mask decoder to draw each mask. The change is what drives them. A click would be the prompt for SAM alone. Here the prompt is the hidden state of a [LAY] token, written by a language model that has read the page and your request. The language model supplies the words and the tree. SAM supplies the pixels.
The page as a tree
How does a language model write a tree? As text, with tags. DocLayout-VL's VLM generates a serialized layout string. Every region is followed by a [LAY] token. A leaf region appears as label [LAY]. A region with children appears as an opening tag, its children, a closing tag and a [LAY]:
The string is then parsed into a tree. Each [LAY] is one node, and the tree is one-to-one with the masks: one token, one region, one mask. Figure 2 shows the model writing the layout of the circular, one branch at a time. Watch the masks appear as each [LAY] is written.
Figure 2 · From a page to a tree of masks
Select a node in the tree or a [LAY] token in the output to see its mask.
Three details of this format are deliberate.
First, a parent's [LAY] comes after its closing tag. By the time the model grounds "header", it has already written everything inside the header. Its hidden state can summarise its children.
Second, the root has no [LAY]. The paper's figures show <document> and </document> without a token. The top-level regions (header, body, footer) are therefore siblings. This matters for HGC below.
Third, labels are free text. The tag is whatever word the prompt or the page calls for: "teaser-strip", "media-unit", "premium-breakdown". Nothing in the architecture fixes a class list.
A natural worry is that a model writing trees as text will write broken trees: unclosed tags or invalid nesting. The paper measured this. The malformed-tree rate drops with training data: 0.41% at 25% of the data, 0.03% at 50%, and 0.01% at 100%.
Asking for regions in words
Because a language model writes the output, the prompt can change everything about it: the vocabulary, the granularity and which regions appear at all. Figure 3 is an interactive version of this. Pick a prompt and the model's output and masks change. The drawn page is a stand-in; the second tab shows real outputs from the paper and the talk.
Figure 3 · One page, many requests
The prompts fall into a few kinds.
- Ontology prompts change the vocabulary but not the regions. "Segment into picture, title, table" and "segment into bank logo, policyholder details, premium breakdown" can return the same masks with different names. This is task B.
- Granularity prompts change how deep the model goes. "The table" and "row 3 of the table" are both valid regions. So is one wedge of a chart, which no flat detector would list.
- Selection prompts return a subset. "Mask all personally identifiable information of the passport holder" returned, on a passport in the paper, the photo, the signature and every identifying field: passport number, surname, given name, sex, dates and places of birth and issue, down to the machine-readable zone. "Segment all Hindi-language text regions on this cover page, ignore the English" returned 5.
- Spatial prompts need reasoning. "Find the figure to the left of a table" came back with an explanation: the page has two figures and two tables, and only Figure 2 sits to the left of one. Then the answer, grounded: Figure 2 [LAY].
All of this is the same model with the same weights. There is no task-specific head and no fine-tuning per prompt type. The instruction-tuning stage, described below, teaches the model to be asked.
The model
The architecture is the same recipe as M3Grounder and DoCoG, with one change. A VLM writes special tokens. Their hidden states become prompts for SAM. What is new is that the [LAY] hidden states first go through HGC, the Hierarchical Grounding Contextualizer, which attends along the tree. Then they reach the segmenter.
DocLayout-VL has three parts, and each does one job.
Who does what in DocLayout-VL
- Vision-language model
- reads the page and the prompt, writes the layout tree, and emits one [LAY] token per region
- HGC
- refines each [LAY] state using only its parent, children and siblings in the tree
- Segmentation module
- SAM's image encoder, prompt encoder and mask decoder: turns each refined token into a mask
The backbone is a standard VLM. The paper uses Qwen3-VL (4B and 8B) for the main results and also tests InternVL3.5-8B. The VLM reads the image and the prompt and generates the layout string autoregressively. When the prompt asks for it, it also writes an explanation.
After generation, the string is parsed into the tree T̂. Only the final hidden states of the [LAY] tokens are kept. Call the state of the i-th token h̃i. The Hierarchical Grounding Contextualizer (HGC) turns these into structure-aware embeddings hi. The next section explains why that step exists.
The segmentation module is SAM-based. It has its own vision encoder, separate from the VLM's, which turns the page into dense features z = Fenc(d). Its prompt encoder turns each hi into a prompt pi. Its mask decoder combines the two:
The whole model is trained end to end. The mask losses flow back through the mask decoder, the prompt encoder and HGC into the language model. So the language model learns to put into each [LAY] state exactly what the segmenter needs to draw that region. Figure 4 follows one forward pass.
Figure 4 · One forward pass through DocLayout-VL
Inference cost is modest for a model of this size. On one H100, DocLayout-VL runs at 602 ms per sample with 24.08 GB of memory, or 1.66 samples per second.
The pattern is the one the hub post calls a smart highlighter. The VLM never types a coordinate. It says what each region is and how regions nest. SAM, which is very good at turning a prompt into a precise mask, does the marking. The new piece is what sits between them.
Why HGC: attention that follows the tree
Start with the intuition. In a feature article, a headline should stay with its article. On a restaurant menu, an item should stay with its menu section. So each [LAY] token attends only to its parent, its children and its siblings. Regions of different branches never merge.
Why not send each h̃i straight to SAM, as M3Grounder does? Because the raw states do not know enough about each other, and what they do know is not organised by the tree.
Two problems with raw token states
The first problem is causality. The VLM is a causal decoder. When it writes the [LAY] for the first caption, it cannot see anything written after it: not the next section, not the footer. So each state has seen only the part of the page layout that came before it in the string.
The second problem is look-alikes. A page has many regions that look the same: section headers, captions, table rows, headlines. Picture the circular. Its two sections each have a header and a figure with a caption. A newspaper page has dozens of headlines, photos and captions. If every layout token can attend to every other one, a caption is as free to pull towards the photo in the next article as towards its own. Two branches can blur into one region.
The tree as an attention mask
HGC is a lightweight multi-layer transformer that runs over the [LAY] states after generation. Its self-attention is bidirectional, so the first token can see the last. That fixes the causality problem. Its attention is also masked by the tree, which fixes the look-alike problem. The paper calls this Hierarchical Contextual Attention.
The rule is short. Each node attends only to its structural neighbourhood: its parent, its children and its siblings. In a standard masked attention layer that is one extra term:
This is the same mechanism as a causal mask in a language model; only the pattern differs. Attention from First Principles derives how an additive −∞ mask removes a position from the softmax. Figure 5 builds the mask for the circular. Select any node to see its neighbourhood, and switch between full and tree attention.
Figure 5 · The HGC attention mask follows the tree
Select a node in the tree or a row of the matrix.
Look at what the mask does to the two captions. Under full attention, caption B can attend to caption A, to the pie chart in the other section and to every row of the table. Under tree attention, caption B sees only section B (its parent) and its siblings: the section header, the photo and the table. It cannot be pulled towards caption A, because caption A is not in its neighbourhood.
Three properties follow from the rule.
- Top-level regions still share page-wide context. Because the root has no token, header, body and footer are siblings. They attend to each other. Each one summarises a large part of the page, so page-level context flows through them.
- Context travels one tree hop per layer. In one layer, a node sees only its neighbourhood. Stack layers and information spreads. Row 3 of the table reaches the footer in four hops: row 3 → table → section B → body → footer. The paper describes HGC as multi-layer without giving the depth, so how far context reaches in practice is not reported.
- On a flat page, tree attention is full attention. If the layout has no nesting, every region is a child of the root, so every region is a sibling of every other. The mask is dense. This is exactly how the paper trains HGC on flat data in the first curriculum stage.
HGC is the third version of a pattern in this series. In M3Grounder, grounding tokens are projected to SAM independently. In DoCoG, the Grounding Interaction Module lets the pointers of one reasoning chain attend to each other in both directions, so that a label and its pie wedge agree. In DocLayout-VL, HGC lets pointers in a tree agree, and it knows the structure to respect because the language model has just written it. Not at all, along a chain, along a tree: that is the only part of the recipe that changes.
Structure-aware losses
HGC shapes the inputs to the segmenter. The losses shape its outputs. The training objective has four terms:
In plain words, Lstruct says the masks must respect the tree. Containment penalises a child's mask that falls outside its parent. Overlap penalises two siblings that claim the same pixels. Lbg says masks stay off the background: every predicted pixel outside the page's ground-truth foreground, such as whitespace, is penalised. The talk's one-line summary is that these are M3Grounder's two priors, now on a tree.
Why add anything to Dice and cross-entropy? Because those losses score each mask on its own. A pixel wrongly added to a mask costs the same wherever it lands: in empty margin, in a sibling region, or outside the parent. But those errors are not equally bad for a layout. A child that spills outside its parent breaks the tree. Two siblings that claim the same pixels break the partition of the page. The new losses charge for exactly these errors.
Containment, overlap and background
All three new terms have the same shape: the fraction of a predicted mask that lies where it should not. Training uses teacher forcing, so each predicted mask M̂v is paired with ground-truth masks for its node, its parent and its siblings.
Two choices in these formulas are worth reading slowly. Each penalty is divided by the predicted mask's own area, so it is a fraction between 0 and 1. A small region that spills is penalised as much as a large one that spills by the same share. And the constraint is the ground-truth parent and sibling, not the predicted ones. The target does not move while the model learns.
Figure 6 lets you spill a predicted mask in three directions by the same number of pixels. Dice treats the three cases the same. The structure terms do not.
Figure 6 · Where a mask spills decides what it costs
These losses are not new ideas so much as old ideas moved to a tree. M3Grounder used two document priors. A bleed loss kept masks off icons and graphics around the text. A hierarchy loss kept the phrase inside the line and the line inside the block. DocLayout-VL carries both over. Bleed becomes background. Enclosure becomes containment, generalised from three fixed levels to any parent–child edge, plus a new non-overlap term for siblings.
The data: HOPLay-Docs-80M
A foundation model needs data at a scale no one annotates by hand. The paper builds HOPLay-Docs-80M (HOPLay: hierarchical, open-set, promptable layout). It has 2.5M pages from 12 domains and 58 document types, with 80M pixel masks, 400K open-set labels and 5M promptable annotations. The paper's dataset table lists 40 languages and a mix of real and synthetic pages.
It comes in three aligned splits, one per curriculum stage:
- FlatLay-Docs-25M: 25M flat regions with 250K open-set labels.
- HierLay-Docs-40M: 40M regions arranged as explicit layout trees, with 400K hierarchical labels.
- PromptLay-Docs-15M: 5M layout question–answer pairs grounded in 15M regions.
The pages come from existing datasets (forms, receipts, slides, industry documents, web PDFs) plus scraped documents: invoices, receipts, theses, circulars, notifications, exam papers, slides and UI screenshots. They include curved text, dense graphics and multi-column layouts. Figure 7 follows a page through the data engine.
Figure 7 · The data engine behind HOPLay-Docs-80M
The five stages, with the models the paper names:
- Open-set hierarchical reconstruction. Qwen3-VL-235B-Instruct writes the page as structured HTML with context-aware labels, so the hierarchy exists by construction. The HTML is rendered and aligned to the original image. A VLM judge checks fidelity. If it passes, boxes and labels are read straight from the reconstruction.
- Semantic relabelling and grouping. For hard pages, flat detectors (Surya, Hi-SAM and DocLayout-YOLO) propose regions. The regions are indexed with Set-of-Mark overlays on visual pages and with OCR anchors on text-heavy pages. Qwen3-VL-235B-Thinking assigns open-set labels and groups the regions into a hierarchy.
- Mask generation. SAM 3 turns each box into a mask. Boundary refinement, overlap resolution and hierarchy consistency checks follow.
- Instruction data. Flat layouts are indexed with Set-of-Mark, hierarchical ones with Graph-of-Mark. Taxonomy-driven prompts produce varied question–answer pairs with explanations, plus deterministic geometric questions. Every answer refers to regions inline with <LAY>, so the supervision stays grounded. Qwen3-VL-235B-Instruct writes the QA.
- Verification. A VLM judge checks reconstruction and hierarchy. Embedding similarity catches labels that do not match the region's text. An LLM judge scores QA pairs. Masks get geometric checks. OCR-based checks removed 3% of synthetic masks.
Stage 1 is the idea behind REPLICA: rebuild the page as HTML first, check the render against the source, and read the labels off the reconstruction. Nobody draws a box. The hub post calls this the data engine that runs through all three grounding papers.
A three-stage curriculum
The three splits are not mixed. The model learns them in order, and what is trained changes at each stage. Figure 8 shows the schedule.
Figure 8 · Learn to see regions, then structure, then requests
- Flat layouts (FlatLay-Docs-25M): learn to see regions. Every region is a sibling, so HGC applies dense attention. The VLM's vision encoder is frozen. The language model, HGC and all of SAM (image encoder, prompt encoder, mask decoder) are trained.
- Hierarchies (HierLay-Docs-40M): learn structure. HGC switches to tree-constrained sparse attention. The same parts stay trainable.
- Instructions (PromptLay-Docs-15M): learn to be asked. The task is now to select regions, not to learn new segmentation concepts. So SAM's image encoder and prompt encoder are frozen, and only the mask decoder and the language model are trained.
The order follows a simple logic. Flat data is the easiest way to learn what a region is and how to draw it. Trees need regions first. Prompts need both, because a prompt selects among regions the model can already find and nest.
The rest of the setup is conventional: AdamW with learning rate 2×10−6, 3% warmup and cosine decay; gradients clipped at 1.0; mixed precision for the VLM, with HGC and the mask decoder in FP32 for stability. Training runs on 64 H100 GPUs with DeepSpeed ZeRO-3 and an effective batch size of 128.
Measuring layout understanding
Existing layout benchmarks score closed-set boxes. None of them can score an open-set label, a tree, a curved mask or a prompt. So the paper builds HOPLay-Docs-Bench: 5,000 manually curated documents with 51,241 annotated regions, 5,277 open-set labels and 47,613 prompt-conditioned annotations. Every sample is checked by hand.
It has four tracks, each with its own metrics:
- FlatLay-Docs-Bench (flat, open-set segmentation): Open mIoU, Open RQ and Open AP. These are open-vocabulary segmentation metrics. Labels are matched by text embedding (gemini-embedding-001), so "author photo" and "author-portrait" can match with partial credit. Open mIoU measures localization with label matching, Open RQ balances matches against false positives and misses, and Open AP captures the precision–recall trade-off.
- HierLay-Docs-Bench (the layout tree): Open mIoU, mean semantic TEDS (a tree edit distance that respects labels) and mean thresholded hierarchical F1 (which checks each node's root-to-node path of ancestors).
- CurveLay-Docs-Bench (curved and irregular regions): Open mIoU and Boundary-F at a 3-pixel tolerance, because mIoU alone does not show whether a contour is right.
- PromptLay-Docs-Bench (instruction-conditioned layout): cumulative IoU of the returned regions, and G-Eval, where a VLM judge rates how well the answer follows the instruction.
The Overall Score is the mean of four track scores. The flat track contributes the mean of its three metrics. The hierarchical track does the same. The curved track contributes Open mIoU. The prompt track contributes the mean of cumulative IoU and G-Eval.
The paper addresses two threats to validity. The first is leakage. Perceptual-hash deduplication (Hamming distance at most 4) between the benchmark and the training set found 0.07% near-duplicates, all removed, and no exact matches. The ten external benchmarks have 0.0% overlap, so every result on them is zero-shot.
The second is the judge. G-Eval and label embeddings use Gemini 3 Pro and a Gemini embedding model, and Gemini 3 Pro is also a baseline. So the paper re-ran the prompt track with Claude Sonnet 4.6 and GPT-5.2 as judges. The ranking of all 17 models stayed stable (Spearman ρ = 0.97 and 0.96, Kendall τ = 0.91 and 0.89). DocLayout-VL-8B ranks first under all three judges, with G-Eval scores of 87.2, 85.9 and 86.4. Measuring What a VLM Can Do discusses judge-based metrics more generally.
Results
The baselines cover every family from the comparison above: hierarchical pipelines (Dolphin, DocParser), small and large open VLMs, thinking VLMs, closed VLMs (Claude Sonnet 4.6, Gemini 3 Pro, GPT-5.2), and InternVL3.5-8B and Qwen3-VL-8B fine-tuned with box supervision on the same curriculum. That last group is the most important control. It has the same data and the same backbone. Only the architecture differs. Figure 9 has every number; pick a track.
Figure 9 · HOPLay-Docs-Bench and zero-shot closed-set results
Open-set, hierarchical, curved and promptable
DocLayout-VL-8B reaches an Overall Score of 79.4. The 4B model reaches 71.8. The best zero-shot model, Gemini 3 Pro, reaches 37.2. Qwen3-VL-8B fine-tuned with boxes on the same data reaches 45.8.
- Flat. 86.7 Open mIoU, 77.0 Open RQ and 61.0 Open AP, against 72.2, 40.1 and 15.4 for Gemini 3 Pro, and 72.1, 44.3 and 26.7 for the box-trained Qwen3-VL-8B.
- Hierarchical. 77.5 Open mIoU, 79.2 semantic TEDS and 71.1 hierarchical F1. Gemini 3 Pro gets 6.9 Open mIoU. Fine-tuning helps the tree metrics (40.3 TEDS) but not enough without explicit hierarchy modelling.
- Curved. 87.9 Open mIoU and 78.4 Boundary-F, against 40.3 and 31.2 for Gemini 3 Pro. Fine-tuning Qwen3-VL-8B with boxes moves it only from 36.0 to 39.7 Open mIoU, because a box cannot trace a curve however well it is trained.
- Promptable. 70.2 cumulative IoU and 87.2 G-Eval, against 28.9 and 77.6 for Gemini 3 Pro.
Classic closed-set benchmarks, zero-shot
Because closed-set detection is a special case of the task, DocLayout-VL can be run on ten classic benchmarks by prompting with their label sets. It never trained on any of them. The traditional detectors it is compared with were trained on each dataset.
The pattern depends on the benchmark. On simple, saturated benchmarks, the per-dataset detectors stay slightly ahead: DocLayout-YOLO gets 96.9 on PubLayNet against 96.5, and 97.5 on TableBank against 97.3. On label-rich and shifted benchmarks, DocLayout-VL is well ahead: 76.9 on M6Doc against 70 for RoDLA, 77.5 on IndicDLP against 55.0 for the best detector, 81.2 on PRImA-LAD against 70.3, and 79.6 on D4LA against 70.9. On OmniDocBench it gets 67.8, against 47.4 for DocLayout-YOLO and 64.2 for Gemini 3 Pro.
Architecture, data and order
One question came up again and again when this work was presented: what matters more, architecture or scale of data? The short answer from the talk is both, but architecture wins. The rest of this section shows why. A second question follows: which parts of the architecture matter? The paper answers both with one controlled experiment: the same Qwen3-VL-8B backbone, trained at 25%, 50% and 100% of the data, with one component added at a time. Figure 10 plots it.
Figure 10 · Architecture versus data scale
Data does real work. For the same Qwen3-VL-8B backbone, the Overall Score goes from 31.6 zero-shot, to 45.8 after fine-tuning with boxes on the same data, to 79.4 for the full model. Data brings the backbone into the task. The architecture closes the rest. The talk shows the same two steps, data and then model, for M3Grounder and DoCoG.
Three patterns stand out, and the paper names them.
- At every data scale, adding HGC helps the tree more than doubling the data. VLM+SAM gains 5.5 points of hierarchical Open mIoU from 25% to 50% data. Adding HGC at 25% gains 12.2. HGC at 25% of the data (59.8) beats VLM+SAM at 100% (58.3).
- The full model uses data better. From 25% to 100% data, the box-only VLM gains 4.1 points on the tree, VLM+SAM gains 10.7, and the full model gains 14.0.
- The curriculum helps at every scale. Joint training is below the full curriculum at 25%, 50% and 100%.
The component ablations tell the same story from another angle. Removing both SAM and HGC (the box-writing VLM) collapses the hierarchical track to 32.5 and the curved track to 39.7. Removing HGC alone costs 19.2 points on the tree. Removing the structure losses costs 5.2. The backbone matters too: with InternVL3.5-8B instead of Qwen3-VL-8B, flat Open mIoU drops from 86.7 to 82.4, hierarchical from 77.5 to 71.3, and G-Eval from 87.2 to 76.5.
How the approaches compare
The table puts the families from this post side by side, along the aspects the post introduced: region shape, vocabulary, structure, control, how regions are located, and how regions relate to each other.
| Approach | Region shape | Label set | Structure | Prompt control | How regions are located | Relations between regions | Evidence in this post |
|---|---|---|---|---|---|---|---|
| Closed-set detectors DocLayout-YOLO, DiT, LayoutLMv3, VGT | Boxes | Fixed per dataset (5 to 74 classes) | Flat list | None | Detection head regresses boxes | None; detections are independent | Strong on their home datasets; drop on shifted, label-rich sets (IndicDLP 55.0) |
| Hierarchical structure parsers DocParser, HRDoc, Detect-Order-Construct, GraphDoc, UniHDSA | Boxes | Fixed | Tree or graph | None | Detector, then relation prediction | Parent–child or graph relations between detected boxes, often with post-hoc tree heuristics | DocParser 4.3 overall on HOPLay-Docs-Bench |
| VLM page parsers Dolphin, Chandra | Boxes | Fixed element types | Element sequence | Task prompts | Layout elements written as a sequence, then parsed | Reading order | Dolphin 6.6 and Chandra 20.1 overall |
| General VLMs, zero-shot Gemini 3 Pro, GPT-5.2, Qwen3-VL | Boxes typed as text | Open | Can write nesting; weak trees | Yes | Coordinates as tokens | Implicit, through a causal decoder | Best: Gemini 3 Pro 37.2 overall, 6.9 hierarchical Open mIoU |
| VLM fine-tuned with boxes Qwen3-VL-8B-ft on the same data | Boxes typed as text | Open | Tree as text | Yes | Coordinates as tokens | Implicit, through a causal decoder | 45.8 overall, 32.5 hierarchical Open mIoU |
| Reasoning segmentation (VLM + SAM) LISA, GLaMM, PixelLM | Masks | Open | None | Yes | A segmentation token's state prompts a mask decoder | None between mask tokens | Built for natural images; the paper notes they struggle on text-dense documents |
| M3Grounder | Masks at phrase, line and block level | Not a layout labeller; grounds answers | Three fixed nested levels per citation | Questions | [GROUND] token → three heads → SAM | None between tokens; a hierarchy loss nests the three levels | Does not generalise well to layout, per the paper |
| DocLayout-VL | Masks | Open; set by the prompt | Full tree of any depth | Yes, including spatial and selection prompts | [LAY] state → HGC → SAM prompt encoder → mask decoder | Parent, child and sibling attention (HGC); containment and overlap losses | 79.4 overall; zero-shot on ten closed-set benchmarks |
How to read this table: read down the "Region shape" and "Label set" columns first. Every row above the last three uses boxes, and only the VLM rows are open-set. Then read "Relations between regions". Only the last row models relations between grounding tokens explicitly, and that column lines up with the hierarchical scores.
Closing the loop with REPLICA
Now look at what DocLayout-VL produces: a hierarchical, open-set tree of masks for any page. That is the job REPLICA's first stage was doing.
REPLICA's Segment stage works in four steps. A tool decides whether the page is digital or scanned. For scanned pages, an ensemble of off-the-shelf detectors (DocLayout-YOLO, IndicDLP-YOLO and Hi-SAM) proposes regions, fused by IoU. A labelling agent uses Set-of-Mark prompting to fix mislabelled and mis-segmented regions. A grouping agent builds the layout tree: it binds captions to figures and nests lists. The hub post calls this the weakest link in REPLICA, because every later stage inherits its mistakes.
DocLayout-VL does all of that in one model: it proposes regions, labels them with open-set names and nests them into a tree. And it was trained on data from REPLICA's own approach: reconstruct the page first, check it, read the labels off the result. Figure 11 shows the loop.
Figure 11 · DocLayout-VL feeds back into REPLICA
The swap is supported by the closed-set results above. Two members of the old ensemble are layout detectors that DocLayout-VL beats zero-shot on label-rich data: DocLayout-YOLO (for example 47.4 against 67.8 on OmniDocBench) and IndicDLP-YOLO (55.0 against 77.5 on IndicDLP). The replacement also removes hand-built steps: no IoU fusion, no separate labelling pass, no separate grouping pass.
This is the last arrow in the hub post's first figure. The system that made the data is improved by a model trained on that data. That is what makes the work a loop rather than a list of papers.
Limitations and open problems
The paper names four limitations. Each points to an open problem.
- One page at a time. DocLayout-VL does not model dependencies across pages. Multi-page tables, sections that continue on the next page and running headers need a multi-page formulation.
- The tree is generated as text. Pages with very many elements produce long sequences. That increases latency and can hurt generation quality. A dense newspaper or a long table with hundreds of cells is where this bites.
- Specialised detectors stay cheaper. For a fixed schema on clean pages, a YOLO detector is faster and almost as accurate, as the PubLayNet and TableBank results show.
- Model-written labels. Training labels come from a 235B VLM with automated checks. How label noise in the open set affects rare domains is not measured separately.
Two further questions follow from the design. HGC's mask trusts the predicted tree; how errors in the tree propagate into the masks is not broken out. And HGC refines tokens only after the whole tree is written. Whether grounding could feed back into generation, so that a poorly grounded node changes the tree, is open.
This is the last post in the series. The hub post, Building Grounded Document Intelligence, puts REPLICA, M3Grounder, DoCoG and DocLayout-VL together as one loop.
Key insights and nuances
- "SAM for documents" holds for the interface, not for the structure. Prompts and masks carry over from SAM; names and the tree do not. Removing only HGC from the VLM+SAM model costs 19.2 points on the tree. (SAM for documents)
- VLMs find layout but do not separate it. Gemini 3 Pro reaches 72.2 flat Open mIoU but 15.4 Open AP. Read instance metrics, not mIoU alone. (Shortfalls)
- Writing the tree is easy; grounding it is hard. Only 0.01% of trees are malformed at full data, yet a box-writing VLM on the same data reaches 32.5 hierarchical Open mIoU. (The page as a tree)
- Good explanations can point at the wrong pixels. Gemini 3 Pro scores 77.6 G-Eval but 28.9 cumulative IoU on prompts. Score both. (Prompts)
- HGC does one job. Removing it costs 19.2 points on the tree and almost nothing on flat, curved and prompt tracks. On a flat page, its tree mask is simply dense attention. (HGC)
- Dice cannot tell where an error went; structure losses can. Containment and overlap charge only for spills that break the tree, at a small cost on flat layouts (86.7 versus 87.2). (Losses)
- The background loss only polices margins. Parent masks make whitespace inside a region count as foreground. (Losses)
- Order beats doubling the data on the tree. The curriculum on half the data (70.2) beats joint training on all of it (68.7). (Curriculum)
- Scale and thinking do not fix layout. Qwen3-VL-8B and 235B score 31.6 and 31.5 overall; the interface change takes the same 8B backbone to 79.4. (Results)
- Better architecture makes data more valuable. The gap to the box-only VLM grows from 35.1 to 45.0 points as data goes from 25% to 100%. (Ablations)
- Zero-shot breadth, not universal wins. Large gains on label-rich sets such as IndicDLP; per-dataset detectors stay slightly ahead and cheaper on PubLayNet and TableBank. (Results)
- The loop closes within a page. DocLayout-VL replaces REPLICA's detector ensemble and two agents, but cross-page structure remains open for both. (Loop)
References
Grouped by topic. Every entry links to its primary source.
The paper
- DocLayout-VL: A Foundational Model for Hierarchical, Open-set, and Promptable Document Layout Segmentation · Srinivasan*, Venna*, Bandarupalli*, Raghuveer, Gunda, Sarvadevabhatla, ECCV 2026, pp. 275–296 (paper, ECCV poster page, animated walkthrough, slides). * equal contribution.
This series
- REPLICA: An Agentic Framework for Visually Faithful Document Reconstruction · Srinivasan, Raghuveer, Venna, Sreevatsa, Jain, Kukkala, Sarvadevabhatla, ICDAR 2026, Oral
- M3Grounder: Mask-Based Multi-Span and Multi-Granular Grounding for Document QA · Venna, Gunda, Jinka, Rachakonda, Srinivasan, Sarvadevabhatla, CVPR 2026
- DoCoG: Mask-based Multi-Type Grounded Chain-of-Thought for Document QA · Gunda, Jinka, Rachakonda, Jain, Venna, Srinivasan, Sarvadevabhatla, ECCV 2026, Spotlight
Layout datasets
- PubLayNet: largest dataset ever for document layout analysis · Zhong, Tang, Jimeno Yepes, ICDAR 2019
- DocBank: A Benchmark Dataset for Document Layout Analysis · Li et al., COLING 2020
- DocLayNet: A Large Human-Annotated Dataset for Document-Layout Analysis · Pfitzmann et al., KDD 2022
- M6Doc: A Large-Scale Multi-Format, Multi-Type, Multi-Layout, Multi-Language, Multi-Annotation Category Dataset for Modern Document Layout Analysis · Cheng et al., CVPR 2023
- IndicDLP: A Foundational Dataset for Multi-Lingual and Multi-Domain Document Layout Parsing · Nath, Kukkala, Khapra, Sarvadevabhatla, ICDAR 2025
- OmniDocBench: Benchmarking Diverse PDF Document Parsing with Comprehensive Annotations · Ouyang et al., CVPR 2025
Layout detectors
- DocLayout-YOLO: Enhancing Document Layout Analysis through Diverse Synthetic Data and Global-to-Local Adaptive Perception · Zhao, Kang, Wang, He, 2024
- DiT: Self-supervised Pre-training for Document Image Transformer · Li et al., ACM Multimedia 2022
- LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking · Huang et al., ACM Multimedia 2022
- Vision Grid Transformer for Document Layout Analysis (introduces D4LA) · Da, Luo, Zheng, Yao, ICCV 2023
- RoDLA: Benchmarking the Robustness of Document Layout Analysis Models · Chen et al., CVPR 2024
Hierarchical document structure
- DocParser: Hierarchical Structure Parsing of Document Renderings · Rausch et al., AAAI 2021
- HRDoc: Dataset and Baseline Method Toward Hierarchical Reconstruction of Document Structures · Ma et al., AAAI 2023
- DocHieNet: A Large and Diverse Dataset for Document Hierarchy Parsing · Xing et al., EMNLP 2024
- Detect-Order-Construct: A Tree Construction based Approach for Hierarchical Document Structure Analysis · Wang, Hu, Zhong, Sun, Huo, 2024
- Graph-based Document Structure Analysis · Chen et al., ICLR 2025
- UniHDSA: A Unified Relation Prediction Approach for Hierarchical Document Structure Analysis · Wang, Hu, Huo, Pattern Recognition 2025
VLMs and page parsers
- Qwen3-VL Technical Report · Qwen Team, 2025
- InternVL3.5: Advancing Open-Source Multimodal Models in Versatility, Reasoning, and Efficiency · Wang et al., 2025
- Dolphin: Document Image Parsing via Heterogeneous Anchor Prompting · Feng et al., Findings of ACL 2025
- Chandra: OCR model for complex tables, forms and handwriting with full layout · Datalab, 2025
- Florence-2: Advancing a Unified Representation for a Variety of Vision Tasks · Xiao et al., CVPR 2024
- MinerU: An Open-Source Solution for Precise Document Content Extraction · Wang et al., 2024
Segmentation and 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
- PixelLM: Pixel Reasoning with Large Multimodal Model · Ren et al., CVPR 2024
- Hi-SAM: Marrying Segment Anything Model for Hierarchical Text Segmentation · Ye et al., TPAMI 2024
Visual prompting and evaluation
- Set-of-Mark Prompting Unleashes Extraordinary Visual Grounding in GPT-4V · Yang et al., 2023
- Graph-of-Mark: Promote Spatial Reasoning in Multimodal Language Models with Graph-Based Visual Prompting · Frisoni et al., AAAI 2026
- Rethinking Evaluation Metrics of Open-Vocabulary Segmentation · Zhou et al., TPAMI 2025
- G-Eval: NLG Evaluation using GPT-4 with Better Human Alignment · Liu et al., EMNLP 2023