Lagrangian manifold Monte Carlo on Monge patches

Marcelo Hartmann, Mark Girolami, Arto Klami

Abstract

The efficiency of Markov Chain Monte Carlo (MCMC) depends on how the underlying geometry of the problem is taken into account. For distributions with strongly varying curvature, Riemannian metrics help in efficient exploration of the target distribution. Unfortunately, they have significant computational overhead due to e.g. repeated inversion of the metric tensor, and current geometric MCMC methods using the Fisher information matrix to induce the manifold are in practice slow. We propose a new alternative Riemannian metric for MCMC, by embedding the target distribution into a higher-dimensional Euclidean space as a Monge patch, thus using the induced metric determined by direct geometric reasoning. Our metric only requires first-order gradient information and has fast inverse and determinants, and allows reducing the computational complexity of individual iterations from cubic to quadratic in the problem dimensionality. We demonstrate how Lagrangian Monte Carlo in this metric efficiently explores the target distributions.

Introduction

Sampling from complex, high-dimensional probability distributions is a fundamental challenge in Bayesian statistics. While standard Hamiltonian Monte Carlo (HMC) is highly effective for many problems, it often struggles with "stiff" distributions—those characterized by regions of extreme curvature, such as the narrow neck of a funnel.

Geometric MCMC methods, such as Riemannian Manifold HMC (RMHMC), address this by employing a position-dependent metric to warp the parameter space, facilitating exploration in these difficult regions. However, traditional approaches rely on the Fisher Information (FI) matrix. Computing the FI matrix requires expected second derivatives, and its use in sampling involves matrix inversions and determinant calculations at every step. These operations scale cubically ($O(D^3)$) with the number of dimensions $D$, rendering geometric MCMC computationally prohibitive for large-scale models.

The Monge Metric: Geometric Reasoning for Sampling

This paper proposes a shift from statistical reasoning to pure geometric reasoning. Instead of the Fisher Information, the authors define a manifold by embedding the log-target distribution $\ell(x)$ into a $(D+1)$-dimensional Euclidean space using a Monge patch: $$\Xi(x) = (x, \alpha \ell(x))$$ where $\alpha$ is a user-defined control parameter. This embedding induces a Riemannian metric tensor $G_M(x)$ defined as: $$G_M(x) = I_D + \alpha^2 \nabla \ell(x) \nabla \ell(x)^\top$$

Comparison of Fisher and Monge metrics on a high-curvature distribution.

The Monge metric is an identity matrix plus a rank-one outer product of gradients. This structure provides significant computational advantages:

  1. Quadratic Scaling: Using the Sherman-Morrison formula, the inverse and determinant can be computed in $O(D^2)$ time, a substantial improvement over the $O(D^3)$ cost of standard geometric methods.
  2. Curvature Information from Gradients: Although the metric only requires first-order gradients, its geometric properties naturally incorporate the Hessian (second derivatives) of the target density, capturing curvature without explicit Hessian manipulation.
  3. Explicit Integration: By pairing this metric with Lagrangian Monte Carlo (LMC), the authors utilize an explicit numerical integrator, avoiding the iterative implicit solvers required by RMHMC.

Key Insights and Tuning

The parameter $\alpha$ serves as a tuning knob for the sampler. When $\alpha = 0$, the metric is Euclidean, and the algorithm behaves like standard HMC. As $\alpha$ increases, the metric becomes increasingly sensitive to the local geometry. This allows the sampler to "regularize" its exploration, providing stability in regions where the Fisher Information might be ill-conditioned.

Experimental Results

The authors evaluated "LMC-Monge" against several benchmarks, including Neal’s Funnel, the Squiggle distribution, and real-world logistic regression datasets (Heart, German, Australian).

Performance comparison on Neal's Funnel across dimensions.

In the Neal’s Funnel experiment, LMC-Monge demonstrated superior exploration capabilities. As dimensionality $D$ increased to 50, the state-of-the-art No-U-Turn Sampler (NUTS) showed significant bias and rising KL divergence. In contrast, LMC-Monge correctly sampled the marginal distribution with minimal error. On logistic regression tasks, LMC-Monge achieved higher Effective Sample Size (ESS) per second than Fisher-metric-based samplers, primarily due to the reduction in matrix algebra overhead.

Conclusion

By introducing the Monge metric, this work makes geometric MCMC viable for high-dimensional problems. The transition from $O(D^3)$ to $O(D^2)$ complexity, combined with the ability to capture curvature using only first-order information, represents a significant step forward in efficient Bayesian computation. Future work may focus on automated tuning of the $\alpha$ parameter and the development of production-ready implementations in probabilistic programming frameworks.

Summary updated

Abstract

The efficiency of Markov Chain Monte Carlo (MCMC) depends on how the underlying geometry of the problem is taken into account. For distributions with strongly varying curvature, Riemannian metrics help in efficient exploration of the target distribution. Unfortunately, they have significant computational overhead due to e.g. repeated inversion of the metric tensor, and current geometric MCMC methods using the Fisher information matrix to induce the manifold are in practice slow. We propose a new alternative Riemannian metric for MCMC, by embedding the target distribution into a higher-dimensional Euclidean space as a Monge patch, thus using the induced metric determined by direct geometric reasoning. Our metric only requires first-order gradient information and has fast inverse and determinants, and allows reducing the computational complexity of individual iterations from cubic to quadratic in the problem dimensionality. We demonstrate how Lagrangian Monte Carlo in this metric efficiently explores the target distributions.
BibTeX
@inproceedings{hartmann2022lagrangian,
  author = {Marcelo Hartmann and Mark Girolami and Arto Klami},
  title = {{Lagrangian manifold Monte Carlo on Monge patches}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2022},
  url = {https://openreview.net/forum?id=z2sNyizikc},
}
Figure