On the Importance of Gradients for Detecting Distributional Shifts in the Wild
Rui Huang, Andrew Geng, Yixuan Li

TL;DR
This paper introduces GradNorm, a novel method for detecting out-of-distribution data by analyzing gradient magnitudes, which outperforms existing approaches in identifying OOD inputs in real-world scenarios.
Contribution
GradNorm is a simple yet effective gradient-based approach that improves OOD detection by leveraging gradient norms, a previously overlooked information source.
Findings
GradNorm reduces FPR95 by up to 16.33% over previous methods.
Gradient magnitude is higher for in-distribution data, aiding OOD detection.
Gradient space contains valuable information for OOD detection not utilized before.
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Taxonomy
TopicsAnomaly Detection Techniques and Applications · Data Stream Mining Techniques · Advanced Neural Network Applications
MethodsSoftmax
