Less Is More, but Where? Dynamic Token Compression via LLM-Guided Keyframe Prior

Yulin Li, Haokun Gui, Ziyang Fan, Junjie Wang, Bin Kang, Bin Chen, Zhuotao Tian · DOI

TL;DR

This paper introduces DyToK, a novel training-free method that dynamically compresses visual tokens in Video Large Language Models (VLLMs) by leveraging LLM's inherent attention mechanisms to identify keyframes. This approach significantly improves efficiency and accuracy for long video understanding tasks by intelligently allocating computational resources to semantically important frames, outperforming existing methods.

What Problem Does This Paper Address?

Modern Video Large Language Models (VLLMs) excel at understanding complex video content but face significant challenges with long videos. The quadratic growth in computational cost with increasing visual token sequences leads to excessive overhead, slow inference, and performance degradation due to redundant information. Existing solutions, like keyframe sampling or uniform token compression, are either computationally expensive, suboptimal, or fail to account for the dynamic importance of frames over time. This paper addresses the critical need for an efficient and effective method to compress visual tokens in VLLMs for long videos, preserving crucial information while discarding redundancies.

Methods

DyToK employs a two-stage, training-free approach:

  1. Temporal Importance Estimation: This stage leverages a lightweight assistant LLM to estimate the importance of each frame. It does this by analyzing the attention scores between the last textual query token and visual tokens across specific layers of the LLM. The key insight here is that LLM attention naturally encodes "keyframe priors" that highlight semantically relevant frames. DyToK specifically uses deeper layers for this estimation, as they are found to provide more reliable and task-aware priors.
  2. Dynamic Frame-Level Compression: Based on the estimated frame importance scores, DyToK dynamically allocates token budgets. Frames deemed more important receive a larger share of the total token budget, while less important frames are compressed more aggressively. This dynamic allocation ensures that critical visual information is preserved, leading to better performance. DyToK is designed to be plug-and-play, compatible with existing token pruning methods (both encoder-based and LLM attention-based).

Datasets

The paper evaluates DyToK on several widely-used long video understanding benchmarks:

  • VideoMME: A benchmark with 2,700 human-annotated multiple-choice questions from 900 videos, covering a wide range of spatial scenes and temporal durations.
  • LongVideoBench: Features 6,678 human-curated multiple-choice questions from 3,763 web videos, focusing on a "referring-reasoning" task.
  • EgoSchema: Comprises around 5,000 five-option multiple-choice questions from 250 hours of egocentric footage, emphasizing long-form temporal reasoning.
  • MLVU: Includes 3,102 multiple-choice questions across 9 distinct long-video understanding tasks, testing fine-grained spatial recognition and long-range temporal logic.

The authors also mention experiments on VideoChatGPT for general descriptive queries.

Key Insights and Ideas

  • LLM Attention as a Keyframe Prior: The core insight is that LLM's internal attention mechanisms, particularly in deeper layers, inherently encode valuable "keyframe priors" that can accurately identify semantically relevant frames for a given query. This is observed even when the model's final answer is incorrect.
  • Dynamic Allocation is Crucial: Unlike static compression methods, DyToK's dynamic allocation of token budgets based on frame importance is key to its success. This allows for adaptive compression that respects the varying information content of frames in a video.
  • Deeper Layers for Better Priors: Attention from deeper LLM layers provides more semantically meaningful and task-aware keyframe priors compared to shallower layers.
  • Lightweight Assistant Model for Efficiency: To avoid the computational cost of using the full LLM for keyframe prior extraction, DyToK utilizes a lightweight assistant model, which achieves comparable performance with significantly reduced computational overhead.
  • Temporal Attention Outliers: The paper identifies a phenomenon of "Temporal Attention Outliers," where initial, final, and sometimes mid-sequence frames receive disproportionately high attention regardless of their semantic relevance. DyToK's upper limit on tokens per frame helps mitigate this issue.

Key Results

  • Significant Accuracy Improvements: DyToK consistently improves accuracy across various VLLMs (LLaVA-OneVision, Qwen2.5-VL) and pruning methods (VisionZip, FastV, DyCoke). For example, at 90% compression, DyToK improves VisionZip by up to 20.4% on average.
  • Efficiency Gains: DyToK achieves substantial speedups. For instance, at a 50% retention ratio, it provides a 2.1x speedup, and at 25% retention, it achieves a 4.3x speedup compared to the vanilla model.
  • Robustness Under Aggressive Compression: DyToK demonstrates remarkable robustness even at extreme compression ratios (e.g., 10% retention), preserving significant accuracy where other methods fail.
  • Plug-and-Play Compatibility: DyToK seamlessly integrates with existing encoder-based and LLM attention-based pruning methods, enhancing their performance without requiring re-training.

Limitations and Future Work

  • Limitation: The paper acknowledges that DyToK's current approach involves an additional lightweight assistant model for keyframe prior generation. While this model is efficient, the authors suggest that future work could explore methods to avoid introducing an extra model altogether.
  • Future Work: The authors suggest further optimization to eliminate the need for an auxiliary model. They also imply that further research into understanding and mitigating temporal attention outliers could lead to even more robust and interpretable VLLMs.

Summary updated

BibTeX
@inproceedings{li2025less,
  author = {Yulin Li and Haokun Gui and Ziyang Fan and Junjie Wang and Bin Kang and Bin Chen and Zhuotao Tian},
  title = {{Less Is More, but Where? Dynamic Token Compression via LLM-Guided Keyframe Prior}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=uhFx1RGD1g},
}
Figure