Lune

ICCV2025Top-tier venue

Gradient Short-Circuit: Efficient Out-of-Distribution Detection via Feature Intervention

Jiawei Gu, Ziyue Qiao, Zechao Li

Abstract

Out-of-Distribution (OOD) detection is critical for safely deploying deep models in open-world environments, where inputs may lie outside the training distribution. During inference on a model trained exclusively with In-Distribution (ID) data, we observe a salient gradient phenomenon: around an ID sample, the local gradient directions for "enhancing" that sample's predicted class remain relatively consistent, whereas OOD samples--unseen in training--exhibit disorganized or conflicting gradient directions in the same neighborhood. Motivated by this observation, we propose an inference-stage technique to short-circuit those feature coordinates that spurious gradients exploit to inflate OOD confidence, while leaving ID classification largely intact. To circumvent the expense of recomputing the logits after this gradient short-circuit, we further introduce a local first-order approximation that accurately captures the post-modification outputs without a second forward pass. Experiments on standard OOD benchmarks show our approach yields substantial improvements. Moreover, the method is lightweight and requires minimal changes to the standard inference pipeline, offering a practical path toward robust OOD detection in real-world applications.

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.

3 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

  • On the Importance of Gradients for Detecting Distributional Shifts in the Wild cites Energy-based Out-of-distribution Detection
  • Refining Norms: A Post-hoc Framework for OOD Detection in Graph Neural Networks cites Energy-based Out-of-distribution Detection
  • ReAct: Out-of-distribution Detection With Rectified Activations cites Energy-based Out-of-distribution Detection
  • ReAct: Out-of-distribution Detection With Rectified Activations cites On the Importance of Gradients for Detecting Distributional Shifts in the Wild
  • Out-of-Distribution Detection with Deep Nearest Neighbors cites Energy-based Out-of-distribution Detection
  • Out-of-Distribution Detection with Deep Nearest Neighbors cites On the Importance of Gradients for Detecting Distributional Shifts in the Wild
  • Out-of-Distribution Detection with Deep Nearest Neighbors cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Out-of-Distribution Detection with Deep Nearest Neighbors cites ReAct: Out-of-distribution Detection With Rectified Activations
  • Revitalizing SVD for Global Covariance Pooling: Halley's Method to Overcome Over-Flattening cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Revitalizing SVD for Global Covariance Pooling: Halley's Method to Overcome Over-FlatteningJiawei Gu, Ziyue Qiao, Xinming Li, Zechao LiNeurIPS 2025 · 5 citations
  2. Fourier Clouds: Fast Bias Correction for Imbalanced Semi-Supervised LearningJiawei Gu, Yidi Wang, Qingqiang Sun, Xinming Li et al.NeurIPS 2025 · 3 citations
  3. Refining Norms: A Post-hoc Framework for OOD Detection in Graph Neural NetworksJiawei Gu, Ziyue Qiao, Zechao LiNeurIPS 2025 · 3 citations

Builds on19

  1. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  2. Energy-based Out-of-distribution DetectionWeitang Liu, Xiaoyun Wang, John D. Owens, Yixuan LiNeurIPS 2020 · 2,213 citations
  3. Out-of-Distribution Detection with Deep Nearest NeighborsYiyou Sun, Yifei Ming, Xiaojin Zhu, Yixuan LiICML 2022 · 789 citations
  4. ReAct: Out-of-distribution Detection With Rectified ActivationsYiyou Sun, Chuan Guo, Yixuan LiNeurIPS 2021 · 733 citations
  5. On the Importance of Gradients for Detecting Distributional Shifts in the WildRui Huang, Andrew Geng, Yixuan LiNeurIPS 2021 · 515 citations

Related papers

  1. Leveraging Perturbation Robustness to Enhance Out-of-Distribution DetectionWenxi Chen, Raymond A. Yeh, Shaoshuai Mou, Yan GuCVPR 2025
  2. Image-based Outlier Synthesis With Training DataSudarshan RegmiCVPR 2026
  3. Scaling for Training Time and Post-hoc Out-of-distribution Detection EnhancementKai Xu, Rongyu Chen, Gianni Franchi, Angela YaoICLR 2024 · 81 citations
  4. CADRef: Robust Out-of-Distribution Detection via Class-Aware Decoupled Relative Feature LeveragingZhiwei Ling, Yachen Chang, Hailiang Zhao, Xinkui Zhao et al.CVPR 2025
  5. On the Impact of Spurious Correlation for Out-of-Distribution DetectionYifei Ming, Hang Yin, Yixuan LiAAAI 2022 · 93 citations
Dusk over the sea between two cliffs drawn in fine vertical lines