Visually-Situated Natural Language Understanding with Contrastive Reading Model and Frozen Large Language Models

Geewook Kim, Hodong Lee, Daehee Kim, Haeji Jung, Sanghee Park, Yoonsik Kim, Sangdoo Yun, Taeho Kil, Bado Lee, Seunghyun Park

Abstract

Large Visual Language Models (LVLMs) often struggle with text-rich images like charts and documents. We present Cream (Contrastive Reading Model), an architecture that enhances frozen Large Language Models (LLMs) with fine-grained visual understanding. By employing an auxiliary encoder and a novel contrastive alignment technique, Cream generates compact soft visual prompts that capture intricate textual and spatial details. Experimental results show that Cream outperforms significantly larger models on complex reasoning tasks like ChartQA and DocVQA while maintaining high computational efficiency.

Introduction: The Challenge of Text-Rich Images

While general-purpose LVLMs like LLaVA or BLIP-2 are excellent at describing natural scenes, they frequently fail when faced with "text-rich" images such as infographics, charts, and documents. Understanding these images requires more than a general visual summary; it necessitates pinpointing specific text strings, understanding their spatial layout, and performing reasoning—often arithmetic—based on that data.

Existing solutions typically rely on general vision encoders that miss fine-grained text or "OCR-into-LLM" pipelines that overwhelm the model with thousands of raw text tokens. The latter is computationally expensive and often exceeds the LLM's context window.

Figure 1: Comparison of Cream against other models on a text-rich advertisement task.

Methods: The Cream Architecture

The core of this work is the Cream architecture, which bridges the gap between general vision and fine-grained textual detail through a dual-encoder system:

  1. Vision Encoder: A standard Vision Transformer (ViT) captures the overall image context.
  2. Auxiliary Encoder: A specialized encoder (based on BART) processes "feature evidence" such as OCR text and object detection boxes.
  3. Contrastive Feature Alignment: This novel strategy uses contrastive learning to align features from the general vision encoder with specific features from the auxiliary encoder. This forces the vision encoder to learn the precise location and content of important text and objects, making the model robust even when OCR data is noisy.
Figure 2: Overview of the Cream architecture (a) and the Contrastive Feature Alignment process (b).

The decoder aggregates these aligned features into a fixed-size "soft visual prompt" of 224 tokens. This prompt is then fed into a frozen LLM (e.g., Vicuna-7B), allowing for efficient processing regardless of the image's text density.

Performance and Efficiency

Cream demonstrates state-of-the-art performance across major text-rich VQA benchmarks:

  • ChartQA: Cream-Vicuna7B achieved 63.0% accuracy, significantly outperforming OCR-GPT4 (34.3%).
  • DocVQA: It reached 79.5%, surpassing specialized models like LayoutLMv3.
  • Inference Speed: Cream is roughly 2x faster than standard OCR-Vicuna pipelines (0.25 sec/sample vs 0.5 sec/sample) because it processes fewer tokens in the LLM stage.

The model also exhibits remarkable robustness; even when 50% of the OCR data was intentionally removed during testing, Cream maintained high performance, proving the vision encoder successfully learned to "read" through contrastive training.

Conclusion

Cream effectively addresses the limitations of current LVLMs in text-rich environments by condensing complex visual and textual information into manageable soft prompts. While currently focused on single-page documents, future work will explore multi-page processing and more sophisticated visual instruction tuning for interactive scenarios.

Summary updated

BibTeX
@inproceedings{kim2023visually,
  author = {Geewook Kim and Hodong Lee and Daehee Kim and Haeji Jung and Sanghee Park and Yoonsik Kim and Sangdoo Yun and Taeho Kil and Bado Lee and Seunghyun Park},
  title = {{Visually-Situated Natural Language Understanding with Contrastive Reading Model and Frozen Large Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-main.735},
}
Figure