Ranked Activation Shift for Post-Hoc Out-of-Distribution Detection
Abstract
State-of-the-art post-hoc out-of-distribution detection methods rely on intermediate layer activation editing. However, they exhibit inconsistent performance across datasets and models. We show that this instability is driven by differences in the activation distributions, and identify a failure mode of scaling-based methods that arises when penultimate layer activations are not rectified. Motivated by this analysis, we propose RAS, a hyperparameter-free post-hoc method that replaces sorted activation magnitudes with a fixed in-distribution reference profile. Our simple plug-and-play method shows strong and consistent performance across datasets and architectures without assumptions on the penultimate layer activation function, and without requiring any hyperparameter tuning, while empirically preserving in-distribution classification accuracy. We further analyze what drives the improvement, showing that both inhibiting and exciting activation shifts independently contribute to better out-of-distribution discrimination.
Create a lesson
Metadata
- Categories
- cs.LG, cs.CV
- Comments
- Code is available at https://github.com/gigug/RAS
Related papers
Action-Conditioned Transition Irreversibility for Out-of-Distribution Detection in Reinforcement Learning
Shared title terminologycs.LGEmil Mittag, Richard Dazeley, Peter Vamplew
The Cross-Context Threshold Test: Detecting Discrimination Under Environmental Shifts
Shared title terminologycs.LGJun Yuan, Xinyue Ye
ZO-Act: Efficient Zeroth-Order Fine-Tuning via One-Shot Activation-Informed Low-Rank Subspaces
Shared title terminologycs.LGXun Dong, Yibo Xu, Naigang Wang et al.
Detecting the Undetectable: Enhancing Unsupervised time series Anomaly Detection via Active Learning
Shared title terminologycs.LGSeung Hun Han, Hyeongwon Kang, Jinwoo Park et al.
Loss Smoothing for Stable Adaptation Under Distribution Shift
Shared title terminologycs.LGDarshan Patil, Ekaterina Lobacheva, Razvan Pascanu et al.
Do Physics Foundation Models Learn Generalizable Physics? A Bias-Aware Benchmark Across Physical Regimes and Distribution Shifts
Shared title terminologycs.LGMengdi Chu, Yang Liu, Ayan Biswas et al.