A Hybrid Approach for Document Layout Analysis in Document images

Tahira Shehzadi, Didier Stricker, Muhammad Zeshan Afzal · DOI

Abstract

Document Layout Analysis (DLA) is a critical precursor to document understanding, yet existing Transformer-based models often struggle with small-scale elements and slow training convergence. This paper presents a hybrid framework based on the DINO (DETR with Improved deNoising Anchor boxes) architecture. By integrating a multi-scale feature backbone, a novel query encoding strategy using RoIAlign, and a hybrid matching training scheme, the proposed model achieves state-of-the-art results. Notably, the approach yields a 98.6% mAP on PubTables and significantly improves detection for challenging categories such as footers and titles.

1. Introduction

Document Layout Analysis (DLA) serves as the foundational "vision" for Document Intelligence systems. Its primary objective is to identify and categorize the geometric structure of document pages—distinguishing between paragraphs, tables, figures, captions, and headers. While deep learning models, particularly those utilizing Transformer architectures like DETR and DINO, have advanced the state-of-the-art, they face persistent challenges. Specifically, these models often exhibit a "blind spot" for small graphical elements and suffer from restrictive "one-to-one" matching strategies during early training phases, which can impede convergence.

This paper introduces a hybrid Transformer-based framework designed to address these limitations, focusing on high-precision detection of both large-scale structures and minute document elements.

2. Methodology

The proposed framework builds upon the DINO architecture, incorporating three primary innovations to enhance detection accuracy and training efficiency.

2.1 Multi-scale Feature Extraction

The model utilizes a ResNet-50 backbone to extract features across multiple resolutions. This multi-scale approach ensures that the network maintains high-fidelity representations of both large document regions (e.g., body text blocks) and tiny, localized regions (e.g., page numbers or footnotes).

2.2 Query Encoding Strategy

To improve the detection of small objects, the authors move beyond standard, abstract learnable object queries. Instead, they implement a Query Encoding mechanism that extracts high-level features directly from the early layers of the CNN backbone using RoIAlign. These "high-quality" queries provide the decoder with a more informed spatial prior, allowing the model to better localize small-scale elements that might otherwise be overlooked by generic queries.

2.3 Hybrid Matching Scheme

The training process employs a dual-branch matching strategy to optimize convergence:

  • One-to-Many Matching: In the initial stages, one ground truth object is associated with multiple predictions. This provides a denser supervisory signal, encouraging the model to explore a wider range of feature representations.
  • One-to-One Matching: To ensure the final model produces clean, non-overlapping predictions without requiring post-processing steps like Non-Maximum Suppression (NMS), the training transitions to a standard one-to-one matching scheme halfway through the process.

3. Experimental Evaluation

The model was rigorously tested on three benchmark datasets representing various document complexities:

  • PubLayNet: A large-scale dataset (360,000+ pages) focused on core document elements like text, titles, and lists.
  • DocLayNet: A diverse dataset (80,000 pages) featuring complex layouts from financial reports, manuals, and legal documents across 11 categories.
  • PubTables-1M: A specialized benchmark for comprehensive table detection and structural recognition.

4. Results and Discussion

The hybrid approach demonstrated superior performance across all benchmarks, outperforming established baselines such as Mask R-CNN and the standard DINO model.

4.1 Benchmark Performance

On DocLayNet, the model achieved an overall mAP of 81.6%. The impact of the query encoding strategy was most evident in difficult categories: page footers reached 91.3% precision, and titles reached 86.3%. On PubLayNet, the model attained an average precision of 97.3%, surpassing previous state-of-the-art methods. The most striking result occurred on PubTables, where the model achieved a 98.6% mAP.

4.2 Ablation Studies

Ablation experiments confirmed the efficacy of the "Hybrid-Query" (Qd + Qe) approach. On the PubLayNet dataset, the inclusion of encoded queries improved the mAP from 95.52% (standard DINO) to 97.3%, validating the hypothesis that spatial priors from the CNN backbone significantly enhance Transformer-based detection.

5. Conclusion and Future Work

The hybrid framework presented in this paper successfully addresses the "blind spot" for small elements in Document Layout Analysis. By combining multi-scale CNN features with a flexible hybrid matching strategy, the model sets new performance benchmarks.

Future research may focus on reducing the computational complexity introduced by the RoIAlign step and integrating these high-precision layout outputs with Large Language Models (LLMs) to bridge the gap between structural layout analysis and deep semantic understanding. Additionally, evaluating the model's robustness on degraded or handwritten historical documents remains an open area for investigation.

Summary updated

BibTeX
@inproceedings{shehzadi2024hybrid,
  author = {Tahira Shehzadi and Didier Stricker and Muhammad Zeshan Afzal},
  title = {{A Hybrid Approach for Document Layout Analysis in Document images}},
  booktitle = {ICDAR},
  year = {2024},
  url = {https://openreview.net/forum?id=cQcwtv8M32},
}
Figure