DAVIS: OOD Detection via Dominant Activations and Variance for Increased Separation
Abid Hassan, Tuan Ngo, Saad Shafiq, Nenad Medvidovic
TL;DR
This work addresses the challenge of detecting out-of-distribution inputs by exposing and exploiting distributional cues discarded by global average pooling. The authors introduce DAVIS, a post-hoc module that enriches penultimate layer representations with channel-wise dominant activations and variance, forming a more discriminative feature vector prior to the final classifier head. DAVIS demonstrates consistent, substantial improvements in false positive rates for OOD detection across CNN architectures on CIFAR and ImageNet, and it yields synergistic gains when combined with existing baselines like Energy, ReAct, DICE, and ASH. The approach is computationally lightweight, architecture-agnostic for CNNs with GAP, robust to hyperparameter choices, and offers a principled path toward moving beyond mean-based statistics in OOD detection.
Abstract
Detecting out-of-distribution (OOD) inputs is a critical safeguard for deploying machine learning models in the real world. However, most post-hoc detection methods operate on penultimate feature representations derived from global average pooling (GAP) -- a lossy operation that discards valuable distributional statistics from activation maps prior to global average pooling. We contend that these overlooked statistics, particularly channel-wise variance and dominant (maximum) activations, are highly discriminative for OOD detection. We introduce DAVIS, a simple and broadly applicable post-hoc technique that enriches feature vectors by incorporating these crucial statistics, directly addressing the information loss from GAP. Extensive evaluations show DAVIS sets a new benchmark across diverse architectures, including ResNet, DenseNet, and EfficientNet. It achieves significant reductions in the false positive rate (FPR95), with improvements of 48.26\% on CIFAR-10 using ResNet-18, 38.13\% on CIFAR-100 using ResNet-34, and 26.83\% on ImageNet-1k benchmarks using MobileNet-v2. Our analysis reveals the underlying mechanism for this improvement, providing a principled basis for moving beyond the mean in OOD detection.
