Riemannian Manifold Hamiltonian Monte Carlo

Mark Girolami, Ben Calderhead, Sa ChinarXiv 2009 · DOI

TL;DR

This paper introduces Riemannian Manifold Hamiltonian Monte Carlo (RM-HMC), a novel Markov Chain Monte Carlo (MCMC) algorithm that automatically adapts to the geometry of complex, high-dimensional probability distributions. RM-HMC significantly improves sampling efficiency and reduces tuning effort compared to existing methods, making it a powerful tool for Bayesian inference in challenging statistical models.

What Problem Does This Paper Address?

Sampling from complex, high-dimensional probability distributions is a fundamental challenge in Bayesian statistics and machine learning. Traditional MCMC methods like Metropolis-Hastings (MH) and Hybrid Monte Carlo (HMC) often struggle with distributions that are highly correlated, have vastly different scales across dimensions, or change their geometric structure significantly between transient and stationary phases. This leads to slow mixing, low acceptance rates, and requires extensive, often manual, tuning of algorithm parameters (e.g., proposal distribution, step sizes, mass matrices). The authors aim to develop an MCMC method that automates this tuning process by leveraging the intrinsic geometric structure of the parameter space.

Methods

The core innovation is the Riemannian Manifold Hamiltonian Monte Carlo (RM-HMC) method. It builds upon Hamiltonian Monte Carlo (HMC) by incorporating the Riemannian geometry of the parameter space. Instead of using a fixed, global mass matrix (as in standard HMC), RM-HMC uses a position-dependent metric tensor, derived from the Fisher Information matrix. This allows the algorithm to adapt its proposal steps to the local curvature and scaling of the target distribution at each iteration.

Key methodological contributions include:

  • Riemannian Manifold Hamiltonian: The Hamiltonian is redefined to incorporate the metric tensor, making the kinetic energy term dependent on the local geometry. This results in a non-separable Hamiltonian.
  • Semi-explicit Symplectic Integrator: A novel second-order symplectic integrator is derived to efficiently simulate trajectories on this Riemannian manifold, ensuring time-reversibility and volume preservation, crucial for detailed balance in MCMC. This integrator is designed to handle the non-separable Hamiltonian that arises from the position-dependent metric.
  • Automated Adaptation: By exploiting the Riemannian structure, RM-HMC automatically adapts to varying scales and correlations, eliminating the need for costly pilot runs or manual tuning of parameters like the mass matrix or step size.

Datasets

The paper evaluates RM-HMC on several benchmark datasets and models:

  • Logistic Regression: Five datasets (Pima Indian, Australian Credit, German Credit, Heart, Ripley) with varying numbers of covariates and data points.
  • Stochastic Volatility Model (SVM): Simulated data for parameter and latent volatility inference.
  • Log-Gaussian Cox Process (LGCP): A high-dimensional spatial data model (64x64 grid).
  • Nonlinear Differential Equations (Fitzhugh-Nagumo model): Simulated data for inferring model parameters and Gaussian Process hyperparameters.

The paper does not introduce new benchmark datasets but uses established ones to demonstrate RM-HMC's performance against existing methods.

Key Insights and Ideas

  • Geometry is Key: The paper strongly advocates for leveraging the intrinsic geometric structure of the parameter space to improve MCMC efficiency. The "shape" of the probability distribution matters significantly for sampling.
  • Automated Tuning is Possible: RM-HMC demonstrates that complex tuning requirements of methods like HMC and MALA can be significantly reduced or eliminated by using geometric information. This is a major practical advantage.
  • High Dimensions and Correlations are Handled: RM-HMC shows remarkable performance in high-dimensional settings with strong correlations (e.g., LGCP, Fitzhugh-Nagumo), where other methods struggle or fail without extensive reparameterization.
  • Efficiency Gains are Substantial: The method consistently achieves higher effective sample sizes (ESS) per unit time, indicating more efficient exploration of the target distribution.

Key Results

RM-HMC consistently outperformed standard MCMC methods (Metropolis-Hastings, MALA, HMC) across all tested models and datasets in terms of time-normalized effective sample size (ESS).

  • Logistic Regression: RM-HMC achieved significantly higher ESS, with relative speedups of up to ×1662 for the Pima Indian dataset.
  • Stochastic Volatility Model: RM-HMC showed superior performance in sampling both parameters and latent volatilities, running faster than HMC due to efficient handling of the metric tensor.
  • Log-Gaussian Cox Process: RM-HMC was able to directly sample the high-dimensional latent variables without the need for ad-hoc reparameterizations or extensive fine-tuning, unlike MALA.
  • Nonlinear Differential Equations: RM-HMC converged much faster and achieved higher ESS than Metropolis and HMC, especially when dealing with complex parameter spaces and different orders of magnitude in marginal distributions. For the Fitzhugh-Nagumo model, RM-HMC achieved relative speedups of ×3.89 for full sampling.

Limitations and Future Work

  • Computational Cost of Metric Tensor: Developing analytical expressions for the metric tensor and its derivatives can be challenging for some statistical models. The O(N³) scaling for inverting the metric tensor can be computationally expensive in very high dimensions, although sparsity in the metric tensor (as seen in the SVM example) can mitigate this.
  • Future Work: The authors suggest embedding RM-HMC within population MCMC procedures for models with distinct, separated modes. Further investigation into the O(N³) scaling issue and characterizing computational costs at intermediate dimensionality regimes is also mentioned.

The paper also notes that while RM-HMC generally requires less tuning than HMC, the development of analytical expressions for the metric tensor is a necessary upfront cost.

Summary updated

Abstract

The paper proposes a Riemannian Manifold Hamiltonian Monte Carlo sampler to resolve the shortcomings of existing Monte Carlo algorithms when sampling from target densities that may be high dimensional and exhibit strong correlations. The method provides a fully automated adaptation mechanism that circumvents the costly pilot runs required to tune proposal densities for Metropolis-Hastings or indeed Hybrid Monte Carlo and Metropolis Adjusted Langevin Algorithms. This allows for highly efficient sampling even in very high dimensions where different scalings may be required for the transient and stationary phases of the Markov chain. The proposed method exploits the Riemannian structure of the parameter space of statistical models and thus automatically adapts to the local manifold structure at each step based on the metric tensor. A semi-explicit second order symplectic integrator for non-separable Hamiltonians is derived for simulating paths across this manifold which provides highly efficient convergence and exploration of the target density. The performance of the Riemannian Manifold Hamiltonian Monte Carlo method is assessed by performing posterior inference on logistic regression models, log-Gaussian Cox point processes, stochastic volatility models, and Bayesian estimation of parameter posteriors of dynamical systems described by nonlinear differential equations. Substantial improvements in the time normalised Effective Sample Size are reported when compared to alternative sampling approaches. Matlab code at \url{http://www.dcs.gla.ac.uk/inference/rmhmc} allows replication of all results.
BibTeX
@misc{girolami2009riemannian,
  author = {Mark Girolami and Ben Calderhead and Sa Chin},
  title = {{Riemannian Manifold Hamiltonian Monte Carlo}},
  year = {2009},
  eprint = {0907.1100},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/0907.1100},
}
Figure