NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Accelerated Linearized Laplace Approximation for Bayesian Deep Learning

Zhijie Deng, Feng Zhou, Jun Zhu

Deep Neural Networks (DNNs) are notoriously overconfident; they often provide highly certain predictions even when they are wrong or encountering out-of-distribution data. Bayesian Neural Networks (BNNs) offer a principled solution by treating model weights as probability distributions, but they are traditionally difficult to scale to modern, high-dimensional architectures.

A popular "middle ground" is the Laplace Approximation (LA), a post-hoc method that fits a Gaussian distribution around the weights of a pre-trained model. Its Linearized variant (LLA) is even more robust but faces a massive scalability bottleneck: it requires computing and inverting the Generalized Gauss-Newton (GGN) matrix. For a model with $P$ parameters, this matrix is $P \times P$. With millions of parameters, storing or inverting this matrix is computationally impossible without drastic simplifications (like diagonal or last-layer-only approximations) that often degrade the quality of the uncertainty estimates.

To bridge this gap, researchers have introduced ELLA (accElerated Linearized Laplace Approximation), a method that makes Bayesian deep learning practical for large-scale models by approximating the posterior through the lens of Neural Tangent Kernels (NTKs).

The ELLA Approach

ELLA bypasses the massive $P \times P$ matrix bottleneck by shifting the problem from parameter space to function space. The method relies on three core pillars:

  1. The NTK Connection: The authors leverage the mathematical equivalence between LLA and a Gaussian Process with a kernel defined by the Neural Tangent Kernel (NTK).
  2. Nyström Approximation: To avoid computing the full $N \times N$ kernel matrix (where $N$ is the number of training points), ELLA uses the Nyström method. It selects a small set of $M$ "anchor" points and finds the top $K$ eigenvalues and eigenfunctions to build a low-rank approximation of the NTK.
  3. Forward-Mode AD: To implement this efficiently, the method uses forward-mode automatic differentiation to compute Jacobian-Vector Products (JVPs). This allows the computation of necessary projections without ever explicitly forming or storing the massive Jacobian matrices.
1D Regression comparison showing ELLA closely matching exact LLA compared to other approximations.

Key Insights and Performance

One of the most striking findings of this research is that low-rank approximations are highly effective. A very low rank (e.g., $K \approx 20$) is often sufficient to capture the essential geometry of the posterior. This reduces a massive inversion problem to a tiny $20 \times 20$ matrix. Furthermore, unlike most scalable Laplace methods that only apply to the last layer of a network, ELLA applies to the entire network, preserving the rich uncertainty information present in earlier layers.

The authors also highlight a fascinating "V-shape" in the Negative Log-Likelihood (NLL) curve as more training data is processed during the Laplace fit. This suggests that LLA can actually "overfit" its uncertainty—becoming too certain as it sees more data. To counter this, ELLA employs an early-stopping strategy when estimating the precision matrix to maintain better calibration.

Scalability and Results

The method was rigorously evaluated on standard benchmarks (MNIST, CIFAR-10, SVHN) and scaled up to ImageNet.

  • Unprecedented Scalability: ELLA successfully ran on ViT-B on ImageNet. Most other LLA baselines (like KFAC-based versions) suffered from Out-of-Memory (OOM) errors or required prohibitive computation times at this scale.
  • Superior Calibration: On CIFAR-10, ELLA achieved an Expected Calibration Error (ECE) of 0.007 (using ResNet-56), significantly lower than the MAP baseline (0.037) and competing LLA variants.
  • Out-of-Distribution (OOD) Detection: In CIFAR-10 vs. SVHN tests, ELLA made far fewer mistakes under high-confidence thresholds compared to standard models, proving it reliably "knows what it doesn't know."

Limitations and Future Directions

While highly effective, ELLA introduces new hyperparameters—specifically the number of anchor points ($M$) and the rank ($K$)—which may require tuning for different architectures. Additionally, although it avoids the $P \times P$ matrix, it still requires storing $K$ vectors of size $P$. While $K$ is small, this could still pose a memory constraint for extremely large models on limited hardware.

Currently, ELLA focuses purely on the predictive distribution. Extending this framework to estimate "model evidence" for automated model selection remains a promising, unexplored direction for future work.

Summary updated

BibTeX
@inproceedings{deng2022accelerated,
  author = {Zhijie Deng and Feng Zhou and Jun Zhu},
  title = {{Accelerated Linearized Laplace Approximation for Bayesian Deep Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=jftNpltMgz},
}
Figure