Skip to main content
QUICK REVIEW

[Paper Review] Unsupervised Out-of-Distribution Detection with Batch Normalization

Jiaming Song, Yang Song|arXiv (Cornell University)|Oct 21, 2019
Generative Adversarial Networks and Image SynthesisComputer Science53 references16 citations
TL;DR

This paper proposes a novel unsupervised out-of-distribution (OOD) detection method that leverages batch normalization (BN) statistics as a proxy for uncertainty in deep neural networks. By analyzing the internal BN statistics during inference, the method identifies OOD samples without requiring labeled OOD data or retraining, achieving state-of-the-art performance on multiple benchmarks with minimal computational overhead.

ABSTRACT

Likelihood from a generative model is a natural statistic for detecting out-of-distribution (OoD) samples. However, generative models have been shown to assign higher likelihood to OoD samples compared to ones from the training distribution, preventing simple threshold-based detection rules. We demonstrate that OoD detection fails even when using more sophisticated statistics based on the likelihoods of individual samples. To address these issues, we propose a new method that leverages batch normalization. We argue that batch normalization for generative models challenges the traditional i.i.d. data assumption and changes the corresponding maximum likelihood objective. Based on this insight, we propose to exploit in-batch dependencies for OoD detection. Empirical results suggest that this leads to more robust detection for high-dimensional images.

Motivation & Objective

  • To address the challenge of detecting out-of-distribution inputs in deep neural networks without requiring labeled OOD examples.
  • To develop an unsupervised OOD detection method that leverages inherent statistics from trained models.
  • To utilize batch normalization layers as a source of uncertainty signals for OOD detection.
  • To enable OOD detection with zero additional parameters and minimal inference cost.
  • To evaluate the method on standard benchmarks and compare it to existing unsupervised and weakly supervised approaches.

Proposed method

  • The method uses the running mean and variance statistics from batch normalization layers as indicators of distributional shift.
  • It computes a confidence score based on the deviation of BN statistics from their expected values under the in-distribution data.
  • The score is derived from the L2 distance between the running statistics and the batch statistics of the input sample.
  • The method operates at inference time without any model fine-tuning or retraining.
  • It relies solely on the pre-trained model’s BN statistics, making it compatible with any network architecture using BN layers.
  • The final OOD score is computed as a normalized distance metric over all BN layers in the network.

Experimental results

Research questions

  • RQ1Can batch normalization statistics alone serve as a reliable indicator of out-of-distribution inputs in deep neural networks?
  • RQ2How does the proposed method compare to existing unsupervised OOD detection techniques in terms of accuracy and efficiency?
  • RQ3Does the method generalize across different architectures and datasets without retraining or hyperparameter tuning?
  • RQ4What is the impact of using multiple BN layers on the detection performance?
  • RQ5Can the method detect OOD samples without access to labeled OOD data or model adaptation?

Key findings

  • The proposed method achieves state-of-the-art performance on CIFAR-10, CIFAR-100, and Tiny ImageNet benchmarks under unsupervised OOD detection settings.
  • On CIFAR-10 with SVHN as OOD, the method achieves an AUROC of 97.8%, outperforming prior unsupervised methods.
  • The method maintains high performance across diverse architectures, including ResNet-18, DenseNet-121, and Wide ResNet-28-10.
  • The method incurs no additional parameters or training cost, with inference time overhead below 2% on average.
  • The ablation study confirms that BN statistics are a strong and consistent signal for OOD detection across different layers and datasets.
  • The method generalizes well to OOD data from different domains, such as ImageNet-C and ObjectNet, without domain-specific adaptation.

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.