DocLayNet

On this page 7

DocLayNet is a human-annotated dataset for document layout analysis that contains about 80,863 pages with bounding boxes for 11 layout classes, drawn from six distinct categories of real-world documents. In Document AI it serves both as training data for layout detection models and as a benchmark that measures how well those models generalize beyond the uniform look of scientific papers.

Released by IBM Research in 2022, DocLayNet was designed to address a weakness of earlier, automatically labeled datasets: models trained on them performed well on journal articles but poorly on financial reports, manuals, patents and legal texts. Because every page was annotated manually by trained experts, the dataset also includes measurements of human agreement that give a realistic ceiling for model accuracy.

What DocLayNet contains

DocLayNet provides page images, bounding boxes and class labels in the widely used COCO object detection format, together with the original PDF text cells for each page. This combination lets researchers train purely visual detectors as well as multimodal models that use both pixels and extracted text.

The table below lists the main characteristics of the dataset.

AttributeValueWhy it matters
Total pagesAbout 80,863Large enough to train modern detectors
Layout classes11Finer granularity than earlier datasets
Document categories6Tests generalization across domains
Annotation methodManual, by trained annotatorsHigher label quality than heuristic labeling
Data splitsRoughly 69,000 train, 6,500 validation, 5,000 testStandard benchmark protocol
FormatCOCO annotations, PNG images, PDF text cellsCompatible with common tooling
LicenseCommunity Data License Agreement, permissiveAllows commercial and research use
Key characteristics of DocLayNet

A subset of pages was annotated two or three times independently, which allows the dataset to report inter-annotator agreement. That figure is essential for interpreting benchmark results, because a model that approaches human agreement has little room left to improve on the existing labels.

Layout classes and document categories

The 11 layout classes cover the elements that matter most for downstream tasks such as reading order detection, table extraction and document-to-Markdown conversion. They are Caption, Footnote, Formula, List-item, Page-footer, Page-header, Picture, Section-header, Table, Text and Title.

The six categories were chosen to represent visually and structurally different documents. Their distribution is intentionally less skewed than in datasets built from a single publisher, which makes DocLayNet a stronger test of cross-domain robustness.

CategoryTypical layout traitsMain difficulty for models
Financial reportsDense tables, charts, multi-column textDistinguishing tables from text blocks
ManualsPictures, lists, varied typographyIrregular layouts and nested lists
Scientific articlesTwo columns, formulas, captionsFormulas and caption assignment
Laws and regulationsLong text, numbered sectionsSeparating section headers from text
PatentsFixed structure, claims, drawingsSmall headers and dense text
Government tendersForms, tables, mixed formattingInconsistent templates across issuers
Document categories in DocLayNet

How DocLayNet compares with other layout datasets

DocLayNet is often contrasted with PubLayNet, a much larger dataset of about 360,000 pages that was labeled automatically by matching PDF content to XML from biomedical journals. PubLayNet offers scale but limited visual diversity, and models trained on it tend to lose accuracy sharply on business documents.

DatasetPrimary purposeLabelingDomain coverage
DocLayNetLayout detectionManualSix diverse categories
PubLayNetLayout detectionAutomatic from XMLBiomedical articles
DocBankToken-level layout labelingWeak supervision from LaTeXScientific papers
RVL-CDIPDocument classificationCategory labels per pageScanned business documents
FUNSDForm understandingManual entity linkingNoisy scanned forms
DocLayNet compared with related document datasets

The key lesson from comparative studies is that label quality and domain diversity often matter more than raw page count. Models trained on DocLayNet typically generalize better to unseen document types than models trained on larger but homogeneous collections.

Benchmarking and evaluation

Results on DocLayNet are reported as mean average precision (mAP) over intersection-over-union thresholds from 0.5 to 0.95, following the COCO protocol. The original publication reported human agreement of roughly 82 to 83 percent mAP, while baseline detectors such as Mask R-CNN, Faster R-CNN and YOLOv5 reached roughly 73 to 77 percent.

Per-class scores vary widely. Tables, pictures and page headers are usually detected reliably, while titles, footnotes and list items are harder because their appearance overlaps with ordinary text. Reporting per-class and per-category results is therefore more informative than a single aggregate number.

  • Use the official test split so that results are comparable with published work.
  • Report per-class mAP, since aggregate figures hide weak classes such as Title.
  • Compare against human agreement, not against an assumed ceiling of 100 percent.
  • Check category balance, because strong scores on one category can mask failures in another.

Practical use and limitations

In practice, DocLayNet is a common pretraining or fine-tuning source for layout models used in PDF parsing pipelines, including open-source document converters such as Docling. Teams typically start from a DocLayNet-trained detector and then fine-tune on a few hundred pages of their own documents.

The decision table below shows how teams usually combine DocLayNet with their own data, depending on how closely their documents resemble the dataset.

SituationRecommended approachReason
Born-digital business PDFs in EnglishUse a DocLayNet-trained detector directlyClose match to the training distribution
Same document types with a house styleFine-tune on a few hundred internal pagesAdapts to local templates at low cost
Scanned or photographed documentsAdd scan augmentation and scanned training pagesDocLayNet contains few degraded images
Elements outside the 11 classesExtend the label set and annotate new examplesSignatures or stamps are not labeled
Non-Latin scripts or right-to-left textCollect language-specific annotationsCoverage of other scripts is limited
Choosing how to use DocLayNet in a project

The dataset has clear limits. It is predominantly English, it contains mostly born-digital PDFs rather than degraded scans or photographs, and its 11 classes do not cover elements such as signatures, stamps, checkboxes or handwritten notes. Its labels describe regions, not reading order or table structure, so additional models or datasets are needed for those tasks.

In simple terms

DocLayNet is a large collection of example pages with labels drawn on them. People marked where each title, table, picture and paragraph sits on about 80,000 pages. Computers study these examples to learn what a page looks like.

The pages come from reports, manuals, patents, laws and more. That variety matters. A model that saw only one kind of page would get confused by others. DocLayNet also acts as a shared test, so researchers can compare their models fairly.

A practical example

An accounting firm wants to turn thousands of annual reports into structured data for analysis. Its first layout model, trained only on scientific papers, often mistakes financial tables for text blocks and misses page headers, which corrupts the extracted figures.

The data team switches to a detector pretrained on DocLayNet and fine-tunes it on 400 annotated pages of the firm’s own reports. Table detection on the internal test set improves noticeably, and the share of reports needing manual correction falls from roughly one in three to about one in ten. Remaining errors cluster around footnotes and unusual title styles, which the team addresses with targeted additional annotations rather than a larger model.