Scaling Vision-Language Models with Sparse Mixture of Experts

Sheng Shen, Zhewei Yao, Chunyuan Li, Trevor Darrell, Kurt Keutzer, Yuxiong He

Abstract

Large-scale Vision-Language Models (VLMs) have demonstrated remarkable capabilities but suffer from high computational costs due to their dense architectures. This paper introduces VL-MoE, a framework that leverages Sparse Mixture of Experts (MoE) to scale VLMs efficiently. By activating only a fraction of the model's parameters for any given input, VL-MoE achieves state-of-the-art performance on multimodal benchmarks while keeping computational costs equivalent to much smaller dense models.

Introduction

The evolution of foundation models has led to massive architectures like Flamingo (80B) and PaLI (17B). While these models exhibit sophisticated reasoning, their "dense" nature—where every parameter is utilized for every calculation—makes training and deployment prohibitively expensive.

Mixture of Experts (MoE) has emerged as a solution for scaling language or vision models independently by routing data to specialized sub-networks. However, applying MoE to generative multimodal models presents unique challenges in load balancing and stability. VL-MoE addresses these hurdles, providing a scalable path for versatile, generative vision-language modeling.

The VL-MoE Framework

VL-MoE is built upon the "Multiway Transformer" (MOME) architecture, which allows for flexible processing of different input modalities. The core innovation lies in the integration of modality-specific expert pools and sparse gating mechanisms.

Modality-Specific Experts

Instead of a one-size-fits-all approach, the model uses pools of experts specialized for different data types:

  • V-FFN: Specialized for vision tokens.
  • T-FFN: Specialized for language tokens.
  • VL-FFN: Dedicated to multimodal fusion in later layers.

Sparse Gating and Routing

In the early layers of the network, a "router" directs image tokens to one of $E$ vision experts and text tokens to one of $E$ language experts. The researchers employed Top-1 routing, ensuring that only the single best expert is activated per token, which significantly reduces the active parameter count during inference.

The VL-MoE architecture supports three encoding modes (a-c) and utilizes modality-specific MoE blocks (d) for efficient scaling.

Training Stability

To mitigate the inherent instability of MoE training, the authors introduced Batch Priority Routing (BPR) and a specialized auxiliary loss (dubbed "vloss"). These mechanisms ensure balanced expert utilization and prevent training crashes, which are common when scaling sparse models.

Experimental Results and Insights

The model was pre-trained on a diverse corpus including ImageNet-22K, Wikipedia, and 10 million image-text pairs. Evaluation across benchmarks such as VQA v2.0, NLVR2, and COCO retrieval demonstrated that VL-MoE consistently outperforms previous base-size models like ViLT and ALBEF.

Key Findings

  • Efficiency Gains: A VL-MoE model with 1.8 billion total parameters only uses 560 million parameters per token. This allows it to match or beat dense models that are 3-4x more computationally expensive.
  • Balanced Scaling: Scaling both vision and language experts simultaneously is crucial. Focusing on a single modality improves specific tasks but hinders general multimodal reasoning.
  • Natural Specialization: Analysis of the routers revealed that experts naturally "learned" to specialize. Vision experts focused on specific features like faces or OCR text, while language experts differentiated between syntax and semantics.

Conclusion

VL-MoE proves that sparse MoE is a viable and efficient strategy for scaling generative multimodal models. While the current work successfully scaled modality-specific experts, future research is needed to scale multimodal fusion experts (VL-FFN) without introducing instability. Additionally, testing these architectures at "web-scale" (billions of pairs) remains a critical next step for the field.

Summary updated

BibTeX
@inproceedings{shen2023scaling,
  author = {Sheng Shen and Zhewei Yao and Chunyuan Li and Trevor Darrell and Kurt Keutzer and Yuxiong He},
  title = {{Scaling Vision-Language Models with Sparse Mixture of Experts}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.758},
}
Figure