On the Importance of Gradients for Detecting Distributional Shifts in the Wild
arXiv:2110.00218
Abstract
Detecting out-of-distribution (OOD) data has become a critical component in ensuring the safe deployment of machine learning models in the real world. Existing OOD detection approaches primarily rely on the output or feature space for deriving OOD scores, while largely overlooking information from the gradient space. In this paper, we present GradNorm, a simple and effective approach for detecting OOD inputs by utilizing information extracted from the gradient space. GradNorm directly employs the vector norm of gradients, backpropagated from the KL divergence between the softmax output and a uniform probability distribution. Our key idea is that the magnitude of gradients is higher for in-distribution (ID) data than that for OOD data, making it informative for OOD detection. GradNorm demonstrates superior performance, reducing the average FPR95 by up to 16.33% compared to the previous best method.
arXiv commentAccepted in NeurIPS 2021
References in corpus (8)
- Auto-Encoding Variational Bayes
- Conditional Image Generation with PixelCNN Decoders
- A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networks
- LSUN: Construction of a Large-scale Image Dataset using Deep Learning with Humans in the Loop
- A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attacks
- Contrastive Training for Improved Out-of-Distribution Detection
- Understanding Anomaly Detection with Deep Invertible Networks through Hierarchies of Distributions and Features
- Shifts: A Dataset of Real Distributional Shift Across Multiple Large-Scale Tasks