Energy-based Out-of-distribution Detection
By Weitang Liu, Xiaoyun Wang, John Douglas Owens, Yixuan Li. 2020
2,043 citations recorded by the source corpus.
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.
Subfields: Artificial Intelligence, Anomaly & Outlier Detection
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Jun Zhu
- Mohit Bansal
- Ziwei Liu
- Fahad Shahbaz Khan
- Percy Liang
- Yoshua Bengio
- Quoc V. Le
- Bernt Schiele
In Anomaly & Outlier Detection
Citations in the corpus
- A Theoretical Study on Solving Continual Learning (2022, methodology): “ODIN: Researchers have proposed several methods to improve the OOD detection performance of a trained network by post-processing [7, 70, 71].”
- Novel Class Discovery without Forgetting (2022, background): “Methods that perform out-of-distribution detection [32,38] and open-set learning [46,18] identify instances significantly different from the training data distribution as novel samples, but do not identify sub-groups within these identified instances automatically.”
- Energy-based Latent Aligner for Incremental Learning (2022, methodology): “EBMs have been used for out-of-distribution sample detection [30, 47], structured prediction [4, 5, 48] and improving adversarial robustness [11, 17].”
- Towards Open World Object Detection (2021, background): “There exists a simple relation between the network outputs after the softmax layer and the Gibbs distribution of class specific energy values [34].”
- GraDA: Graph Generative Data Augmentation for Commonsense Reasoning (2022, methodology): “See supplementary for a comparison of QAP with two other methods for filtering i.e. Energy (Liu et al., 2020) and Model Confidence & Variability (Swayamdipta et al., 2020).”
- VOS: Learning What You Don't Know by Virtual Outlier Synthesis (2022, methodology): “Open-world object detection includes out-of-domain generalization (Kim et al., 2021; Wang et al., 2021), zero-shot object detection (Gu et al., 2022; Rahman et al., 2020) and incremental object detection (Liu et al., 2020b; P´erez-R´ua et al., 2020).”
- CODEs: Chamfer Out-of-Distribution Examples against Overconfidence Issue (2021, methodology): “Specifically, we train WRN-40-2 [49] on CIFAR-10 and CIFAR-100 [24], and then test it on six datasets: Textures [6], SVHN, Places365 [50], LSUN-Crop [47], LSUNResize [47], and iSUN [45] following [32].”
- OpenOOD: Benchmarking Generalized Out-of-Distribution Detection (2022, methodology): “Later works explore other simple and more efficient indicators to distinguish ID and OOD, such as ODIN [13] that uses temperature scaling with gradient-based input perturbations, MDS [18] that measures minimum mahalanobis distance from class centroids, EBO [14] that uses energy-based functions, GRAM ”
- Is Out-of-Distribution Detection Learnable? (2022, methodology): “Note that, following [23], we choose the threshold used by the free-energy method so that 95% of ID data are correctly identified as the ID classes by the OOD detector.”
- Generalized Out-of-Distribution Detection: A Survey (2021, positive): “Built on the insights, recent work [104], [111] proposed using an energy score for OOD detection, which enjoys theoretical interpretation from a likelihood perspective [293].”
- Deterministic Neural Networks with Appropriate Inductive Biases Capture Epistemic and Aleatoric Uncertainty (2021, methodology): “On the other hand, to quantify the epistemic uncertainty, we use i) the softmax entropy, ii) the softmax density [Liu et al., 2020b] or iii) the GMM feature density (as described in section 4).”
- Unsupervised Energy-based Out-of-distribution Detection using Stiefel-Restricted Kernel Machine (2021, methodology): “Similar to [18] and [7], our proposed approach is energy-based.”
- Variational (Gradient) Estimate of the Score Function in Energy-based Latent Variable Models (2020, background): “, 2020), out-of-distribution detection (Grathwohl et al., 2020a; Liu et al., 2020) and controllable generation (Nijkamp et al.”
- INSIDE: LLMs' Internal States Retain the Power of Hallucination Detection (2024, methodology): “Besides, in order to investigate whether traditional OOD detection methods can be used for hallucination detection, we also introduce a popular OOD detection method Energy score (Liu et al., 2020) as a comparison method.”
- Mitigating Neural Network Overconfidence with Logit Normalization (2022, methodology): “Beyond MSP, we show that our method not only out-performs, but also boosts more advanced post-hoc OOD scoring functions, such as ODIN (Liang et al., 2018), energy score (Liu et al., 2020), and GradNorm score (Huang et al., 2021).”
- On the Importance of Gradients for Detecting Distributional Shifts in the Wild (2021, methodology): “Energy [28] Liu et al. first proposed using energy score for OOD uncertainty estimation.”
- A Unified Continual Learning Framework with General Parameter-Efficient Tuning (2023, neutral): “Previous research [29] has shown that the energy of an energy model trained on one data domain is generally very high on other data domains.”
- ADBench: Anomaly Detection Benchmark (2022, methodology): “…fields, e.g., OCSVM [157], can be used for AD as well; future benchmark can consider including: ( i ) OOD methods: MSP [65], energy-based EBO [104], and Mahalanobis distance-based MDS [92]; ( ii ) novelty detection methods: OCGAN [135] and Adversarial One-Class Classifier [154]; and ( iii )…”