Abstract
In the image domain, excellent representations can be learned by inducing invariance to content-preserving transformations via noise contrastive learning. In this paper, we generalize contrastive learning to a wider set of transformations, and their compositions, for which either invariance or distinctiveness is sought. We show that it is not immediately obvious how existing methods such as SimCLR can be extended to do so. Instead, we introduce a number of formal requirements that all contrastive formulations must satisfy, and propose a practical construction which satisfies these requirements. In order to maximise the reach of this analysis, we express all components of noise contrastive formulations as the choice of certain generalized transformations of the data (GDTs), including data sampling. We then consider videos as an example of data in which a large variety of transformations are applicable, accounting for the extra modalities -- for which we analyze audio and text -- and the dimension of time. We find that being invariant to certain transformations and distinctive to others is critical to learning effective video representations, improving the state-of-the-art for multiple benchmarks by a large margin, and even surpassing supervised pretraining.
Introduction
Self-supervised learning (SSL) has revolutionized how models learn from massive datasets without manual labels. In the image domain, the standard approach involves inducing invariance to content-preserving augmentations. However, this "one-size-fits-all" approach is insufficient for complex, multi-modal data like video. Video introduces temporal dynamics and multiple modalities (audio and text) where knowing what makes two clips different is often as important as knowing what makes them the same.
The Generalized Data Transformation (GDT) Framework
We introduce Generalized Data Transformations (GDTs), a framework that treats every step of the data pipeline—from selecting a video file to applying color jitter—as a transformation in a sequence. This allows for a unified treatment of data sampling and augmentation.
Invariance vs. Distinctiveness
The core innovation is a flexible contrastive loss. For every transformation, such as a time-shift or a modality split, the framework allows defining whether the model should be:
- Invariant: Pulling representations together (e.g., different color augmentations of the same clip).
- Distinctive: Pushing them apart (e.g., two different time-stamps from the same video).
Hierarchical Sampling
To learn these complex relationships, we propose a hierarchical sampling strategy. Transformations are organized into a tree structure, where a training batch is formed by sampling videos, then time-shifts, then modalities, and finally augmentations.
This structured sampling acts as a form of stratified sampling, which reduces the variance of loss gradients and leads to more stable, higher-quality feature learning compared to naive random sampling.
Experimental Results
We evaluated GDT on standard action recognition benchmarks, UCF-101 and HMDB-51, after pre-training on large-scale datasets like Kinetics-400 and HowTo100M.
State-of-the-Art Performance
The GDT framework set new state-of-the-art marks across multiple benchmarks. On HMDB-51, GDT achieved 67.4% accuracy when pre-trained on HowTo100M, outperforming previous methods like MIL-NCE by over 6%. Remarkably, this self-supervised model even surpassed a model trained with full supervision on Kinetics-400 (65.1%).
As shown in the table above, GDT consistently outperforms existing self-supervised approaches in both k-Nearest Neighbor (kNN) and retrieval tasks, demonstrating the power of balancing invariance and distinctiveness in multi-modal learning.
Conclusion
By generalizing contrastive learning to include distinctiveness and employing hierarchical sampling, GDT provides a robust framework for video representation learning. Our results suggest that the combination of what a model chooses to be invariant to versus distinctive to is the primary driver of performance in multi-modal self-supervision.
Summary updated