Out-of-Distribution Detection with a Single Unconditional Diffusion Model

Alvin Heng, Alexandre H. Thiery, Harold Soh
5/20/2024
cs.LGcs.AIstat.ML

Official code: clear-nus/diffpath (20 stars, MIT, last commit 2024-10-22).

Abstract

Out-of-distribution (OOD) detection is a critical task in machine learning that seeks to identify abnormal samples. Traditionally, unsupervised methods utilize a deep generative model for OOD detection. However, such approaches require a new model to be trained for each inlier dataset. This paper explores whether a single model can perform OOD detection across diverse tasks. To that end, we introduce Diffusion Paths (DiffPath), which uses a single diffusion model originally trained to perform unconditional generation for OOD detection. We introduce a novel technique of measuring the rate-of-change and curvature of the diffusion paths connecting samples to the standard normal. Extensive experiments show that with a single model, DiffPath is competitive with prior work using individual models on a variety of OOD tasks involving different distributions. Our code is publicly available at https://github.com/clear-nus/diffpath.

View on arXivView PDF

Code Implementations(1)

clear-nus/diffpathOfficial100%
MIT
204PythonMay 20, 20241 years agoMIT

Similar Papers

Cite this paper

@article{heng2024outofdistribution,
  title  = {Out-of-Distribution Detection with a Single Unconditional Diffusion Model},
  author = {Alvin Heng and Alexandre H. Thiery and Harold Soh},
  year   = {2024},
  eprint = {2405.11881},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2405.11881},
  url    = {http://arxiv.org/abs/2405.11881v3},
  journal = {NEURIPS 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.11881.svg)](https://codeofpaper.com/paper/2405.11881)

Discussion