Abstract
Self-supervised contrastive learning (CL) has emerged as a powerful paradigm for learning visual representations without human-annotated labels. While much research has focused on closing the accuracy gap between CL and supervised learning (SL), the behavioral differences regarding distributional robustness remain under-explored. This study conducts a systematic evaluation of CL and SL across a hierarchy of data corruptions, ranging from pixel-level distortions to dataset-level distribution shifts. Our findings reveal a nuanced trade-off: while CL is significantly more robust to downstream corruptions at test time, it exhibits heightened vulnerability to structural corruptions during pre-training. We analyze these behaviors through the lenses of feature space uniformity and data augmentation dependencies, offering insights into how SL models can be improved by adopting CL-inspired regularization.
Introduction
In the pursuit of higher ImageNet benchmarks, the research community has prioritized top-1 accuracy, often overlooking the critical role of distributional robustness. For machine learning models to be reliable in real-world applications, they must maintain performance when the data distribution shifts. This paper investigates whether the self-supervised nature of contrastive learning provides inherent robustness advantages over traditional supervised learning. By moving beyond accuracy-only metrics, the authors stress-test these paradigms across a multi-level hierarchy of data corruptions.
Methodology
The researchers established two distinct testing protocols to isolate the effects of data corruption:
- Downstream Robustness (Test I): Models are pre-trained on clean data but evaluated on corrupted downstream tasks. This simulates real-world scenarios where a deployed model encounters noisy or distorted inputs.
- Pre-training Robustness (Test II): Models are trained directly on corrupted data to measure the sensitivity of the learning algorithm itself to low-quality training signals.
The study categorizes corruptions into three levels:
- Micro-level (Pixel): Gamma distortion, which alters image brightness and contrast.
- Mid-level (Patch): Global and local shuffling of image patches, which disrupts the spatial structure of objects.
- Macro-level (Dataset): Class imbalance (long-tail distributions) and the use of synthetic data generated by GANs.
Analysis and Insights
The experiments unveiled several key behavioral differences between the two learning paradigms:
The "Breathing Room" Hypothesis
Supervised learning typically forces classes into very tight clusters to minimize cross-entropy loss. In contrast, contrastive learning encourages feature uniformity, spreading representations more evenly across the feature space. This "breathing room" prevents minor input distortions from pushing a representation across a decision boundary, making CL models inherently more robust to downstream noise.
The Augmentation Trap
CL's reliance on data augmentation—specifically random cropping—is a double-edged sword. CL learns by assuming that different crops of the same image represent the same underlying object. When training data is patch-shuffled, these crops no longer contain coherent object parts, breaking the self-supervised signal. Consequently, CL is far more sensitive to structural corruptions during training than SL.
Label Blindness as a Shield
Because CL does not rely on labels during pre-training, it is remarkably resilient to dataset-level distribution shifts like class imbalance. While SL models are often biased toward majority classes (the "head"), CL models learn high-quality features from all images regardless of their frequency in the dataset.
Key Results
- Downstream Resilience: CL models consistently outperformed SL models in downstream robustness tests. On ImageNet-100, MoCo-v2 showed significantly smaller accuracy drops when faced with gamma and shuffling distortions compared to supervised baselines.
- Pre-training Sensitivity: SL proved much more robust when the training data itself was corrupted. For instance, in patch-shuffling experiments, SL's accuracy drop was often minimal (under 10%), while CL models suffered catastrophic performance losses.
- Dataset Stability: MoCo-v2 demonstrated exceptional stability against class imbalance. Moving from a balanced to a long-tail training set resulted in a negligible 0.71% performance drop, whereas SL models experienced a much steeper decline.
- Improving Supervised Learning: The authors demonstrated that adding a "uniformity" regularization term to standard SL—mimicking the feature distribution of CL—significantly improved the model's robustness to test-time noise.
Conclusion
This research highlights that while CL and SL may achieve similar accuracy, their underlying behaviors are fundamentally different. CL offers superior robustness to downstream noise and dataset imbalance but requires high-quality, spatially consistent data during training. These insights provide a roadmap for developing more reliable models by combining the strengths of both supervised and self-supervised learning.
Summary updated