Riemannian-Manifold HMC
- RMHMC is a Markov Chain Monte Carlo method that utilizes a position-dependent metric, derived from the Fisher information or Hessian, to adapt to local curvature.
- It integrates geometric insights into Hamiltonian dynamics by adjusting proposal trajectories, thereby reducing random-walk behavior in complex parameter spaces.
- The approach employs a semi-implicit symplectic integrator to accurately simulate nonseparable Hamiltonians, offering superior effective sample sizes despite higher computational costs.
Riemannian-Manifold Hamiltonian Monte Carlo (RMHMC) is a Markov Chain Monte Carlo (MCMC) methodology that generalizes the Hybrid/Hamiltonian Monte Carlo (HMC) paradigm to exploit the local Riemannian geometry of the target distribution’s parameter space. RMHMC equips the parameter manifold with a smoothly varying metric tensor, typically derived from the Fisher information or the negative Hessian of the log-posterior, enabling proposal trajectories that are automatically adapted to local curvature. This approach enhances sampling efficiency, particularly in high-dimensional and highly correlated posteriors, by circumventing the need for costly pilot runs to calibrate proposal scales and by reducing random-walk behavior.
1. Mathematical Formulation on a Riemannian Manifold
Let denote the parameter vector of interest, with target posterior density , where is the likelihood and the prior. The parameter space is endowed with a position-dependent, symmetric positive-definite metric tensor . A momentum variable (conditionally distributed as ) augments the parameter space, yielding an extended "Hamiltonian"
with
This Hamiltonian structure ensures that the marginal distribution over remains under the dynamics, due to the volume correction .
2. Riemannian Manifold Hamiltonian Dynamics
The stochastic dynamics evolve according to the Riemannian generalization of Hamilton's equations:
The first two terms ( and ) correspond to the natural gradient and volume correction, while the final term () accounts for the metric’s local variation and is a contraction involving third-order derivatives. The coupled ODEs trace geodesic flows under the metric .
3. Metric Tensor Choices and Geometric Adaptivity
Typical metric choices:
- Expected Fisher Information: .
- Observed Information (regularized): , with small for positive definiteness.
The metric tensor re-scales the local geometry: directions with large eigenvalues (high curvature) admit smaller step sizes, enhancing stability and efficiency in regions of strong anisotropy. In flat directions, larger steps promote rapid exploration. The approach removes the need for global scaling heuristics and pilot adaptation runs as in traditional HMC.
4. Symplectic Integrator for Nonseparable Hamiltonians
The Hamiltonian is nonseparable due to the position-dependence of , precluding direct use of the explicit leapfrog integrator. The method employs a semi-implicit, time-reversible, second-order symplectic integrator. For each integration step of size :
- Momentum half-step (explicit):
- Position update (typically implicit):
This may require a fixed-point or Newton solve due to the nonlinearity from .
- Metric update and corresponding derivatives.
- Second momentum half-step:
This update is repeated times per trajectory. All metric derivatives and must be available in closed form or computed via autodifferentiation.
5. Full RMHMC Algorithm and Practical Implementation
The complete iteration is as follows:
- Compute and .
- Sample .
- Integrate via generalized leapfrog steps as above.
- Compute the Hamiltonian difference .
- Accept the proposal with probability ; otherwise retain the previous state.
Key computational aspects:
- Computing and per step is and .
- Calculating metric derivatives () is .
- Step 2 (position update) typically requires efficient linear algebra, including Cholesky factorization or parallelization, especially in moderate () dimensions.
- For very large , use sparse, low-rank, or block-diagonal approximations to . Cholesky caching, partial metric updates, and structure-exploiting linear algebra are advised.
6. Practical Performance and Empirical Results
Empirical studies by Girolami & Calderhead demonstrate RMHMC’s superiority on a range of models:
- Logistic regression: faster mixing in moderate dimensions.
- Log-Gaussian Cox process: efficient high-dimensional GP latent variable inference ().
- Stochastic volatility models: improved performance on latent time-series models.
- Bayesian inference on ODE parameters: rapid convergence and exploration.
Reported time-normalized Effective Sample Size (ESS) improvements over standard HMC and Random Walk Metropolis range from a factor of 2 to 10, particularly in strongly anisotropic or highly correlated posteriors.
7. Advantages, Limitations, and Applicability
Advantages:
- Automatic adaptation to local curvature and anisotropy.
- Suppression of random-walk behavior in challenging geometries.
- Greater statistical efficiency (higher ESS per unit time) for targets with rapidly varying or strongly correlated scales.
Limitations:
- High per-step computational expense—each step is dominated by metric computation, inversion, and metric derivative evaluation.
- Complex implementation—implicit integrator steps and metric derivatives make coding nontrivial.
- Scalability is restricted in very high dimensions unless conditional independence, sparsity, or low-rank structure in is exploited.
Applicability: RMHMC is most effective for moderate- to high-dimensional (tens to a few hundreds of dimensions) hierarchical Bayesian models exhibiting severe posterior anisotropy, strong dependence, or curved geometries that challenge conventional HMC or Metropolis approaches.
For algorithmic details, see the provided MATLAB code linked by the original authors, which is organized to replicate all main results and serve as reference for efficient RMHMC implementations (0907.1100).
Sponsored by Paperpile, the PDF & BibTeX manager trusted by top AI labs.
Get 30 days free