Another physically motivated sampler: Microcanonical HMC

This time it’s astrophysicists rather than quantum physicists getting in on the sampling action.

Microcanonical HMC

Uroš Seljak, an astrophysics professor at UC Berkeley, and collaborators developed a form of Hamiltonian Monte Carlo (HMC) sampling with an alternative approach to energy related to underdamped Langevin dynamics. Here’s the link to the arXiv paper.

Uros presented a preliminary version last month when he visited Flatiron Institute for our workshop on measure transport, diffusion processes, and sampling (a topic which was way more popular than my co-organizer Michael Albergo and I anticipated).

Meaningful evaluation vs. NUTS

I like that the microcanonical HMC paper demonstrates an auto-tuning scheme that shows impressive improvements over the no-U-turn sampler from Stan rather than using vanilla Hamiltonian Monte Carlo as a baseline. Vanilla HMC is very difficult to tune to work and even harder to tune for efficiency, especially without integration time jittering (step size or number of steps).

Langevin diffusions everywhere

I’m seeing Langevin diffusions everywhere these days. Chirag Modi, a joint astro and math postdoc here at Flatiron Institute who did his Ph.D. with Uros, Alex Barnett, Edward Roualdes and I are working on mashing up our recent work on delayed rejection for HMC for multiscale distributions with Radford Neal’s latest partial momentum refresh Langevin sampler, with a dash of parallel auto-adaptation courtesy of Matt Hoffman and Pavel Sountsov’s latest sampler, MEADS. This is the project that motivated Edward to start BridgeStan.

The field is heating up

The field of NUTS competitors is continuing to heat up (physical systems pun purely coincidental). Stay tuned for the results of BridgeStan implementations with more extensive evaluations based on posteriordb.

13 thoughts on “Another physically motivated sampler: Microcanonical HMC

  1. Question. For the comparison of MCHMC and NUTS on Neal’s funnel, the paper says (these lines come from two different places):

    > Compared to NUTS (with warm-up) the improvement of MCHMC is a factor of 11
    > Both MCHMC and NUTS are capable of accurately sampling the funnel target

    Is there a reason to think we can get away from needing to non-center everything? Or that MCHMC has some advantage here leading to this factor of 11? Or is this just MCHMC making better of a tough situation?

    • Non-centered parametrization would still be useful. Neal’s Funnel becomes the Standard Normal and the ESS drastically increases to 0.25.
      Here we do not do that and as you say, MCHMC just makes better of a tough situation.

    • I hope we can get away from needing to manual make the combinatorial centered/non-centered parameterization. I would much rather have a sampler that works for both parameterizations than requiring the user to manually optimize.

      • It is too much to expect from any sampler to work equally well in all parametrizations.
        This is where the preconditioning comes in. For example, you could combine the MCHMC with a Normalizing flow preconditioner (or something cheaper).

        • Do you have something diagrammed on how that might work (how to know a non-centering can be applied, how to detect, and what to do)?

        • @Ben and @Tamas:

          The current standard reference for adaptive non-centering is probably Maria Gorinova’s “Automatic Reparameterisation of Probabilistic Programs”. She also writes a bit about automatically detecting possibilities for non-centering (and also other reparametrizations) based on analyzing the probabilistic program’s code/structure, but this isn’t what we would be considering at all. We would want to put it into brms, because brms already has all of the structure about hierarchies between parameters available. To tune the adaptive non-centeredness, we’d also be doing something slightly different (but related) to what Maria Gorinova proposed. We actually haven’t started working on bringing it to brms, and Paul Bürkner also doesn’t know about our plans yet, so “end of this year” is probably quite optimistic. In principle, implementation should be easy, but in practice, well, you never know what happens there…

Leave a Reply

Your email address will not be published. Required fields are marked *