DOGE: Towards Versatile Visual Document Grounding and Referring

Yinan Zhou, Yuxin Chen, Haokun Lin, Shuyu Yang, Li Zhu, Zhongang Qi, Chen Ma, Ying ShanarXiv 2024

Abstract Multimodal Large Language Models (MLLMs) have shown impressive general visual understanding but often struggle with the spatial precision required for complex document analysis. This paper introduces DOGR, a framework comprising a specialized data engine (DOGR-Engine), a comprehensive benchmark (DOGR-Bench), and a high-performance model designed to bridge the gap in fine-grained document grounding and referring. By leveraging a novel re-rendering strategy and multi-granular parsing, DOGR achieves state-of-the-art performance in text localization and grounded reasoning, significantly outperforming proprietary models like GPT-4o and Gemini 1.5 Pro in spatial tasks.

Introduction: Overcoming "Spatial Clumsiness"

While current MLLMs excel at general Visual Question Answering (VQA), they remain "blurry-eyed" when interacting with dense documents. A model might summarize a chart but fail to "draw a box around the data point for 2023" (grounding) or "explain the text inside this specific red box" (referring). This "spatial clumsiness" stems from two main bottlenecks: noisy OCR-based annotations and a lack of diverse instruction-tuning data that exercises bidirectional grounding-referring loops.

The DOGR-Engine: Precision-First Data Generation

To address these issues, the authors developed the DOGR-Engine. This pipeline generates high-quality data through two primary methods:

  1. Re-rendering for Posters and Charts: Instead of relying on error-prone OCR, the engine programmatically modifies document templates (e.g., changing text color or opacity) and uses pixel-wise subtraction to derive mathematically perfect bounding boxes.
  2. Hybrid Parsing for PDFs: By combining MinerU (for layout logic) and PyMuPDF (for text extraction), the engine ensures the model learns both spatial coordinates and the logical reading order of complex documents.
DOGR enables precise grounding and referring across various document types, including charts, posters, and PDFs.

The engine produced the DOGR-Dataset, containing 2.1 million multi-granular parsing samples and 700,000 instruction-tuning samples. These samples cover words, phrases, lines, and paragraphs, teaching the model a hierarchical understanding of document structure.

DOGR-Bench and Model Evaluation

The researchers also introduced DOGR-Bench, a benchmark with 3.6K test samples across seven tasks, including Grounded Answering (Ga), Grounded Reasoning (Gr), and Referring (Rt).

The DOGR Model (built on InternViT-300M and Qwen2-7B) was trained using a three-stage strategy: pre-alignment, parsing pre-training, and grounded interaction fine-tuning. The results were striking:

  • Localization Superiority: On the DocLocal4K task, DOGR achieved 86.64% accuracy, compared to roughly 5% for Gemini 1.5 Pro and GPT-4o.
  • Grounded Reasoning: On DOGR-Bench, the model reached 83.2% accuracy in Grounded Answering, setting a new state-of-the-art for open-source models.
  • Zero-Shot Generalization: Despite being trained on specific document types, DOGR showed a surprising ability to handle "out-of-distribution" tasks, such as recognizing and grounding handwritten text.

Key Insights

The study highlights that precision is non-negotiable. Even a 30% noise level in training bounding boxes leads to catastrophic drops in grounding performance. Furthermore, the "Grounding-Referring" loop is essential for intuitive human-AI interaction; a model must be able to point to its evidence and understand what a user is pointing at.

Conclusion and Future Work

DOGR represents a significant step toward fine-grained document intelligence. While currently focused on English, future iterations aim to expand to multilingual support and improve handling of complex text wrapping. By open-sourcing the code, data, and model, the authors provide a robust foundation for the next generation of document-aware AI.

Summary updated

BibTeX
@misc{zhou2024doge,
  author = {Yinan Zhou and Yuxin Chen and Haokun Lin and Shuyu Yang and Li Zhu and Zhongang Qi and Chen Ma and Ying Shan},
  title = {{DOGE: Towards Versatile Visual Document Grounding and Referring}},
  year = {2024},
  eprint = {2411.17125},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.17125},
}
Figure