Out-of-Distribution (OOD) detection is a task that is witnessing increasing interest in machine and deep learning, since it deals with the problem of signaling inputs coming outside of the data-generating distribution on which a certain model has been trained. Different approaches have been proposed, some of which are based on network architecture design, others consisting in obtaining confidence scores without retraining. Recently, some studies have pointed out that applying density estimation-based anomaly detection scores on the latent spaces associated with hidden layers of neural networks may be beneficial for improving out-of-distribution detection. In this work, we provide a contribution to this research line by proposing a novel out-of-distribution approach, called CF-OOD (for Concentration-Free Out-of-Distribution detection), based on the Concentration-Free Outlier Factor (CFOF), a score relying on the concept of reverse nearest neighborhood, which has been originally designed for effective anomaly detection in the context of very high-dimensional data. Indeed, the above measure is particularly suitable for the typically large hidden representations of deep learning architectures. Experiments highlight that the novel method is able to provide state-of-the-art performances on a plurality of deep learning architectures and out-of-distribution datasets, and also in the challenging low-regime scenario. Finally, we show that the choice of the neighborhood parameter value is not critical and, moreover, that the scores can be reliably estimated by means of a sampling procedure exploiting only a small fraction of the in-distribution data.

CF-OOD: Concentration-Free Density Estimation for Reliable Out-of-Distribution Detection

Angiulli, Fabrizio;Fassetti, Fabio;Zupi, Maria Pia
2026-01-01

Abstract

Out-of-Distribution (OOD) detection is a task that is witnessing increasing interest in machine and deep learning, since it deals with the problem of signaling inputs coming outside of the data-generating distribution on which a certain model has been trained. Different approaches have been proposed, some of which are based on network architecture design, others consisting in obtaining confidence scores without retraining. Recently, some studies have pointed out that applying density estimation-based anomaly detection scores on the latent spaces associated with hidden layers of neural networks may be beneficial for improving out-of-distribution detection. In this work, we provide a contribution to this research line by proposing a novel out-of-distribution approach, called CF-OOD (for Concentration-Free Out-of-Distribution detection), based on the Concentration-Free Outlier Factor (CFOF), a score relying on the concept of reverse nearest neighborhood, which has been originally designed for effective anomaly detection in the context of very high-dimensional data. Indeed, the above measure is particularly suitable for the typically large hidden representations of deep learning architectures. Experiments highlight that the novel method is able to provide state-of-the-art performances on a plurality of deep learning architectures and out-of-distribution datasets, and also in the challenging low-regime scenario. Finally, we show that the choice of the neighborhood parameter value is not critical and, moreover, that the scores can be reliably estimated by means of a sampling procedure exploiting only a small fraction of the in-distribution data.
2026
9783032060686
9783032060693
Deep Learning
Out-of-distribution detection
Reverse Nearest Neighbor
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/20.500.11770/399817
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 0
  • ???jsp.display-item.citation.isi??? ND
social impact