Dragonfly: Multi-Resolution Zoom Supercharges Large Visual-Language Model

Kezhen Chen, Rahul Thapa, Rahul Chalamala, Ben Athiwaratkun, Shuaiwen Leon Song, James Zou · DOI

Abstract

Dragonfly is a Vision-Language Model (VLM) designed to address the "blurry vision" limitation of fixed-resolution Vision Transformers. By employing a multi-resolution zoom-in strategy combined with a simple mean-pooling token aggregation, Dragonfly achieves state-of-the-art performance in fine-grained tasks such as OCR, chart understanding, and biomedical image analysis. With 8 billion parameters, it outperforms significantly larger models on benchmarks like ChartQA and SLAKE.

Introduction

Most modern VLMs rely on fixed-resolution Vision Transformers (ViTs), such as CLIP, which were trained on relatively small images (e.g., 224px or 336px). When these models encounter high-resolution images containing small text, complex charts, or tiny objects, the images must be downsampled, leading to a loss of critical detail. While "multi-crop" strategies have been explored to preserve native resolution, existing models still struggle with the fine-grained details necessary for professional or technical tasks. Furthermore, increasing resolution often leads to an explosion in visual tokens, overwhelming the Large Language Model (LLM) and increasing computational costs.

Methods

The authors introduce a Multi-Resolution Zoom-In approach. Instead of just trying to match the original image's resolution, Dragonfly magnifies regions of the image to extract features that the ViT would otherwise miss.

Triple-Stream Encoding

The model processes an image at three levels:

  1. Low: A global view of the entire image (336x336).
  2. Medium: The image divided into 4 crops.
  3. High: The image divided into 36 crops, effectively "zooming in" on sub-regions.

Mean-Pooling Aggregation

To prevent the LLM from being buried under thousands of tokens, Dragonfly applies a simple mean-pooling layer with a stride of 4. This compresses each 576-token crop into just 36 tokens, maintaining efficiency while preserving essential features.

The Dragonfly architecture utilizes triple-stream encoding and mean-pooling to process high-resolution images efficiently.

Architecture and Training

Dragonfly uses Llama-3.1-8B-Chat as the language backbone and CLIP ViT-L/14@336px as the image encoder. Training occurs in two stages: vision-language alignment using 558K pairs, followed by supervised fine-tuning (SFT) on a massive, curated dataset of 2 million general samples and 1.4 million biomedical samples.

Key Results

Dragonfly consistently ranks at the top of the 7-8B parameter class. It achieved 71.2% on ChartQA and 73.6% on VQAv2, outperforming models that are significantly larger or trained on much more data.

Dragonfly excels at complex chart understanding tasks, a key benchmark for fine-grained visual reasoning.

In the biomedical domain, Dragonfly-Med set new records, achieving 91.6% accuracy on SLAKE (beating Google’s Med-Gemini at 84.8%) and a 67.1 F1 score on Path-VQA (beating Med-PaLM M at 62.7%).

Discussion and Conclusion

The most striking insight is that zooming in beyond native resolution helps. Magnification allows the ViT to focus its attention on local features that are ignored in a global view. While simple mean-pooling proved more effective than complex "Perceiver" architectures, the vision encoder remains a bottleneck due to the processing of 41 separate sub-crops. Future work should move toward "any-resolution" vision architectures that can natively process images of varying scales.

Dragonfly demonstrates that strategic resolution management and simple aggregation can push the boundaries of what 8B-parameter models can achieve in specialized and fine-grained visual tasks.

Code and models are available at: https://github.com/togethercomputer/Dragonfly

Summary updated

BibTeX
@misc{chen2024dragonfly,
  author = {Kezhen Chen and Rahul Thapa and Rahul Chalamala and Ben Athiwaratkun and Shuaiwen Leon Song and James Zou},
  title = {{Dragonfly: Multi-Resolution Zoom Supercharges Large Visual-Language Model}},
  year = {2024},
  eprint = {2406.00977},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.00977},
}
Figure