Spatiotemporal Contrastive Video Representation Learning

Rui Qian, Tianjian Meng, Boqing Gong, Ming-Hsuan Yang, Huisheng Wang, Serge J. Belongie, Yin Cui

Abstract

Contrastive Video Representation Learning (CVRL) is a self-supervised framework designed to learn robust spatiotemporal features from unlabeled video data. By contrasting augmented clips from the same video against those from different videos, CVRL addresses the unique challenges of the temporal dimension. The framework introduces two primary innovations: temporally consistent spatial augmentations and a proximity-biased temporal sampling strategy. Experimental results demonstrate that CVRL significantly narrows the performance gap between self-supervised and supervised video models, outperforming traditional ImageNet-based pre-training on major benchmarks like Kinetics-400 and Kinetics-600.

Introduction

While self-supervised learning (SSL) has achieved remarkable success in static image domains, video remains a significant challenge. The primary difficulty lies in effectively capturing the temporal dimension. Simple extensions of image-based SSL methods, such as "inflating" 2D convolutions to 3D, often fail to capture essential motion cues. Previous attempts at video SSL relied on pretext tasks like frame reordering, which often struggled to scale. CVRL addresses this by designing data augmentations that provide a sufficient learning challenge without destroying the inherent temporal information that defines video.

Methodology

The CVRL framework utilizes a contrastive learning objective based on the InfoNCE loss. The core idea is to align representations of two augmented clips derived from the same video while pushing apart representations from different videos.

Overview of the CVRL framework, highlighting the temporal sampling and consistent spatial augmentation.

The framework introduces two key technical innovations:

  1. Temporally Consistent Spatial Augmentation: Standard image augmentations (e.g., cropping, color jittering) can destroy motion cues if applied independently to each frame. CVRL applies identical transformation parameters to every frame within a clip, maintaining temporal continuity while encouraging spatial invariance.
  2. Sampling-based Temporal Augmentation: Rather than selecting clips at random, CVRL employs a sampling strategy where the probability of selecting a pair of clips decreases as their temporal distance increases. This ensures the model focuses on semantically related content while avoiding over-invariance to long-term scene changes.

The backbone architecture is a 3D-ResNet (R3D), which extends standard ResNet architectures into the temporal dimension to process video volumes.

Key Insights

  • The Importance of Temporal Consistency: Independent frame-wise augmentation introduces artificial "flicker" that distracts the 3D CNN. Maintaining consistency allows the model to focus on genuine spatiotemporal cues.
  • Optimizing the Temporal Window: Clips separated by large time intervals may lack semantic overlap. A monotonically decreasing sampling distribution focuses the contrastive task on the most relevant temporal windows.
  • Surpassing Image-based Pre-training: CVRL demonstrates that self-supervised pre-training directly on video data is superior to the long-standing practice of initializing video models with ImageNet-trained weights.

Experimental Results

CVRL was evaluated on several large-scale benchmarks, including Kinetics-400, Kinetics-600, UCF-101, and HMDB-51.

Kinetics-600 top-1 accuracy vs. number of parameters, comparing CVRL to supervised and other self-supervised baselines.
  • Kinetics-600 Performance: Using a linear classifier on a frozen R3D-50 backbone, CVRL achieves 70.4% top-1 accuracy, outperforming ImageNet supervised pre-training by 15.7%.
  • Scalability: With an R3D-152 (2x) backbone, accuracy reaches 72.9%, nearing the 79.4% achieved by full supervised training.
  • Data Efficiency: In a semi-supervised setting with only 1% of Kinetics-400 labels, CVRL achieves 35.1% accuracy, a massive improvement over the 3.2% achieved by training from scratch.
  • Downstream Transfer: CVRL sets state-of-the-art results for vision-only SSL on UCF-101 (94.4%) and HMDB-51 (70.6%) upon fine-tuning.

Discussion and Future Work

While CVRL significantly reduces the gap between self-supervised and supervised learning, a ~7-9% performance difference remains on Kinetics benchmarks. Additionally, training 3D ResNets on large video datasets is computationally intensive. Future research may explore incorporating multi-modal data, such as audio or text, to further enhance the learned representations.

Summary updated

BibTeX
@inproceedings{qian2021spatiotemporal,
  author = {Rui Qian and Tianjian Meng and Boqing Gong and Ming-Hsuan Yang and Huisheng Wang and Serge J. Belongie and Yin Cui},
  title = {{Spatiotemporal Contrastive Video Representation Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.00689},
}
Figure