TL;DR
This paper introduces a novel framework that leverages Large Language Models (LLMs) to significantly improve document layout analysis, especially in low-data scenarios. By fusing LLM-generated structural priors with traditional visual detector outputs, the method achieves state-of-the-art label efficiency, reducing the need for extensive manual annotation.
What Problem Does This Paper Address?
Document layout analysis, crucial for tasks like digital libraries and automated form processing, traditionally requires vast amounts of labeled data. While semi-supervised learning has helped, it often inherits biases from teacher models and struggles with fine-grained distinctions. Human readers use text semantics to understand document structure (e.g., "Figure 3:" indicating a caption). This paper aims to bridge this gap by incorporating LLMs' sophisticated textual understanding into the layout analysis pipeline, creating more accurate "pseudo-labels" for training models with less labeled data.
Methods
The core of the proposed framework is a probabilistic fusion module that combines predictions from a teacher detector (e.g., a vision transformer-based model) with structural regions inferred by an LLM.
- OCR-LLM Pipeline: First, OCR is used to extract text blocks and their bounding boxes from unlabeled documents. These are then fed to an LLM, which infers hierarchical regions with associated classes and confidence scores.
- Inverse-Variance Fusion: The LLM's structural predictions are fused with the teacher detector's visual predictions. This fusion is guided by inverse-variance weighting, a principled approach that assigns more weight to the more certain prediction source.
- Learned Instance-Adaptive Gating: To go beyond fixed fusion weights, the authors introduce a lightweight gating mechanism. This mechanism learns instance-specific fusion weights based on features like prediction confidence, IoU, and text quality, further improving accuracy.
- Cross-Modal Consistency: To stabilize training, a consistency loss is employed, encouraging alignment between visual features from the detector and text embeddings derived from OCR content.
- Curriculum Learning: The training progresses in stages, starting with high-confidence teacher pseudo-labels, then incorporating fused predictions, and finally using LLM-only soft labels for rare classes.
Datasets
The framework is evaluated on two widely used document layout analysis benchmarks:
- PubLayNet: A large-scale benchmark focused on scientific publications, with 5 categories.
- DocLayNet: A more diverse dataset with 11 categories, covering scientific papers, forms, and more.
The experiments simulate low-data regimes by using only 5% and 10% of labeled data, treating the rest as unlabeled for semi-supervised learning.
Key Insights and Ideas
- LLMs as Structural Priors: The paper strongly demonstrates that LLMs can provide valuable structural knowledge that complements visual information, especially for disambiguating visually similar regions or identifying rare classes.
- Label Efficiency is Key: The LLM-guided fusion significantly boosts performance in low-data settings, achieving near-supervised performance with a fraction of the labeled data.
- Principled Fusion Matters: Inverse-variance weighting and learned adaptive gating lead to more robust and accurate fusion compared to fixed heuristics.
- Privacy-Preserving Deployment: The use of open-source LLMs allows for privacy-preserving deployment with minimal performance degradation.
- Targeted LLM Value: LLM guidance is most impactful in cases of partial agreement between teacher and LLM, where it can correct class predictions or improve localization.
Key Results
- Lightweight Variant (SwiftFormer, 26M params): Achieved 88.2±0.3 AP on PubLayNet using only 5% labels, outperforming strong semi-supervised baselines.
- Document-pretrained Variant (LayoutLMv3, 133M params): Reached 89.7±0.4 AP on PubLayNet with 5% labels, surpassing standard semi-supervised LayoutLMv3 and matching UDOP (which requires much more pretraining).
- LLM Value: LLMs contribute an additional +2.4 to +4.8 AP over simple text heuristics, with a significant +3.8 AP gain in ambiguous cases where LLMs disambiguate semantic types.
- Robustness: The method shows graceful degradation under OCR noise and maintains strong performance across different languages.
- Efficiency: The lightweight variant requires significantly fewer parameters and less training time compared to larger, pretrained models. The LLM preprocessing cost is amortized across training runs.
Limitations and Future Work
- Multilingual Documents: Current LLM prompts are optimized for English. Handling non-Latin scripts and mixed-script documents requires language-specific prompts and may necessitate specialized OCR models.
- Complex Layouts: Dense multi-column formats and deeply nested structures pose challenges for inferring reading order and hierarchical reasoning.
- Domain Specificity: While strong for common document types, the LLM's structural knowledge might need adaptation for highly specialized formats (e.g., sheet music, architectural blueprints).
- Computational Requirements: While single-GPU training is feasible, LLM preprocessing can be computationally intensive, and local deployment of large LLMs requires significant resources.
- Future Work: The authors suggest extending the framework to broader document understanding tasks like Visual Question Answering (VQA) and exploring cross-script robustness more thoroughly.
Summary updated