Adaptive Keyframe Sampling for Long Video Understanding

Xi Tang, Jihao Qiu, Lingxi Xie, Yunjie Tian, Jianbin Jiao +1 more
2/28/2025
cs.CVcs.AIcs.LG

Official code: ncTimTang/AKS (228 stars, last commit 2025-12-19). 1 more implementation below.

Abstract

Multimodal large language models (MLLMs) have enabled open-world visual understanding by injecting visual input as extra tokens into large language models (LLMs) as contexts. However, when the visual input changes from a single image to a long video, the above paradigm encounters difficulty because the vast amount of video tokens has significantly exceeded the maximal capacity of MLLMs. Therefore, existing video-based MLLMs are mostly established upon sampling a small portion of tokens from input data, which can cause key information to be lost and thus produce incorrect answers. This paper presents a simple yet effective algorithm named Adaptive Keyframe Sampling (AKS). It inserts a plug-and-play module known as keyframe selection, which aims to maximize the useful information with a fixed number of video tokens. We formulate keyframe selection as an optimization involving (1) the relevance between the keyframes and the prompt, and (2) the coverage of the keyframes over the video, and present an adaptive algorithm to approximate the best solution. Experiments on two long video understanding benchmarks validate that Adaptive Keyframe Sampling improves video QA accuracy (beyond strong baselines) upon selecting informative keyframes. Our study reveals the importance of information pre-filtering in video-based MLLMs. Code is available at https://github.com/ncTimTang/AKS.

View on arXivView PDF

Code Implementations(2)

ncTimTang/AKSOfficial100%

[CVPR 2025] Adaptive Keyframe Sampling for Long Video Understanding

22818Shell, PythonFeb 27, 202510 months ago
Apache-2.0

[ICLR 2026] FOCUS: Efficient Keyframe Selection for Long Video Understanding

745Shell, PythonOct 28, 20256 months agoApache-2.0

Cite this paper

@article{tang2025adaptive,
  title  = {Adaptive Keyframe Sampling for Long Video Understanding},
  author = {Xi Tang and Jihao Qiu and Lingxi Xie and Yunjie Tian and Jianbin Jiao and Qixiang Ye},
  year   = {2025},
  eprint = {2502.21271},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.21271v1},
  journal = {CVPR 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.21271.svg)](https://codeofpaper.com/paper/2502.21271)

Discussion