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

Quantifying the effectiveness of linear preconditioning in Markov chain Monte Carlo

Max Hird, Samuel LivingstonearXiv 2023 · DOI

In the world of Bayesian computation, Markov chain Monte Carlo (MCMC) is the workhorse. However, its efficiency is often crippled by the "geometry" of the target distribution. If a distribution is highly stretched or anisotropic—think of a long, thin "ridge" in a contour plot—standard samplers like the Random Walk Metropolis (RWM) or Hamiltonian Monte Carlo (HMC) struggle to explore it efficiently.

The standard remedy is preconditioning: transforming the coordinate system to make the distribution look more "circular" (isotropic). While practitioners use this trick daily, its theoretical foundations have remained surprisingly thin. This paper by Max Hird and Samuel Livingstone provides a rigorous look at when linear preconditioning actually helps, and when it might surprisingly make things worse.

TL;DR

This paper quantifies how linear preconditioning affects MCMC mixing times by analyzing the "condition number" ($\kappa$) of target distributions. It identifies specific mathematical structures (additive and multiplicative Hessians) where preconditioning is provably effective, while warning that common defaults—like diagonal preconditioning—can actually degrade performance in highly correlated models.

What Problem Does This Paper Address?

The performance of MCMC samplers is often tied to the condition number ($\kappa$) of the target distribution's potential function. Formally, for a log-concave distribution, $\kappa$ is the ratio of the largest to the smallest eigenvalue of the Hessian of the log-density. A high $\kappa$ means the distribution is poorly conditioned (highly anisotropic), leading to slow "mixing" and requiring many more iterations to produce independent samples.

While linear preconditioning (multiplying the state by a matrix $L$) is intended to reduce $\kappa$, there has been a lack of clarity on:

  1. Whether all well-behaved distributions can be improved by linear preconditioning.
  2. Which specific preconditioners (e.g., the Fisher matrix, the covariance matrix, or the Hessian at the mode) are optimal for different model structures.
  3. Whether popular software defaults, such as diagonal preconditioning, are always safe.

Methods

The authors focus on the class of well-conditioned distributions (strongly log-concave and smooth). They analyze the effect of a linear transformation $Y = LX$ on the condition number $\tilde{\kappa}$ of the transformed distribution.

The paper introduces two key structural assumptions that make distributions "preconditionable":

  • Additive Hessians: The Hessian $\nabla^2 U(x)$ can be written as a constant matrix $A$ plus a small varying part $B(x)$.
  • Multiplicative Hessians: The Hessian takes the form $Z^T \Lambda(x) Z$, where $Z$ is a fixed "design matrix" and $\Lambda(x)$ is a varying diagonal matrix. This structure is common in Generalized Linear Models (GLMs).

The authors use matrix perturbation theory (specifically variants of the Davis–Kahan theorem) to provide upper and lower bounds on the spectral gap of the RWM sampler, showing exactly how preconditioning increases this gap.

Datasets

The paper uses simulated models to validate its theoretical findings:

  • Correlated Gaussian: A 5-dimensional Gaussian with a specific covariance matrix designed to show the pitfalls of diagonal preconditioning.
  • Bayesian Linear Regression: Using a Hyperbolic prior (which results in an additive Hessian structure).
  • Bayesian Binomial Regression: Using a generalized g-prior (which results in a multiplicative Hessian structure).
  • High-Dimensional HMC Study: 50-dimensional Gaussian and Logistic regression models used to measure the reduction in computational cost (leapfrog steps) achieved by preconditioning.

Key Insights and Ideas

  • Result 1: The "Unpreconditionable" Distribution. Surprisingly, the authors prove that there exist well-behaved, log-concave distributions where no linear preconditioner can reduce the condition number. In these cases, the anisotropy is "intrinsic" to the curvature and cannot be fixed by a simple linear stretch.
  • The Danger of Diagonal Preconditioning. Many MCMC packages (like Stan or TensorFlow Probability) use diagonal preconditioning by default because it is computationally cheap ($O(d)$). However, the authors show that if the target has strong off-diagonal correlations, diagonal preconditioning can actually increase the condition number and slow down the sampler.
  • Structure-Specific Success.
    • For additive Hessians, the inverse square root of the Fisher matrix or the target covariance are excellent choices.
  • For multiplicative Hessians (like in logistic regression), performing a QR decomposition on the design matrix $Z$ or using the Hessian at the mode can reduce $\kappa$ to its theoretical minimum.
  • Spectral Gap Gains. For the RWM sampler, the authors prove that the spectral gap (a measure of mixing speed) is inversely proportional to $\kappa$. Thus, reducing $\kappa$ via preconditioning directly and provably speeds up the chain.

Key Results

  • Computational Speedup: In HMC experiments, proper preconditioning reduced the number of leapfrog steps required to get an independent sample by a factor of roughly $\sqrt{\kappa}$. In high-dimensional cases, this translates to massive savings in wall-clock time.
  • Diagonal Failure: In a 5D Gaussian test case, diagonal preconditioning increased the condition number from $\approx 4,400$ to $\approx 8,100$, leading to significantly lower Effective Sample Size (ESS) compared to doing nothing at all.
  • Tight Bounds: The authors provided the first tight upper and lower bounds for the spectral gap of RWM with explicit $1/\kappa$ dependence, confirming that preconditioning's benefit is not just empirical but mathematically guaranteed under their identified structures.

Limitations and Future Work

  • Linear Only: The paper focuses strictly on linear transformations. While linear preconditioning is common, it cannot fix "banana-shaped" or non-convex distributions.
  • Nonlinear Extensions: The authors suggest that Nonlinear Preconditioning (e.g., using Normalizing Flows or Riemannian Manifold MCMC) is the natural next step for distributions that don't fit the additive/multiplicative structures.
  • Beyond Log-Concavity: The theory relies heavily on strong log-concavity. Extending these results to multi-modal distributions or those with heavier tails remains an open challenge.
  • Adaptive Preconditioning: While the paper discusses what the "ideal" preconditioner is, it doesn't deeply explore the best ways to learn these matrices on-the-fly during the "warm-up" phase of an MCMC run.

Summary updated

BibTeX
@misc{hird2023quantifying,
  author = {Max Hird and Samuel Livingstone},
  title = {{Quantifying the effectiveness of linear preconditioning in Markov chain Monte Carlo}},
  year = {2023},
  eprint = {2312.04898},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.04898},
}
Figure