TL;DR
Large Vision-Language Models (LVLMs) are powerful but computationally expensive due to their large number of visual tokens. This paper introduces PLPHP, a novel two-level pruning method that dynamically removes less important visual tokens at both the layer and attention head levels. PLPHP significantly speeds up inference and reduces memory usage with minimal performance loss, making LVLMs more practical.
What Problem Does This Paper Address?
Modern Large Vision-Language Models (LVLMs) excel at tasks requiring understanding and reasoning across images and text. However, a major bottleneck is their inference efficiency. This is largely due to the massive number of visual tokens generated from input images, which are then processed by the language model's decoder. Previous attempts at pruning these visual tokens often used coarse-grained strategies, like removing tokens uniformly across all layers or heads. This could lead to significant performance degradation, especially on complex tasks that require nuanced visual understanding. The core problem is how to efficiently reduce the computational burden of visual tokens without sacrificing the model's ability to comprehend visual information.
Methods
PLPHP tackles this problem with a two-level, fine-grained pruning approach:
- Layer-Level Retention Rate Allocation: This level dynamically determines how many visual tokens to keep for each decoder layer. The authors observed a "Vision Token Re-attention" phenomenon, where some deeper layers actually increase their attention to visual information after initially decreasing it. To account for this, PLPHP calculates a "Vision Attention Score" for each layer. Layers with higher scores (more attention to vision) retain a larger percentage of their visual tokens, while layers with lower scores are pruned more aggressively. This is achieved by categorizing layers into "vision-attentive," "vision-indifferent," and "vision-balanced" based on their attention scores and assigning a specific retention rate to each category.
- Head-Level Vision Token Pruning: Within each layer, PLPHP further refines pruning at the attention head level. This is motivated by the observation that different attention heads within the same layer focus on different aspects of the input. For each head, PLPHP identifies the visual tokens with the highest attention scores and retains only a proportion (determined by the layer-level retention rate) of these most important tokens. This allows for selective pruning, preserving critical contextual information that might be missed by a uniform pruning strategy. The pruning is applied to the Key-Value (KV) cache, which is crucial for efficient decoding.
PLPHP is designed as a "plug-and-play" module, meaning it can be integrated into existing LVLM architectures without requiring extensive retraining.
Datasets
The paper evaluates PLPHP on a variety of benchmarks, focusing on tasks that are sensitive to visual understanding and efficiency:
- Multi-Image Benchmarks:
- LLaVA-NeXT-Interleave-Bench (subsets: Spot-the-Diff, Image-Edit, Visual-Story-Telling, Multi-View): These are comprehensive benchmarks designed to test LVLMs on complex multi-image reasoning and understanding tasks.
- Single-Image Benchmarks:
- Flickr30k: A standard dataset for image captioning.
- COCO 2017 Caption: Another widely used dataset for image captioning.
- DetailCaps4870: A dataset with more fine-grained descriptions, particularly useful for efficiency analysis due to its longer generation content.
The authors also mention using LLaVA-OneVision-7B as their primary model for experiments, with additional evaluations on Qwen2-VL, IDEFICS2, and Mantis to demonstrate generality.
Key Insights and Ideas
- Vision Token Re-attention is Crucial: The discovery that LVLMs don't uniformly decrease attention to visual tokens in deeper layers, but rather sometimes re-focus, is a key insight. This challenges simpler pruning strategies and justifies the need for layer-specific adaptation.
- Attention Heads Have Distinct Roles: The observation that different attention heads focus on different visual aspects is critical. This supports the idea of head-level pruning, allowing for more nuanced retention of information.
- Fine-Grained Pruning is Key to Efficiency Without Performance Loss: PLPHP's success hinges on its ability to dynamically adjust pruning at both the layer and head levels. This fine-grained control allows it to discard redundant information effectively while preserving what's essential for understanding.
- Multi-Image Tasks Benefit Significantly: The paper highlights that PLPHP not only maintains performance but can even improve it on multi-image tasks. This suggests that the redundancy in visual information in such tasks can be detrimental, and PLPHP's pruning helps to streamline the model's focus.
Key Results
PLPHP demonstrates impressive efficiency gains with minimal performance impact:
- Decoding Speed: Achieves an 18% faster decoding speed.
- KV Cache Size: Reduces the KV Cache size by over 50%.
- Performance Degradation: Exhibits a very low average performance drop of only 0.46% across various benchmarks.
- Multi-Image Performance: Achieves notable performance improvements on multi-image tasks, even surpassing the uncompressed model by 0.51% on average across specific benchmarks.
- Generality: The method shows effectiveness across different LVLM architectures (Qwen2-VL, IDEFICS2, Mantis), achieving significant KV cache compression (e.g., 57% on average for two models).
Limitations and Future Work
- Hyperparameter Sensitivity: While PLPHP is robust, the paper acknowledges that parameters like
r(retention rate) andAr(dynamic adjustment range) influence performance and efficiency. The ablation studies show that while adaptive pruning is superior, there's a trade-off between aggressive pruning (lowerr) and performance. - Focus on Inference: The current work focuses on improving inference efficiency. Future work could explore how these pruning strategies might be integrated into the training process itself for even greater gains.
- Further Exploration of Re-attention: While the paper identifies Vision Token Re-attention, further in-depth analysis of why and how this phenomenon occurs across different architectures could lead to even more sophisticated pruning techniques.
- Broader Model Architectures: While tested on several models, extending PLPHP to an even wider range of LVLM architectures and modalities could further solidify its generality.
Summary updated