On the Importance of Gradients for Detecting Distributional Shifts in the Wild
Rui Huang, Andrew Geng, Yixuan Li
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 indistribution (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. Code and data available: https://github.com/deeplearning-wisc/gradnorm_ood . * Work done while A.G was working as an undergraduate research assistant with Li's lab. 35th Conference on Neural Information Processing Systems (NeurIPS 2021).
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 57a3997d-2ab9-4622-93a4-db0f91cb3505Cited by top-tier papers156
- 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
- VOS: Learning What You Don't Know by Virtual Outlier SynthesisXuefeng Du, Zhaoning Wang, Mu Cai, Yixuan LiICLR 2022 · 417 citations
- Mitigating Neural Network Overconfidence with Logit NormalizationHongxin Wei, Renchunzi Xie, Hao Cheng, Lei Feng et al.ICML 2022 · 386 citations
- Delving into Out-of-Distribution Detection with Vision-Language RepresentationsYifei Ming, Ziyang Cai, Jiuxiang Gu, Yiyou Sun et al.NeurIPS 2022 · 308 citations
Builds on10
- Energy-based Out-of-distribution DetectionWeitang Liu, Xiaoyun Wang, John D. Owens, Yixuan LiNeurIPS 2020 · 2,213 citations
- Why Normalizing Flows Fail to Detect Out-of-Distribution DataPolina Kirichenko, Pavel Izmailov, Andrew Gordon WilsonNeurIPS 2020 · 370 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
- Likelihood Regret: An Out-of-Distribution Detection Score For Variational Auto-encoderZhisheng Xiao, Qing Yan, Yali AmitNeurIPS 2020 · 234 citations
- Self-Supervised Learning for Generalizable Out-of-Distribution DetectionSina Mohseni, Mandar Pitale, J. B. S. Yadawa, Zhangyang WangAAAI 2020 · 229 citations
Related papers
- GradOrth: A Simple yet Efficient Out-of-Distribution Detection with Orthogonal Projection of GradientsSima Behpour, Thang Long Doan, Xin Li, Wenbin He et al.NeurIPS 2023 · 34 citations
- Block Selection Method for Using Feature Norm in Out-of-Distribution DetectionYeonguk Yu, Sungho Shin, Seongju Lee, Changhyun Jun et al.CVPR 2023
- Simple and Effective Out-of-Distribution Detection via Cosine-based Softmax LossSoonCheol Noh, DongEon Jeong, Jee-Hyong LeeICCV 2023 · 6 citations
- Multiscale Score Matching for Out-of-Distribution DetectionAhsan Mahmood, Junier Oliva, Martin Andreas StynerICLR 2021 · 41 citations
- Exploiting Discrepancy in Feature Statistic for Out-of-Distribution DetectionXiaoyuan Guan, Jiankang Chen, Shenshen Bu, Yuren Zhou et al.AAAI 2024 · 4 citations
