Compressed Video Prompt Tuning

Bing Li, Jiaxin Chen, Xiuguo Bao, Di HuangNeurIPS 2023

This paper, presented at NeurIPS 2023, introduces Compressed Video Prompt Tuning (CVPT), a novel framework designed to bridge the gap between high-performance video models (pre-trained on raw RGB frames) and the practical reality of compressed video streams.

TL;DR

CVPT is a parameter-efficient representation learning framework that adapts pre-trained raw video models to compressed video understanding. By using Motion Vectors and Residuals as "conditional prompts," it achieves state-of-the-art accuracy on action recognition benchmarks while training less than 1% of the model parameters and bypassing the expensive video decoding phase.

What Problem Does This Paper Address?

Most state-of-the-art video understanding models are trained on "raw" videos—sequences of dense RGB frames. However, in the real world, videos are stored and transmitted in compressed formats (like H.264 or HEVC). A compressed video consists of one full RGB frame (I-frame) followed by several P-frames, which only store Motion Vectors (where pixels moved) and Residuals (the difference between the predicted and actual pixels).

Comparison of video processing paradigms, highlighting the proposed CVPT method.

Standard approaches to handling compressed video typically fall into two categories:

  1. Full Decoding: Converting the video back to raw RGB, which is computationally expensive and slow.
  2. Full Fine-Tuning: Training a model specifically on compressed data, which is resource-intensive and often fails to bridge the "modality gap" between dense RGB and sparse motion data.

The authors identify a missed opportunity: can we use the "free" motion information already present in compressed streams to "prompt" a powerful, frozen model pre-trained on raw video?

Methods

The core of CVPT is to keep a pre-trained Transformer backbone (like ViT) frozen and introduce a small number of trainable components designed specifically for compressed modalities.

The CVPT architecture featuring Conditional Prompts with Refinement (CPR) and Selective Cross-modal Complementary Prompt (SCCP) blocks.
  • Conditional Prompt with Refinement (CPR): Instead of using static, learnable vectors (the standard in prompt tuning), CVPT re-parameterizes the Motion Vectors and Residuals of the specific video instance into prompts. This makes the prompts "instance-aware," allowing the model to adapt to the unique motion of every video.
  • Selective Cross-modal Complementary Prompt (SCCP) Blocks: These blocks are inserted into the Transformer backbone and perform a crucial "cleaning" step. Because Motion Vectors are often blocky and noisy, the SCCP uses the Residuals (which typically align with object boundaries) to create an attention mask. This mask filters the Motion Vectors, effectively creating a "refined" motion cue that is then fused with the I-frame features.
  • Layer-wise Refinement: These prompts are updated at every layer of the Transformer, allowing the model to capture motion information at multiple levels of abstraction.

Datasets

The authors evaluated CVPT on three widely used action recognition benchmarks:

  • HMDB-51: A relatively small dataset with 51 action categories.
  • UCF-101: A standard benchmark with 101 action categories.
  • Something-Something v2 (SSv2): A large-scale, motion-centric dataset where the interaction between objects is key to understanding the action.

The models were pre-trained on the Kinetics-400 dataset using both supervised and self-supervised (SSL) strategies.

Key Insights and Ideas

  • Residuals as a Denoising Filter: One of the core insights is using Residuals to gate Motion Vectors. While Motion Vectors are "free" in compressed video, they are notoriously noisy compared to calculated optical flow. By leveraging the fact that Residuals are high-frequency signals often located at object edges, the authors found a way to extract high-quality motion cues without the cost of optical flow computation.
  • Bridging the Modality Gap via Prompting: Rather than trying to force a model to "see" Motion Vectors as RGB frames, CVPT treats them as a complementary modality that provides context (a "prompt") to the spatial information in the I-frames.
  • Parameter Efficiency: By freezing the backbone and only training the prompt-generation layers, the model avoids "catastrophic forgetting" of the rich features learned during raw video pre-training.

Key Results

  • Superior Accuracy: On UCF-101, CVPT (using a ViT-B backbone) achieved 95.5% accuracy, outperforming full fine-tuning (88.1%) and other prompt-tuning methods like VPT (83.6%).
  • Extreme Efficiency: CVPT achieves these results with less than 1% of parameters being trainable (e.g., 0.5M trainable parameters vs. 86.4M total).
  • Inference Speed: Because it bypasses full decoding, the pre-processing time is reduced by roughly 10x (238ms for CVPT vs. 2496ms for standard raw video pipelines like VideoMAE).
  • Scalability: The method showed consistent gains across different backbones, including ViT-Large and Swin-Transformer.

Limitations and Future Work

The authors acknowledge a few areas for further exploration:

  • Task Generalization: While highly effective for action recognition, the performance of CVPT on other tasks like video segmentation or object tracking in the compressed domain remains to be seen.
  • GOP Dependency: The current implementation relies on a specific Group of Pictures (GOP) structure (1 I-frame and 11 P-frames). Adapting to highly variable compression settings or different codecs (like AV1) could be a future direction.
  • Refinement Complexity: While the SCCP blocks are lightweight, adding them to every layer of a very deep model still adds some overhead, though it remains far more efficient than full decoding.

Summary updated

BibTeX
@inproceedings{li2023compressed,
  author = {Bing Li and Jiaxin Chen and Xiuguo Bao and Di Huang},
  title = {{Compressed Video Prompt Tuning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=2vADOf3K00},
}
Figure