Streaming Long Video Understanding with Large Language Models

Rui Qian, Xiaoyi Dong, Pan Zhang, Yuhang Zang, Shuangrui Ding, Dahua Lin, Jiaqi Wang

Abstract

This paper presents VideoStreaming, an advanced vision-language large model (VLLM) designed for streaming video understanding. VideoStreaming capably processes arbitrary-length video by utilizing a constant number of video tokens that are streamingly encoded and adaptively selected. The primary challenge in long video understanding—the computational burden of token explosion—is addressed through two core designs: Memory-Propagated Streaming Encoding and Adaptive Memory Selection. The former segments videos into short clips and sequentially encodes them with propagated memory, while the latter selects question-relevant memories to feed into a Large Language Model (LLM). This disentangled approach allows for efficient, precise video understanding and the ability to answer multiple questions without re-encoding the entire video. Our model achieves superior performance on long-video benchmarks, demonstrating precise temporal comprehension.

Introduction

As Vision-Language Models (VLLMs) evolve, long video understanding remains a significant hurdle due to the "token explosion problem." Standard models struggle with computational overhead when extracting tokens from every frame, often exceeding the context window of the underlying LLM. Common mitigation strategies, such as sparse sampling or spatio-temporal pooling, frequently result in information loss—either missing brief critical events or sacrificing the spatial detail necessary for nuanced question answering.

VideoStreaming addresses these gaps by maintaining a global understanding of the video stream while retaining the ability to "zoom in" on specific, relevant moments to generate informative responses.

Methodology

The VideoStreaming architecture is built upon two primary components that separate the process of visual feature extraction from linguistic reasoning.

1. Memory-Propagated Streaming Encoding

Instead of processing a video in its entirety, VideoStreaming segments it into short, manageable clips. A small, decoder-only language model (Phi-2) serves as the streaming encoder. During the encoding of clip k, the model incorporates "memory" tokens from the previous clip (k-1). Leveraging the autoregressive nature of LMs, the sequence information is naturally aggregated into the final tokens of the prompt. These tokens serve as a condensed representation that encapsulates the video content up to that specific timestamp.

2. Adaptive Memory Selection

To prevent the loss of fine-grained details over long durations, the model stores historical memories for all clips. When a user provides a query, the model generates a "question indicator" and calculates its similarity to the stored "clip indicators." Using a Gumbel-Topk selection strategy, the model identifies the most relevant memories (e.g., the top 4 clips) and feeds only those into a larger reasoning LLM (Vicuna-7B). This ensures the input token count remains constant regardless of the total video length.

The VideoStreaming architecture, illustrating the streaming encoding process (right) and the global reasoning pipeline with adaptive selection (left).

Key Insights: LMs as Visual Compressors

A pivotal finding of this research is the efficacy of using small LMs as visual compressors rather than just reasoning engines. The authors observed that the causal attention mechanism in LMs is remarkably adept at distilling visual features into a compact memory state.

Furthermore, ablation studies revealed that "shallower" encoding is often more effective; using the first 16 layers of Phi-2 outperformed the full 32-layer model. This suggests that deeper layers may become overly specialized for text-based next-token prediction, whereas middle layers retain richer semantic features more suitable for visual representation.

Internal attention mechanism and prefix task used to train the Small Language Model as an efficient visual compressor.

Experimental Results

VideoStreaming was evaluated across various benchmarks, ranging from short clips to ultra-long movies:

  • Efficiency: On the MovieNet-QA benchmark (featuring movies up to 100 hours), VideoStreaming achieved an inference latency of 5.32 seconds per question, significantly faster than competitors like LLaMA-VID (~16 seconds). It utilized only 256 tokens as input to the LLM, compared to over 18,000 required by other models.
  • Accuracy: The model reached a global accuracy of 90.4% on MovieChat-1K, a substantial improvement over the previous state-of-the-art of 71.2%.
  • Temporal Grounding: On Next-GQA, the model's similarity-based selection achieved high Intersection of Prediction (IoP) scores, confirming its ability to identify the correct temporal segments for specific queries.

Additionally, the authors contributed a new dataset of 300K multi-round long video QA pairs derived from Panda-70M, featuring explicit timestamps to improve the model's temporal selection capabilities.

Conclusion and Future Work

VideoStreaming demonstrates that disentangling video extraction from reasoning allows for highly efficient and scalable long video understanding. While the current model relies on uniform sampling, future iterations will explore adaptive segmentation. This would allow the model to dynamically adjust clip lengths or sampling frequencies based on the visual complexity and information density of the video stream, further optimizing performance for high-action or static sequences.

Summary updated

BibTeX
@inproceedings{qian2024streaming,
  author = {Rui Qian and Xiaoyi Dong and Pan Zhang and Yuhang Zang and Shuangrui Ding and Dahua Lin and Jiaqi Wang},
  title = {{Streaming Long Video Understanding with Large Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=axX62CQJpa},
}
Figure