[Paper Review] DocFormerv2: Local Features for Document Understanding
DocFormerv2 is a novel encoder-decoder transformer for Visual Document Understanding (VDU) that integrates vision, language, and spatial features using asymmetric pre-training with two novel tasks on the encoder and one on the decoder. It achieves state-of-the-art performance on nine VDU benchmarks, including 4.3% absolute F1 gain on TabFact and superior robustness to OCR errors, outperforming larger models like GIT2 and Flamingo on scene-text VQA tasks.
We propose DocFormerv2, a multi-modal transformer for Visual Document Understanding (VDU). The VDU domain entails understanding documents (beyond mere OCR predictions) e.g., extracting information from a form, VQA for documents and other tasks. VDU is challenging as it needs a model to make sense of multiple modalities (visual, language and spatial) to make a prediction. Our approach, termed DocFormerv2 is an encoder-decoder transformer which takes as input - vision, language and spatial features. DocFormerv2 is pre-trained with unsupervised tasks employed asymmetrically i.e., two novel document tasks on encoder and one on the auto-regressive decoder. The unsupervised tasks have been carefully designed to ensure that the pre-training encourages local-feature alignment between multiple modalities. DocFormerv2 when evaluated on nine datasets shows state-of-the-art performance over strong baselines e.g. TabFact (4.3%), InfoVQA (1.4%), FUNSD (1%). Furthermore, to show generalization capabilities, on three VQA tasks involving scene-text, Doc- Formerv2 outperforms previous comparably-sized models and even does better than much larger models (such as GIT2, PaLi and Flamingo) on some tasks. Extensive ablations show that due to its pre-training, DocFormerv2 understands multiple modalities better than prior-art in VDU.
Motivation & Objective
- To improve Visual Document Understanding (VDU) by modeling the interplay between visual, linguistic, and spatial modalities in document layouts.
- To address the limitation of linearized OCR text by incorporating layout-aware, local feature alignment through dedicated pre-training tasks.
- To demonstrate that a simplified linear visual encoder outperforms complex vision backbones like SwinV2 in VDU, challenging prior assumptions.
- To show generalization of the pre-trained model to out-of-domain scene-text VQA tasks, surpassing larger models.
- To validate the effectiveness of asymmetric pre-training with dual encoder tasks and a single decoder task for multi-modal alignment.
Proposed method
- DocFormerv2 employs an encoder-decoder transformer architecture that jointly processes text, vision, and spatial features as input.
- It introduces two novel unsupervised pre-training tasks on the encoder—Token-to-Grid and a layout-aware contrastive task—to enhance local feature alignment.
- A single auto-regressive pre-training task is applied on the decoder to generate text conditioned on multi-modal context.
- The model uses a linear projection for visual features instead of a dedicated CNN or ViT backbone, simplifying the architecture.
- Pre-training is performed on 64 million documents, with asymmetric task scheduling favoring encoder representation learning.
- The Token-to-Grid task explicitly encourages the model to learn spatial relationships by predicting visual tokens from text spans within a grid structure.
Experimental results
Research questions
- RQ1Can asymmetric pre-training with dual encoder tasks improve local multi-modal feature alignment in Visual Document Understanding?
- RQ2Does a simple linear visual encoder outperform complex vision backbones like SwinV2 in VDU tasks?
- RQ3To what extent does the model generalize to out-of-domain VQA tasks, particularly scene-text VQA?
- RQ4How does the model’s performance scale with increasing pre-training data volume?
- RQ5How robust is the model to OCR errors, and does the generative decoder enhance noise resilience?
Key findings
- DocFormerv2 achieves state-of-the-art performance on five VDU benchmarks, including a 4.3% absolute F1 improvement on TabFact compared to prior baselines.
- On the InfoVQA benchmark, it achieves a 1.4% absolute F1 gain over strong baselines, demonstrating improved reasoning over document content.
- On FUNSD, the model maintains high robustness to OCR errors, with only a 1.68% F1 drop at 20% error rate, compared to a 9.84% drop for an encoder-only model.
- When fine-tuned on three scene-text VQA datasets, DocFormerv2 outperforms larger models such as GIT2, PaLI, and Flamingo, indicating strong generalization capacity.
- Ablation studies confirm that the 128-image token setting and 4x4 grid size for the Token-to-Grid task yield optimal performance, with suboptimal choices harming accuracy.
- The use of a linear visual encoder outperforms SwinV2 by +4.3% on DocVQA, showing that simpler visual feature extraction is more effective in this context.
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.