Are Bigger Encoders Always Better in Vision Large Models?

Bozhou Li, Hao Liang, Zimo Meng, Wentao ZhangarXiv 2024 · OpenReview

Abstract

Multimodal large language models (MLLMs) have demonstrated significant potential across various applications due to their ability to process and reason with multimodal information. Among these, vision language models (VLMs) are particularly notable for their visual comprehension. However, the scaling dynamics of VLMs under the prevailing "connected vision" paradigm remain under-explored. This study investigates the impact of vision encoder size, Large Language Model (LLM) backbone size, and data quality on VLM performance during the multimodal pretraining stage. Our findings challenge the conventional "bigger is better" assumption, revealing that increasing vision encoder size does not always yield performance gains. Instead, LLM backbone size and data quality emerge as more critical factors for effective multimodal alignment.

Introduction

The current standard for constructing Vision Language Models (VLMs), such as LLaVA, involves a connected vision paradigm: a pre-trained vision encoder (e.g., ViT) is linked to a pre-trained Large Language Model (LLM) via a trainable projector. While scaling laws for LLMs are well-established, their application to the VLM connection phase is less clear. It is often assumed that a larger vision encoder will inherently produce a superior VLM. This research investigates whether this assumption holds or if computational resources are being inefficiently allocated to oversized encoders that the LLM cannot fully exploit.

Methods

The researchers performed 120 experiments focused on the Multimodal Pretraining (MM PT) stage, where visual features are aligned with LLM text embeddings.

  • Architecture: Utilizing the LLaVA-1.5 framework, the vision encoder and LLM backbone were kept frozen, while only a two-layer MLP projector was trained.
  • Scaling Variables:
    • Vision Encoders: Four CLIP-trained ViT models, ranging from 86M to 1.01B parameters.
  • LLM Backbones: Vicuna-7B and Vicuna-13B.
  • Data Volume: Training subsets ranging from 1 million to 10 million image-text pairs.
  • Evaluation: Performance was measured using cross-entropy loss for next-token prediction on a validation set of 25,600 image-text pairs.

Datasets

The study employed two primary datasets:

  1. CC12M (Conceptual 12M): Recognized for high-quality image-text alignment.
  2. LAION-400M: A large-scale dataset from which subsets (1M to 10M) were sampled for comparison.

Key Insights and Ideas

The Encoder Paradox

A significant finding is that the largest encoder (1.01B parameters) does not consistently outperform smaller ones. In several instances, the 632M encoder achieved lower evaluation loss than the 1.01B version. This suggests a bottleneck in projecting massive feature sets into a space the LLM can effectively interpret, rather than a lack of "intelligence" in the encoder itself.

Performance trends for Vicuna-7B on CC12M, showing the performance crossover between 632M and 1.01B encoders.

The Dominance of LLM Capacity

The size of the LLM backbone proved to be a more decisive factor than encoder size. Larger LLMs (13B vs. 7B) consistently achieved better results and reached peak performance more rapidly. This indicates that larger LLMs have a higher capacity for processing visual tokens, regardless of the encoder's scale.

Quality Over Quantity

Data quality significantly impacts alignment. Models trained on the high-quality CC12M dataset consistently outperformed those trained on larger but noisier subsets of LAION-400M, emphasizing that accurate image-text pairing is more valuable than sheer volume during pretraining.

Key Results

The experiments highlight diminishing returns for encoder scaling and the superiority of LLM scaling. For instance, with a Vicuna-7B backbone on CC12M data, the 632M ViT reached a loss of 1.886 at 10M samples, while the 1.01B ViT lagged at 1.909. Conversely, upgrading the LLM backbone from 7B to 13B provided a substantial performance leap.

Evaluation loss for Vicuna-13B on CC12M, highlighting the impact of LLM backbone size.

As shown in the table above, even with the smallest 86M encoder, the 13B LLM achieved a loss of 1.937 at 10M data points—significantly better than the 2.023 loss achieved by the 7B LLM with the same encoder. This disconnect suggests that the standalone superiority of large encoders (e.g., on ImageNet) does not automatically translate to better VLM performance through a simple projector.

Limitations and Future Work

This study focused on the "frozen backbone" paradigm. Future research could investigate whether fine-tuning the encoder or LLM would allow larger encoders to be better utilized. Additionally, the study was limited to text-generative models; "any-to-any" multimodal models might exhibit different scaling behaviors.

The authors also propose a revised computational cost formula for VLMs, as standard $6ND$ estimates are inaccurate when only the projector is updated. The proposed formula, $C \approx 2N_{ViT}D_{img} + 6N_{LLM}(D_{img} + D_{txt})$, better reflects the computational asymmetry between image and text tokens. Exploring more advanced alignment mechanisms beyond MLP projectors remains a promising avenue for unlocking the potential of 1B+ parameter encoders.

Summary updated

BibTeX
@misc{li2024are,
  author = {Bozhou Li and Hao Liang and Zimo Meng and Wentao Zhang},
  title = {{Are Bigger Encoders Always Better in Vision Large Models?}},
  year = {2024},
  eprint = {2408.00620},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.00620},
}
Figure