PubLayNet is a large-scale public dataset for document layout analysis that contains more than 360,000 page images from biomedical research articles, each annotated with bounding boxes and polygon masks for five layout categories: text, title, list, table and figure. In Document AI, it is one of the most widely used benchmarks for training and evaluating models that detect and classify regions on a page before text extraction, table extraction or reading order detection.
Released by IBM researchers in 2019, PubLayNet was built automatically rather than by manual labeling. Its size made it practical, for the first time, to train deep object detection networks for layout analysis at scale, and it remains a standard pretraining source for layout models even though its single document domain limits generalization.
How PubLayNet was constructed
PubLayNet was created by matching PDF articles with their XML representations from the PubMed Central Open Access Subset. The XML files encode the logical structure of each article, including paragraphs, headings, lists, tables and figures, while the PDFs record where each element appears on the rendered page.
An automated pipeline parsed the PDF content, aligned text and graphic elements with the corresponding XML nodes using fuzzy string matching, and converted the matched regions into layout annotations. Pages with poor matching quality were filtered out. This approach produced labels at a scale that manual annotation could not afford, with a reported quality high enough for training detection models.
Annotations follow the COCO object detection format, which records a category, a bounding box and a segmentation polygon for every region. This choice lets practitioners use standard detection frameworks, such as Detectron2 or MMDetection, without custom data loaders.
Layout categories and dataset composition
PubLayNet defines five coarse layout categories, chosen because they map directly onto the XML structure of scientific articles. The following table explains each category and its typical role in downstream processing.
| Category | What it covers | Typical downstream use |
|---|---|---|
| Text | Body paragraphs, captions, author lists and footnotes | OCR and reading order detection |
| Title | Article titles and section headings | Document structure and chunking |
| List | Numbered and bulleted lists | Preserving item boundaries |
| Table | Tabular regions including headers | Table structure recognition |
| Figure | Charts, photographs, diagrams and plots | Image extraction and captioning |
The dataset is split into training, validation and test sets. The training set holds about 336,000 pages, and the validation and test sets each contain roughly 11,000 pages. Test labels were initially withheld for a competition, so most published results report scores on the validation split.
| Split | Approximate pages | Common use |
|---|---|---|
| Training | 336,000 | Model training and pretraining |
| Validation | 11,000 | Reported benchmark results |
| Test | 11,000 | Competition and held-out evaluation |
The category distribution is heavily skewed toward text, which accounts for the large majority of annotated regions. Lists and titles are comparatively rare, which explains why model accuracy is usually lowest on the list and title categories.
Evaluation metrics and typical results
Models trained on PubLayNet are evaluated with COCO-style mean average precision (mAP), averaged over intersection-over-union thresholds from 0.50 to 0.95. A detection counts as correct only when its box overlaps the reference region sufficiently and carries the correct label.
The original baselines used Faster R-CNN and Mask R-CNN and reached an overall mAP of about 0.90 on the validation set. Later layout-aware and transformer-based models, including LayoutLMv3 and the Document Image Transformer, report scores in the 0.94 to 0.96 range. Because these values are close to saturation, small differences between modern models often fall within the noise caused by annotation inconsistencies.
PubLayNet compared with other layout datasets
PubLayNet is best understood as a large but homogeneous dataset. Later benchmarks were designed specifically to address its narrow domain and coarse label set, as the comparison below shows.
| Dataset | Document domain | Label granularity | Annotation method |
|---|---|---|---|
| PubLayNet | Biomedical scientific articles | 5 layout classes | Automatic, XML to PDF matching |
| DocLayNet | Finance, law, patents, manuals and more | 11 layout classes | Manual, by trained annotators |
| DocBank | Scientific papers from arXiv | 12 token-level classes | Weak supervision from LaTeX |
| RVL-CDIP | Scanned business documents | 16 document classes | Whole-page classification labels |
| FUNSD | Noisy scanned forms | Entity and link labels | Manual, small scale |
The most important contrast is with DocLayNet, which contains about 80,000 manually annotated pages across diverse document types. Models trained only on PubLayNet often perform poorly on invoices, reports or brochures, while DocLayNet-trained models generalize better to real business documents.
Practical use and limitations
In practice, PubLayNet serves mainly as a pretraining and benchmarking resource. Teams often pretrain a layout detector on PubLayNet and then fine-tune it on a few hundred domain-specific pages, which typically yields better results than training from scratch on the small target set.
- Domain bias: the pages come from journal articles with clean, born-digital typesetting, so scanned or handwritten documents are underrepresented.
- Coarse classes: headers, footers, page numbers, formulas and captions are not separate categories, which limits reading order and chunking tasks.
- Label noise: automatic matching produces occasional missing or misaligned regions.
- Licensing: the source articles come from the open access subset, but each article carries its own license, so commercial reuse needs a review.
For production pipelines, PubLayNet results should be treated as an indicator of model capacity, not as a guarantee of accuracy on the target documents. A domain-specific evaluation set remains essential before deployment.
The simple explanation
PubLayNet is a huge collection of example pages from scientific articles. On every page, the parts are marked: here is a paragraph, here is a heading, here is a table, here is a picture.
Computers use these marked pages to learn what a page layout looks like. It is like teaching a child to find the headings in a newspaper by showing thousands of pages with the headings circled. After enough practice, the computer can find these parts on new pages by itself. The main catch is that all the examples are science papers, so other document types need extra training.
How it is used in practice
A data team at a pharmaceutical company needs to extract tables and figures from about 50,000 research PDFs to build a searchable evidence database. Running OCR on whole pages mixes table cells with surrounding text and produces unusable output.
The team trains a Mask R-CNN layout detector on PubLayNet, which matches its source material closely because the internal reports resemble journal articles. They then fine-tune the model on 300 manually labeled pages from their own archive, adding a separate class for chemical structure diagrams.
The resulting pipeline detects table regions with high precision, crops them and sends them to a table structure recognition model. Figures are stored with their captions. Manual extraction effort drops substantially, and reviewers now check only pages where detection confidence falls below a set threshold.