Skip to main content
QUICK REVIEW

[Paper Review] Magnetic Hamiltonian Monte Carlo

Nilesh Tripuraneni, Mark Rowland|arXiv (Cornell University)|Jul 10, 2016
Markov Chains and Monte Carlo MethodsMathematics16 references12 citations
TL;DR

This paper introduces magnetic Hamiltonian Monte Carlo (MHMC), a generalization of Hamiltonian Monte Carlo that uses non-canonical Hamiltonian dynamics to improve sampling efficiency. By incorporating a magnetic field-like term in the dynamics, MHMC enhances mixing in high-dimensional posterior distributions, as demonstrated by improved effective sample sizes in both toy and real-world inference problems.

ABSTRACT

Hamiltonian Monte Carlo (HMC) exploits Hamiltonian dynamics to construct efficient proposals for Markov chain Monte Carlo (MCMC). In this paper, we present a generalization of HMC which exploits extit{non-canonical} Hamiltonian dynamics. We refer to this algorithm as magnetic HMC, since in 3 dimensions a subset of the dynamics map onto the mechanics of a charged particle coupled to a magnetic field. We establish a theoretical basis for the use of non-canonical Hamiltonian dynamics in MCMC, and construct a symplectic, leapfrog-like integrator allowing for the implementation of magnetic HMC. Finally, we exhibit several examples where these non-canonical dynamics can lead to improved mixing of magnetic HMC relative to ordinary HMC.

Motivation & Objective

  • To develop a generalization of Hamiltonian Monte Carlo (HMC) that leverages non-canonical Hamiltonian dynamics for improved MCMC sampling.
  • To establish a theoretical foundation for using non-canonical dynamics in MCMC, preserving key properties like symplecticity and time-reversibility.
  • To design a symplectic, leapfrog-like integrator for efficient numerical implementation of the proposed dynamics.
  • To empirically demonstrate that magnetic HMC outperforms standard HMC in terms of mixing and effective sample size on complex posterior distributions.
  • To explore the potential of magnetic field components as a form of local preconditioning in MCMC, analogous to Riemannian HMC.

Proposed method

  • Proposes a generalized Hamiltonian framework using a non-symmetric matrix A in the Hamiltonian flow equations, enabling non-canonical dynamics.
  • Introduces a magnetic field-like term in the dynamics, modeled via a skew-symmetric matrix G, which in 3D corresponds to the motion of a charged particle in a magnetic field.
  • Derives a symplectic integrator analogous to the leapfrog integrator used in standard HMC, ensuring numerical stability and energy preservation.
  • Applies the method to target distributions by augmenting the parameter space with momentum variables and simulating the magnetic Hamiltonian flow for a fixed time τ.
  • Uses the Metropolis-Hastings acceptance step to correct for numerical integration errors, ensuring detailed balance with respect to the target distribution.
  • Employs a momentum resampling step at each iteration, followed by integration of the magnetic Hamiltonian flow, and applies a momentum flip to ensure detailed balance.

Experimental results

Research questions

  • RQ1Can non-canonical Hamiltonian dynamics improve mixing in MCMC sampling compared to standard HMC?
  • RQ2What are the theoretical properties (e.g., symplecticity, time-reversibility) of non-canonical Hamiltonian dynamics in the context of MCMC?
  • RQ3How can a symplectic integrator be constructed for magnetic HMC to enable efficient numerical simulation?
  • RQ4Does the inclusion of a magnetic field component lead to measurable improvements in effective sample size and convergence speed?
  • RQ5Can magnetic HMC be generalized to include position-dependent magnetic fields or other non-canonical structures for adaptive inference?

Key findings

  • Magnetic HMC achieves higher effective sample sizes per second than standard HMC on the Fitzhugh-Nagumo model, with improvements of up to 11% in effective sample size for the b and c parameters.
  • The MHMC variant with perturbation along the ab plane achieved the best performance, with an effective sample size of 1.47 for parameter b, compared to 1.33 for standard HMC.
  • All MHMC variants showed improved mixing over the b and c parameters, with effective sample sizes consistently higher than HMC across all tested magnetic field configurations.
  • The average acceptance rate across all MHMC and HMC chains was approximately 80%, indicating that the proposals were well-calibrated and efficient.
  • The computational cost per iteration was nearly identical across all methods (~238 seconds for 1000 samples), confirming that performance differences were due to mixing, not computation.
  • The marginal posterior density contours for (a,b) revealed strong non-linear dependence on parameters, justifying the need for advanced sampling methods like MHMC to explore complex posteriors effectively.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.