How good is your Laplace approximation of the Bayesian posterior? Finite-sample computable error bounds for a variety of useful divergences

Mikołaj J. Kasprzak, Ryan Giordano, Tamara BroderickarXiv 2022 · DOI

Abstract

The Laplace approximation is a popular method for constructing a Gaussian approximation to the Bayesian posterior and thereby approximating the posterior mean and variance. But approximation quality is a concern. One might consider using rate-of-convergence bounds from certain versions of the Bayesian Central Limit Theorem (BCLT) to provide quality guarantees. But existing bounds require assumptions that are unrealistic even for relatively simple real-life Bayesian analyses; more specifically, existing bounds either (1) require knowing the true data-generating parameter, (2) are asymptotic in the number of samples, (3) do not control the Bayesian posterior mean, or (4) require strongly log concave models to compute. In this work, we provide the first computable bounds on quality that simultaneously (1) do not require knowing the true parameter, (2) apply to finite samples, (3) control posterior means and variances, and (4) apply generally to models that satisfy the conditions of the asymptotic BCLT. Moreover, we substantially improve the dimension dependence of existing bounds; in fact, we achieve the lowest-order dimension dependence possible in the general case. We compute exact constants in our bounds for a variety of standard models, including logistic regression, and numerically demonstrate their utility. We provide a framework for analysis of more complex models.

Introduction: The Need for Reliable Laplace Approximations

In Bayesian inference, practitioners often encounter mathematically intractable posterior distributions. To address this, the Laplace approximation is frequently employed: it identifies the peak of the distribution (the MAP estimate) and fits a Gaussian (Normal) distribution based on the local curvature (the Hessian). While computationally efficient and widely used, its reliability has historically been difficult to quantify in practice.

Traditional theoretical guarantees, such as those derived from the Bayesian Central Limit Theorem (BCLT), often fall short for real-world applications. They typically suffer from a "Catch-22"—requiring knowledge of the true data-generating parameter—or are purely asymptotic, offering no concrete error estimates for finite sample sizes. Furthermore, many existing bounds are restricted to log-concave models or fail to provide guarantees for critical metrics like the posterior mean and variance.

Comparison of the proposed framework against existing literature across key criteria.

As shown in the comparison above, this work introduces a framework that addresses these gaps, providing the first set of computable, finite-sample bounds that do not require global log-concavity or knowledge of the true parameter.

Methodology: Beyond Asymptotics

The authors provide a framework to compute explicit error constants for three key distances: Total Variation (TV), 1-Wasserstein ($W_1$, which controls the mean), and a specific metric ($D$) that controls the covariance. Their technical approach relies on three pillars:

  1. Log-Sobolev Inequalities (LSI): By using LSI to bound the Kullback-Leibler (KL) divergence via the Fisher divergence, the authors can control error using only the derivatives of the log-posterior—quantities that are readily calculable.
  2. Space Splitting: The parameter space is divided into an "inner" region near the peak (where the Gaussian fit is accurate) and an "outer" region (the tails). Concentration inequalities are then used to prove that the outer region contains negligible probability mass.
  3. Stein’s Method: For one-dimensional cases, Stein’s method is utilized to provide general bounds for arbitrary test functions.

Key Advantages: Dimension Scaling and Generality

A major contribution of this research is the improvement of dimension dependence. The authors achieved a scaling of $O(d^2/n)$ for TV and $W_1$ distances, a significant advancement over the $O(d^3/n)$ scaling found in previous literature. This represents the lowest possible order for the general case.

Furthermore, the bounds do not require global log-concavity. By focusing on the "strict optimality" of the posterior peak, the framework applies to a much broader class of models, including those with heavy tails. These bounds are "computable," meaning researchers can plug in their data, perform numerical optimization to find specific constants (such as the maximum of the third derivative of the log-likelihood), and obtain a rigorous upper bound on the approximation error.

Empirical Validation

The framework was validated using several classic Bayesian models where ground truth could be established via intensive Markov Chain Monte Carlo (MCMC) sampling:

  • Poisson Likelihood with Gamma Prior: Used to test model misspecification.
  • Weibull Likelihood with Inverse-Gamma Prior: A heavy-tailed, non-log-concave model.
  • Logistic Regression with Student’s t Prior: A multivariate, non-log-concave model used to test scaling with dimension ($d$).

Experimental results confirmed that the bounds vanish at the expected rate of $1/\sqrt{n}$. In the Logistic Regression tests, the bounds remained non-vacuous (useful) for sample sizes in the low thousands, even as dimensionality increased. While the bounds are inherently conservative to ensure safety, they closely track the "true" error measured via MCMC, making them a viable tool for certifying approximations.

Conclusion and Future Work

While this work provides a significant step toward practical error certification, it does introduce some computational overhead. Finding the maximum value of the third derivative of the log-posterior in high-dimensional spaces can be numerically intensive. Future research may focus on extending these techniques to even more complex models and optimizing the constant-finding process for high-dimensional applications like neural networks.

Summary updated

BibTeX
@misc{kasprzak2022how,
  author = {Mikołaj J. Kasprzak and Ryan Giordano and Tamara Broderick},
  title = {{How good is your Laplace approximation of the Bayesian posterior? Finite-sample computable error bounds for a variety of useful divergences}},
  year = {2022},
  eprint = {2209.14992},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2209.14992},
}
Figure