Skip to main content
QUICK REVIEW

[Paper Review] Variational Inference to Measure Model Uncertainty in Deep Neural Networks

Konstantin Posch, Jan Steinbrener|arXiv (Cornell University)|Feb 26, 2019
Gaussian Processes and Bayesian InferenceComputer Science21 references12 citations
TL;DR

This paper proposes a variational inference approach to quantify model uncertainty in deep neural networks by learning layer-wise parameter variances proportional to squared mean weights, enabling Bayesian deep learning with minimal additional parameters. The method reduces test error by 15% on MNIST compared to standard networks while providing reliable prediction credible intervals and identifying confidently wrong predictions.

ABSTRACT

We present a novel approach for training deep neural networks in a Bayesian way. Classical, i.e. non-Bayesian, deep learning has two major drawbacks both originating from the fact that network parameters are considered to be deterministic. First, model uncertainty cannot be measured thus limiting the use of deep learning in many fields of application and second, training of deep neural networks is often hampered by overfitting. The proposed approach uses variational inference to approximate the intractable a posteriori distribution on basis of a normal prior. The variational density is designed in such a way that the a posteriori uncertainty of the network parameters is represented per network layer and depending on the estimated parameter expectation values. This way, only a few additional parameters need to be optimized compared to a non-Bayesian network. We apply this Bayesian approach to train and test the LeNet architecture on the MNIST dataset. Compared to classical deep learning, the test error is reduced by 15%. In addition, the trained model contains information about the parameter uncertainty in each layer. We show that this information can be used to calculate credible intervals for the prediction and to optimize the network architecture for a given training data set.

Motivation & Objective

  • To address the lack of model uncertainty estimation in classical deep learning, where parameters are treated as deterministic values.
  • To reduce overfitting in deep networks, especially with small training datasets, by introducing a Bayesian framework.
  • To enable practical uncertainty quantification in predictions through credible intervals without significant computational overhead.
  • To support data-driven network architecture optimization by leveraging layer-wise parameter uncertainty.
  • To provide a scalable Bayesian deep learning approach that requires only a few additional parameters beyond standard training.

Proposed method

  • The method uses variational inference to approximate the intractable posterior distribution over network weights using a normal prior.
  • The variational posterior is parameterized with layer-specific variances proportional to the squared expectations of the weights and biases.
  • A single scaling factor per layer is used to control the variance of the weight and bias distributions, minimizing additional parameters.
  • During inference, multiple forward passes with sampled weights estimate prediction uncertainty and construct 95% credible intervals.
  • The model is trained end-to-end using stochastic gradient descent, optimizing both network weights and the layer-specific variance scaling factors.
  • The approach is evaluated on the LeNet architecture for MNIST image classification, comparing Bayesian and non-Bayesian variants.

Experimental results

Research questions

  • RQ1Can a Bayesian deep learning approach be designed that quantifies both model and prediction uncertainty with minimal computational cost?
  • RQ2How does the proposed layer-wise variance parameterization affect generalization performance and overfitting in small-data regimes?
  • RQ3To what extent can uncertainty estimates identify confidently wrong predictions, and how do they compare to standard network confidence scores?
  • RQ4Can the uncertainty information be used to guide network architecture design or improve model robustness?
  • RQ5How do the credible intervals derived from the Bayesian model compare to the actual prediction reliability on test data?

Key findings

  • The Bayesian model achieved a 15% reduction in test error compared to the standard non-Bayesian LeNet on the MNIST dataset.
  • The network was able to identify 14 images where it was highly confident but wrong, highlighting the risk of overconfident deterministic predictions.
  • For 94% of misclassified images, the network was uncertain (not within 95% credible intervals), indicating that uncertainty estimates can flag unreliable predictions.
  • The method successfully produced interpretable credible intervals for predictions through multiple forward passes with sampled weights.
  • The model demonstrated improved robustness against overfitting, particularly beneficial in low-data regimes.
  • The approach enables practical uncertainty quantification without significant increase in training or inference cost.

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.