Abstract
The remarkable natural language understanding, reasoning, and generation capabilities of large language models (LLMs) have made them attractive for application to video question answering (Video QA) tasks, utilizing video tokens as contextual input. However, employing LLMs for long video understanding presents significant challenges and remains under-explored. The extensive number of video tokens leads to considerable computational costs for LLMs while using aggregated tokens results in loss of vision details. Moreover, the presence of abundant question-irrelevant tokens introduces noise to the video QA process. To address these issues, we introduce a simple yet effective retrieval-based video language model (R-VLM) for efficient and interpretable long video QA. Specifically, given a question (query) and a long video, our model identifies and selects the most relevant $K$ video chunks and uses their associated visual tokens to serve as context for the LLM inference. This effectively reduces the number of video tokens, eliminates noise interference, and enhances system performance. Our experimental results validate the effectiveness of our framework for comprehending long videos. Furthermore, based on the retrieved chunks, our model is interpretable that provides the justifications on where we get the answers.
Introduction
Large Language Models (LLMs) have revolutionized how we interact with text, but feeding them video data remains a massive computational bottleneck. Current Video-Language Models (VLMs) struggle with long videos (e.g., clips longer than a minute) due to three main hurdles: computational cost from excessive visual tokens, information loss from global pooling, and noise from irrelevant video segments that lead to hallucinations.
To address these challenges, researchers from Microsoft Research and USTC introduced R-VLM, a framework that uses a learnable retrieval mechanism to help LLMs "watch" only the most relevant parts of a long video. By acting like a librarian that finds the right "chapters" first, R-VLM significantly reduces computational overhead while maintaining high performance on long-video tasks.
Methodology
The R-VLM framework processes video through a pipeline designed for both efficiency and detail preservation.
Chunking and Compression
The video is divided into non-overlapping 4-second chunks. Each chunk undergoes spatial and temporal pooling to reduce its token count by over 93% while still preserving local details necessary for answering specific questions.
Learnable Retrieval
The core innovation is a lightweight Multi-Layer Perceptron (MLP) added to a frozen CLIP text encoder. This MLP learns to transform a user's question into a specialized embedding used to score the relevance of each video chunk. To train this without explicit segment labels, a "Soft Matching" (SM) loss is used to align question embeddings with relevant visual features.
Efficient Inference
During the final step, only the top $K$ (usually 5) most relevant chunks are projected into the LLM's (Vicuna-7B) input space. This keeps the input size constant regardless of whether the video is 1 minute or 1 hour long, theoretically supporting videos over 80 hours in length.
Experimental Results
R-VLM was evaluated across a wide array of long-video QA benchmarks, including ActivityNet-QA, EgoSchema, NExt-QA, and IntentQA, to test zero-shot generalization.
State-of-the-Art Performance
R-VLM achieved 40.2% accuracy on the EgoSchema fullset, representing a significant jump over previous models like LLoVi (33.5%) and Video-ChatGPT. It consistently outperforms existing models on several datasets by nearly 7%.
Efficiency Gains
The retrieval mechanism allows for 69% to 95% savings in FLOPs compared to processing all video chunks. In training, R-VLM uses roughly 45.3 GB of VRAM for 80-second sequences, whereas a baseline model without retrieval would require over 75 GB and likely crash on longer sequences.
Conclusion and Future Work
R-VLM demonstrates that selective attention is key to efficient long-video understanding. By filtering out irrelevant data before it reaches the LLM, the model avoids the interference that typically plagues long-context reasoning. While the retrieval module can occasionally be a bottleneck if it fails to select the correct chunk, future directions include exploring more powerful vision backbones and adaptive mechanisms to decide how many chunks are needed based on question complexity.
Summary updated