Abstract
Large Vision-Language Models (LVLMs) typically rely on CLIP-style vision encoders, which excel at general object recognition but struggle with dense, fine-grained visual data such as documents and charts. This "out-of-vocabulary" problem limits their utility in specialized domains. We introduce Vary, a novel framework designed to scale the vision vocabulary of LVLMs. Vary employs a two-stage process: first, a "vocabulary network" is trained (Vary-tiny) to tokenize dense visual information using a Segment Anything Model (SAM) backbone; second, this new vocabulary is integrated into a larger LVLM (Vary-base) alongside the original CLIP encoder. This dual-branch approach allows the model to handle high-resolution document parsing and complex chart reasoning without compromising general multimodal performance. Experimental results demonstrate that Vary achieves significant improvements in OCR and ChartQA, outperforming existing models like LLaVA-1.5.
Introduction
Current state-of-the-art LVLMs, such as LLaVA or MiniGPT-4, almost exclusively utilize CLIP-style vision encoders. While CLIP is highly effective for recognizing general objects in natural scenes, it acts as a low-resolution "dictionary" when confronted with dense text, complex charts, or non-English documents. For these specialized tasks, CLIP encounters a fundamental "out-of-vocabulary" problem; it was not trained to tokenize the fine-grained details required for document-level OCR or markdown conversion.
Simply unfreezing CLIP during training often leads to catastrophic forgetting or inefficient learning. Vary addresses this by treating vision vocabulary expansion similarly to text vocabulary expansion: if a model needs to learn a "new language" (such as dense document structures), it requires new tokens.
Methodology
The authors propose a two-stage framework to "write" and then integrate a new vision vocabulary.
Stage 1: Vocabulary Generation (Vary-tiny)
To create the new vocabulary, the researchers utilize a "vocabulary network" based on the Segment Anything Model (SAM) ViT-base. Unlike CLIP, which focuses on global semantics, SAM is designed for localization, making it a superior candidate for fine-grained perception. This network is paired with a tiny decoder (OPT-125M) and trained via autoregression to "read" documents and charts. During this phase, the model learns to compress high-resolution (1024x1024) visual information into meaningful new tokens. To ensure the new vocabulary does not introduce noise into natural image processing, COCO images are included as "negative samples."
Stage 2: Vocabulary Integration (Vary-base)
Once the new vocabulary is established, it is integrated into a larger LVLM. Vary-base employs two parallel vision branches: the original CLIP-L (for general concepts) and the newly created Vary-tiny branch (for fine-grained details). The features from both branches are concatenated and fed into a large language model, such as Vicuna-7B or Qwen-7B. Crucially, the vision encoders remain frozen during this phase, forcing the LLM to learn how to utilize the expanded vocabulary without overwriting existing general knowledge.
Data Strategy
The success of Vary relies on a robust "data engine" to generate high-quality training samples:
- Vary-tiny Training: Utilizes 1 million English and 1 million Chinese document image-text pairs extracted from PDFs, alongside 750k rendered charts (using matplotlib and pyecharts).
- Vary-base Training: Incorporates synthetic LaTeX documents (0.9M total), 200k high-quality charts generated via GPT-4, and standard general-purpose datasets like LAION-COCO (4M) and LLaVA-SFT data.
Key Results
Vary demonstrates significant leaps in specialized perception without sacrificing general intelligence:
- Document Parsing: On a custom OCR test set, Vary-base achieved a 0.181 Edit Distance and 81.10% F1-score, outperforming specialized models like Nougat.
- DocVQA: The model achieved 78.2% ANLS, showing a strong ability to reason over document images.
- General Benchmarks: On MMVet, Vary scored 36.2%, outperforming LLaVA-1.5-7B (30.5%), proving that the added vision vocabulary enhances general multimodal reasoning.
- Qualitative Performance: The model can convert complex documents directly into Markdown or LaTeX and transform charts into Python dictionaries with high fidelity.
Conclusion and Future Work
Vary proves that scaling the vision vocabulary is a viable path for improving LVLM performance on dense data. By choosing SAM for its localization strengths and using a dual-branch architecture, the model bridges the gap between general scene understanding and specialized document/chart parsing. Future work will explore more efficient ways to merge these vocabularies beyond simple concatenation and investigate other specialized "visual languages," such as medical or satellite imagery.
Summary updated