TL;DR
This paper introduces VisiPruner, a novel framework that significantly reduces computational costs in multimodal Large Language Models (MLLMs) by understanding and exploiting their discontinuous, three-stage cross-modal processing. By identifying that shallow layers act as attention sinks and deep layers discard visual information, VisiPruner prunes redundant visual tokens, achieving up to 99% reduction in visual attention computation and 53.9% FLOPs reduction while maintaining performance.
What Problem Does This Paper Address?
Multimodal Large Language Models (MLLMs) excel at tasks combining vision and language, but their computational demands are substantial. This is largely due to the quadratic complexity of attention mechanisms with the number of visual tokens. While existing methods try to prune these tokens, they often lack a deep understanding of how MLLMs actually process and integrate visual information across their layers. This paper aims to bridge this gap by systematically analyzing the cross-modal dynamics within MLLMs to develop a more efficient and principled pruning strategy.
Methods
The core of VisiPruner lies in its systematic analysis of MLLM layer-wise processing, revealing a three-stage cross-modal interaction:
- Shallow Layers (Task Recognition): Visual tokens act as "attention sinks," stabilizing attention distributions but not contributing to meaningful fusion. The model primarily uses text to recognize the task.
- Middle Layers (Sparse Grounding): This is where true cross-modal fusion happens, driven by a small subset of critical visual tokens. The paper proposes an "influence-based" method to identify these tokens, moving beyond simple attention weights to measure their impact on the output.
- Deep Layers (Linguistic Refinement): Visual information is largely discarded, and the model focuses on refining the linguistic output.
Based on these insights, VisiPruner implements a training-free pruning framework:
- Shallow Layers: Merges visual attention into a single token in the first layer (attention sink) and skips cross-attention computation in subsequent shallow layers.
- Middle Layers: Employs an adaptive strategy to retain only the most influential visual tokens identified through cosine similarity and L2 distance metrics.
- Deep Layers: Discards vision tokens entirely once fusion is complete, identified by a "vision exit layer."
Datasets
The paper evaluates VisiPruner on several standard multimodal benchmarks, including:
- GQA (Visual Question Answering)
- MMStar (Multimodal Understanding)
- MMBENCH (Multimodal Benchmarking)
- VQAT (Visual Question Answering Task)
- POPE (Object Hallucination Benchmark)
- TextVQA (OCR Benchmark)
The primary model used for analysis and demonstration is LLaVA-v1.5 7B.
Key Insights and Ideas
- Counter-intuitive Shallow Layer Role: Contrary to common assumptions, shallow layers don't fuse visual and textual information. Instead, visual tokens act as passive "attention sinks" to stabilize the model's internal workings, a role that can be significantly reduced without performance loss.
- Sparse Fusion in Middle Layers: Cross-modal fusion isn't a broad process but is driven by a small, critical set of visual tokens in the middle layers. This sparsity is key to efficient pruning.
- Attention Weights are Misleading: Simple attention scores are insufficient to identify important visual tokens. The paper demonstrates that masking highly attended tokens has little impact, while their actual influence on the output (measured by cosine similarity and L2 distance) is a better indicator.
- Discontinuous Vision Dependence: Vision is not continuously required throughout the model. There's a clear transition point where visual information becomes redundant, allowing for its complete removal in deeper layers.
Key Results
- Significant Computation Reduction: VisiPruner achieves up to 99% reduction in vision-related attention computations and 53.9% reduction in overall FLOPs on LLaVA-v1.5 7B.
- Performance Preservation: Despite aggressive pruning, VisiPruner maintains competitive performance across various benchmarks, often outperforming existing token pruning methods. For example, on GQA, performance drops minimally (e.g., 61.95 to 61.3).
- Generalization: The framework demonstrates effectiveness across diverse MLLMs, including LLaVA-v1.5 13B, MobileVLM-V2-3B, Qwen2-VL 7B, and InternVL2.5-8B.
- Actionable Guidelines: The research provides practical insights for designing more efficient MLLMs by aligning their architecture with their intrinsic layer-wise processing dynamics.
Limitations and Future Work
- Hardware Constraints: The analysis was limited to models up to 13 billion parameters due to hardware constraints. Future work could explore larger models.
- Projector Alignment: Training the projector to align vision tokens with semantic representations until later layers could further strengthen the findings regarding shallow layer processing.
- Training Integration: While VisiPruner is training-free, embedding these principles directly into MLLM training pipelines could further optimize performance-efficiency trade-offs.
Summary updated