Microcanonical Hamiltonian Monte Carlo

Jakob Robnik, G. Bruno De Luca, Eva Silverstein, Uroš Seljak
12/16/2022
34 citations
stat.COastro-ph.IMhep-lat

Official code: JakobRobnik/MicroCanonicalHMC (79 stars, Jupyter Notebook, GPL-3.0, last commit 2025-12-09).

Abstract

We develop Microcanonical Hamiltonian Monte Carlo (MCHMC), a class of models which follow a fixed energy Hamiltonian dynamics, in contrast to Hamiltonian Monte Carlo (HMC), which follows canonical distribution with different energy levels. MCHMC tunes the Hamiltonian function such that the marginal of the uniform distribution on the constant-energy-surface over the momentum variables gives the desired target distribution.

Show full abstract

We show that MCHMC requires occasional energy conserving billiard-like momentum bounces for ergodicity, analogous to momentum resampling in HMC. We generalize the concept of bounces to a continuous version with partial direction preserving bounces at every step, which gives an energy conserving underdamped Langevin-like dynamics with non-Gaussian noise (MCLMC). MCHMC and MCLMC exhibit favorable scalings with condition number and dimensionality. We develop an efficient hyperparameter tuning scheme that achieves high performance and consistently outperforms NUTS HMC on several standard benchmark problems, in some cases by more than an order of magnitude.

View on arXivView PDF

Code Implementations(1)

GPL-3.0

MCHMC: sampler from an arbitrary differentiable distribution

796Jupyter Notebook, PythonAug 8, 202211 months agoGPL-3.0

Similar Papers

Cite this paper

@article{robnik2022microcanonical,
  title  = {Microcanonical Hamiltonian Monte Carlo},
  author = {Jakob Robnik and G. Bruno De Luca and Eva Silverstein and Uroš Seljak},
  year   = {2022},
  eprint = {2212.08549},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2212.08549}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2212.08549.svg)](https://codeofpaper.com/paper/2212.08549)

Discussion