Abstract
Self-supervised learning (SSL) for video representation typically relies on binary contrastive learning or discrete pretext tasks. This paper introduces Contrastive Spatio-Temporal Pretext (CSTP) learning, which incorporates a novel pretext task: Spatio-Temporal Overlap Rate (STOR) prediction. STOR requires the model to estimate the precise degree of overlap between two video clips in both spatial and temporal dimensions. By integrating STOR into a joint contrastive learning framework, the proposed method achieves state-of-the-art performance on UCF-101 and HMDB-51 benchmarks for action recognition and video retrieval.
Introduction
Video self-supervised learning typically follows two paradigms: contrastive learning, which pulls features of augmented views of the same video together, and pretext tasks, which involve solving handcrafted puzzles like rotation or temporal order prediction. While effective, these approaches often overlook the granular relationship between clips. For instance, two clips from the same video may have varying degrees of overlap. Humans can easily distinguish between a 10% and a 90% overlap; however, standard contrastive models treat both as equally "positive."
Methodology: The STOR Task and CSTP Framework
The core contribution of this work is the Spatio-Temporal Overlap Rate (STOR) prediction task. Unlike binary instance discrimination, STOR requires the model to quantify the relationship between two clips $v_i$ and $v'_i$ sampled from the same video.
Spatio-Temporal Overlap Rate (STOR)
STOR consists of two components:
- Spatial Overlap: The model predicts the Intersection over Union (IoU) of the spatial bounding boxes of two clips.
- Temporal Overlap: The model predicts the ratio of the overlapping duration to the total duration of the two clips.
As shown in the figure above, the model is trained to classify the overlap into discrete categories (e.g., 0.3, 0.6, 0.9). This granular supervision forces the network to learn more detailed spatio-temporal features. To implement this, the researchers developed a 2-step sampling strategy for data augmentation, ensuring that the generated clip pairs possess the desired overlap rates while maintaining sufficient randomness for robust learning.
Joint Optimization
The CSTP framework integrates STOR with other established SSL techniques. The total loss function is a weighted combination of:
- Contrastive Loss: Using frameworks like BYOL or MoCo to ensure instance discrimination.
- Pretext Losses: Including STOR prediction, playback rate prediction, and rotation prediction.
This multi-task approach ensures that the model learns both global instance-level features and local structural details within the video.
Experimental Results
The authors evaluated CSTP on several benchmarks using an R(2+1)D backbone.
Action Recognition
On the UCF-101 dataset, CSTP achieved a top-1 accuracy of 87.6%, and 56.4% on HMDB-51. These results surpass previous state-of-the-art methods such as RSPNet and VideoMoCo, highlighting the benefit of the STOR task in learning discriminative action features.
Video Retrieval
The impact of CSTP is even more pronounced in video retrieval tasks. On UCF-101, the model achieved an R@1 of 74.3%, outperforming the nearest competitor by over 16%. This suggests that the "intermediate state" perception significantly improves the quality of the learned latent space for similarity matching.
Ablation Studies and Visualizations
Ablation experiments revealed that BYOL serves as the most effective contrastive base for CSTP. Furthermore, the optimal number of overlap categories was found to be approximately 5; fewer categories simplify the task too much, while more categories make convergence difficult. Visualizations using Class Activation Maps (CAM) show that CSTP-trained models focus more accurately on foreground motion compared to baseline contrastive models, which are often distracted by background elements.
Conclusion
Contrastive Spatio-Temporal Pretext (CSTP) learning addresses a key limitation in video SSL by introducing the STOR task. By moving beyond binary similarity and requiring models to predict precise overlap rates, CSTP develops a more nuanced understanding of video content. The framework's success in action recognition and retrieval tasks underscores the importance of intermediate state perception in self-supervised representation learning.
Code is available at https://github.com/Katou2/CSTP.
Summary updated