Is Self-Supervised Contrastive Learning More Robust Than Supervised Learning?

Yuanyi Zhong, Haoran Tang, Junkun Chen, Jian Peng, Yu-Xiong WangICLR 2023

Abstract

Prior work on self-supervised contrastive learning has primarily focused on evaluating the recognition accuracy, but has overlooked other behavioral aspects. In addition to accuracy, distributional robustness plays a critical role in the reliability of machine learning models. We design and conduct a series of robustness tests to quantify the behavioral differences between contrastive learning and supervised learning to downstream and pre-training data distribution changes. These tests leverage data corruptions at multiple levels, ranging from pixel-level distortion to patch-level shuffling and to dataset-level distribution shift, including both natural and unnatural corruptions. Our tests unveil intriguing robustness behaviors of contrastive and supervised learning: while we generally observe that contrastive learning is more robust than supervised learning under downstream corruptions, we surprisingly discover the robustness vulnerability of contrastive learning under pixel and patch level corruptions during pre-training. Furthermore, we observe the higher dependence of contrastive learning on spatial image coherence information during pre-training, e.g., it is particularly sensitive to global patch shuffling. We explain these results by connecting to feature space uniformity and data augmentation. Our analysis has implications in improving the downstream robustness of supervised learning, and calls for more studies on understanding contrastive learning.
BibTeX
@inproceedings{zhong2023is,
  author = {Yuanyi Zhong and Haoran Tang and Junkun Chen and Jian Peng and Yu-Xiong Wang},
  title = {{Is Self-Supervised Contrastive Learning More Robust Than Supervised Learning?}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=FPdDFUVYVPl},
}
Figure