Lune

NeurIPS2021Top-tier venue

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 . G was working as an undergraduate research assistant with Li's lab.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

156 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Mitigating Neural Network Overconfidence with Logit Normalization cites Energy-based Out-of-distribution Detection
  • Mitigating Neural Network Overconfidence with Logit Normalization cites ReAct: Out-of-distribution Detection With Rectified Activations
  • Mitigating Neural Network Overconfidence with Logit Normalization cites Out-of-Distribution Detection with Deep Nearest Neighbors
  • Out-of-Distribution Detection with Deep Nearest Neighbors cites Mitigating Neural Network Overconfidence with Logit Normalization
  • Mitigating Neural Network Overconfidence with Logit Normalization cites Self-Supervised Learning for Generalizable Out-of-Distribution Detection
  • Delving into Out-of-Distribution Detection with Vision-Language Representations cites VOS: Learning What You Don't Know by Virtual Outlier Synthesis
  • Delving into Out-of-Distribution Detection with Vision-Language Representations cites Energy-based Out-of-distribution Detection
  • Delving into Out-of-Distribution Detection with Vision-Language Representations cites Likelihood Regret: An Out-of-Distribution Detection Score For Variational Auto-encoder
  • Delving into Out-of-Distribution Detection with Vision-Language Representations cites ReAct: Out-of-distribution Detection With Rectified Activations
  • Delving into Out-of-Distribution Detection with Vision-Language Representations cites Input Complexity and Out-of-distribution Detection with Likelihood-based Generative Models
  • Delving into Out-of-Distribution Detection with Vision-Language Representations cites Out-of-Distribution Detection with Deep Nearest Neighbors
  • Delving into Out-of-Distribution Detection with Vision-Language Representations cites Why Normalizing Flows Fail to Detect Out-of-Distribution Data
  • VOS: Learning What You Don't Know by Virtual Outlier Synthesis cites Energy-based Out-of-distribution Detection
  • VOS: Learning What You Don't Know by Virtual Outlier Synthesis cites ReAct: Out-of-distribution Detection With Rectified Activations
  • VOS: Learning What You Don't Know by Virtual Outlier Synthesis cites Self-Supervised Learning for Generalizable Out-of-Distribution Detection
  • Energy-based Out-of-distribution Detection cites Input Complexity and Out-of-distribution Detection with Likelihood-based Generative Models
  • Energy-based Out-of-distribution Detection cites Self-Supervised Learning for Generalizable Out-of-Distribution Detection
  • Likelihood Regret: An Out-of-Distribution Detection Score For Variational Auto-encoder cites Input Complexity and Out-of-distribution Detection with Likelihood-based Generative Models
  • ReAct: Out-of-distribution Detection With Rectified Activations cites Energy-based Out-of-distribution Detection
  • ReAct: Out-of-distribution Detection With Rectified Activations cites Likelihood Regret: An Out-of-Distribution Detection Score For Variational Auto-encoder
  • ReAct: Out-of-distribution Detection With Rectified Activations cites Input Complexity and Out-of-distribution Detection with Likelihood-based Generative Models
  • ReAct: Out-of-distribution Detection With Rectified Activations cites Why Normalizing Flows Fail to Detect Out-of-Distribution Data
  • Out-of-Distribution Detection with Deep Nearest Neighbors cites Energy-based Out-of-distribution Detection
  • Out-of-Distribution Detection with Deep Nearest Neighbors cites ReAct: Out-of-distribution Detection With Rectified Activations
  • Out-of-Distribution Detection with Deep Nearest Neighbors cites Self-Supervised Learning for Generalizable Out-of-Distribution Detection
  • Why Normalizing Flows Fail to Detect Out-of-Distribution Data cites Input Complexity and Out-of-distribution Detection with Likelihood-based Generative Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers156

  1. Out-of-Distribution Detection with Deep Nearest NeighborsYiyou Sun, Yifei Ming, Xiaojin Zhu, Yixuan LiICML 2022 · 789 citations
  2. ReAct: Out-of-distribution Detection With Rectified ActivationsYiyou Sun, Chuan Guo, Yixuan LiNeurIPS 2021 · 733 citations
  3. VOS: Learning What You Don't Know by Virtual Outlier SynthesisXuefeng Du, Zhaoning Wang, Mu Cai, Yixuan LiICLR 2022 · 417 citations
  4. Mitigating Neural Network Overconfidence with Logit NormalizationHongxin Wei, Renchunzi Xie, Hao Cheng, Lei Feng et al.ICML 2022 · 386 citations
  5. 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

  1. Energy-based Out-of-distribution DetectionWeitang Liu, Xiaoyun Wang, John D. Owens, Yixuan LiNeurIPS 2020 · 2,213 citations
  2. Why Normalizing Flows Fail to Detect Out-of-Distribution DataPolina Kirichenko, Pavel Izmailov, Andrew Gordon WilsonNeurIPS 2020 · 370 citations
  3. 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
  4. Likelihood Regret: An Out-of-Distribution Detection Score For Variational Auto-encoderZhisheng Xiao, Qing Yan, Yali AmitNeurIPS 2020 · 234 citations
  5. Self-Supervised Learning for Generalizable Out-of-Distribution DetectionSina Mohseni, Mandar Pitale, J. B. S. Yadawa, Zhangyang WangAAAI 2020 · 229 citations

Related papers

  1. 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
  2. Simple and Effective Out-of-Distribution Detection via Cosine-based Softmax LossSoonCheol Noh, DongEon Jeong, Jee-Hyong LeeICCV 2023 · 6 citations
  3. Block Selection Method for Using Feature Norm in Out-of-Distribution DetectionYeonguk Yu, Sungho Shin, Seongju Lee, Changhyun Jun et al.CVPR 2023
  4. Multiscale Score Matching for Out-of-Distribution DetectionAhsan Mahmood, Junier Oliva, Martin Andreas StynerICLR 2021 · 41 citations
  5. Mahalanobis++: Improving OOD Detection via Feature NormalizationMaximilian Müller, Matthias HeinICML 2025
Dusk over the sea between two cliffs drawn in fine vertical lines