Skip to main content
QUICK REVIEW

[Paper Review] Tractable Function-Space Variational Inference in Bayesian Neural Networks

Tim G. J. Rudner, Zonghao Chen|arXiv (Cornell University)|Dec 28, 2023
Adversarial Robustness in Machine LearningComputer Science6 citations
TL;DR

This paper proposes tractable function-space variational inference (FSVI) for Bayesian neural networks, enabling scalable uncertainty estimation by directly modeling posterior distributions over functions rather than parameters. By introducing a simple estimator for the function-space Kullback-Leibler divergence, FSVI allows meaningful prior incorporation and achieves state-of-the-art predictive uncertainty and accuracy on diverse tasks, including a safety-critical medical diagnosis benchmark.

ABSTRACT

Reliable predictive uncertainty estimation plays an important role in enabling the deployment of neural networks to safety-critical settings. A popular approach for estimating the predictive uncertainty of neural networks is to define a prior distribution over the network parameters, infer an approximate posterior distribution, and use it to make stochastic predictions. However, explicit inference over neural network parameters makes it difficult to incorporate meaningful prior information about the data-generating process into the model. In this paper, we pursue an alternative approach. Recognizing that the primary object of interest in most settings is the distribution over functions induced by the posterior distribution over neural network parameters, we frame Bayesian inference in neural networks explicitly as inferring a posterior distribution over functions and propose a scalable function-space variational inference method that allows incorporating prior information and results in reliable predictive uncertainty estimates. We show that the proposed method leads to state-of-the-art uncertainty estimation and predictive performance on a range of prediction tasks and demonstrate that it performs well on a challenging safety-critical medical diagnosis task in which reliable uncertainty estimation is essential.

Motivation & Objective

  • To address the limitations of parameter-space variational inference in Bayesian neural networks, which often leads to poor uncertainty quantification and underperforms non-Bayesian methods.
  • To enable the incorporation of task-specific prior knowledge about the data-generating process into Bayesian neural network inference.
  • To develop a scalable, tractable method for function-space variational inference that supports reliable predictive uncertainty estimation in high-dimensional and overparameterized settings.
  • To evaluate the method on standard benchmarks and a real-world safety-critical medical diagnosis task, demonstrating robustness under distribution shift.

Proposed method

  • The method formulates Bayesian inference explicitly in function space, targeting the posterior distribution over functions induced by network parameters.
  • It introduces a novel, simple estimator for the Kullback-Leibler divergence between function-space distributions, enabling stochastic variational inference.
  • The approach uses a context distribution $p_{\mathbf{X}_{\mathcal{C}}}$ to sample input points at each gradient step, approximating the supremum in the variational objective.
  • For image inputs, the context distribution is defined as uniform over monochrome images constructed from training data pixels; for tabular data, it uses empirical input bounds.
  • The method supports flexible prior design, including priors that encourage high uncertainty in out-of-distribution regions.
  • It is implemented using standard deep learning frameworks with Adam optimization and is compatible with standard architectures like ResNet and MLPs.

Experimental results

Research questions

  • RQ1Can function-space variational inference be made tractable and scalable for high-dimensional, overparameterized neural networks?
  • RQ2Does incorporating task-specific prior knowledge into function-space priors improve predictive uncertainty and accuracy compared to parameter-space methods?
  • RQ3How does the proposed method perform under distribution shift, particularly in safety-critical applications?
  • RQ4Can function-space variational inference outperform both Bayesian and non-Bayesian baselines in uncertainty estimation and predictive performance?

Key findings

  • FSVI achieves state-of-the-art predictive performance and uncertainty estimation across multiple regression and classification benchmarks, including 1D regression and Two Moons datasets.
  • On the Snelson 1D regression task, FSVI produces predictive distributions that fit training data well while exhibiting high uncertainty far from training points, as desired.
  • In the diabetic retinopathy diagnosis task, FSVI-based selective prediction with expert referral outperforms baselines, maintaining high accuracy even at low referral rates.
  • The method demonstrates robustness to distribution shift, with models assigning high epistemic uncertainty to OOD samples, enabling effective selective prediction.
  • FSVI with task-specific priors significantly improves uncertainty calibration and predictive accuracy compared to standard parameter-space variational inference and deep ensembles.
  • The proposed estimator for the function-space KL divergence enables stable and scalable training, making function-space inference practical for real-world applications.

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.