FoPru: Focal Pruning for Efficient Large Vision-Language Models

Lei Jiang, Weizhe Huang, Tongxuan Liu, Yuting Zeng, Jing Li, Lechao Cheng, Xiaohua XuarXiv 2024 · DOI

Introduction

Large Vision-Language Models (LVLMs), such as LLaVA, have demonstrated remarkable capabilities in multimodal understanding. However, these models face significant computational challenges due to the "visual tax"—the high number of visual tokens generated by vision encoders like CLIP. Since Transformer complexity scales quadratically with token count, processing hundreds of image patches leads to slow inference and high memory usage. Existing compression methods often require expensive retraining or fine-tuning. In response, we present Focal Pruning (FoPru), a training-free, plug-and-play method that reduces visual tokens by up to 75% with minimal impact on accuracy.

Methodology: The FoPru Pipeline

FoPru operates as an intermediate module between the vision encoder and the LLM, processing tokens in three distinct stages before they reach the language model:

  1. Token Significance Calculation: FoPru identifies critical tokens by analyzing the attention maps of the vision encoder's penultimate layer. The significance score is derived by averaging attention weights across heads and dimensions, creating a robust importance map for the image.
  2. Token Pruning: Two strategies are employed to decide which tokens to retain:
  3. Rank Strategy: Selects the top $N$ tokens globally based on significance scores, which is ideal for general object recognition.
  4. Row Strategy: Selects tokens in structured horizontal rows to preserve spatial continuity, a feature crucial for tasks involving reading text (OCR).
  5. Token Reordering: Remaining tokens are re-indexed to maintain their original relative spatial positions, ensuring the LLM receives a coherent representation.
The FoPru pipeline: from input visual tokens and attention maps to pruned and reordered outputs.

Key Insights: Attention Concentration and "Mode Collapse"

A core discovery driving FoPru is the phenomenon of "mode collapse" in deep layers of vision encoders. As information passes through the layers, attention weights become increasingly concentrated. By the final layers, over 80% of the attention is focused on less than 25% of the tokens. This concentration indicates that a large portion of visual tokens are effectively "dead weight" before they even reach the LLM.

Attention maps across different layers of the vision encoder, illustrating the concentration of attention weights in deeper layers.

Experimental Results

FoPru was evaluated across seven diverse benchmarks, including POPE (hallucination), MMMU (university-level knowledge), ScienceQA (SQA), and TextVQA.

Efficiency and Performance

For the LLaVA-1.6-13B model, retaining only 25% of tokens resulted in a 2.52x speedup in Time To First Token (TTFT) and a 1.24x speedup in Time Per Output Token (TPOT). Despite this drastic reduction, accuracy remained within a 1% margin on MMMU, SQA, and POPE. On extreme benchmarks like Ai2D, the model maintained roughly 60% accuracy even when pruned down to just 5 tokens (a 0.2% retention ratio).

Pruning as a Denoiser

Interestingly, pruning occasionally improved performance on datasets like MMMU and POPE. This suggests that redundant tokens can sometimes act as noise, and removing them helps the LLM focus on the most salient visual features.

Strategy Trade-offs

While the Rank strategy excels at identifying discrete objects, the Row strategy is essential for text-heavy tasks. OCR performance is generally more sensitive to pruning, as character recognition relies heavily on local horizontal context which can be broken by global pruning.

Conclusion

FoPru provides a highly efficient, training-free solution for accelerating LVLMs. By leveraging internal attention mechanisms to prune redundant visual information, it achieves significant speedups while maintaining high fidelity. Future work will explore adaptive pruning ratios that dynamically adjust based on image complexity and integration with other compression techniques like quantization.

Summary updated

BibTeX
@misc{jiang2024fopru,
  author = {Lei Jiang and Weizhe Huang and Tongxuan Liu and Yuting Zeng and Jing Li and Lechao Cheng and Xiaohua Xu},
  title = {{FoPru: Focal Pruning for Efficient Large Vision-Language Models}},
  year = {2024},
  eprint = {2411.14164},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.14164},
}
Figure