Skip to main content
QUICK REVIEW

[Paper Review] Single Layer Predictive Normalized Maximum Likelihood for Out-of-Distribution Detection

Koby Bibas, Meir Feder|arXiv (Cornell University)|Oct 18, 2021
Adversarial Robustness in Machine LearningComputer Science8 citations
TL;DR

This paper proposes a novel out-of-distribution (OOD) detection method using the predictive normalized maximum likelihood (pNML) regret for single-layer neural networks, which is analytically derived and adapted to pretrained deep networks without additional parameters or data. It achieves state-of-the-art performance, improving AUROC by up to 15.6% across 74 benchmarks on CIFAR-100, CIFAR-10, SVHN, and ImageNet-30.

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 {\\em 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 {\\em 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.

Motivation & Objective

  • Address the challenge of out-of-distribution (OOD) detection in safety-critical AI systems where OOD samples are unavailable during training.
  • Develop a theoretically grounded, distribution-free OOD detection method that does not rely on assumptions about test data or model parameters.
  • Derive an analytical expression for the pNML regret in a single-layer neural network to enable generalization analysis.
  • Adapt the derived pNML regret to any pretrained deep neural network with a softmax classifier, using only the last layer and no additional training.
  • Demonstrate superior OOD detection performance across diverse benchmarks without tuning or extra data.

Proposed method

  • Derive the analytical form of the pNML regret for a single-layer neural network, defined as the log-loss difference between the pNML learner and a genie that knows the true label.
  • Show that the pNML regret is minimized when the test sample lies in a subspace spanned by eigenvectors of large eigenvalues of the training data's empirical correlation matrix.
  • Prove that the pNML regret is also low when the test sample is far from the decision boundary, indicating high confidence in predictions.
  • Adapt the pNML regret to the last layer of a pretrained deep neural network by treating the feature representations as input to a single-layer classifier.
  • Use the pNML regret as a confidence score for OOD detection, replacing or enhancing standard softmax probabilities without modifying the network or requiring additional data.
  • Apply the method to models including DenseNet-100, ResNet-34, WideResNet-40, and ResNet-18/101 on CIFAR-100, CIFAR-10, SVHN, and ImageNet-30.

Experimental results

Research questions

  • RQ1Can an analytical expression for the pNML regret be derived for a single-layer neural network, and under what conditions does it yield low generalization error (low regret)?
  • RQ2How does the pNML regret behave when the test input lies in a low-dimensional subspace defined by high-variance directions of the training data?
  • RQ3Can the pNML regret be effectively used as a confidence score for OOD detection in deep neural networks without retraining or adding parameters?
  • RQ4Does the pNML-based OOD detection method outperform existing state-of-the-art approaches across diverse benchmark datasets and network architectures?
  • RQ5What is the impact of the pNML regret on OOD detection performance in high-resolution image settings, such as ImageNet-30?

Key findings

  • The pNML regret is analytically derived for a single-layer neural network, providing a theoretically grounded measure of generalization error in the individual setting framework.
  • The pNML regret is low when the test sample lies in a subspace spanned by eigenvectors associated with large eigenvalues of the training data's empirical correlation matrix, indicating robust generalization.
  • The pNML regret is also low when the test sample is far from the decision boundary, suggesting high confidence in predictions for such inputs.
  • Applying the pNML regret to the last layer of a pretrained DNN improves OOD detection performance across 74 benchmarks without additional parameters or data.
  • The method achieves a maximum AUROC improvement of 15.6% over state-of-the-art methods, particularly on CIFAR-100 with iSUN and ImageNet (R) as OOD sets.
  • For TNR at TPR 95%, the pNML method improves performance by 90.4% on the CIFAR-100 and Gaussian OOD combination, achieving perfect separation in some cases.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.