[Paper Review] Unified Pretraining Framework for Document Understanding
UDoc is a unified pretraining framework for document understanding that integrates visual and textual features using a hierarchical transformer with mixed convolutional and self-attention mechanisms. It improves downstream performance on form, receipt, and document classification tasks through joint multimodal learning with three self-supervised objectives, achieving state-of-the-art results on RVL-CDIP and PubLayNet.
Document intelligence automates the extraction of information from documents and supports many business applications. Recent self-supervised learning methods on large-scale unlabeled document datasets have opened up promising directions towards reducing annotation efforts by training models with self-supervised objectives. However, most of the existing document pretraining methods are still language-dominated. We present UDoc, a new unified pretraining framework for document understanding. UDoc is designed to support most document understanding tasks, extending the Transformer to take multimodal embeddings as input. Each input element is composed of words and visual features from a semantic region of the input document image. An important feature of UDoc is that it learns a generic representation by making use of three self-supervised losses, encouraging the representation to model sentences, learn similarities, and align modalities. Extensive empirical analysis demonstrates that the pretraining procedure learns better joint representations and leads to improvements in downstream tasks.
Motivation & Objective
- To address the limitations of language-dominated document pretraining by integrating visual and textual features in a unified framework.
- To model hierarchical document structure by encoding sentences from words and documents from sentences using a two-level transformer encoder.
- To improve multimodal alignment and representation learning through a gated cross-attention mechanism that dynamically weights visual and textual features.
- To reduce computational cost and improve input length scalability by using convolution for local dependencies and self-attention for global context.
- To enable transfer learning across diverse document types (e.g., forms, receipts, scientific papers) using a single unified pretraining approach.
Proposed method
- UDoc uses a hierarchical transformer encoder: the first level encodes words into sentences, and the second level encodes sentences into documents, reducing computation and improving context modeling.
- It employs a mixed attention mechanism combining 2D convolution for local visual-textual dependencies and self-attention for global relationships in the document.
- A novel gated cross-attentional transformer dynamically controls the influence of visual and textual features per semantic region, enabling adaptive fusion.
- The framework applies three self-supervised objectives: sentence modeling, similarity learning, and cross-modal alignment to learn joint representations.
- Visual features are extracted via a CNN backbone, and text features are derived from OCR (EasyOCR), with the entire model pre-trained on large-scale unlabeled document images.
- The visual backbone is fine-tuned and reused for downstream tasks such as document object detection on PubLayNet, outperforming ImageNet-pretrained backbones.
Experimental results
Research questions
- RQ1Can a unified pretraining framework effectively learn joint representations from multimodal document inputs across diverse document types?
- RQ2How does hierarchical modeling of words → sentences → documents improve representation learning compared to word-level modeling?
- RQ3To what extent does gated cross-attention improve multimodal alignment and performance on document understanding tasks?
- RQ4Can a unified pretraining framework reduce annotation costs and improve performance across form, receipt, and document image classification tasks?
- RQ5How does pretraining on document-specific visual features compare to using general-purpose ImageNet pretraining for document-specific downstream tasks?
Key findings
- UDoc achieves 95.05% accuracy on RVL-CDIP, outperforming the base UniDoc model (93.96%) when the sentence encoder is unfreezed during fine-tuning.
- The pretrained visual backbone from UDoc improves FRCNN object detection on PubLayNet, achieving 93.9% mAP compared to 91.4% with an ImageNet-pretrained ResNet-50 backbone.
- UDoc's joint pretraining with three self-supervised objectives leads to better joint representations and improved downstream performance on form understanding, receipt understanding, and document image classification.
- The model demonstrates superior performance on semi-structured documents like forms and receipts, where spatial layout and visual features are critical.
- Fine-tuning the sentence encoder during inference further improves results, though at the cost of increased computational demand.
- The visual backbone from UDoc generalizes well to document-specific tasks and can be used with any ConvNet architecture without custom layers.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.