Can I do HMC with the wrong Hamiltonian?

I initially posted the following question on Stackexchange, and a member advised me to come and ask it here.
I am a novice HMC user. I am reading Neal’s chapter in the Handbook of MCMC. I think I can present the HMC algorithm as :

  1. Sample a new momentum
  2. Propose a new momentum and a new position using a reversible and volume preserving integrator such as the Leapfrog Integrator
  3. Accept or reject the proposed momentum and position using a Metropolis step

If I understood well, the critical point in the second step of the HMC algorithm is that the proposal is volume preserving and reversible, but I am free to use another position energy function than the negated log-likelihood of the target. I am aware of the fact that this would be very inefficient because the acceptance rate of HMC depends of the use of Hamiltonian dynamics to visit high-density regions. However, there might be an interest if someone was using a cheap approximation to the density, or to use a heated density to do some tempering (the option is not mentioned in the manual though). Is my understanding correct or did I miss something ?

1 Like

Tagging the resident expert @betanalpha

2 Likes

that’s funny, the person on StackExchange told me to go either for him or Radford Neal…

Firstly a quickly clarification: the algorithm you detail is the original Hybrid Monte Carlo scheme from physics that Radford Neal introduced to statistics. These days we use much more sophisticated Hamiltonian Monte Carlo algorithms – see https://arxiv.org/abs/1701.02434 for much more on both.

You can use any Hamiltonian function you want to generate a proposal – the Metropolis acceptance procedure will compensate for any error exactly. The scalability of Hamiltonian Monte Carlo, however, depends on using the exact Hamiltonian to drive the discrete trajectories. In high dimensional spaces even small changes to the Hamiltonian function will cause the discrete trajectories to systematically drift away from the true energy level set and the acceptance probability will plummet.

For details see http://proceedings.mlr.press/v37/betancourt15.pdf.

3 Likes

Hello ! Thank you so much for your answer !