Riemannian Laplace approximations for Bayesian neural networks

Federico Bergamin, Pablo Moreno-Muñoz, Søren Hauberg, Georgios Arvanitidis
6/12/2023
stat.MLcs.LGstat.ME

No official code found. Best implementation: federicobergamin/riemannian-laplace-approximation (13 stars, last commit 2023-12-24). 1 more below.

Abstract

Bayesian neural networks often approximate the weight-posterior with a Gaussian distribution. However, practical posteriors are often, even locally, highly non-Gaussian, and empirical performance deteriorates. We propose a simple parametric approximate posterior that adapts to the shape of the true posterior through a Riemannian metric that is determined by the log-posterior gradient. We develop a Riemannian Laplace approximation where samples naturally fall into weight-regions with low negative log-posterior. We show that these samples can be drawn by solving a system of ordinary differential equations, which can be done efficiently by leveraging the structure of the Riemannian metric and automatic differentiation. Empirically, we demonstrate that our approach consistently improves over the conventional Laplace approximation across tasks. We further show that, unlike the conventional Laplace approximation, our method is not overly sensitive to the choice of prior, which alleviates a practical pitfall of current approaches.

View on arXivView PDF

Code Implementations(2)

Experimental code for Tubular Riemannian Laplace Approximations for Bayesian Neural Networks (ICML 2025)

10Python, Jupyter NotebookDec 17, 20259 months ago

Repository for the paper "Riemannian Laplace approximations for Bayesian neural networks"

134PythonAug 29, 20232 years ago

Similar Papers

Cite this paper

@article{bergamin2023riemannian,
  title  = {Riemannian Laplace approximations for Bayesian neural networks},
  author = {Federico Bergamin and Pablo Moreno-Muñoz and Søren Hauberg and Georgios Arvanitidis},
  year   = {2023},
  eprint = {2306.07158},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2306.07158v1},
  journal = {NEURIPS 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2306.07158.svg)](https://codeofpaper.com/paper/2306.07158)

Discussion