Skip to main content
QUICK REVIEW

[Paper Review] Bayesian Variational Autoencoders for Unsupervised Out-of-Distribution Detection

Erik Daxberger, José Miguel Hernández-Lobato|arXiv (Cornell University)|Dec 11, 2019
Adversarial Robustness in Machine LearningComputer Science32 citations
TL;DR

This paper proposes a Bayesian variational autoencoder (BVAE) that uses stochastic gradient Markov chain Monte Carlo (SG-MCMC) to estimate a full posterior over decoder parameters, enabling robust unsupervised out-of-distribution (OoD) detection in both input and latent spaces via information-theoretic measures of model informativeness. The method significantly outperforms prior likelihood-based approaches on standard benchmarks by capturing epistemic uncertainty.

ABSTRACT

Despite their successes, deep neural networks may make unreliable predictions when faced with test data drawn from a distribution different to that of the training data, constituting a major problem for AI safety. While this has recently motivated the development of methods to detect such out-of-distribution (OoD) inputs, a robust solution is still lacking. We propose a new probabilistic, unsupervised approach to this problem based on a Bayesian variational autoencoder model, which estimates a full posterior distribution over the decoder parameters using stochastic gradient Markov chain Monte Carlo, instead of fitting a point estimate. We describe how information-theoretic measures based on this posterior can then be used to detect OoD inputs both in input space and in the model's latent space. We empirically demonstrate the effectiveness of our proposed approach.

Motivation & Objective

  • To address the critical limitation of deep neural networks in making overconfident predictions on out-of-distribution (OoD) inputs, especially in safety-critical applications.
  • To overcome the fundamental unreliability of likelihood-based OoD detection methods that can assign higher density to OoD data than in-distribution data.
  • To develop a unified, unsupervised framework for detecting OoD inputs in both input space and latent space using principled uncertainty quantification.
  • To leverage posterior inference over model parameters to quantify the informativeness of new inputs, linking OoD detection to active learning principles.

Proposed method

  • Proposes a Bayesian VAE (BVAE) that replaces point estimates of decoder parameters with a full posterior distribution using stochastic gradient Markov chain Monte Carlo (SG-MCMC).
  • Uses the posterior predictive distribution over model parameters to compute expected informativeness of a test input ${\mathbf{x}}^{*}$ as a proxy for OoD status.
  • Quantifies the expected change in posterior distribution after observing ${\mathbf{x}}^{*}$, linking to information-theoretic active learning via mutual information.
  • Applies the same principle to latent space by measuring informativeness of latent codes ${\mathbf{z}}^{*}$, enabling latent OoD detection.
  • Employs WAIC (Watanabe-Akaike Information Criterion) as a proxy for model evidence to approximate the posterior predictive density.
  • Treats the expected log-likelihood under the posterior as a robust score, avoiding reliance on single-point likelihood estimates.

Experimental results

Research questions

  • RQ1Can a Bayesian deep generative model with full posterior inference over parameters improve OoD detection reliability compared to likelihood-based methods?
  • RQ2How can epistemic uncertainty captured via posterior distributions be leveraged to detect OoD inputs in both input and latent spaces?
  • RQ3Can information-theoretic measures of model informativeness—based on posterior update—serve as a principled and robust OoD detection criterion?
  • RQ4Does the proposed BVAE approach outperform existing unsupervised OoD detection methods on standard benchmarks, particularly in latent space?

Key findings

  • The proposed BVAE method significantly outperforms likelihood-based baselines and other state-of-the-art OoD detection methods on standard benchmarks such as MNIST, CIFAR-10, and SVHN.
  • The method achieves superior performance in detecting OoD inputs in both input space and latent space, demonstrating robustness across diverse data distributions.
  • Information-theoretic scores based on posterior predictive variance and expected log-likelihood under the posterior show strong correlation with OoD status.
  • The use of SG-MCMC to sample decoder parameters enables reliable uncertainty quantification, avoiding the overconfidence issues of point-estimate VAEs.
  • The approach effectively detects OoD inputs even when standard likelihoods assign higher scores to OoD data, highlighting its robustness.
  • The method is effective for latent space OoD detection, which is critical for applications like Bayesian optimization in structured input spaces (e.g., molecular generation).

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.