Partial and Asymmetric Contrastive Learning for Out-of-Distribution Detection in Long-Tailed Recognition

Haotao Wang, Aston Zhang, Yi Zhu, Shuai Zheng, Mu Li +2 more
7/4/2022
cs.CVcs.LG

No official code found. Best implementation: amazon-science/long-tailed-ood-detection (42 stars, Apache-2.0, last commit 2023-05-15).

Abstract

Existing out-of-distribution (OOD) detection methods are typically benchmarked on training sets with balanced class distributions. However, in real-world applications, it is common for the training sets to have long-tailed distributions. In this work, we first demonstrate that existing OOD detection methods commonly suffer from significant performance degradation when the training set is long-tail distributed. Through analysis, we posit that this is because the models struggle to distinguish the minority tail-class in-distribution samples, from the true OOD samples, making the tail classes more prone to be falsely detected as OOD. To solve this problem, we propose Partial and Asymmetric Supervised Contrastive Learning (PASCL), which explicitly encourages the model to distinguish between tail-class in-distribution samples and OOD samples. To further boost in-distribution classification accuracy, we propose Auxiliary Branch Finetuning, which uses two separate branches of BN and classification layers for anomaly detection and in-distribution classification, respectively. The intuition is that in-distribution and OOD anomaly data have different underlying distributions. Our method outperforms previous state-of-the-art method by $1.29\%$, $1.45\%$, $0.69\%$ anomaly detection false positive rate (FPR) and $3.24\%$, $4.06\%$, $7.89\%$ in-distribution classification accuracy on CIFAR10-LT, CIFAR100-LT, and ImageNet-LT, respectively. Code and pre-trained models are available at https://github.com/amazon-research/long-tailed-ood-detection.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Official implementation for "Partial and Asymmetric Contrastive Learning for Out-of-Distribution Detection in Long-Tailed Recognition" (ICML'22 Long Presentation)

426Shell, PythonJun 10, 20223 years agoApache-2.0

Similar Papers

Cite this paper

@article{wang2022partial,
  title  = {Partial and Asymmetric Contrastive Learning for Out-of-Distribution Detection in Long-Tailed Recognition},
  author = {Haotao Wang and Aston Zhang and Yi Zhu and Shuai Zheng and Mu Li and Alex Smola and Zhangyang Wang},
  year   = {2022},
  eprint = {2207.01160},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2207.01160v1}
}

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/2207.01160.svg)](https://codeofpaper.com/paper/2207.01160)

Discussion