Enhancing Out-of-Distribution Detection with Extended Logit Normalization
Yifan Ding, Xixi Liu, Jonas Unger, Gabriel Eilertsen
TL;DR
This work tackles the limited generalizability of LogitNorm for OOD detection by identifying feature-space collapse as a key limitation. It introduces Extended Logit Normalization (ELogitNorm), a hyperparameter-free, distance-aware training objective that uses the average distance to decision boundaries to scale logits, thereby preserving informative feature structure and improving OOD separability. Empirical results across CIFAR-10/100 and ImageNet benchmarks show that ELogitNorm consistently enhances a wide range of post-hoc OOD scores, yields better calibration, and maintains or improves ID accuracy compared to LogitNorm and other training-based approaches. The method is simple to integrate, robust to near- and far-OOD scenarios, and compatible with existing post-hoc scoring techniques, offering a practical advancement for reliable OOD detection in real-world systems.
Abstract
Out-of-distribution (OOD) detection is essential for the safe deployment of machine learning models. Recent advances have explored improved classification losses and representation learning strategies to enhance OOD detection. However, these methods are often tailored to specific post-hoc detection techniques, limiting their generalizability. In this work, we identify a critical issue in Logit Normalization (LogitNorm), which inhibits its effectiveness in improving certain post-hoc OOD detection methods. To address this, we propose Extended Logit Normalization ($\textbf{ELogitNorm}$), a novel hyperparameter-free formulation that significantly benefits a wide range of post-hoc detection methods. By incorporating feature distance-awareness to LogitNorm, $\textbf{ELogitNorm}$ shows more robust OOD separability and in-distribution (ID) confidence calibration than its predecessor. Extensive experiments across standard benchmarks demonstrate that our approach outperforms state-of-the-art training-time methods in OOD detection while maintaining strong ID classification accuracy.
