Streaming Long Video Understanding with Large Language Models

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

Understanding long videos—think hour-long movies or surveillance feeds—is a major hurdle for Vision-Language Large Models (VLLMs). The "token explosion" problem is real: if you represent every frame with hundreds of tokens, a long video quickly exceeds the context window and computational budget of even the most powerful LLMs.

Current solutions usually involve aggressive sparse sampling (skipping most frames) or heavy frame-wise compression. Both have flaws: sparse sampling misses fast-moving actions, while frame compression often sacrifices the spatial detail needed to identify small objects or text.

In their paper, "Streaming Long Video Understanding with Large Language Models," researchers introduce VideoStreaming, a framework designed to handle arbitrarily long videos with a constant memory footprint and high temporal precision.

TL;DR

VideoStreaming processes long videos by streamingly encoding them into condensed "memories" that propagate information over time. It then uses an adaptive selection mechanism to retrieve only the most question-relevant segments for the LLM to reason over, achieving state-of-the-art performance on long-video benchmarks with significantly higher inference efficiency.

What Problem Does This Paper Address?

The core challenge is the trade-off between context and detail.

  1. Computational Burden: Long videos generate too many tokens for standard LLM attention mechanisms.
  2. Information Loss: Existing compression methods often ignore inter-frame temporal dynamics or lose fine-grained spatial details.
  3. Redundancy: In a 10-minute video, a specific question (e.g., "What did the man pick up at the 2-minute mark?") only requires a tiny fraction of the total visual data.

VideoStreaming aims to create a general video representation that is both compact enough for long-term context and detailed enough for moment-specific queries.

Methods

The architecture consists of two main components: Memory-Propagated Streaming Encoding and Adaptive Memory Selection.

Overview of the VideoStreaming framework showing the streaming encoder and the final reasoning stage.

1. Memory-Propagated Streaming Encoding

Instead of looking at the whole video at once, the model segments it into short clips.

  • Sequential Processing: Each clip is encoded by a small language model (like Phi-2). Crucially, the encoding process for the current clip takes the "historical memory" from the previous clip as input.
  • Information Distillation: To force the model to compress information, the authors use a "prefix task" with a modified attention mask. As illustrated below, text response tokens can only "see" a small set of summarization tokens, forcing those tokens to capture all relevant visual information from the raw frame features.
  • Fixed-Length Global Memory: This streaming approach results in a fixed-length memory that encapsulates the entire video's history up to the current timestamp.
The prefix task architecture within the Small Language Model, demonstrating how summarization tokens condense clip features.

2. Adaptive Memory Selection

Since a single fixed-length summary inevitably loses some fine-grained detail from early in the video, the model stores the intermediate memories of all clips.

  • Question-Aware Retrieval: When a user asks a question, the model generates a "question indicator." It then calculates the cosine similarity between this indicator and "clip indicators" stored during the encoding phase.
  • Dynamic Context: It selects the top most relevant memories (e.g., the 4 most relevant clips) and feeds only those into a larger LLM (like Vicuna-7B) for the final answer. This keeps the input token count low while ensuring the most relevant details are present.

Datasets

The model underwent a two-stage training process:

  • Stage 1 (Single Clip): Trained on 790K image/short-video captions and 763K instruction-following pairs to align visual features with the small LM encoder.
  • Stage 2 (Long Video): Trained on a curated set of 300K multi-round long video QA pairs (derived from Panda-70M) and 20K synthesized long videos created by concatenating shorter clips.

Evaluation Benchmarks: * VideoChatGPT: General video understanding. * EgoSchema: Very long (3-minute) egocentric videos. * Next-QA / Next-GQA: Temporal grounding and causal reasoning. * MovieChat-1K & MovieNet-QA: Hour-long movies requiring both global and breakpoint (moment-specific) analysis.

Key Insights and Ideas

  • Small LMs as Efficient Encoders: Using a small decoder-only model as the encoder is a clever move. It allows the model to use language-like "reasoning" to decide what visual information is worth keeping during the compression phase.
  • Disentangled Extraction and Reasoning: By separating the heavy lifting of video encoding from the final reasoning, the model can answer multiple different questions about the same video without re-encoding the entire stream.
  • The Power of Propagation: Propagating memory allows the model to maintain temporal consistency. Without this, the model would treat every clip as an isolated event, losing the "story" of the video.

Key Results

  • State-of-the-Art Performance: VideoStreaming achieved 44.1% accuracy on EgoSchema, outperforming previous zero-shot and even some fine-tuned models.
  • Superior Temporal Grounding: On Next-GQA, it reached the highest mIoP (Mean Intersection of Prediction), proving it can accurately "point" to the right time in a video to answer a question.
  • Massive Efficiency Gains: On the hour-long MovieNet-QA benchmark, VideoStreaming used only 256 tokens as input to the LLM, compared to over 18,000 tokens for competing models like LLaMA-VID. This resulted in a 3x speedup in inference latency (5.32s vs 16.48s per question).

Limitations and Future Work

  • Uniform Sampling: Currently, the model samples frames uniformly within clips. The authors note that some segments (like a still landscape) need fewer frames than others (like a fast-paced fight scene). They plan to explore adaptive segmentation that adjusts clip length based on visual complexity.
  • Memory Selection Granularity: While selecting clips is efficient, very long clips might still contain internal redundancy. Future work could refine the selection to the sub-clip or even frame level.

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