Energy-based Out-of-distribution Detection
Weitang Liu, Xiaoyun Wang, John D. Owens, Yixuan Li
Abstract
Determining whether inputs are out-of-distribution (OOD) is an essential building block for safely deploying machine learning models in the open world. However, previous methods relying on the softmax confidence score suffer from overconfident posterior distributions for OOD data. We propose a unified framework for OOD detection that uses an energy score. We show that energy scores better distinguish in- and out-of-distribution samples than the traditional approach using the softmax scores. Unlike softmax confidence scores, energy scores are theoretically aligned with the probability density of the inputs and are less susceptible to the overconfidence issue. Within this framework, energy can be flexibly used as a scoring function for any pre-trained neural classifier as well as a trainable cost function to shape the energy surface explicitly for OOD detection. On a CIFAR-10 pre-trained WideResNet, using the energy score reduces the average FPR (at TPR 95%) by 18.03% compared to the softmax confidence score. With energy-based training, our method outperforms the state-of-the-art on common benchmarks.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 42110b75-ecff-444a-92be-6f193d0e4890Cited by top-tier papers529
- Out-of-Distribution Detection with Deep Nearest NeighborsYiyou Sun, Yifei Ming, Xiaojin Zhu, Yixuan LiICML 2022 · 789 citations
- ReAct: Out-of-distribution Detection With Rectified ActivationsYiyou Sun, Chuan Guo, Yixuan LiNeurIPS 2021 · 733 citations
- Open-Set Recognition: A Good Closed-Set Classifier is All You NeedSagar Vaze, Kai Han, Andrea Vedaldi, Andrew ZissermanICLR 2022 · 594 citations
- Efficient Test-Time Model Adaptation without ForgettingShuaicheng Niu, Jiaxiang Wu, Yifan Zhang, Yaofo Chen et al.ICML 2022 · 579 citations
- On the Importance of Gradients for Detecting Distributional Shifts in the WildRui Huang, Andrew Geng, Yixuan LiNeurIPS 2021 · 515 citations
Builds on6
- Your classifier is secretly an energy based model and you should treat it like oneWill Grathwohl, Kuan-Chieh Wang, Jörn-Henrik Jacobsen, David Duvenaud et al.ICLR 2020 · 643 citations
- Input Complexity and Out-of-distribution Detection with Likelihood-based Generative ModelsJoan Serrà, David Álvarez, Vicenç Gómez, Olga Slizovskaia et al.ICLR 2020 · 307 citations
- Self-Supervised Learning for Generalizable Out-of-Distribution DetectionSina Mohseni, Mandar Pitale, J. B. S. Yadawa, Zhangyang WangAAAI 2020 · 229 citations
- MOS: Towards Scaling Out-of-Distribution Detection for Large Semantic SpaceRui Huang, Yixuan LiCVPR 2021
- Generalized ODIN: Detecting Out-of-Distribution Image Without Learning From Out-of-Distribution DataYen-Chang Hsu, Yilin Shen, Hongxia Jin, Zsolt KiraCVPR 2020
Related papers
- Dual Energy-Based Model with Open-World Uncertainty Estimation for Out-of-distribution DetectionQi Chen, Hu DingCVPR 2025
- EGonc : Energy-based Open-Set Node Classification with substitute UnknownsQin Zhang, Zelin Shi, Shirui Pan, Junyang Chen et al.NeurIPS 2024 · 2 citations
- Hybrid Energy Based Model in the Feature Space for Out-of-Distribution DetectionMarc Lafon, Elias Ramzi, Clément Rambour, Nicolas ThomeICML 2023 · 14 citations
- GEN: Pushing the Limits of Softmax-Based Out-of-Distribution DetectionXixi Liu, Yaroslava Lochman, Christopher ZachCVPR 2023
- FEVER-OOD: Free Energy Vulnerability Elimination for Robust Out-of-Distribution DetectionBrian K. S. Isaac-Medina, Mauricio Che, Yona Falinie Binti A. Gaus, Samet Akcay et al.ICCV 2025 · 2 citations
