Advanced Layout Analysis Models for Docling

Nikolaos Livathinos, Christoph Auer, Ahmed Nassar, Rafael Teixeira de Lima, Maksym Lysak, Brown Ebouky, Cesar Berrospi, Michele Dolfi, Panagiotis Vagenas, Matteo Omenetti, Kasper Dinkla, Yusik Kim, Valery Weber, Lucas Morin, Ingmar Meijer, Viktor Kuropiatnyk, Tim Strohmeyer, A. Said Gurbuz, Peter W. J. StaararXiv 2025

Here is a technical summary of the paper "Advanced Layout Analysis Models for Docling."

TL;DR

This paper introduces a new family of open-source, high-performance document layout analysis models integrated into the Docling pipeline. By training permissive-license architectures (RT-DETR and DFINE) on a newly curated dataset of 150,000 documents, the authors achieve up to a 23.9% mAP improvement over previous baselines. Their top-performing model, heron-101, delivers 78% mAP with an inference speed of just 28 ms per page on an NVIDIA A100 GPU.

What Problem Does This Paper Address?

Document Layout Analysis (DLA)—the task of identifying, classifying, and locating structural elements like text, tables, figures, and forms on a page—is the critical first step in document conversion pipelines. However, building robust DLA models is notoriously difficult due to the immense variety of document styles and systemic flaws in existing datasets.

Popular datasets like DocLayNet often omit key structural classes (such as forms, code blocks, and checkboxes) or contain inconsistent annotations (e.g., labeling a full-page form as a "Table" or "Picture"). Furthermore, standard object detection metrics like mean Average Precision (mAP) often fail to reflect the actual real-world utility of a layout engine, sometimes penalizing models that generate cleaner, more granular outputs than the noisy ground truth.

Methods

To circumvent legal constraints surrounding the popular YOLO family, the authors focused exclusively on open-source, Transformer-based real-time object detectors. They evaluated and trained:

  • RT-DETRv1 and RT-DETRv2 (using ResNet-50 and ResNet-101 backbones)
  • DFINE (using HGNet-V2 backbones across medium, large, and x-large configurations)

A key contribution of this work is their specialized post-processing pipeline. Raw bounding box predictions are intersected with native PDF cells to "snap" boundaries precisely around text elements. The pipeline also applies rule-based heuristics to handle overlapping elements (e.g., nesting text inside a "Form" or "Key-Value Region" wrapper).

Evaluation was performed using standard COCO-tools alongside a more document-centric benchmarking tool, docling-eval.

Datasets

The models were trained on a diverse, aggregated dataset of 150,000 single-page documents containing 2.3 million layout elements across 17 canonical classes. This dataset unifies:

  • canonical-DocLayNet: A curated subset of the original DocLayNet (22,101 training pages), filtered using an automated RT-DETRv2 detector to remove pages containing unannotated "delta" classes (e.g., forms, code, checkboxes).
  • DocLayNet-v2: An improved, proprietary extension covering the full 17-class taxonomy.
  • WordScape: A dataset harvested from Microsoft Word documents in Common Crawl, filtered to remove mislabeled table/form annotations.

Key Insights and Ideas

  • The mAP Paradox in DLA: The authors demonstrate that standard COCO mAP can be a deceptive metric for document layouts. Applying post-processing significantly improves the visual and structural quality of the layout (by clustering fragmented text and snapping boxes to text cells), yet it actually lowers the mAP score. This occurs because the metric strictly penalizes deviations from the original, often coarse or noisy, ground-truth bounding boxes.
  • Granularity vs. Ground Truth: Models frequently predict highly detailed, correct structures (e.g., identifying individual headers and list items) where a human annotator simply drew a single large box labeled "Picture."
  • Data Filtering is Essential: Rather than manually re-annotating massive datasets, using a secondary model to filter out inconsistently labeled pages (producing "canonical" subsets) drastically reduces training noise and improves final model accuracy.

Key Results

The authors introduced five new layout models that significantly outperform the previous Docling baseline while maintaining real-time inference speeds.

Figure 1: Models mAP scores vs inference times. Docling’s new default model “heron”, delivers a 23.5% mAP gain.
  • heron-101 (RT-DETRv2-r101vd): The top-performing model, achieving 78.0% mAP on the canonical DocLayNet test split. It runs in 28 ms/image on an NVIDIA A100 and 62 ms/image on an Apple M3 Max (MPS).
  • heron (RT-DETRv2-r50vd): The new default model for Docling v2.50.0, providing a 23.5% mAP gain over the old baseline with nearly identical runtime performance (30–31 ms on A100).
  • egret-m (DFINE-m): The fastest and lightest model variant (19.5M parameters), clocking in at just 24 ms/image on an A100 and demonstrating excellent efficiency on CPU environments.

Limitations and Future Work

While the post-processing pipeline successfully resolves overlapping boxes and aligns predictions to native PDF text cells, it relies heavily on rule-based heuristics. These heuristics may not generalize perfectly to highly non-standard document layouts. Additionally, because the post-processing relies on intersecting predictions with native PDF cells, its performance advantages may vary when processing pure image scans (OCR-only workflows) where native text cell boundaries are unavailable.

The authors emphasize the need for the document layout community to move toward evaluation metrics that better capture structural hierarchy rather than relying solely on standard computer vision bounding-box overlap (mAP).

Summary updated

BibTeX
@misc{livathinos2025advanced,
  author = {Nikolaos Livathinos and Christoph Auer and Ahmed Nassar and Rafael Teixeira de Lima and Maksym Lysak and Brown Ebouky and Cesar Berrospi and Michele Dolfi and Panagiotis Vagenas and Matteo Omenetti and Kasper Dinkla and Yusik Kim and Valery Weber and Lucas Morin and Ingmar Meijer and Viktor Kuropiatnyk and Tim Strohmeyer and A. Said Gurbuz and Peter W. J. Staar},
  title = {{Advanced Layout Analysis Models for Docling}},
  year = {2025},
  eprint = {2509.11720},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.11720},
}
Figure