mlsanityData to 7 Oct 2026

Understanding the properties and limitations of contrastive learning for Out-of-Distribution detection

arXiv 2211.03183 ↗First posted 6 Nov 2022cs.LG cs.CVcited by 1

Not on the map. Why?

Abstract (arXiv)

A recent popular approach to out-of-distribution (OOD) detection is based on a self-supervised learning technique referred to as contrastive learning. There are two main variants of contrastive learning, namely instance and class discrimination, targeting features that can discriminate between different instances for the former, and different classes for the latter. In this paper, we aim to understand the effectiveness and limitation of existing contrastive learning methods for OOD detection. We approach this in 3 ways. First, we systematically study the performance difference between the instance discrimination and supervised contrastive learning variants in different OOD detection settings. Second, we study which in-distribution (ID) classes OOD data tend to be classified into. Finally, we study the spectral decay property of the different contrastive learning approaches and examine how it correlates with OOD detection performance. In scenarios where the ID and OOD datasets are sufficiently different from one another, we see that instance discrimination, in the absence of fine-tuning, is competitive with supervised approaches in OOD detection. We see that OOD samples tend to be classified into classes that have a distribution similar to the distribution of the entire dataset. Furthermore, we show that contrastive learning learns a feature space that contains singular vectors containing several directions with a high variance which can be detrimental or beneficial to OOD detection depending on the inference approach used.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 22 of its 27 references that are in the map. First posted on arXiv 6 Nov 2022.

Builds on

22 of 27 references.

References · 22

  1. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  2. 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 11,979
  3. 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,482
  4. 2017Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithmscited by 4,283
  5. 2020Supervised Contrastive Learningcited by 2,803
  6. 2016A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networkscited by 2,362
  7. 2021Barlow Twins: Self-Supervised Learning via Redundancy Reductioncited by 1,818
  8. 2018A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attackscited by 1,472
  9. 2017Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networkscited by 1,325
  10. 2014Deep Neural Networks are Easily Fooled: High Confidence Predictions for Unrecognizable Imagescited by 774
  11. 2018Predictive Uncertainty Estimation via Prior Networkscited by 555
  12. 2020CSI: Novelty Detection via Contrastive Learning on Distributionally Shifted Instancescited by 441
10 more
  1. 2020A Unifying Review of Deep and Shallow Anomaly Detectioncited by 423
  2. 2018Deep Learning for Classical Japanese Literaturecited by 415
  3. 2018Deep Anomaly Detection Using Geometric Transformationscited by 269
  4. 2021SSD: A Unified Framework for Self-Supervised Outlier Detectioncited by 264
  5. 2019Input complexity and out-of-distribution detection with likelihood-based generative modelscited by 186
  6. 2020Contrastive Training for Improved Out-of-Distribution Detectioncited by 186
  7. 2020Learning and Evaluating Representations for Deep One-class Classificationcited by 133
  8. 2020Revisiting Training Strategies and Generalization Performance in Deep Metric Learningcited by 99
  9. 2021Does Your Dermatology Classifier Know What It Doesn't Know? Detecting the Long-Tail of Unseen Conditionscited by 68
  10. 2021Masked Contrastive Learning for Anomaly Detectioncited by 23

Built on by

Cited by year

Citing papers per year: 2025: 1.

1 paper.