Single Layer Predictive Normalized Maximum Likelihood for Out-of-Distribution Detection
Koby Bibas, Meir Feder, Tal Hassner
Abstract
Detecting out-of-distribution (OOD) samples is vital for developing machine learning based models for critical safety systems. Common approaches for OOD detection assume access to some OOD samples during training which may not be available in a real-life scenario. Instead, we utilize the predictive normalized maximum likelihood (pNML) learner, in which no assumptions are made on the tested input. We derive an explicit expression of the pNML and its generalization error, denoted as the regret, for a single layer neural network (NN). We show that this learner generalizes well when (i) the test vector resides in a subspace spanned by the eigenvectors associated with the large eigenvalues of the empirical correlation matrix of the training data, or (ii) the test sample is far from the decision boundary. Furthermore, we describe how to efficiently apply the derived pNML regret to any pretrained deep NN, by employing the explicit pNML for the last layer, followed by the softmax function. Applying the derived regret to deep NN requires neither additional tunable parameters nor extra data. We extensively evaluate our approach on 74 OOD detection benchmarks using DenseNet-100, ResNet-34, and WideResNet-40 models trained with CIFAR-100, CIFAR-10, SVHN, and ImageNet-30 showing a significant improvement of up to 15.6% over recent leading methods.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers9
- RankFeat: Rank-1 Feature Removal for Out-of-distribution DetectionYue Song, Nicu Sebe, Wei WangNeurIPS 2022 · 76 citations
- FiLM-Ensemble: Probabilistic Deep Learning via Feature-wise Linear ModulationMehmet Ozgur Turkoglu, Alexander Becker, Hüseyin Anil Gündüz, Mina Rezaei et al.NeurIPS 2022 · 46 citations
- Few-shot Learning with Noisy LabelsKevin J. Liang, Samrudhdhi B. Rangrej, Vladan Petrovic, Tal HassnerCVPR 2022 · 46 citations
- Density-driven Regularization for Out-of-distribution DetectionWenjian Huang, Hao Wang, Jiahao Xia, Chengyan Wang et al.NeurIPS 2022 · 17 citations
- DeepLens: Interactive Out-of-distribution Data Detection in NLP ModelsDa Song, Zhijie Wang, Yuheng Huang, Lei Ma et al.CHI 2023 · 7 citations
Builds on7
- Energy-based Out-of-distribution DetectionWeitang Liu, Xiaoyun Wang, John D. Owens, Yixuan LiNeurIPS 2020 · 2,213 citations
- Fantastic Generalization Measures and Where to Find ThemYiding Jiang, Behnam Neyshabur, Hossein Mobahi, Dilip Krishnan et al.ICLR 2020 · 705 citations
- Uncertainty Estimation Using a Single Deep Deterministic Neural NetworkJoost van Amersfoort, Lewis Smith, Yee Whye Teh, Yarin GalICML 2020 · 529 citations
- Detecting Out-of-Distribution Examples with Gram MatricesChandramouli Shama Sastry, Sageev OoreICML 2020 · 275 citations
- Self-Supervised Learning for Generalizable Out-of-Distribution DetectionSina Mohseni, Mandar Pitale, J. B. S. Yadawa, Zhangyang WangAAAI 2020 · 229 citations
Related papers
- Igeood: An Information Geometry Approach to Out-of-Distribution DetectionEduardo Dadalto Câmara Gomes, Florence Alberge, Pierre Duhamel, Pablo PiantanidaICLR 2022 · 32 citations
- Kernel PCA for Out-of-Distribution DetectionKun Fang, Qinghua Tao, Kexin Lv, Mingzhen He et al.NeurIPS 2024 · 37 citations
- Improving Out-of-Distribution Detection with Markov Logic NetworksKonstantin Kirchheim, Frank OrtmeierICML 2025
- Mahalanobis++: Improving OOD Detection via Feature NormalizationMaximilian Müller, Matthias HeinICML 2025
- Test-Time Linear Out-of-Distribution DetectionKe Fan, Tong Liu, Xingyu Qiu, Yikai Wang et al.CVPR 2024
