Out-of-distribution detection using neural activation prior
Published in arXiv preprint arXiv:2402.18162, 2024
Deep neural networks often exhibit overconfidence when encountering out-of-distribution (OOD) data, posing significant risks in safety-critical applications. While various post-hoc detection methods exist, they often rely on pooled features or logits, overlooking the rich distributional information embedded within the feature channels of the penultimate layer. This paper addresses this gap by proposing Neural Activation Prior (NAP).
The core insight of NAP is that In-Distribution (ID) samples typically trigger strong, specific activations (high signal) in trained filters, whereas OOD samples result in diffuse, noise-like activations. Based on this, the authors design a simple yet effective scoring function analogous to a Signal-to-Noise Ratio (SNR), calculated as the ratio of maximum to mean activation values within channels. NAP is a plug-and-play method that requires no retraining or hyperparameter tuning. Experiments on CIFAR and ImageNet benchmarks demonstrate that NAP is orthogonal to existing methods (like Energy and ReAct) and, when combined, can reduce the False Positive Rate (FPR95) by up to 66.03%.
