Skip to main content
QUICK REVIEW

[Paper Review] Accelerated Linearized Laplace Approximation for Bayesian Deep Learning

Zhijie Deng, Feng Zhou|arXiv (Cornell University)|Oct 23, 2022
Gaussian Processes and Bayesian InferenceComputer Science5 citations
TL;DR

This paper proposes ELLA, an accelerated Linearized Laplace Approximation method for Bayesian deep learning that uses Nyström approximation of Neural Tangent Kernels (NTKs) to bypass explicit computation of costly Hessian or Jacobian matrices. By leveraging forward-mode automatic differentiation, ELLA achieves state-of-the-art uncertainty quantification with improved scalability, including on vision transformers, while maintaining theoretical guarantees and outperforming standard LLA approximations on ImageNet and CIFAR-10 benchmarks.

ABSTRACT

Laplace approximation (LA) and its linearized variant (LLA) enable effortless adaptation of pretrained deep neural networks to Bayesian neural networks. The generalized Gauss-Newton (GGN) approximation is typically introduced to improve their tractability. However, LA and LLA are still confronted with non-trivial inefficiency issues and should rely on Kronecker-factored, diagonal, or even last-layer approximate GGN matrices in practical use. These approximations are likely to harm the fidelity of learning outcomes. To tackle this issue, inspired by the connections between LLA and neural tangent kernels (NTKs), we develop a Nystrom approximation to NTKs to accelerate LLA. Our method benefits from the capability of popular deep learning libraries for forward mode automatic differentiation, and enjoys reassuring theoretical guarantees. Extensive studies reflect the merits of the proposed method in aspects of both scalability and performance. Our method can even scale up to architectures like vision transformers. We also offer valuable ablation studies to diagnose our method. Code is available at \url{https://github.com/thudzj/ELLA}.

Motivation & Objective

  • To address the inefficiency and fidelity loss in existing Linearized Laplace Approximation (LLA) methods that rely on Kronecker-factored or diagonal GGN approximations.
  • To enable scalable and accurate uncertainty quantification in Bayesian deep learning without explicitly computing or storing large Hessian or Jacobian matrices.
  • To leverage the connection between LLA and Neural Tangent Kernels (NTKs) to accelerate inference through low-rank kernel approximation.
  • To provide theoretical guarantees on the approximation error between ELLA and vanilla LLA, ensuring reliability in predictive uncertainty.
  • To demonstrate scalability and performance of ELLA on modern architectures like vision transformers and standard ImageNet benchmarks.

Proposed method

  • Proposes a Nyström approximation to the Neural Tangent Kernel (NTK) to enable efficient computation of the LLA covariance matrix without explicit Hessian or Jacobian storage.
  • Utilizes forward-mode automatic differentiation (fwAD) to efficiently compute Jacobian-vector products (JVPs) required for NTK approximation.
  • Applies low-rank approximation to the NTK via a subset of data points, reducing computational cost while preserving predictive fidelity.
  • Maintains the core structure of vanilla LLA but replaces full GGN computation with kernel-based approximation, enabling scalability to large models.
  • Theoretical analysis shows that the predictive error between ELLA and vanilla LLA decreases as the NTK approximation becomes more accurate.
  • Implements the method in a way compatible with standard deep learning libraries, enabling plug-and-play integration with pretrained models.

Experimental results

Research questions

  • RQ1Can Nyström approximation of the NTK effectively accelerate Linearized Laplace Approximation without sacrificing predictive accuracy?
  • RQ2How does ELLA's uncertainty estimation performance compare to standard LLA variants with KFAC, diagonal, or last-layer approximations on standard benchmarks?
  • RQ3Can ELLA scale to modern architectures like vision transformers, where full Hessian computation is infeasible?
  • RQ4What is the theoretical relationship between the accuracy of the NTK approximation and the resulting predictive uncertainty in ELLA?
  • RQ5Does ELLA maintain reliable uncertainty calibration across distribution shifts, such as ImageNet-C corruptions?

Key findings

  • ELLA achieves state-of-the-art uncertainty calibration on CIFAR-10, matching or outperforming LLA with KFAC, diagonal, or last-layer approximations in terms of ECE and NLL.
  • On ImageNet with ResNet-18, ResNet-34, and ResNet-50, ELLA achieves lower ECE (0.015–0.018) than MAP (0.026–0.037), indicating better uncertainty calibration.
  • For ViT-B on ImageNet, ELLA reduces ECE to 0.022 compared to MAP’s 0.039, demonstrating improved uncertainty calibration on modern architectures.
  • ELLA maintains competitive accuracy (81.6%) and lower NLL (0.695) than MAP (81.5% accuracy, 0.700 NLL) on ViT-B, showing improved calibration without accuracy loss.
  • On ImageNet-C corruptions, ELLA consistently outperforms MAP in both NLL and ECE, indicating robustness to distribution shift.
  • The method avoids out-of-memory errors and long training times that plague standard LLA implementations on large models, demonstrating superior scalability.

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.