Learning Streaming Video Representation via Multitask Training

Yibin Yan, Jilan Xu, Shangzhe Di, Yikun Liu, Yudi Shi, Qirui Chen, Zeqian Li, Yifei Huang, Weidi Xie

TL;DR

This paper introduces StreamFormer, a novel backbone for real-time video understanding that efficiently processes video streams frame-by-frame. By employing a multitask learning framework that unifies global, temporal, and spatial video analysis, StreamFormer achieves state-of-the-art performance on various downstream tasks while maintaining computational efficiency.

What Problem Does This Paper Address?

Traditional video understanding models often process videos offline, analyzing entire clips at once. However, many real-world applications, such as autonomous driving and robotics, require real-time, frame-by-frame video analysis. This "streaming video understanding" presents unique challenges: models must process information sequentially, preserve crucial historical context with limited memory, and make low-latency decisions. Existing approaches often struggle to balance these demands with the need for rich spatial and temporal detail, sometimes sacrificing one for the other. This paper aims to bridge this gap by developing a backbone that excels at streaming video understanding across diverse tasks.

Methods

The core innovation is StreamFormer, a streaming video backbone built upon a pre-trained Vision Transformer (SigLIP). The key modifications are:

  • Causal Temporal Attention: Instead of bidirectional attention (which looks at past and future frames), StreamFormer uses causal attention. This ensures that when processing a frame, the model can only access information from that frame and preceding ones, mimicking real-time constraints. This is achieved by applying a causal mask within the attention mechanism.
  • Spatial Low-Rank Adaptation (LoRA): To adapt pre-trained image features for video tasks without losing their strong representational power, StreamFormer employs LoRA. This technique introduces a small number of trainable parameters to fine-tune the spatial attention layers, making the adaptation efficient.
  • Multitask Visual-Language Alignment Framework: To train StreamFormer effectively, the authors propose a unified framework that trains the model on three complementary objectives:
  • Global-level training: Focuses on overall scene semantics (action recognition, video-text retrieval).
  • Temporal-level training: Captures temporal dynamics and event localization (temporal action localization, temporal video grounding).
  • Spatial-level training: Achieves fine-grained spatial understanding (video object segmentation, referring video object segmentation). This multitask approach leverages shared textual embeddings from SigLIP to align visual and textual representations across different granularities, enabling the model to learn comprehensive video understanding.

Datasets

The paper utilizes a variety of publicly available datasets for pre-training, categorized by task:

  • Action Recognition (AR): [12, 38]
  • Video-Text Retrieval (VTR): [2, 11, 14, 88, 101, 107]
  • Temporal Action Localization (TAL): [11, 67, 126]
  • Temporal Video Grounding (TVG): [2, 37, 51, 52, 72, 82]
  • Video Object Segmentation (VOS): [60, 95, 113]
  • Referring Video Object Segmentation (RVOS): [26, 84]

Approximately 1 million video-text pairs were used for pre-training. For comparison and data efficiency studies, the WebVid-10M dataset was also used.

Key Insights and Ideas

  • Causality is Key for Streaming: The paper strongly emphasizes that causal temporal attention is fundamental for building efficient and scalable streaming video understanding models. It allows for predictable inference costs as the video length increases.
  • Multitask Learning for Rich Representations: Unifying global, temporal, and spatial tasks within a single visual-language alignment framework is crucial for learning robust and versatile video representations. This approach allows the model to capture diverse aspects of video content simultaneously.
  • Data Efficiency through Annotation Leverage: By leveraging existing, well-annotated datasets for multitask training, StreamFormer achieves strong performance with significantly less data (0.1M pairs) compared to models trained on massive, uncurated video-text datasets (e.g., WebVid-10M). This highlights the value of high-quality annotations.
  • SigLIP as a Strong Foundation: The choice of SigLIP as the pre-trained image encoder proves effective, providing a strong visual representation that can be efficiently adapted for video tasks.

Key Results

StreamFormer demonstrates competitive performance across several downstream tasks:

  • Online Action Detection (OAD): Achieves state-of-the-art results on THUMOS-14, outperforming baselines and matching flow-based methods without the computational overhead of optical flow. For example, it achieves 73.9 mAP (w/ flow) and 68.4 mAP (w/o flow), a significant improvement over the baseline SigLIP (58.9 mAP w/o flow).
  • Online Video Instance Segmentation: Outperforms baseline ResNet50 and ViT backbones on YouTube-VIS-2019, achieving 45.1 AP and 43.6 AR with the StreamFormer backbone.
  • Video Question Answering (VideoQA): Shows superior performance on VideoMME and MLVU benchmarks, indicating that enhanced temporal motion and spatial detail perception in the backbone lead to better VideoQA capabilities.
  • Computational Efficiency: Figure 3 demonstrates that StreamFormer's latency remains nearly constant with increasing frame counts when using KV-Cache, unlike bidirectional attention, highlighting its scalability for streaming applications.

Limitations and Future Work

  • Limitations:
    • The paper notes that for online action detection, bidirectional attention slightly outperforms causal attention in terms of raw accuracy, though at a significant computational cost. This is attributed to the ability of bidirectional attention to access all frames.
  • The authors acknowledge that while their multitask approach is data-efficient, models trained solely on spatial-level tasks perform sub-optimally in OAD and VideoQA, potentially due to limited data for video segmentation tasks.
  • Future Work:
    • The paper suggests that the framework is inherently extensible, allowing for the incorporation of new tasks by defining additional alignment mechanisms.
  • The efficiency gains from causal attention, especially with KV-Cache, open doors for more complex and real-time video understanding applications.
  • Further exploration into optimizing the balance between computational cost and annotation cost for pre-training could lead to even more efficient models.

Summary updated

BibTeX
@inproceedings{yan2025learning,
  author = {Yibin Yan and Jilan Xu and Shangzhe Di and Yikun Liu and Yudi Shi and Qirui Chen and Zeqian Li and Yifei Huang and Weidi Xie},
  title = {{Learning Streaming Video Representation via Multitask Training}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure