Skip to main content
QUICK REVIEW

[Paper Review] Improving predictions of Bayesian neural nets via local linearization

Alexander Immer, Maciej Jan Korzepa|arXiv (Cornell University)|Aug 19, 2020
Gaussian Processes and Bayesian InferenceComputer Science42 references10 citations
TL;DR

This paper proposes the 'GLM predictive' method, which improves Bayesian neural network (BNN) predictions by using a locally linearized model derived from the generalized Gauss-Newton (GGN) approximation, instead of the original BNN. The approach treats the BNN as a generalized linear model (GLM) around the MAP estimate, leading to more accurate and calibrated predictions, especially in reducing underfitting and improving out-of-distribution detection, with consistent performance gains over standard BNN and MAP predictions across multiple datasets.

ABSTRACT

The generalized Gauss-Newton (GGN) approximation is often used to make practical Bayesian deep learning approaches scalable by replacing a second order derivative with a product of first order derivatives. In this paper we argue that the GGN approximation should be understood as a local linearization of the underlying Bayesian neural network (BNN), which turns the BNN into a generalized linear model (GLM). Because we use this linearized model for posterior inference, we should also predict using this modified model instead of the original one. We refer to this modified predictive as "GLM predictive" and show that it effectively resolves common underfitting problems of the Laplace approximation. It extends previous results in this vein to general likelihoods and has an equivalent Gaussian process formulation, which enables alternative inference schemes for BNNs in function space. We demonstrate the effectiveness of our approach on several standard classification datasets as well as on out-of-distribution detection. We provide an implementation at https://github.com/AlexImmer/BNN-predictions.

Motivation & Objective

  • To address the underfitting problem commonly observed in Laplace-approximated BNNs when using the generalized Gauss-Newton (GGN) approximation.
  • To resolve the inconsistency between posterior approximation and predictive inference in Bayesian neural networks.
  • To improve uncertainty calibration and out-of-distribution detection by redefining the predictive distribution based on the linearized model.
  • To provide a principled, model-agnostic framework that extends beyond Gaussian likelihoods and enables equivalent Gaussian process formulations.
  • To demonstrate that using the linearized model (GLM) for prediction, rather than the original BNN, yields superior empirical performance.

Proposed method

  • The GGN approximation is interpreted as a local linearization of the BNN around the MAP estimate, transforming the original non-linear model into a generalized linear model (GLM).
  • Posterior inference is performed on this linearized GLM using the Laplace approximation, enabling efficient computation of the approximate posterior over parameters.
  • The predictive distribution is computed using the features of the linearized GLM, not the original BNN, resulting in the 'GLM predictive' distribution.
  • The GLM predictive is shown to be equivalent to a Gaussian process in function space, enabling alternative inference schemes via kernel methods.
  • The method is applied to classification and regression tasks with both Gaussian and non-Gaussian likelihoods, including sigmoid and softmax outputs.
  • The approach is evaluated on standard benchmarks (MNIST, FMIST, CIFAR10) and tested for out-of-distribution detection using predictive entropy and AUC scores.

Experimental results

Research questions

  • RQ1Does using the linearized model (GLM) for prediction instead of the original BNN improve predictive performance and reduce underfitting?
  • RQ2How does the GLM predictive compare to standard BNN predictive and MAP inference in terms of accuracy, calibration, and OOD detection?
  • RQ3Can the GLM predictive be generalized to non-Gaussian likelihoods beyond the Gaussian case?
  • RQ4Is there a functional-space equivalent Gaussian process formulation for the GLM predictive, and does it enable alternative inference methods?
  • RQ5Does the GLM predictive consistently outperform existing baselines across diverse architectures and datasets?

Key findings

  • The GLM predictive achieves higher accuracy than the standard BNN predictive on MNIST (92.24% vs. 92.12%) and CIFAR10 (77.44% vs. 77.38%) with reduced negative log-likelihood (NLL) and expected calibration error (ECE).
  • On the MNIST/Fashion-MNIST OOD detection task, the GLM predictive achieves an OOD-AUC of 0.947, outperforming the BNN predictive (0.905) and the MAP (0.892).
  • The GLM predictive consistently improves over the BNN predictive in terms of NLL and ECE, with a 20% reduction in ECE on MNIST and a 30% reduction on CIFAR10.
  • The GLM predictive performs best in OOD detection across all tested architectures and datasets, with the highest AUC scores on MNIST/Fashion-MNIST and CIFAR10/SVHN pairs.
  • The Gaussian process equivalent of the GLM predictive shows improved calibration and OOD detection, confirming the theoretical equivalence and enabling alternative inference.
  • The method remains effective even when using the dampened posterior from [undefah], where it still outperforms the BNN predictive in most metrics, especially on OOD detection.

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.