Vision-Language Models (VLMs) like LLaVA are incredible at "seeing" and "reasoning," but they come with a heavy computational tax. Because they process high-resolution images as hundreds of individual tokens, they are significantly slower and more memory-hungry than their text-only counterparts.
A new paper, titled "CoreMatching," suggests we’ve been looking at efficiency all wrong. While previous researchers tried to speed up models by either pruning redundant image tokens or skipping inactive neurons, they treated these as two separate problems. This paper proves they are deeply linked, offering a "co-adaptive" framework that achieves a staggering 10× speedup on consumer-grade hardware.
TL;DR
CoreMatching is the first framework to exploit the synergy between token sparsity (removing redundant image parts) and neuron sparsity (skipping inactive FFN layers). By identifying "Core Tokens" that activate the most "Core Neurons," the framework achieves a 5× reduction in FLOPs and up to a 10× speedup with near-lossless accuracy.
What Problem Does This Paper Address?
The bottleneck in VLMs is two-fold:
- Token Redundancy: Images contain a lot of "filler." Processing every pixel-patch (token) through every layer is wasteful.
- Computational Density: The Feed-Forward Network (FFN) layers in Transformers are massive, but in practice, only a tiny fraction of neurons (often <10%) actually fire for a given input.
Existing solutions are "siloed." Token pruning methods usually rely on attention scores, which can be noisy and inaccurate. Neuron sparsity methods focus on the model's internal weights but ignore the input's spatial redundancy. The authors asked: Do these two paradigms operate in isolation, or is there a deeper interplay?
Methods
The authors introduce CoreMatching, a training-free, plug-and-play framework. The process works in two main stages:
- Identifying Core Neurons: During the "pre-filling" stage (when the model first looks at the image and prompt), the system identifies which neurons in the FFN layers are most frequently and strongly activated. These are the "Core Neurons"—the heavy hitters for that specific task.
- Deriving Core Tokens: Instead of using simple attention scores to prune images, CoreMatching looks for tokens that activate the largest number of these Core Neurons. These "Core Tokens" are deemed the most critical for the final output.
- Projection-guided Criterion: The authors developed a new mathematical metric for token importance. Unlike standard methods that only look at the magnitude of attention, this criterion considers the angle (cosine similarity) between vectors, filtering out "noisy" tokens that attention scores might accidentally keep.
- Adaptive Pruning: Using a "knee" threshold (maximum geometric distance), the model automatically decides how many tokens to keep based on the complexity of the input, rather than using a hard-coded percentage.
Datasets
The framework was evaluated across a massive battery of benchmarks:
- Image Understanding: VQAv2, GQA, SciQA, TextVQA, POPE, MME, MMBench, SEED, VisWiz, and MM-Vet.
- Video Reasoning: MSVD-QA, MSRVT-QA, and ActivityNet-QA.
- Models: Primarily LLaVA-1.5 (7B and 13B), but also tested on the newer Qwen2.5-VL and LLaMA-3.2 architectures.
Key Insights and Ideas
- The "Aha!" Moment: The researchers discovered that tokens and neurons mutually reinforce each other. A token is "important" precisely because it activates the neurons that the model relies on for inference. This alignment means you can use neuron activation patterns as a high-fidelity map for pruning tokens.
- Attention is Not Enough: The paper demonstrates that standard attention scores ignore angular information. Two tokens might have high attention weights, but if one's vector points in a direction that doesn't align with the model's "Core Neurons," it’s essentially noise.
- Dynamic Scaling: CoreMatching is "input-adaptive." For a simple question (e.g., "What color is the sky?"), it might retain only a few tokens. For a complex reasoning task, it keeps more. This flexibility allows for maximum speed without sacrificing "brainpower" when it's actually needed.
Key Results
- Massive Speedups: On an NVIDIA Titan Xp, CoreMatching achieved a 10.33× overall speedup and a 5× reduction in FLOPs.
- Efficiency: It achieved a 2.1× speedup in the pre-filling stage and a 9.2× speedup during the decoding (text generation) stage.
- Lossless Performance: On datasets like VQAv2 and GQA, the model maintained original accuracy while using only 10% of the original image tokens. In some cases, the pruned model actually outperformed the full model by removing distracting, irrelevant image data.
- Memory Savings: The framework significantly reduced the KV cache size, allowing for longer conversations on devices with limited VRAM.
Limitations and Future Work
- Architectural Constraints: In models like LLaMA-3.2, which use "cross-attention" layers, the activation layers cannot be used as easily to guide token pruning. This suggests the method needs refinement for specific non-standard architectures.
- Hardware Specifics: While the speedups are massive on older hardware (Titan Xp), the relative gains are slightly lower on high-end hardware like the A100, though still significant.
- Future Directions: The researchers suggest exploring how this "co-adaptive" approach could be integrated into the training process itself (sparse training) rather than just being used for post-training inference.
Summary updated