Q-Frame: Query-aware Frame Selection and Multi-Resolution Adaptation for Video-LLMs

Shaojie Zhang, Jiahui Yang, Jianqin Yin, Zhenbo Luo, Jian Luan

TL;DR

This paper introduces Q-Frame, a novel plug-and-play framework for video understanding with Large Language Models (LLMs). Q-Frame intelligently selects relevant frames and adapts their resolution based on the query, significantly improving performance on long videos and complex tasks compared to traditional uniform frame sampling.

What Problem Does This Paper Address?

Modern Multimodal Large Language Models (MLLMs) are increasingly capable of understanding visual content, but applying them to videos presents a significant challenge. Videos contain a massive amount of data (thousands of frames), while current LLMs have limited context windows. Traditional methods of sampling frames uniformly (e.g., taking every Nth frame) are inefficient and suboptimal. They often miss crucial temporal transitions, are query-agnostic (meaning the same frames are selected regardless of the question), and can lead to a loss of fine-grained details when downsampling high-resolution frames. This paper aims to address these limitations by developing a more intelligent and adaptive approach to frame selection and resolution scaling for video understanding.

Methods

Q-Frame is a training-free, plug-and-play module that can be integrated with existing Video-LLMs. It consists of three main components:

  • Cross-modal Query Retrieval (CQR): This component uses a pre-trained text-image matching model (like CLIP) to find frames that are semantically relevant to the given textual query. It essentially scores each frame's relevance to the query.
  • Query-Aware Frame Selection (QFS): Building on the relevance scores from CQR, QFS uses a Gumbel-Max trick to dynamically select frames. This is a probabilistic sampling strategy that balances exploration (trying different frames) and exploitation (focusing on the most relevant ones), ensuring a diverse yet informative set of frames.
  • Multi-Resolution Adaptation (MRA): This is a key innovation. Instead of processing all frames at a single resolution, MRA assigns different resolutions to selected frames based on their relevance to the query. High-resolution is used for critical frames that contain fine details, while lower resolutions are used for less important frames to save computational resources. This allows Video-LLMs to process more frames within the same token budget.

Datasets

The paper evaluates Q-Frame on three widely adopted long-video benchmarks:

  • MLVU: A benchmark for multi-task understanding of long videos, comprising 2593 tasks across nine categories.
  • LongVideoBench: A dataset containing 1337 QA pairs for long video understanding, evaluated without subtitles.
  • Video-MME: A benchmark with 2700 manually annotated QA pairs for video understanding.

Key Insights and Ideas

  • Query-driven frame selection is crucial: Uniform sampling is inherently flawed because it doesn't consider what information is actually needed to answer a specific question. Q-Frame's query-aware approach significantly improves relevance.
  • Adaptive resolution is a game-changer for efficiency: By intelligently downsampling less critical frames, Q-Frame allows Video-LLMs to process more informative frames without exceeding computational limits. This is vital for handling long videos.
  • Q-Frame is model-agnostic: The framework is designed to be plug-and-play, meaning it can be easily integrated with various existing Video-LLMs (both open-source and closed-source) without requiring any additional training of the LLM itself.
  • Balancing frame count and resolution matters: Ablation studies show that the combination of query-aware frame selection (QFS) and multi-resolution adaptation (MRA) is essential for optimal performance. Simply applying CLIP to top-K frames or using fixed resolutions is less effective.

Key Results

  • Q-Frame consistently outperforms uniform frame sampling across all evaluated benchmarks (MLVU, LongVideoBench, Video-MME).
  • On the Video-MME benchmark, Q-Frame applied to Qwen2-VL achieved the highest overall accuracy.
  • The improvements brought by Q-Frame are consistent across different Video-LLMs, including VILA-V1.5, Qwen2-VL, and GPT-40.
  • Q-Frame significantly enhances performance on longer videos, mitigating the typical performance drop seen with uniform sampling.
  • Qualitative analysis shows Q-Frame can correctly answer queries that uniform sampling fails to address, by capturing more relevant frames and details. For example, in one case, Q-Frame correctly identified how players celebrated a goal, while uniform sampling missed this detail.

Limitations and Future Work

  • Short videos: The paper notes a slight performance decrease for VILA-V1.5 on very short videos (8s-15s) when Q-Frame is applied. This is attributed to uniform sampling of 8 frames per second in this range making frame selection less critical.
  • Computational cost of MRA: While MRA aims to reduce computational load, processing frames at multiple resolutions still incurs some overhead. The paper suggests that a balanced approach to resolution allocation is key.
  • Future work: The paper highlights Q-Frame's potential for future advancements in Video-LLM integration, suggesting its model-agnostic nature makes it a scalable and effective solution for long-form video understanding. Further exploration into optimizing the resolution allocation strategy and its application to even more complex video understanding tasks could be future directions.

Summary updated

BibTeX
@inproceedings{zhang2025q,
  author = {Shaojie Zhang and Jiahui Yang and Jianqin Yin and Zhenbo Luo and Jian Luan},
  title = {{Q-Frame: Query-aware Frame Selection and Multi-Resolution Adaptation for Video-LLMs}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure