Abstract
This paper describes our champion solution to the LOVEU Challenge @ CVPR'24, Track 1 (Long Video VQA). Processing long sequences of visual tokens is computationally expensive and memory-intensive, making long video question-answering a challenging task. The key is to compress visual tokens effectively, reducing memory footprint and decoding latency, while preserving the essential information for accurate question-answering. We adopt a hierarchical memory mechanism named STAR Memory, proposed in Flash-VStream, that is capable of processing long videos with limited GPU memory (VRAM). We further utilize the video and audio data of MovieChat-1K training set to fine-tune the pretrained weight released by Flash-VStream, achieving 1st place in the challenge. Code is available at project homepage https://invinciblewyq.github.io/vstream-page .
Introduction
Large Language Models (LLMs) are increasingly being adapted to interpret video content. However, long videos present a significant "memory explosion" problem. A standard video generates a staggering number of visual tokens, making it impossible to store every frame's features in GPU memory (VRAM). Even with sufficient memory, the sheer volume of data would lead to prohibitive latency in LLM response times.
Existing pruning or compression methods often sacrifice fine-grained details, which are crucial for answering specific questions about localized events. To address this, researchers from Tsinghua University and ByteDance developed Flash-VStream, a framework utilizing a hierarchical memory system called STAR Memory. This system compresses visual tokens into four distinct tiers, enabling the model to maintain both high-level summaries and specific details without overwhelming computational resources.
Methodology: The STAR Memory Mechanism
The core of the Flash-VStream framework is the STAR Memory mechanism, which organizes visual information into four specialized layers:
- Spatial Memory (S): A First-In-First-Out (FIFO) queue that retains high-resolution spatial details from the most recent frames to provide immediate short-term context.
- Temporal Memory (T): This layer employs a Weighted K-means Clustering algorithm to condense long-term information. By grouping similar frames and storing only their "centroids," the system represents key events over time with a constant memory footprint.
- Abstract Memory (A): A Semantic Attention model synthesizes high-level concepts and a global synopsis of the video into a compact set of tokens.
- Retrieved Memory (R): For questions requiring specific details, the system identifies relevant clusters in the temporal memory and retrieves original, high-quality features from a feature buffer to supplement the LLM's input.
The overall pipeline integrates a CLIP ViT-L/14 visual encoder and Whisper-large-v3 for Automatic Speech Recognition (ASR). Transcribed audio is fed to a Vicuna-7B LLM alongside the STAR memory tokens to generate final answers.
Experimental Setup
The model underwent a three-stage training process:
- Modality Alignment: Training on LLaVA-filtered image-caption pairs to align visual and textual features.
- Instruction Tuning: Utilizing approximately 1 million QA pairs from the LLaMA-VID and Video-ChatGPT datasets.
- Domain-Specific Fine-tuning: Fine-tuning on the MovieChat-1K training set, which consists of long-form movie clips.
Evaluation was conducted on the MovieChat-1K test set, using automated metrics (Accuracy and Score) evaluated by Gemini-Pro and GPT-3.5.
Key Results and Insights
The hierarchical approach proved significantly more effective than flat token representations. A key finding was the impact of audio; dialogue often provides essential context that visual features alone cannot capture. By limiting the STAR memory to exactly 681 tokens, the model achieved high efficiency and low latency regardless of video length.
As shown in the results, domain-specific fine-tuning (Stage-3) significantly improved performance. On the validation set, it raised Global Accuracy from 66.7% to 84.0%. The addition of ASR data further propelled the model to a dominant 96.0% Global Accuracy on the test set, securing 1st place in the CVPR 2024 LOVEU Challenge.
Conclusion and Future Work
Flash-VStream demonstrates that hierarchical memory is a robust solution for long-video VQA. However, limitations remain. Currently, the model uses different inference strategies for global versus "breakpoint" (specific moment) questions. A more unified approach that handles all question types seamlessly would be more robust. Additionally, while audio is currently treated as a text supplement, future work could explore deeper audio-visual feature fusion to improve performance in non-verbal or noisy environments. Finally, investigating dynamic memory sizing based on content complexity could further optimize the balance between performance and efficiency.
Summary updated