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

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Guglielmo, Gianluca, Masana, Marc
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915929413124096
author Guglielmo, Gianluca
Masana, Marc
author_facet Guglielmo, Gianluca
Masana, Marc
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2604_08572
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Ranked Activation Shift for Post-Hoc Out-of-Distribution Detection
Guglielmo, Gianluca
Masana, Marc
Machine Learning
Computer Vision and Pattern Recognition
I.4.9
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.
title Ranked Activation Shift for Post-Hoc Out-of-Distribution Detection
topic Machine Learning
Computer Vision and Pattern Recognition
I.4.9
url https://arxiv.org/abs/2604.08572