Detecting Out-of-distribution Data through In-distribution Class Prior

Xue Jiang, Feng Liu, Zhen Fang, Hong Chen, Tongliang Liu, Feng Zheng*, Bo Han

*Corresponding author for this work

Research output: Chapter in book/report/conference proceedingConference proceedingpeer-review

11 Citations (Scopus)

Abstract

Given a pre-trained in-distribution (ID) model, the inference-time out-of-distribution (OOD) detection aims to recognize OOD data during the inference stage. However, some representative methods share an unproven assumption that the probability that OOD data belong to every ID class should be the same, i.e., these OOD-to-ID probabilities actually form a uniform distribution. In this paper, we show that this assumption makes the above methods incapable when the ID model is trained with class-imbalanced data.Fortunately, by analyzing the causal relations between ID/OOD classes and features, we identify several common scenarios where the OOD-to-ID probabilities should be the ID-class-prior distribution and propose two strategies to modify existing inference-time detection methods: 1) replace the uniform distribution with the ID-class-prior distribution if they explicitly use the uniform distribution; 2) otherwise, reweight their scores according to the similarity between the ID-class-prior distribution and the softmax outputs of the pre-trained model. Extensive experiments show that both strategies can improve the OOD detection performance when the ID model is pre-trained with imbalanced data, reflecting the importance of ID-class prior in OOD detection.
Original languageEnglish
Title of host publicationProceedings of the 40th International Conference on Machine Learning, ICML 2023
EditorsAndreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, Jonathan Scarlett
PublisherML Research Press
Pages15067-15088
Number of pages22
Volume202
Publication statusPublished - Jul 2023
Event40th International Conference on Machine Learning, ICML 2023 - Honolulu, United States
Duration: 23 Jul 202329 Jul 2023
https://icml.cc/Conferences/2023
https://proceedings.mlr.press/v202/
https://openreview.net/group?id=ICML.cc/2023/Conference

Publication series

NameProceedings of Machine Learning Research
Volume202
ISSN (Print)2640-3498

Conference

Conference40th International Conference on Machine Learning, ICML 2023
Country/TerritoryUnited States
CityHonolulu
Period23/07/2329/07/23
Internet address

Fingerprint

Dive into the research topics of 'Detecting Out-of-distribution Data through In-distribution Class Prior'. Together they form a unique fingerprint.

Cite this