Revisiting Likelihood-Based Out-of-Distribution Detection by Modeling Representations

Yifan Ding, Arturas Aleksandraus, Amirhossein Ahmadian, Jonas Unger, Fredrik Lindsten +1 more
4/10/2025
cs.LGcs.CV

Official code: limchaos/Likelihood-OOD (5 stars, MIT, last commit 2025-07-24).

Abstract

Out-of-distribution (OOD) detection is critical for ensuring the reliability of deep learning systems, particularly in safety-critical applications. Likelihood-based deep generative models have historically faced criticism for their unsatisfactory performance in OOD detection, often assigning higher likelihood to OOD data than in-distribution samples when applied to image data. In this work, we demonstrate that likelihood is not inherently flawed. Rather, several properties in the images space prohibit likelihood as a valid detection score. Given a sufficiently good likelihood estimator, specifically using the probability flow formulation of a diffusion model, we show that likelihood-based methods can still perform on par with state-of-the-art methods when applied in the representation space of pre-trained encoders. The code of our work can be found at $\href{https://github.com/limchaos/Likelihood-OOD.git}{\texttt{https://github.com/limchaos/Likelihood-OOD.git}}$.

View on arXivView PDF

Code Implementations(1)

MIT
50Shell, PythonApr 10, 20251 years agoMIT

Similar Papers

Cite this paper

@article{ding2025revisiting,
  title  = {Revisiting Likelihood-Based Out-of-Distribution Detection by Modeling Representations},
  author = {Yifan Ding and Arturas Aleksandraus and Amirhossein Ahmadian and Jonas Unger and Fredrik Lindsten and Gabriel Eilertsen},
  year   = {2025},
  eprint = {2504.07793},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.07793v3}
}

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

Discussion