Revisiting Energy-Based Model for Out-of-Distribution Detection
Yifan Wu, Xichen Ye, Songmin Dai, Dengye Pan, Xiaoqiang Li, Weizhong Zhang, Yifan Chen
TL;DR
This work tackles the challenge of robust out-of-distribution (OOD) detection without relying on curated real outliers by introducing peripheral-distribution (PD) data generated via simple transformations. Grounded in energy-based models (EBMs), it defines an energy barrier that separates in-distribution (ID) from PD and OOD samples, and proposes an energy-barrier loss (OEST*) to enforce this separation while maintaining ID accuracy. The key contributions are the PD data concept, the energy-barrier theory with a principled loss, and extensive experiments showing competitive to state-of-the-art OOD detection on CIFAR-10/100 across near and far OOD benchmarks, with improved generalization and backbone-insensitive performance. The approach offers a practical, scalable alternative to real outliers, potentially enabling more robust open-world perception in applications like autonomous systems and medical imaging, where curated OOD data are scarce.
Abstract
Out-of-distribution (OOD) detection is an essential approach to robustifying deep learning models, enabling them to identify inputs that fall outside of their trained distribution. Existing OOD detection methods usually depend on crafted data, such as specific outlier datasets or elaborate data augmentations. While this is reasonable, the frequent mismatch between crafted data and OOD data limits model robustness and generalizability. In response to this issue, we introduce Outlier Exposure by Simple Transformations (OEST), a framework that enhances OOD detection by leveraging "peripheral-distribution" (PD) data. Specifically, PD data are samples generated through simple data transformations, thus providing an efficient alternative to manually curated outliers. We adopt energy-based models (EBMs) to study PD data. We recognize the "energy barrier" in OOD detection, which characterizes the energy difference between in-distribution (ID) and OOD samples and eases detection. PD data are introduced to establish the energy barrier during training. Furthermore, this energy barrier concept motivates a theoretically grounded energy-barrier loss to replace the classical energy-bounded loss, leading to an improved paradigm, OEST*, which achieves a more effective and theoretically sound separation between ID and OOD samples. We perform empirical validation of our proposal, and extensive experiments across various benchmarks demonstrate that OEST* achieves better or similar accuracy compared with state-of-the-art methods.
