Dense Connector for MLLMs

Huanjin Yao, Wenhao Wu, Taojiannan Yang, YuXin Song, Mengxi Zhang, Haocheng Feng, Yifan Sun, Zhiheng Li, Wanli Ouyang, Jingdong Wang

Abstract

Multimodal Large Language Models (MLLMs) typically rely on the final layer of a vision encoder, potentially discarding rich spatial and semantic information present in intermediate layers. This paper introduces the Dense Connector (DC), a plug-and-play architecture that integrates multi-layer features from a frozen vision encoder. By employing Dense Channel Integration (DCI), the model achieves state-of-the-art performance across 19 benchmarks. Furthermore, the Efficient Dense Connector enables a 3x inference speedup by maintaining high accuracy with 75% fewer visual tokens.

Introduction

In the rapidly evolving landscape of Multimodal Large Language Models (MLLMs), such as LLaVA and GPT-4V, research has predominantly focused on scaling the linguistic components—utilizing larger Large Language Models (LLMs) or higher-quality instruction-tuning datasets. However, the visual processing side has remained relatively static. Most current models treat the vision encoder, typically a frozen CLIP-style Vision Transformer (ViT), as a black box, extracting only the final high-level features to serve as input for the LLM.

This approach overlooks the wealth of information contained within the intermediate layers of the ViT. These layers capture varying levels of granularity and diverse regions of interest that the final layer might discard. The Dense Connector addresses this by integrating these "offline" features, providing a more holistic visual representation to the LLM without significantly increasing computational overhead.

Methodology

The Dense Connector extracts features from multiple layers of a frozen vision encoder. The authors explored three primary architectural strategies to integrate these features:

  1. Sparse Token Integration (STI): This method selects tokens from various layers and concatenates them. While straightforward, it increases the total token count, which can significantly slow down LLM inference.
  2. Sparse Channel Integration (SCI): This approach concatenates features from different layers along the channel dimension. This maintains the original token count but increases the "width" of each token.
  3. Dense Channel Integration (DCI): Identified as the most effective variant, DCI groups all layers of the vision encoder (e.g., layers 1-12 and 13-24), sums the features within each group, and then concatenates these group-summaries with the final layer features.

The Efficient Dense Connector

To address the "token bottleneck"—where a high volume of visual tokens slows down the LLM—the authors proposed the Efficient Dense Connector. This module utilizes parameter-free 2D bilinear interpolation to downsample visual tokens by 4x (e.g., from 576 to 144) after they have been enriched with multi-layer information via the Dense Connector. This ensures the LLM receives high-density information while processing fewer total tokens.

Experimental Setup

The models were trained using established high-quality pipelines to ensure comparability with existing benchmarks:

  • Pre-training: Utilized LLaVA-1.5 (558K image-text pairs) or Mini-Gemini (1.2M pairs).
  • Instruction Tuning: Utilized LLaVA-1.5 (665K conversations) or Mini-Gemini (1.5M conversations).

Evaluation was conducted across a comprehensive suite of 19 benchmarks, covering image understanding (GQA, VQAv2, ScienceQA, TextVQA, POPE, MathVista, MMBench, MM-Vet, and MMMU) and zero-shot video understanding (MSVD-QA, ActivityNet-QA, MSRVTT-QA, and the Video-ChatGPT benchmark).

Key Insights

  • The "Free Lunch" Concept: Because the vision encoder remains frozen, intermediate features are computed during the standard forward pass. Utilizing them is computationally "free" in terms of primary vision processing.
  • Layer Diversity: Analysis of attention maps reveals that early layers focus on different image regions compared to later layers. Combining these provides a more comprehensive "visual cue" for the LLM.
  • Channel vs. Token Scaling: The research suggests that increasing the informational richness of each token (via channel concatenation) is often more efficient than simply increasing the number of tokens.

Results and Discussion

The Dense Connector demonstrated significant performance improvements across the board:

  • Performance Gains: Integrating the Dense Connector into LLaVA-1.5 improved scores by 2.7% on ScienceQA and 2.5% on MMBench without adding extra parameters to the LLM.
  • Inference Efficiency: The Efficient Dense Connector achieved performance parity with the full LLaVA-1.5 model while using only 25% of the visual tokens, resulting in a 3x inference speedup.
  • Scalability: The method scales effectively to larger architectures. A 70B Llama-3-based model using the Dense Connector achieved 82.4% on ScienceQA and 79.4% on MMBench.
  • Zero-Shot Video Prowess: By enriching the image representation, the model excelled at video frame understanding without explicit video training. The DC+FreeVA (34B) model set new state-of-the-art records on MSVD-QA (77.4%) and MSRVTT-QA (62.1%).

Conclusion

The Dense Connector represents a significant step in optimizing the visual interface of MLLMs. By leveraging the internal representations of pre-trained vision encoders, it provides a substantial performance boost and efficiency gains. Future work will likely explore more sophisticated alignment techniques between visual and linguistic spaces and the application of Dense Connectors in native video training contexts.

Summary updated

BibTeX
@inproceedings{yao2024dense,
  author = {Huanjin Yao and Wenhao Wu and Taojiannan Yang and YuXin Song and Mengxi Zhang and Haocheng Feng and Yifan Sun and Zhiheng Li and Wanli Ouyang and Jingdong Wang},
  title = {{Dense Connector for MLLMs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=Ioabr42B44},
}
Figure