Abstract
Large Visual-Language Models (LVLMs) often struggle with text-rich images because their vision encoders are pre-trained on holistic, image-level tasks that overlook fine-grained details. We introduce DoCo (Document Object COntrastive learning), a plug-and-play pre-training method that aligns patch-level visual features with multimodal (text, layout, visual) features of specific document objects. By addressing the "fine-grained feature collapse" issue, DoCo significantly boosts LVLM performance on visual document understanding (VDU) tasks without adding computational overhead during inference.
Introduction: The Challenge of Fine-Grained Document Understanding
While LVLMs have shown incredible zero-shot capabilities in general open-ended vision-language tasks, they often fall short in Visual Document Understanding (VDU) scenarios—like reading charts, tables, and text-heavy reports.
The root cause is identified as the "fine-grained feature collapse issue." Most LVLMs initialize their vision encoders with CLIP, which is trained via image-level contrastive learning (matching a whole image to a whole caption). This holistic approach fails to capture the dense, localized, fine-grained features necessary to read and reason about specific text elements within a document. Consequently, the model's attention often "drifts" when trying to answer questions about specific text blocks or data points.
Methodology: Document Object COntrastive Learning (DoCo)
The authors propose DoCo, a pre-training framework designed to teach the LVLM's vision encoder to pay attention to fine-grained document objects.
Key Components
- Auxiliary Multimodal Encoder: During pre-training, an off-the-shelf OCR tool extracts text and bounding boxes. A multimodal encoder (LayoutLMv3) processes these to create rich representations combining text, layout, and visual data.
- ROI Aggregation: Because Vision Transformers (ViTs) process images in fixed grid patches, bounding boxes rarely align perfectly with patch edges. The authors designed a novel ROI Aggregation module that calculates the overlap area between patches and bounding boxes, using it as an attention mask to accurately pool visual features for specific objects.
- Intra- and Inter-DoCo: The model uses contrastive learning to align the ViT's visual features with the multimodal encoder's rich features. Intra-DoCo aligns objects within the same image, while Inter-DoCo contrasts global document object features across different images in a batch.
Plug-and-Play Architecture
After pre-training, the multimodal encoder is discarded. The enhanced vision encoder is then plugged into standard LVLMs (like Qwen-VL-Chat or mPLUG-Owl) for fine-tuning. This means the model gets smarter without any extra computational cost during inference.
Datasets and Evaluation
Pre-training utilized ~1.0 million image-text pairs from CC3M and LAION, processed with OCR to extract bounding boxes. Fine-tuning and evaluation were conducted on a diverse mix of VDU benchmarks totaling ~0.4M samples, including DocVQA, ChartQA, TextVQA, and InfoVQA.
Key Results and Insights
- Broad Performance Gains: Integrating DoCo into Qwen-VL-Chat improved average performance across VDU benchmarks by roughly 2% compared to the standard CLIP-pretrained baseline. On DocVQA specifically, accuracy rose from 62.2% to 64.8%.
- Attention Grounding: Qualitative analysis shows that while baseline CLIP models exhibit severe "attention drift," DoCo-enhanced models maintain tight, accurate focus on the specific text regions relevant to the prompt.
- Multimodal Guidance: By forcing the vision encoder to mimic representations of a specialized multimodal encoder during pre-training, the vision encoder learns to naturally isolate and encode text-rich regions on its own.
Conclusion
DoCo effectively bridges the gap between holistic image pre-training and the fine-grained requirements of document understanding. While the method excels at visual grounding, future work will focus on improving the LLM's complex document-related commonsense reasoning and mathematical calculation capabilities.
Summary updated