Abstract
Large Vision-Language Models (LVLMs) demonstrate a significant performance decline as textual context length increases, a phenomenon attributed to the dilution of visual dependency. This paper investigates the "language prior trap," where models rely on textual patterns rather than visual cues in long dialogues. We propose a training-free context pruning method that identifies and removes low-importance textual tokens based on shallow-layer attention weights. Our approach improves reasoning accuracy by up to 22% while reducing inference latency by approximately 50%.
Introduction
While Large Language Models (LLMs) have evolved to handle massive context windows, their multimodal counterparts (LVLMs) struggle to maintain visual focus during extended interactions. As the textual history grows, the attention mechanism normalizes weights across an increasing number of tokens, effectively "diluting" the signal from visual tokens. This leads to a sharp decline in performance, with some models experiencing up to a 17% drop in accuracy as context length increases from 0.5k to 2.5k tokens.
The researchers identify this as a failure of visual dependency. In long-context scenarios, models often fall into a "language prior trap," where they hallucinate answers based on linguistic patterns in the dialogue history rather than the actual image content. Interestingly, experiments replacing images with solid blocks showed that models sometimes perform better without visual input in long contexts, confirming they are "cheating" by ignoring pixels.
Methodology: Training-Free Context Pruning
To address this, we introduce a strategy to "denoise" the input context without requiring additional training or fine-tuning. The method is built on the observation that cross-modal interaction is front-loaded in the Transformer architecture; shallow layers are primarily responsible for mapping text to visual regions, while deeper layers handle linguistic reasoning.
The pruning process follows four key steps:
- Attention Analysis: Attention weights are calculated in the first $m$ layers to identify which textual tokens are actively interacting with visual data.
- Importance Scoring: Weights are aggregated across multiple heads using max-pooling to assign a global importance score to each textual token.
- Selective Pruning: The bottom $n\%$ of textual tokens—the "noise"—are removed. Crucially, visual tokens are never pruned, ensuring the model retains full access to the original image data.
- Concentrated Attention: Mathematically, reducing the number of low-importance tokens reduces the entropy of the attention distribution, forcing the model to re-focus on the remaining visual and textual cues.
Experimental Results
Benchmarks
The method was evaluated on SVIT-Long, a new benchmark containing over 15,000 samples with context lengths up to 2.5k tokens, and MMDU, a multi-turn dialogue benchmark used to test scalability across model sizes from 7B to 34B parameters.
Key Findings
- Accuracy Gains: The pruning method yielded massive improvements. DeepSeek-VL achieved a performance jump of 22.43% at the 2.0k context mark, while ViP-LLaVA improved by over 17% at 1.5k context.
- Efficiency: By reducing the sequence length, the method cuts inference time by roughly 50% compared to baseline models.
- Visual Stability: Analysis showed that visual dependency is more stable when target objects are large. Small, "needle-in-a-haystack" visual details are the first to be ignored as text length grows, making pruning essential for fine-grained tasks.
- Scalability: The performance gap between the pruned method and the baseline widens as model size increases, suggesting that larger models benefit more from context denoising.
Conclusion and Future Work
Context pruning acts as more than just a compression tool; it serves as a functional denoiser that restores visual dependency in LVLMs. While this study establishes a preliminary "Token Pruning Scaling Law," future work will explore dynamic pruning rates that adjust on-the-fly based on task complexity. This training-free approach offers a scalable path toward more robust and efficient long-context multimodal reasoning.
Summary updated