TL;DR
Multimodal Large Language Models (MLLMs) waste significant compute processing task-irrelevant visual tokens. This paper demonstrates that we can safely prune these tokens at the very input stage of the LLM by using a lightweight, 5-layer convolutional network to predict token relevance from the first layer's attention map, slashing KV-cache and prefill times with negligible performance loss.
What Problem Does This Paper Address?
When you pass an image or video into a Multimodal Large Language Model (MLLM), a vision encoder translates that visual data into hundreds or thousands of "visual tokens." Processing all of these tokens through every layer of a large language model creates massive computational and memory overhead, especially for high-resolution images or long videos.
To fix this, researchers have developed "task-related token compression" methods to drop tokens that aren't relevant to the user's prompt. However, previous state-of-the-art methods assumed that visual tokens need to pass through the shallow layers of the LLM first to achieve proper vision-language alignment. As a result, they only prune tokens in the intermediate layers. The authors of this paper challenge this assumption, asking: Can we effectively compress task-related tokens right at the input stage, before the LLM even begins its heavy lifting?
Methods
The authors propose a novel, model-agnostic compression paradigm that operates entirely at the LLM input stage. The approach consists of two main phases:
- Explainability-Driven Ground Truth: The authors use a Transformer explainability method (Generic Attention Explainability) to trace the flow of semantic relevance from the generated text response back to the raw visual inputs. This post-hoc analysis creates a global relevance map ($R_v$) that highlights exactly which visual tokens were crucial for answering the prompt.
- Lightweight Compressor Learning ($f_\theta$): Because generating the true explainability map requires a full forward and backward pass (which is too slow for practical inference), the authors train a standalone, 5-layer 1D depthwise separable convolutional network. This tiny network takes the attention scores from just the first layer of the LLM (specifically, how text tokens attend to visual tokens) and predicts the global relevance map.
During inference, visual tokens are passed to the first LLM layer, the lightweight compressor instantly predicts token importance, and the least relevant tokens are pruned before the rest of the LLM layers process the sequence.
Datasets
The lightweight compressor was trained on subsets of high-quality open-source datasets:
- Images: A subset of ~10K samples from Infinity-MM.
- Videos: A combined subset of ~17K samples from LLaVA-Video, NeXT-QA, and ActivityNetQA.
To prove the method's generalizability, it was evaluated across 13 diverse benchmarks using three leading MLLMs (LLaVA-OneVision, Qwen2-VL, and VILA1.5):
- Image Benchmarks: MME, MMStar, MMVet, SEED-Bench, POPE, TextVQA, MMBench, GQA, ScienceQA, VizWiz, ChartQA, DocVQA, and OCRBench.
- Video Benchmarks: Video-MME, MVBench, MMBench-Video, NExT-QA, and ActivityNetQA.
Key Insights and Ideas
- Input-Stage Pruning is Feasible: Contrary to the prevailing belief that shallow layers are indispensable for cross-modal alignment, this paper proves that the first layer's attention map already contains enough instruction-relevance signals to guide effective pruning.
- The Power of a Simple Mapping: A lightweight 1D CNN can successfully approximate a complex, multi-layer post-hoc explainability map. This means we can reap the benefits of global explainability analysis at a fraction of the computational cost.
- Gradients Matter for Labels: When generating the training labels, weighting the attention maps with gradients (grad-weighted aggregation) yielded significantly better compression performance than simple attention averaging.
Key Results
- Massive Video Token Reduction: On video tasks, the method safely prunes 75% of visual tokens while retaining over 97% of the original performance for both VILA1.5 and LLaVA-OneVision.
- Efficient Image Pruning: For image tasks, 50% of tokens can be removed while maintaining over 96% of baseline performance on Qwen2-VL and LLaVA-OneVision.
- Inference Speedups: By filtering tokens at the input stage, the method achieves a 1.60× speedup in prefilling time and slashes KV-cache memory footprint (e.g., reducing Qwen2-VL's cache from 71.2MB to 17.8MB on the MMStar benchmark).
- Outperforming the Baselines: The proposed framework consistently beats existing intermediate-layer pruning methods like FastV, PyramidDrop, and Dart at comparable FLOP counts.
Limitations and Future Work
The primary limitation is the resource-intensive nature of generating the training data. Because the ground-truth relevance scores rely on backward passes across the entire MLLM, scaling the training data to ultra-high-resolution images or exceptionally long video sequences is computationally expensive.
For future work, the authors plan to explore even stronger compressor architectures and investigate how these explainability-derived relevance scores can be used to dynamically guide token compression during the actual training of the MLLM itself.
Summary updated