NODI: Out-Of-Distribution Detection with Noise from Diffusion
Jingqiu Zhou, Aojun Zhou, Hongsheng Li
TL;DR
The paper tackles out-of-distribution detection by introducing diffusion models that incorporate information from the entire in-distribution training set into predicted noise vectors. It proposes a bias-removing encoding scheme and normalizes features onto a fixed-radius sphere, enabling either a diffusion-based or a closed-form noise-vector OOD score, with test-time scaling determined by binary search. Empirically, the approach yields robust improvements across image encoders (ResNet and Vision Transformers) on Imagenet-backed OOD benchmarks, including up to about a 3.5 percentage-point AUROC gain with MAE-based encoders, and demonstrates clear benefits from bias removal, normalization, and class-wise scoring. The method shows strong encoder-robustness and outperforms prior OOD techniques, suggesting practical impact for safe deployment and avenues for further refinement.
Abstract
Out-of-distribution (OOD) detection is a crucial part of deploying machine learning models safely. It has been extensively studied with a plethora of methods developed in the literature. This problem is tackled with an OOD score computation, however, previous methods compute the OOD scores with limited usage of the in-distribution dataset. For instance, the OOD scores are computed with information from a small portion of the in-distribution data. Furthermore, these methods encode images with a neural image encoder. The robustness of these methods is rarely checked with respect to image encoders of different training methods and architectures. In this work, we introduce the diffusion process into the OOD task. The diffusion model integrates information on the whole training set into the predicted noise vectors. What's more, we deduce a closed-form solution for the noise vector (stable point). Then the noise vector is converted into our OOD score, we test both the deep model predicted noise vector and the closed-form noise vector on the OOD benchmarks \cite{openood}. Our method outperforms previous OOD methods across all types of image encoders (Table. \ref{main}). A $3.5\%$ performance gain is achieved with the MAE-based image encoder. Moreover, we studied the robustness of OOD methods by applying different types of image encoders. Some OOD methods failed to generalize well when switching image encoders from ResNet to Vision Transformers, our method performs exhibits good robustness with all the image encoders.
