552 11. SAMPLING METHODS
11.5.2 Hybrid Monte Carlo
As we discussed in the previous section, for a nonzero step size, the discretiza-
tion of the leapfrog algorithm will introduce errors into the integration of the Hamil-
tonian dynamical equations.Hybrid Monte Carlo(Duaneet al., 1987; Neal, 1996)
combines Hamiltonian dynamics with the Metropolis algorithm and thereby removes
any bias associated with the discretization.
Specifically, the algorithm uses a Markov chain consisting of alternate stochastic
updates of the momentum variablerand Hamiltonian dynamical updates using the
leapfrog algorithm. After each application of the leapfrog algorithm, the resulting
candidate state is accepted or rejected according to the Metropolis criterion based
on the value of the HamiltonianH. Thus if(z,r)is the initial state and(z,r)
is the state after the leapfrog integration, then this candidate state is accepted with
probability
min (1,exp{H(z,r)−H(z,r)}). (11.67)
If the leapfrog integration were to simulate the Hamiltonian dynamics perfectly,
then every such candidate step would automatically be accepted because the value
ofHwould be unchanged. Due to numerical errors, the value ofHmay sometimes
decrease, and we would like the Metropolis criterion to remove any bias due to this
effect and ensure that the resulting samples are indeed drawn from the required dis-
tribution. In order for this to be the case, we need to ensure that the update equations
corresponding to the leapfrog integration satisfy detailed balance (11.40). This is
easily achieved by modifying the leapfrog scheme as follows.
Before the start of each leapfrog integration sequence, we choose at random,
with equal probability, whether to integrate forwards in time (using step size)or
backwards in time (using step size−). We first note that the leapfrog integration
scheme (11.64), (11.65), and (11.66) is time-reversible, so that integration forLsteps
using step size−will exactly undo the effect of integration forLsteps using step
size. Next we show that the leapfrog integration preserves phase-space volume
exactly. This follows from the fact that each step in the leapfrog scheme updates
either azivariable or anrivariable by an amount that is a function only of the other
variable. As shown in Figure 11.14, this has the effect of shearing a region of phase
space while not altering its volume.
Finally, we use these results to show that detailed balance holds. Consider a
small regionRof phase space that, under a sequence ofLleapfrog iterations of
step size, maps to a regionR′. Using conservation of volume under the leapfrog
iteration, we see that ifRhas volumeδVthen so too willR′. If we choose an initial
point from the distribution (11.63) and then update it usingLleapfrog interactions,
the probability of the transition going fromRtoR′is given by
1
ZH
exp(−H(R))δV
1
2
min{ 1 ,exp(−H(R)+H(R′))}. (11.68)
where the factor of 1 / 2 arises from the probability of choosing to integrate with a
positive step size rather than a negative one. Similarly, the probability of starting in