TL;DR
The paper introduces Detect-Order-Construct, a unified end-to-end framework that treats document structure analysis as a hierarchical tree construction problem. By reformulating object detection, reading order prediction, and Table of Contents (TOC) extraction as multi-modal relation prediction tasks, the authors achieve state-of-the-art results across major benchmarks and introduce Comp-HRDoc, the first comprehensive benchmark for evaluating these subtasks simultaneously.
What Problem Does This Paper Address?
Most Document Layout Analysis (DLA) tools focus on "flat" physical structures—identifying where a paragraph or a table is on a page. However, real-world documents (like those created in LaTeX or Word) are inherently hierarchical. A section contains subsections, which contain paragraphs, which follow a specific reading order.
Existing research often tackles these pieces in isolation: one model for detection, another for reading order, and perhaps a rule-based script for the Table of Contents. This fragmented approach leads to "cascading errors" and fails to capture the rich logical relationships between document elements. The authors aim to bridge this gap by creating a system that understands the document as a rooted tree, where nodes are page objects and edges represent logical or sequential connections.
Methods
The authors propose a three-stage pipeline:
- Detect: This stage identifies page objects (text regions, tables, figures) and assigns them logical roles (e.g., "heading," "caption"). It uses a hybrid approach: a top-down model (DINO) handles graphical objects like tables, while a bottom-up relation prediction model groups OCR-extracted text-lines into coherent text regions.
- Order: Once objects are identified, the model predicts the reading sequence. Instead of simple sorting, the authors treat this as a dependency parsing task. A multi-modal transformer (combining visual features, BERT text embeddings, and 2D positions) predicts the "succeeding" object for every element.
- Construct: This final stage builds the abstract hierarchical tree (the TOC). The authors introduce a tree-aware relation prediction head that predicts both parent-child and sibling relationships between section headings. They also developed a Tree Insertion Algorithm to ensure the final output is a mathematically valid tree structure.
A key technical highlight is the use of Multi-modal Transformer-based Relation Prediction. By feeding visual, textual, and spatial data into a transformer encoder, the model learns the "context" of an object relative to the entire page, which is crucial for distinguishing between, say, a regular paragraph and a footnote.
Datasets
The researchers evaluated their system on four major datasets:
- PubLayNet & DocLayNet: Standard large-scale benchmarks for document layout.
- HRDoc: A high-quality dataset specifically for hierarchical reconstruction.
- Comp-HRDoc (New): The authors' own contribution. Built upon HRDoc-Hard, this benchmark provides annotations that allow researchers to evaluate detection, reading order, and TOC extraction all at once, providing a more holistic view of model performance.
Key Insights and Ideas
- Unity in Relations: The biggest "aha moment" is that detection, ordering, and hierarchy can all be framed as relationship prediction. Whether it's "this line follows that line" or "this section is a child of that section," the underlying mathematical problem is the same.
- The Power of Siblings: In the "Construct" stage, the authors found that predicting sibling relationships (which section comes immediately before this one at the same level) is just as important as predicting the parent. This extra constraint significantly improves the accuracy of the generated TOC.
- Hybrid is Better: Standard object detectors often struggle with small, dense text regions. By using a bottom-up approach (grouping lines into regions) for text and a top-down approach for graphics, the model achieves much higher precision on complex layouts.
Key Results
The "Detect-Order-Construct" system achieved impressive numbers:
- DocLayNet: Reached a mean Average Precision (mAP) of 81.0%, significantly outperforming the previous best (YOLOv5 at 76.8%).
- PubLayNet: Achieved a SOTA mAP of 96.5%.
- Hierarchical Accuracy: On the HRDoc-Hard dataset, the model improved the "Semantic-TEDS" score (a metric for tree similarity) from 0.69 to 0.85, a massive leap in structural understanding.
- TOC Extraction: On the new Comp-HRDoc benchmark, the model outperformed specialized TOC models like MTD by nearly 18% in Micro-STEDS scores.
Limitations and Future Work
The authors identify a few key hurdles:
- Dependency on Detection: The "Construct" stage is only as good as the "Detect" stage. If the model fails to identify a section heading correctly, the entire branch of the hierarchical tree may be lost or misplaced.
- Section Numbering: The model relies heavily on the semantics of section numbers (e.g., "1.1"). It struggles with documents that use non-standard or missing numbering schemes.
- Scope: Currently, the model is optimized for digital-born PDFs. The authors plan to expand the framework to handle more "wild" scenarios, such as legal contracts, financial reports, and handwritten documents with even more complex, non-linear structures.
Summary updated