Ranked Activation Shift for Post-Hoc Out-of-Distribution Detection

arXiv cs.LG / 4/13/2026

📰 NewsIdeas & Deep AnalysisModels & Research

Key Points

  • ポストホックな外れ値(OOD)検出は中間層の活性編集に依存するが、データセットやモデルで性能が安定しない原因が活性分布の違いにあることを分析している。
  • ペナルティ層(penultimate layer)の活性が適切に補正されない場合に、スケーリング系手法で顕在化する失敗モードを特定している。
  • 提案手法「Ranked Activation Shift」は、ソートした活性の大きさを固定のin-distribution参照プロファイルで置き換えることで、ハイパーパラメータ不要のプラグアンドプレイ方式として一貫したOOD検出性能を示す。
  • in-distribution分類精度は構成上維持され、改善には活性の抑制(inhibiting shift)と活性の興奮(exciting shift)がそれぞれ独立に寄与することを追加分析している。

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 \ours, 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 preserving in-distribution classification accuracy by construction. We further analyze what drives the improvement, showing that both inhibiting and exciting activation shifts independently contribute to better out-of-distribution discrimination.