Understanding normalization in contrastive representation learning and out-of-distribution detection

Tai Le-Gia, Jaehyun Ahn
12/23/2023
cs.CVstat.ML

No confident code implementation found for this paper.

Abstract

Contrastive representation learning has emerged as an outstanding approach for anomaly detection. In this work, we explore the $\ell_2$-norm of contrastive features and its applications in out-of-distribution detection. We propose a simple method based on contrastive learning, which incorporates out-of-distribution data by discriminating against normal samples in the contrastive layer space. Our approach can be applied flexibly as an outlier exposure (OE) approach, where the out-of-distribution data is a huge collective of random images, or as a fully self-supervised learning approach, where the out-of-distribution data is self-generated by applying distribution-shifting transformations. The ability to incorporate additional out-of-distribution samples enables a feasible solution for datasets where AD methods based on contrastive learning generally underperform, such as aerial images or microscopy images. Furthermore, the high-quality features learned through contrastive learning consistently enhance performance in OE scenarios, even when the available out-of-distribution dataset is not diverse enough. Our extensive experiments demonstrate the superiority of our proposed method under various scenarios, including unimodal and multimodal settings, with various image datasets.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{legia2023understanding,
  title  = {Understanding normalization in contrastive representation learning and out-of-distribution detection},
  author = {Tai Le-Gia and Jaehyun Ahn},
  year   = {2023},
  eprint = {2312.15288},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.15288v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.15288.svg)](https://codeofpaper.com/paper/2312.15288)

Discussion