Understanding the Properties and Limitations of Contrastive Learning for Out-of-Distribution Detection

Nawid Keshtmand*, Raul Santos-Rodriguez, Jonathan Lawry

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference Contribution (Conference Proceeding)

Abstract

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.
Original languageEnglish
Title of host publicationPattern Recognition, Computer Vision, and Image Processing. ICPR 2022 International Workshops and Challenges - Proceedings
EditorsJean-Jacques Rousseau, Bill Kapralos
PublisherSpringer Science and Business Media Deutschland GmbH
Pages330-343
Number of pages14
ISBN (Electronic)9783031376603
ISBN (Print)9783031376597
DOIs
Publication statusPublished - 30 Jul 2023
Event26th International Conference on Pattern Recognition, ICPR 2022 - Montréal, Canada
Duration: 21 Aug 202225 Aug 2022

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume13643 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference26th International Conference on Pattern Recognition, ICPR 2022
Country/TerritoryCanada
CityMontréal
Period21/08/2225/08/22

Bibliographical note

Publisher Copyright:
© 2023, Springer Nature Switzerland AG.

Keywords

  • Contrastive Learnining
  • OOD detection

Fingerprint

Dive into the research topics of 'Understanding the Properties and Limitations of Contrastive Learning for Out-of-Distribution Detection'. Together they form a unique fingerprint.

Cite this