When and How Does In-Distribution Label Help Out-of-Distribution Detection?

Xuefeng Du, Yiyou Sun, Yixuan Li
5/28/2024
cs.LG

Official code: deeplearning-wisc/id_label (4 stars, last commit 2024-05-30).

Abstract

Detecting data points deviating from the training distribution is pivotal for ensuring reliable machine learning. Extensive research has been dedicated to the challenge, spanning classical anomaly detection techniques to contemporary out-of-distribution (OOD) detection approaches. While OOD detection commonly relies on supervised learning from a labeled in-distribution (ID) dataset, anomaly detection may treat the entire ID data as a single class and disregard ID labels. This fundamental distinction raises a significant question that has yet to be rigorously explored: when and how does ID label help OOD detection? This paper bridges this gap by offering a formal understanding to theoretically delineate the impact of ID labels on OOD detection. We employ a graph-theoretic approach, rigorously analyzing the separability of ID data from OOD data in a closed-form manner. Key to our approach is the characterization of data representations through spectral decomposition on the graph. Leveraging these representations, we establish a provable error bound that compares the OOD detection performance with and without ID labels, unveiling conditions for achieving enhanced OOD detection. Lastly, we present empirical results on both simulated and real datasets, validating theoretical guarantees and reinforcing our insights. Code is publicly available at https://github.com/deeplearning-wisc/id_label.

View on arXivView PDF

Code Implementations(1)

source code for ICML'24 paper "When and how does in-distribution label help out-of-distribution detection?"

40PythonMay 24, 20242 years ago

Similar Papers

Cite this paper

@article{du2024when,
  title  = {When and How Does In-Distribution Label Help Out-of-Distribution Detection?},
  author = {Xuefeng Du and Yiyou Sun and Yixuan Li},
  year   = {2024},
  eprint = {2405.18635},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.18635v1},
  journal = {ICML 2024 2024}
}

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

Discussion