Riemannian Laplace Approximation with the Fisher Metric

Hanlin Yu, Marcelo Hartmann, Bernardo Williams, Mark Girolami, Arto Klami

TL;DR

Laplace’s method is a fast way to approximate complex probability distributions with a simple Gaussian, but it’s often too inaccurate for real-world Bayesian inference. This paper introduces RLA-F, a Riemannian generalization of the Laplace Approximation that uses the Fisher Information Matrix as a metric to warp the space, making the approximation exact for a much broader class of distributions while remaining computationally efficient.

What Problem Does This Paper Address?

In Bayesian inference, we often need to characterize a "posterior" distribution—our updated belief about model parameters after seeing data. The Laplace Approximation (LA) is a classic, high-speed tool for this: it finds the peak (mode) of the distribution and fits a Gaussian there.

The catch? Real-world distributions are rarely Gaussian; they can be "banana-shaped," heavy-tailed, or multi-modal. A recent upgrade called Riemannian Laplace Approximation (RLA) tried to fix this by transforming Gaussian samples along "geodesic paths" (the shortest paths in a curved space). However, the authors show that the previous state-of-the-art RLA (which uses the "Monge metric") is fundamentally flawed: it is biased and systematically underestimates uncertainty, even when you have infinite data.

Methods

The authors propose two ways to fix the bias in Riemannian Laplace Approximations:

  1. RLA-BLog: A correction to the existing Monge-metric method. It uses a "logarithmic map" to adjust the initial velocity of samples, ensuring they land in the right place. While theoretically sound, it’s computationally heavy.
  2. RLA-F (The Star of the Show): Instead of using gradients to define the curvature (the Monge approach), it uses the Fisher Information Matrix (FIM) as the Riemannian metric.

The workflow for RLA-F is elegant:

  • Step 1: Find the mode of the target distribution (the MAP estimate).
  • Step 2: Sample "velocities" from a standard Gaussian distribution.
  • Step 3: Treat these velocities as starting points for particles moving through a curved space defined by the Fisher metric. By solving an Ordinary Differential Equation (ODE), these particles follow "geodesics" to their final positions, which form the new, flexible approximation.
Figure 1: Left: The Fisher metric (green) captures the local curvature of the target density (black). Right: Samples from a Gaussian distribution (orange) are de- terministically mapped using the Fisher metric to pro- vide a flexible approximation (blue).

Datasets

The researchers evaluated their methods across a variety of synthetic and real-world challenges:

  • Synthetic "Toy" Problems: The Banana, Squiggle, and Funnel distributions. these are classic benchmarks for testing if an inference method can handle non-linear, non-Gaussian shapes.
  • Bayesian Logistic Regression: Tested on five standard UCI datasets: Ripley, Pima, Heart, Australian, and German.
  • Neural Network Regression: A 1D regression task using a small neural network to test how well the method handles the complex, high-dimensional landscapes of deep learning.

Key Insights and Ideas

  • The "Intrinsic" Advantage: The Fisher Information Matrix is the "natural" geometry for probability distributions. Unlike previous methods that relied on "extrinsic" gradient information, the Fisher metric is invariant to how you parameterize your model.
  • Exactness for Diffeomorphisms: The authors prove that RLA-F is exact for any distribution that is a "diffeomorphism of a Gaussian" (essentially, a Gaussian that has been smoothly warped). This is a huge step up from standard LA, which is only exact for actual Gaussians.
  • Smoothness Equals Speed: Counter-intuitively, even though the Fisher metric requires a matrix inversion ($O(D^3)$), it creates a "smoother" geometry. This allows the ODE solver to take much larger steps, often making RLA-F faster than the "simpler" Monge-based RLA-B.
RLA-F (left) is exact for the complex Squiggle distribution, while the previous RLA-B (right) is biased and too narrow.

Key Results

  • Bias Correction: The authors demonstrated that the previous RLA-B method's bias grows significantly as the dimensionality ($D$) of the problem increases. RLA-F eliminates this bias.
  • Accuracy: In logistic regression experiments, RLA-F consistently achieved the lowest Wasserstein distance (a measure of how much two distributions differ) to the ground truth (NUTS MCMC).
  • Neural Networks: For neural network regression, RLA-F successfully captured "in-between" uncertainty in data gaps where standard Laplace failed completely.
In NN regression, RLA-F (third from left) closely matches the ground-truth NUTS (right), while RLA-B and RLA-BLog struggle with variance.

Limitations and Future Work

  • Scalability: The $O(D^3)$ cost of inverting the Fisher metric is a bottleneck for massive neural networks with millions of parameters. The authors suggest that future work could integrate scalable FIM approximations like KFAC to bridge this gap.
  • Metric Selection: While the Fisher metric is powerful, it's not a silver bullet. For extremely high-dimensional models, the biased but cheaper Monge metric might still be preferred in some practical scenarios, suggesting a need for a "middle ground" metric.
  • Mini-batching: Currently, the Fisher metric requires gradients over the full dataset. Developing mini-batch versions of RLA-F would be a major win for large-scale machine learning.

Summary updated

BibTeX
@inproceedings{yu2024riemannian,
  author = {Hanlin Yu and Marcelo Hartmann and Bernardo Williams and Mark Girolami and Arto Klami},
  title = {{Riemannian Laplace Approximation with the Fisher Metric}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2024},
  url = {https://openreview.net/forum?id=VCHhYiDdLs},
}
Figure