On the Geometric Ergodicity of Hamiltonian Monte Carlo

Samuel Livingstone, Michael Betancourt, Simon Byrne, Mark Girolami

Introduction

This paper deals with ergodic properties of Markov chains produced by the Hamiltonian (or Hybrid) Monte Carlo method (HMC), a technique for approximating high dimensional integrals through stochastic simulation . Iterative algorithms of this type are widely used in (for example) statistics and machine learning , inverse problems , and molecular dynamics . In many of these settings a prior distribution can be constructed for an unknown quantity, and after conditioning on some observed data, Bayes’ theorem gives a posterior — to extract relevant information from this typically high-dimensional integrals must be evaluated.

A popular approach to such problems is to simulate a Markov chain whose limiting distribution is the posterior, and compute long-run averages (e.g. ). Provided the chain is ergodic, then a Law of Large Numbers exists for these. Several Markov chain Monte Carlo (MCMC) methods of this nature have been proposed in the literature, and many are well understood theoretically (e.g. ). HMC has proven an empirical success, with numerous authors noting its superior performance in a variety of settings (e.g. ) and high performance software available for its implementation . Comparatively few rigorous results, however, exist to justify this. Indeed, the absence of such analysis has been noted on more than one occasion . The major contribution of this work is to establish general scenarios under which geometric ergodicity can and cannot be established for Markov chains produced by common HMC implementations.

for any A∈BA\in\mathcal{B}. Constructing a Markov chain for which some distribution of interest π(⋅)\pi(\cdot) is invariant is not very difficult, owing to the Metropolis–Hastings algorithm , in which the family {fθ,θ∈Θ}\{f_{\theta},\theta\in\Theta\} is given by

and set r(x,y):=0r(x,y):=0 otherwise. Then α(x,y):=1∧r(x,y)\alpha(x,y):=1\wedge r(x,y). A more general definition is given in Proposition 1 of . The resulting chain (Xn)n≥0(X_{n})_{n\geq 0} is reversible with respect to π(⋅)\pi(\cdot).

Simple choices for the family {gξ,ξ∈Ξ}\{g_{\xi},\xi\in\Xi\} result in Markov chains which are intuitive and convenient to analyse. In the random walk case gξ(x)=x+ξg_{\xi}(x)=x+\xi, with Ξ=X\Xi=\mathbf{X} and μ(⋅)\mu(\cdot) a centred, symmetric distribution . For the Metropolis-adjusted Langevin algorithm (MALA) gξ(x)=x+h∇log⁡π(x)/2+hξg_{\xi}(x)=x+h\nabla\log\pi(x)/2+\sqrt{h}\xi, with μ(⋅)\mu(\cdot) a standard Gaussian measure on Ξ=X\Xi=\mathbf{X}, h>0h>0 a constant, ∇\nabla the gradient operator and π(x)\pi(x) the Lebesgue density of π(⋅)\pi(\cdot). The former is in some sense a naive choice, while the latter is an Euler–Maruyama scheme for the diffusion governed by dXt=∇log⁡π(Xt)dt+2dWtdX_{t}=\nabla\log\pi(X_{t})dt+\sqrt{2}dW_{t}, for which π(⋅)\pi(\cdot) is invariant under suitable regularity conditions (see e.g. ). In both cases proposals are local (only depending on analytic information at the current point), and xx is combined with ξ\xi linearly, with added complexity coming only through the (typically nonlinear) α\alpha. As a result, simple bounds on α\alpha allow stochastic stability properties such as π\pi-irreducibility to be deduced straightforwardly, and rates of convergence for different forms of π(⋅)\pi(\cdot) are also well-understood in both cases .

The HMC method can also be considered within the above framework, as outlined in . The algorithm is designed to exploit the measure-preserving properties of Hamiltonian flow (e.g. ), which can be induced provided the state space for the chain is a symplectic manifold (e.g. ). The space X\mathbf{X} can be made symplectic by doubling the dimension, introducing auxiliary momentum variables pp which follow some user-specified distribution. A Hamiltonian function can then be constructed on the resulting phase space which preserves a distribution for (x,p)(x,p), the xx-marginal of which will be π(⋅)\pi(\cdot). At each step of the Markov chain, a fresh value for pp is drawn from its conditional distribution given the current xx state, and then the relevant Hamiltonian flow is approximated for TT units of time to produce the next proposed move. The resulting proposal map is

where Prx\text{Pr}_{x} denotes the projection operator onto the xx coordinate, φT\varphi_{T} the approximate flow for TT units of time, and ξ={T,p}\xi=\{T,p\}. Typically the distribution for pp is chosen to be a dd-dimensional Gaussian. If the law of pp does not depend on xx, then the Störmer–Verlet (or leapfrog) numerical integrator is typically used to approximate the flow, with ε>0\varepsilon>0 chosen as the integrator step-size and LL the number of ‘leapfrog steps’ (meaning T=LεT=L\varepsilon). The choice of TT is a point of ambiguity; often it is set to be some fixed value, however heuristics have also been suggested for choosing this dynamically (e.g. ). For T=εT=\varepsilon (meaning L=1L=1) in fact HMC reduces to MALA. In general, however, for L>1L>1 (2) will be a non-linear function of pp, making analysis of the method challenging, particularly in the case of a dynamic TT.

Our main contribution is to establish conditions under which common HMC implementations produce a geometrically ergodic Markov chain. We also establish instances where convergence will not be geometric, meaning the sampler may perform poorly in practice. We first consider the case where the choice of integration time TT is chosen independently of the current position, and show that here the non-linear terms in gξ(x)g_{\xi}(x) can be bounded in probability as the norm ∥x∥→∞\|x\|\to\infty under suitable assumptions, meaning that geometric convergence essentially occurs for HMC in the same scenarios as for MALA, when the tails of π(x)\pi(x) are uniformly exponential or lighter, but no lighter than that of a Gaussian density. We then consider an idealised scheme in which TT is chosen as a function of the current position, and show that in this case geometrically converging chains can be constructed for a much broader class of targets. Although the latter results are in an idealised case, they do offer some practical guidelines for the choice of integration time, which can be used to examine some commonly used heuristics in the literature as well as suggest alternatives.

Theoretical study of MCMC methods is in the main focused on two themes: convergence to equilibrium and asymptotic variance. The first is often understood through upper bounding some suitable discrepancy between the nnth iterate of the Markov chain and its limiting distribution, as a function of nn. When the discrepancy is taken as either the Total Variation or VV-norm distance (for some suitable Lyapunov function V:X→[1,∞)V:\mathbf{X}\to[1,\infty)), then the drift and minorisation conditions popularised in can be used to show that the distance to equilibrium decreases geometrically in nn (we elaborate in Section 3). If such a bound holds then for reversible chains a Central Limit Theorem exists for long-run averages of L2(π)L^{2}(\pi) functionals (e.g. ). We take this approach here. Note that such techniques rely crucially on the chain being ψ\psi-irreducible for some σ\sigma-finite measure ψ(⋅)\psi(\cdot).

For HMC, establish that if the potential energy U(x)=−log⁡π(x)U(x)=-\log\pi(x) is bounded above, continuous and has bounded derivative then the algorithm will produce a π\pi-irreducible chain. The result holds for both the exact flow and the leapfrog integrator variants of HMC. Typically the boundedness assumption on U(x)U(x) will only be satisfied when X\mathbf{X} is compact. The authors also show that π\pi-irreducibility can be established more broadly if the integration time is chosen stochastically. More recently, consider a continuous-time version of HMC in which the integration step-size is randomly sampled from an Exponential distribution. Under the assumption that Hamilton’s equations can be exactly integrated, they prove that the algorithm will produce a geometrically ergodic Markov chain whenever the tails of π(x)\pi(x) decay at a Gaussian rate or faster. The method of the authors is to relate HMC to underdamped Langevin dynamics, the ergodic properties of which are established in . By contrast, we relate HMC to overdamped Langevin dynamics, as analysed in . Although at first this may seem less natural, in fact it allows us to paint a broad picture of when the algorithm as used in practice will and will not produce a geometrically ergodic Markov chain. In some practical approximations are given for convergence bounds under a positive curvature assumption on the underlying chain. We discuss these further in Section 7. We comment further on connections between HMC and Langevin dynamics in the supplementary material .

Recently a HMC has been generalised to the context of sampling on spaces of infinite dimension . Due to the frequent singularity of measures in such spaces, it is often necessary to characterise distance to equilibrium here through other metrics than Total Variation. Such analysis is beyond the scope of this paper, though we note that recent work in the context of MALA in and are useful pre-cursors in this direction.

2 Notation

Overview of Main Results

The majority of results in this paper concern the version of HMC which is typically used in practice, in which the ‘integration time’ for a typical proposal is chosen independently of the current position in the chain. In this scenario we have the following result.

If Assumptions A1 (on page 5.1), A2 (on page 5.11) and A3 (on page 5.13) hold, then a Markov chain produced by the Hamiltonian Monte Carlo method (outlined in Algorithm 1) will be geometrically ergodic.

Assumption A1 introduces a controlled degree of randomness into the integration time parameter, which ensures ergodicity of the HMC transition kernel. Instead of establishing π\pi-irreducibility directly on on the multiple step HMC transition, we make a simple stochasticity assumption on the integration time parameter, which allows much of the technical difficulty to be sidestepped. Assumption A2 imposes conditions on the distribution from which expectations are desired, essentially restricting the tail behaviour to be lighter than a Laplacian but no lighter than a Gaussian distribution. This is to ensure that when the chain is very far from the ‘centre’ of the space then typical proposals will bring it back to regions where probability mass concentrates. Assumption A3 relates to the Metropolis–Hastings acceptance rate, ensuring that this does not behave undesirably, in the sense that desirable proposals are often rejected. We make these arguments precise in Section 5.

We also present the following conditions under which Markov chains produced using HMC will not be geometrically ergodic.

If either of the following hold then HMC will not produce a geometrically ergodic Markov chain:

(i) lim⁡∥x∥→∞∥∇U(x)∥∥x∥=∞\lim_{\|x\|\to\infty}\frac{\|\nabla U(x)\|}{\|x\|}=\infty and (18) and (19) are satisfied

The first of these scenarios in essence covers the case where the distribution of interest has lighter tails than those of a Gaussian distribution. In this case explicit numerical solvers for Hamilton’s equations typically become unstable in some regions of the state space. The second is concerned with ‘heavy tailed’ distributions, in which the resulting Hamiltonian flow can be slow, precluding a geometric rate of convergence.

For the exponential family class of models E(β,α)\mathcal{E}(\beta,\alpha), under assumption A1 the following results hold:

(i) For 1≤β≤21\leq\beta\leq 2, the Hamiltonian Monte Carlo method will produce a geometrically ergodic chain (for small enough ε\varepsilon in the β=2\beta=2 case)

(ii) If β<1\beta<1 or β>2\beta>2, then the Hamiltonian Monte Carlo method will not produce a geometrically ergodic chain

The results are analogous to those found for the Metropolis-adjusted Langevin algorithm in . A key finding of this work is that when the integration time parameter is chosen in a manner which is independent of the current position, then the two methods essentially coincide in terms of presence or absence of geometric ergodicity. In other words, taking more than a single leapfrog step in the method will not result in a chain ‘becoming’ geometrically ergodic, even though it may still improve the speed of convergence.

We also consider an idealised version of the method in Section 6, in which the integration time is allowed to depend on the current position in a prescribed way. This scheme was designed to mimic several more recent versions of HMC (e.g. ) which are commonly used in modern software packages (e.g. ). For a specific one-dimensional class of smooth exponential family models we find the following

For the one-dimensional class of distributions with densities of the form

then the idealised Hamiltonian Monte Carlo method introduced in Section 6 will produce a geometrically ergodic Markov chain for any choice of β>0\beta>0.

The positive result in the case where β>2\beta>2 is an artefact of the assumption that Hamilton’s equations can be exactly solved in the idealised scheme - this result would disappear if a typical explicit numerical solver were used instead. However, the findings for the case β<1\beta<1 suggest that there are advantages to using an position-dependent integration time in the presence of heavy tails. We discuss this in more detail in Section 7.

Preliminaries

The approach taken here to establishing geometric convergence was popularised in the monograph . A key observation first shown in that work is the following.

Recall that a set C∈BC\in\mathcal{B} is called ‘small’ if there is a t<∞t<\infty, a measure ν(⋅)\nu(\cdot) defined on (X,B)(\mathbf{X},\mathcal{B}) and an ϵ>0\epsilon>0 such that ∀x∈C\forall x\in C and ∀A∈B\forall A\in\mathcal{B} it holds that Pt(x,A)≥ϵν(A)P^{t}(x,A)\geq\epsilon\nu(A) (see e.g. ).

We are concerned here with specific forms of PP.

We say PP is of the Metropolis–Hastings type if

where QQ is a Markov kernel, α(x,y)\alpha(x,y) is defined in (1) and r(x)=1−∫α(x,y)Q(x,dy)r(x)=1-\int\alpha(x,y)Q(x,dy).

The following was shown in when PP is of the form (4).

If π(⋅)\pi(\cdot) and Q(x,⋅)Q(x,\cdot) admit Lebesgue densities π(x)\pi(x) and q(y∣x)q(y|x), π(x)\pi(x) is bounded away from and ∞\infty on compact sets, and there exists δq>0\delta_{q}>0 and ϵq>0\epsilon_{q}>0 such that, for every xx,

then the Metropolis–Hastings chain with candidate density q(y∣x)q(y|x) is π\pi-irreducible and aperiodic, and all compact sets are small.

If PP is of Metropolis–Hastings type and the conditions of Proposition 3.3 are satisfied, then (3) holds if and only if

Showing a lack of geometric ergodicity typically requires careful study of the distribution of return times to small sets. The following result of , however, provides a straightforward method for doing this for Metropolis–Hastings kernels.

If PP is of Metropolis–Hastings type, then (3) fails to hold if ess sup⁡r(x)=1\operatorname*{ess\,sup}r(x)=1.

Lack of geometric ergodicity can also be established in some cases using the following result of .

If for any η>0\eta>0 there is a δ>0\delta>0 such that

If PP is of Metropolis–Hastings type, it is straightforward to verify that Q(x,Bδ(x))>1−ηQ(x,B_{\delta}(x))>1-\eta ensures (6), meaning we only need consider the candidate kernel in these cases.

Hamiltonian Monte Carlo

We give a brief introduction here. For a more detailed account see or . We consider probability densities of the form π(x)∝e−U(x)\pi(x)\propto e^{-U(x)} for some U:X→[0,∞)U:\mathbf{X}\to[0,\infty). If we view U(x)=−log⁡π(x)U(x)=-\log\pi(x) as a ‘potential’ energy in a physical system, it is natural to consider the larger phase space and construct the Hamiltonian

Solving (8) results in Hamiltonian flow. To put this presentation into the framework introduced in Section 1, we can consider constructing a measure-preserving map fθ:X→Xf_{\theta}:\mathbf{X}\to\mathbf{X} by setting the input to be x0x_{0}, choosing a momentum variable p0p_{0}, solving (8) for TT units of time and then projecting back down onto X\mathbf{X} to produce xTx_{T}. The parameters θ={p0,T}\theta=\{p_{0},T\} define the behaviour of a single map fθf_{\theta}, and how they are chosen define the behaviour of the Markov chain produced by iterating the process of randomly selecting a θ\theta and then applying the resulting map fθf_{\theta} to the current point to produce the next.

Of course, it is often not possible to solve (8) exactly, so numerical methods are needed. Fortunately, the rich geometric structure of Hamiltonian systems allows the construction of symplectic integrators, which possess attractive long term numerical stability properties (e.g. ), meaning that for appropriate Hamiltonians the approximate solution of (8) is such that H(xt,pt)≈H(x0,p0)H(x_{t},p_{t})\approx H(x_{0},p_{0}) for all t<ηt<\eta, where η≫0\eta\gg 0. The standard choice when the Hamiltonian is of the form (7) is the Störmer–Verlet or leapfrog scheme, in which (xLε,pLε)(x_{L\varepsilon},p_{L\varepsilon}) is generated from (x0,p0)(x_{0},p_{0}) using LL steps of the recursion

for some step-size ε>0\varepsilon>0. Although the resulting approximate flow map φLε(x0,p0):=(xLε,pLε)\varphi_{L\varepsilon}(x_{0},p_{0}):=(x_{L\varepsilon},p_{L\varepsilon}) no longer preserves π(⋅)\pi(\cdot), it can be used as a proposal mechanism within the Metropolis–Hastings framework (e.g. ). The full method is shown in Algorithm 1 below.

From this point forward we assume M=IM=I for ease of exposition but without loss of generality.

To use the techniques of , it is helpful to express the HMC transition in such a way that when ∥x∥\|x\| is large it is clear how the chain will behave. Although it is typically presented as a map on the larger phase space, HMC can simply be thought of as a Markov chain on X\mathbf{X}, and we will find this representation useful in relation to the above. In this case the candidate map gξg_{\xi} is given by the following proposition, which can be straightforwardly be derived using classical results (see e.g. ).

where p0∼N(0,I)p_{0}\sim N(0,I), LL is the number of leapfrog steps and ε\varepsilon the integrator step-size. With this choice, the acceptance probability will be

Proposition 4.2 highlights the previously noted relationship between HMC and MALA quite explicitly, as setting L=1L=1 means the third term on the right-hand side of (9) disappears, leaving the MALA proposal x0−ε2∇U(x0)/2+εp0x_{0}-\varepsilon^{2}\nabla U(x_{0})/2+\varepsilon p_{0}. It also highlights why taking L>1L>1 proposes a greater challenge, as for each xiεx_{i\varepsilon} with i≥1i\geq 1 this term will typically be a nonlinear transformation of x0x_{0} and p0p_{0}. As p0p_{0} is stochastic, then ε2∑i=1L−1(L−i)∇U(xiε)\varepsilon^{2}\sum_{i=1}^{L-1}(L-i)\nabla U(x_{i\varepsilon}) will be also, but its distribution will often be intractable.

Results for an position-independent integration time

In this section we make the assumption that the distribution L(⋅)\mathfrak{L}(\cdot) for the number of leapfrog steps LL does not depend on the current position. This is relaxed in Section 6.

It is known (e.g. ) that establishing π\pi-irreducibility is not so straightforward in the case of HMC as for Metropolis–Hastings methods based on random walks or Langevin diffusions. The canonical example where the system becomes reducible is integrating the harmonic oscillator over precisely one period (e.g. ). We show this in the supplementary material .

The observation noted here and elsewhere that HMC in the case L=1L=1 corresponds to MALA, for which irreducibility is established in , can be exploited to alleviate these issues and establish π\pi-irreducibility of HMC under the following assumption.

Assumption A1 can be viewed as the discrete time analogue to the the exponential integration time assumption made in , and in many respects serves a similar purpose. Similar conditions are also exploited to prove π−\pi-irreducibility results in .

In fact, before the final publication of the present work, it was shown in that π\pi-irreducibility can indeed be established without using assumption A1, but instead considering the HMC chain using a fixed number of leapfrog steps L≥1L\geq 1, under suitable assumptions and using appropriate techniques. We refer the interested reader to that work for details.

2 Geometric ergodicity

We first present here some seemingly abstract conditions under which the HMC method produces a geometrically ergodic Markov chain. We then give some natural assumptions on the potential U(x)U(x) under which these hold.

We present the results of this section conditioned on a fixed choice of the number of leapfrog steps LL, for ease of exposition. Note that the required drift conditions shown hold for a fixed LL, then under A1 they will hold when possible values for LL are averaged over according to L(⋅)\mathfrak{L}(\cdot), so this does not affect the generality of the results.

Notation. We introduce some further notation for this section. Let Iδ(x):={y∈X:∥y∥≤∥x∥δ}I_{\delta}(x):=\{y\in\mathbf{X}:\|y\|\leq\|x\|^{\delta}\} for some 1/2<δ<11/2<\delta<1. In the case δ=1\delta=1 we will simply write I(x)I(x). Let

denote the ‘mean’ next candidate position (xLε−Lεp0x_{L\varepsilon}-L\varepsilon p_{0}), and

denote the proposal ‘drift’ (implying mL,ε(x0,p0)=x0−ψL,ε(x0,p0)m_{L,\varepsilon}(x_{0},p_{0})=x_{0}-\psi_{L,\varepsilon}(x_{0},p_{0})). We will also sometimes write h:=ε2/2h:=\varepsilon^{2}/2 in a most likely futile attempt to keep things readable.

The HMC method produces a geometrically ergodic Markov chain if assumption A1 holds, and in addition both

where η(d):=Γ((d+1)/2)/Γ(d/2)\eta(d):=\Gamma((d+1)/2)/\Gamma(d/2), and

where R(x0):={y∈X:α(x0,y)<1}R(x_{0}):=\{y\in\mathbf{X}:\alpha(x_{0},y)<1\} denotes the ‘potential rejection region’ and I(x0):={y∈X:∥y∥≤∥x0∥}I(x_{0}):=\{y\in\mathbf{X}:\|y\|\leq\|x_{0}\|\} the ‘interior’ of x0x_{0}.

Take V(x)=es∥x∥V(x)=e^{s\|x\|} for some s>0s>0 and write A(x0):=R(x0)cA(x_{0}):=R(x_{0})^{c}. Then we can write

The last integral asymptotes to zero as ∥x0∥→∞\|x_{0}\|\to\infty by (13). Writing xLε(p0)x_{L\varepsilon}(p_{0}) to indicate that xLεx_{L\varepsilon} depends on p0p_{0}, the first integral can be written

Noting that ∥xLε(p0)∥≤∥mL,ε(x0,p0)∥+Lε∥p0∥\|x_{L\varepsilon}(p_{0})\|\leq\|m_{L,\varepsilon}(x_{0},p_{0})\|+L\varepsilon\|p_{0}\| for large enough ∥x0∥\|x_{0}\| and using (12) above then setting ξ(x0):=sup⁡∥p0∥≤∥x0∥δ(∥mL,ε(x0,p0)∥−∥x0∥)\xi(x_{0}):=\sup_{\|p_{0}\|\leq\|x_{0}\|^{\delta}}(\|m_{L,\varepsilon}(x_{0},p_{0})\|-\|x_{0}\|) we can write

The last integral can be bounded above by the moment generating function of a Chi-distributed random variable with dd degrees of freedom, and so equals elog⁡(1+s2Lεη(d)+o(s))≤es2Lεη(d)+o(s)e^{\log(1+s\sqrt{2}L\varepsilon\eta(d)+o(s))}\leq e^{s\sqrt{2}L\varepsilon\eta(d)+o(s)}. Therefore by (12) the integral asymptotes to a quantity which is strictly less than one if s>0s>0 is chosen to be suitably small.

Provided δ>1/2\delta>1/2, then for ∥x0∥\|x_{0}\| large enough C∥x0∥1−δ−∥x0∥δ<−1C\|x_{0}\|^{1-\delta}-\|x_{0}\|^{\delta}<-1, meaning

which becomes negligibly small as ∥x0∥→∞\|x_{0}\|\to\infty, as required. ∎

Theorem 5.3 is a generalisation of Theorem 4.1 in to the HMC case. The nontriviality involved in this extension is accounting for the randomness induced into mL,ε(x0,p0)m_{L,\varepsilon}(x_{0},p_{0}) from p0p_{0}.

whenever ∥x0∥>M\|x_{0}\|>M for some M<∞M<\infty. The statements in this section give three simple conditions which establish this are also sufficient to establish (12) when L≥2L\geq 2. The main result is stated below. The crucial consequence of this is that controlling the behaviour of ‘global move’ updates produced by HMC when L>1L>1 can be done through only ‘local’ knowledge, meaning analytic information at the current point x0x_{0}.

For any L≥1L\geq 1 (12) holds if the following conditions are met

(SC1.1) lim⁡∥x0∥→∞∥∇U(x0)∥=∞\lim_{\|x_{0}\|\to\infty}\|\nabla U(x_{0})\|=\infty

(SC1.2) lim inf⁡∥x0∥→∞⟨∇U(x0),x0⟩∥∇U(x0)∥∥x0∥>0\liminf_{\|x_{0}\|\to\infty}\frac{\langle\nabla U(x_{0}),x_{0}\rangle}{\|\nabla U(x_{0})\|\|x_{0}\|}>0

(SC1.3) lim⁡∥x0∥→∞∥∇U(x0)∥∥x0∥=0\lim_{\|x_{0}\|\to\infty}\frac{\|\nabla U(x_{0})\|}{\|x_{0}\|}=0.

(SC1.3b) lim sup⁡∥x0∥→∞∥∇U(x0)∥∥x0∥=Sl,\limsup_{\|x_{0}\|\to\infty}\frac{\|\nabla U(x_{0})\|}{\|x_{0}\|}=S_{l},

for some Sl<∞S_{l}<\infty, then there is an ε0∈(0,∞)\varepsilon_{0}\in(0,\infty) such that the same result holds provided ε∈(0,ε0)\varepsilon\in(0,\varepsilon_{0}).

This is re-stated as Proposition 5.10 and Proposition 5.11 below, which follow from the preceding Lemmas. ∎

The conditions of the result are intuitive. Condition (SC1.2) ensures that the gradient asymptotically ‘points inwards’, while (SC1.1) and (SC1.3) ensure that ∥∇U(x0)∥\|\nabla U(x_{0})\| grows but at an asymptotically sublinear rate. We begin with a straightforward observation.

(SC1.2a) lim sup⁡∥x0∥→∞(h2∥∇U(x0)∥2−2h⟨∇U(x0),x0⟩2∥x0∥)<−2εη(d)\limsup_{\|x_{0}\|\to\infty}\left(\frac{h^{2}\|\nabla U(x_{0})\|^{2}-2h\langle\nabla U(x_{0}),x_{0}\rangle}{2\|x_{0}\|}\right)<-\sqrt{2}\varepsilon\eta(d)

(SC1.3) lim⁡∥x0∥→∞∥∇U(x0)∥∥x0∥=0\lim_{\|x_{0}\|\to\infty}\frac{\|\nabla U(x_{0})\|}{\|x_{0}\|}=0.

First note that ∥x0−h∇U(x0)∥=∥x0∥2+h2∥∇U(x0)∥2−2h⟨∇U(x0),x0⟩\|x_{0}-h\nabla U(x_{0})\|=\sqrt{\|x_{0}\|^{2}+h^{2}\|\nabla U(x_{0})\|^{2}-2h\langle\nabla U(x_{0}),x_{0}\rangle}. Recall the generalised Bernoulli inequality: if y>−1y>-1 and r∈r\in then (1+y)r≤1+ry\left(1+y\right)^{r}\leq 1+ry. Setting r:=1/2r:=1/2, a(x0):=∥x0∥2a(x_{0}):=\|x_{0}\|^{2} and b(x0):=h2∥∇U(x0)∥2−2h⟨∇U(x0),x0⟩b(x_{0}):=h^{2}\|\nabla U(x_{0})\|^{2}-2h\langle\nabla U(x_{0}),x_{0}\rangle then we have

This will be strictly less than ∥x0∥\|x_{0}\| in the limit as ∥x0∥→∞\|x_{0}\|\to\infty provided b(x0)/a(x0)>−1b(x_{0})/a(x_{0})>-1. Noting that

then it suffices to see that under (SC1.3) the right-hand side can be made arbitrarily close to zero by taking ∥x0∥\|x_{0}\| large enough. ∎

We can also recover some more intuitive sufficient conditions.

A more intuitive condition which implies (SC1.2a) conditional on (SC1.3) and (SC1.1) is

(SC1.2) lim⁡∥x0∥→∞⟨∇U(x0),x0⟩∥∇U(x)∥∥x0∥>0\lim_{\|x_{0}\|\to\infty}\frac{\langle\nabla U(x_{0}),x_{0}\rangle}{\|\nabla U(x)\|\|x_{0}\|}>0

For large enough ∥x0∥\|x_{0}\| this implies

From now on we refer to (SC1.1), (SC1.2) and (SC1.3) combined as (SC1.1)-(SC1.3). Next we show that these same conditions are sufficient for (12) to hold.

Under the following conditions (12) holds:

(i) lim inf⁡∥x0∥→∞,∥p0∥≤∥x0∥δ(∥ψL,ε∥2−2⟨ψL,ε,x0⟩∥x0∥2)>−1\liminf_{\|x_{0}\|\to\infty,\|p_{0}\|\leq\|x_{0}\|^{\delta}}\left(\frac{\|\psi_{L,\varepsilon}\|^{2}-2\langle\psi_{L,\varepsilon},x_{0}\rangle}{\|x_{0}\|^{2}}\right)>-1

(ii) lim sup⁡∥x0∥→∞,∥p0∥≤∥x0∥δ(∥ψL,ε∥2−2⟨ψL,ε,x0⟩2∥x0∥)<0\limsup_{\|x_{0}\|\to\infty,\|p_{0}\|\leq\|x_{0}\|^{\delta}}\left(\frac{\|\psi_{L,\varepsilon}\|^{2}-2\langle\psi_{L,\varepsilon},x_{0}\rangle}{2\|x_{0}\|}\right)<0.

Using the generalised Bernoulli inequality as above gives the result. ∎

Next we relate the conditions of Lemma 5.7 to criteria that only depend on the current point x0x_{0}. The following lemmas give a starting point.

Provided ∥p0∥≤∥x0∥δ\|p_{0}\|\leq\|x_{0}\|^{\delta} and (SC1.3) holds then we have the following

(i) For any η>0\eta>0 there is an Mη<∞M_{\eta}<\infty such that whenever ∥x0∥>Mη\|x_{0}\|>M_{\eta} it holds that (1−η)∥x0∥≤∥xε∥≤(1+η)∥x0∥(1-\eta)\|x_{0}\|\leq\|x_{\varepsilon}\|\leq(1+\eta)\|x_{0}\|

(ii) ∥∇U(xε)∥=o(∥x0∥)\|\nabla U(x_{\varepsilon})\|=o(\|x_{0}\|)

(iii) ∥pε∥∈o(∥x0∥)\|p_{\varepsilon}\|\in o(\|x_{0}\|).

(i) Noting that ∥xε∥=∥x0−h∇U(x0)+εp0∥\|x_{\varepsilon}\|=\|x_{0}-h\nabla U(x_{0})+\varepsilon p_{0}\| gives

(ii) We have from (i) and (SC1.3) that for any γ>0\gamma>0 there is an Mγ<∞M_{\gamma}<\infty such that whenever ∥x0∥>Mγ/(1−δ\|x_{0}\|>M_{\gamma}/(1-\delta) then ∥∇U(xε)∥/∥xε∥<γ\|\nabla U(x_{\varepsilon})\|/\|x_{\varepsilon}\|<\gamma. This implies using (i) that ∥∇U(xε)∥/∥x0∥<γ(1−δ)\|\nabla U(x_{\varepsilon})\|/\|x_{0}\|<\gamma(1-\delta), and since γ(1−δ)\gamma(1-\delta) can be made arbitrarily small then the result follows.

(iii) ∥pε∥=∥p0−ε∇U(x0)/2−ε∇U(xε)/2∥≤∥p0∥+ε∥∇U(x0)∥/2+ε∥∇U(xε)∥/2\|p_{\varepsilon}\|=\|p_{0}-\varepsilon\nabla U(x_{0})/2-\varepsilon\nabla U(x_{\varepsilon})/2\|\leq\|p_{0}\|+\varepsilon\|\nabla U(x_{0})\|/2+\varepsilon\|\nabla U(x_{\varepsilon})\|/2, which is ∈o(∥x0∥)\in o(\|x_{0}\|) using (i) and (ii) and the fact that ∥p0∥≤∥x0∥δ\|p_{0}\|\leq\|x_{0}\|^{\delta} ∎

Provided ∥p0∥≤∥x0∥δ\|p_{0}\|\leq\|x_{0}\|^{\delta} and (SC1.3) holds then for any L<∞L<\infty and each i∈{0,...,L−1}i\in\{0,...,L-1\} the following hold

(i) For any η>0\eta>0 there is an Mη<∞M_{\eta}<\infty such that whenever ∥x0∥>Mη\|x_{0}\|>M_{\eta} it holds that (1−η)∥x0∥≤∥xiε∥≤(1+η)∥x0∥(1-\eta)\|x_{0}\|\leq\|x_{i\varepsilon}\|\leq(1+\eta)\|x_{0}\|

(ii) ∥∇U(xiε)∥∈o(∥x0∥)\|\nabla U(x_{i\varepsilon})\|\in o(\|x_{0}\|)

(iii) ∥piε∥∈o(∥x0∥)\|p_{i\varepsilon}\|\in o(\|x_{0}\|)

(iv) ∥ψL,ε∥∈o(∥x0∥)\|\psi_{L,\varepsilon}\|\in o(\|x_{0}\|).

The results follow iteratively for each ii using the same approach as in the previous Lemma. For the case i=2i=2 then noting that ∥x2ε∥=∥xε−h∇U(xε)+εpε∥\|x_{2\varepsilon}\|=\|x_{\varepsilon}-h\nabla U(x_{\varepsilon})+\varepsilon p_{\varepsilon}\|, then (i) in this case follows from Lemma 5.8. It follows that ∥∇U(x2ε)∥∈o(∥x0∥)\|\nabla U(x_{2\varepsilon})\|\in o(\|x_{0}\|) and ∥p2ε∥∈o(∥x0∥)\|p_{2\varepsilon}\|\in o(\|x_{0}\|) by an analogous argument to this Lemma. Given this then it can be shown that (i) holds for i=3i=3, and then (ii) and (iii) by the same logic, and the argument can be iterated as many times as is needed. The last claim follows trivially from the second. ∎

Under (SC1.1)-(SC1.3) then for any L<∞L<\infty the conditions of Lemma 5.7 are satisfied.

First we show (i). Writing x∗:=arg⁡max⁡i∈0,...,L−1{∥∇U(xiε)∥}x^{*}:=\arg\max_{i\in{0,...,L-1}}\left\{\|\nabla U(x_{i\varepsilon})\|\right\}, then we have ∥ψL,ε∥≤Lε2∑i=0L−1∥∇U(xiε)∥≤L2ε2∥∇U(x∗)∥\|\psi_{L,\varepsilon}\|\leq L\varepsilon^{2}\sum_{i=0}^{L-1}\|\nabla U(x_{i\varepsilon})\|\leq L^{2}\varepsilon^{2}\|\nabla U(x^{*})\|, which implies

which can be made arbitrarily small by taking ∥x0∥\|x_{0}\| large enough using (SC1.3). Noting that ∥ψL,ε∥/∥x0∥≥⟨ψL,ε,x0⟩/∥x0∥2≥−∥ψL∥/∥x0∥\|\psi_{L,\varepsilon}\|/\|x_{0}\|\geq\langle\psi_{L,\varepsilon},x_{0}\rangle/\|x_{0}\|^{2}\geq-\|\psi_{L}\|/\|x_{0}\|, then an analogous argument can be used to show that −2⟨ψL,x0⟩/∥x0∥2-2\langle\psi_{L},x_{0}\rangle/\|x_{0}\|^{2} will also tend to zero as ∥x0∥→∞\|x_{0}\|\to\infty.

(ii) First note from above that lim⁡∥x0∥→∞∥ψL,ε∥2/(L2ε2∥∇U(x∗)∥∥x0∥)=0\lim_{\|x_{0}\|\to\infty}\|\psi_{L,\varepsilon}\|^{2}/\left(L^{2}\varepsilon^{2}\|\nabla U(x^{*})\|\|x_{0}\|\right)=0. By an analogous argument to that used in the proof of Corollary 5.6, it is clear therefore that (ii) holds if

where each ci=(L−i)ε2c_{i}=(L-i)\varepsilon^{2} for i≥1i\geq 1 and c0=Lε2/2c_{0}=L\varepsilon^{2}/2 . The second of these terms is o(∥∇U(x∗)∥∥x0∥)o(\|\nabla U(x^{*})\|\|x_{0}\|) using the Cauchy–Schwartz inequality and Lemma 5.9 (which shows that ∥x0−xiε∥∈o(∥x0∥)\|x_{0}-x_{i\varepsilon}\|\in o(\|x_{0}\|)), and so this term vanishes if divided by ∥∇U(x∗)∥∥x0∥\|\nabla U(x^{*})\|\|x_{0}\|. The first term divided by the same quantity will be strictly positive as each term in the sum is ≥0\geq 0 using (SC1.3) and Lemma 5.9, and at least one of them is >0>0 since it will correspond to x∗x^{*}. Using (SC1.1) establishes that ⟨ψLε,x0⟩/∥x0∥→∞\langle\psi_{L\varepsilon},x_{0}\rangle/\|x_{0}\|\to\infty as ∥x0∥→∞\|x_{0}\|\to\infty, proving the result. ∎

The condition (SC1.3) allows clarity in the proofs, but precludes the natural boundary case of distributions with Gaussian tails. The following proposition addresses this.

(SC1.3b) lim sup⁡∥x0∥→∞∥∇U(x0)∥∥x0∥=Sl\limsup_{\|x_{0}\|\to\infty}\frac{\|\nabla U(x_{0})\|}{\|x_{0}\|}=S_{l}

for some constant Sl<∞S_{l}<\infty, then there is an ε0∈(0,∞)\varepsilon_{0}\in(0,\infty) such that for any choice of ε∈(0,ε0)\varepsilon\in(0,\varepsilon_{0}) the conditions of Lemma 5.7 are satisfied.

We simply note that the term ⟨ψL,ε,x0⟩∈O(ε2)\langle\psi_{L,\varepsilon},x_{0}\rangle\in O(\varepsilon^{2}), while ∥ψL,ε∥2∈O(ε4)\|\psi_{L,\varepsilon}\|^{2}\in O(\varepsilon^{4}), so that the proofs of the preceding Lemmas can be straightforwardly modified when (SC1.3) is replaced by (SC1.3b) by choosing a small enough value of ε\varepsilon that the inner product dominates the square norm. We omit the details of this. ∎

The sensitivity to the choice of ε\varepsilon in this case is well known in this scenario as a potential source of numerical instabilities, and choosing ε<1/Sl\varepsilon<1/S_{l} is recommended to alleviate such issues (e.g. ). We conclude this subsection with the following assumption that we require for a geometrically ergodic Markov chain produced by the HMC method, which is a natural conclusion of the preceding results.

A2 The potential U(x)U(x) satisfies either (SC1.1)-(SC1.3), or it satisfies (SC1.1)-(SC1.3b) and ε\varepsilon is chosen to be suitably small that the conditions of Lemma 5.7 are satisfied.

Condition (SC1.1) precludes densities for which ∥∇U(x)∥→c\|\nabla U(x)\|\to c for some 0<c<∞0<c<\infty. Often geometric ergodicity will still hold in this case, as we demonstrate in Corollary 2.3, however a different argument is required to that presented above.

It remains to consider (13), which reflects the role of the acceptance rate in the HMC method. We turn to this next.

2.2 Discussion of (13).

In the authors note that (13) applied to the MALA transition xε=x−ε2∇U(x)/2+εp0x_{\varepsilon}=x-\varepsilon^{2}\nabla U(x)/2+\varepsilon p_{0} can be viewed as the restriction that for xε∈I(x0)x_{\varepsilon}\in I(x_{0})

where U^1:=⟨x0−xε,∇U(xε)+∇U(x0)⟩/2\hat{U}_{1}:=\left\langle x_{0}-x_{\varepsilon},\nabla U(x_{\varepsilon})+\nabla U(x_{0})\right\rangle/2 denotes the ‘trapezium’ estimate for the line integral U(x0)−U(xε)=∫xεx0∇U(z)dzU(x_{0})-U(x_{\varepsilon})=\int_{x_{\varepsilon}}^{x_{0}}\nabla U(z)dz. We can extend this intuition to HMC and arrive at the following natural generalisation of the same condition.

The acceptance rate for HMC will satisfy the ‘inwards acceptance’ property (13) if whenever xLε∈I(x0)x_{L\varepsilon}\in I(x_{0}) then in the limit as ∥x0∥→∞\|x_{0}\|\to\infty it holds that

where U^L:=⟨x0−xLε,∇U(x0)+∇U(xLε)+2∑i=1L−1∇U(xiε)⟩/(2L)\hat{U}_{L}:=\langle x_{0}-x_{L\varepsilon},\nabla U(x_{0})+\nabla U(x_{L\varepsilon})+2\sum_{i=1}^{L-1}\nabla U(x_{i\varepsilon})\rangle/(2L) denotes the quadrature rule estimate for the line integral ∫x0xLε∇U(z)dz\int_{x_{0}}^{x_{L\varepsilon}}\nabla U(z)dz based on LL trapezia and the forward and reverse drift components are given by

We first note that we can write p0=1Lε(xLε−x0+ψL,ε)p_{0}=\frac{1}{L\varepsilon}(x_{L\varepsilon}-x_{0}+\psi_{L,\varepsilon}), and that using reversibility of the leapfrog integrator, we can also write pLε=1Lε(xLε−x0−ψL,εR)p_{L\varepsilon}=\frac{1}{L\varepsilon}(x_{L\varepsilon}-x_{0}-\psi_{L,\varepsilon}^{R}). The log acceptance ratio can therefore be written

We require this quantity to be ≥0\geq 0. This is equivalent to the requirement

We can re-write the right-hand side of the above expression as

Substituting this into the inequality and simplifying gives the result. ∎

The requirement (16) can sometimes be established using convexity arguments. In the exponential family class of Corollary 2.3, for example, setting xi:=xLε+i(x0−xLε)/Lx^{i}:=x_{L\varepsilon}+i(x_{0}-x_{L\varepsilon})/L, when 1≤β<4/31\leq\beta<4/3 one can show as ∣x0∣→∞|x_{0}|\to\infty that U^L→a.s.(x0−xLε)(∇U(x0)+∇U(xLε)+2∑i=1L−1∇U(xi))/(2L)\hat{U}_{L}\xrightarrow{a.s.}(x_{0}-x_{L\varepsilon})(\nabla U(x_{0})+\nabla U(x_{L\varepsilon})+2\sum_{i=1}^{L-1}\nabla U(x^{i}))/(2L), the regular trapezium rule estimate for ∫xLεx0∇U(z)dz=U(x0)−U(xLε)\int_{x_{L\varepsilon}}^{x_{0}}\nabla U(z)dz=U(x_{0})-U(x_{L\varepsilon}). Since ∇U(x)\nabla U(x) is concave/convex for xx positive/negative then the trapezium rule gives an underestimate for the integral as ∣x0∣→∞|x_{0}|\to\infty, and hence the left-hand side of (16) will be positive, while it is also possible to show that the right hand side is negative in this case (using arguments given in the proof of Corollary 2.3). We omit the details of this.

There is some discussion in of relaxations of (13) to the requirement that α(x0,xε)≥δ\alpha(x_{0},x_{\varepsilon})\geq\delta for some δ>0\delta>0 if ∥xε∥≤∥x0∥\|x_{\varepsilon}\|\leq\|x_{0}\|, which are also applicable to the HMC case and would relax the inequality (16) to some degree. In essence, the key role of the ‘inwards acceptance’ property (13) (among the class of potentials which satisfy A2) is to limit the degree of oscillation in the tails of the density e−U(x)e^{-U(x)}, which can potentially mean that too many proposals xLεx_{L\varepsilon} for which the chosen Lyapunov function V(xLε)/V(x0)<1V(x_{L\varepsilon})/V(x_{0})<1 are rejected to establish a geometric bound of the form (3). Similar requirements to (13) are needed for many Markov chain Monte Carlo methods which rely on the Metropolis–Hastings construction (e.g. ). The issues are discussed in some detail in the case of the Random Walk Metropolis in . It is possible that choosing the more natural (but less pliable) Lyapunov function V(x)=esU(x)V(x)=e^{sU(x)} for some s>0s>0 would remove the need for (13) here, owing to the ergodic nature of the proposal kernel. We leave such explorations for future work.

The preceding discussion leads to the following assumption that we require for geometric ergodicity here.

A3 The chain satisfies the ‘inwards acceptance’ property (13) which can equivalently be formulated as (16).

Assumptions A1-A3 together are sufficient to establish a geometric bound.

Part (ii) is a direct consequence of Theorem 2.2 For part (i), we consider three cases separately.

First consider β∈(1,2)\beta\in(1,2), meaning 1>β−1>01>\beta-1>0. Since ∇U(x)=αβsgn(x)∣x∣β−1\nabla U(x)=\alpha\beta\text{sgn}(x)|x|^{\beta-1} then A2 holds. It remains to establish A3. We let x0→∞x_{0}\to\infty but an analogous argument holds as x0→−∞x_{0}\to-\infty by symmetry. Note that xε=x0−ε2αβsgn(x0)∣x0∣β−1/2+εp0x_{\varepsilon}=x_{0}-\varepsilon^{2}\alpha\beta\text{sgn}(x_{0})|x_{0}|^{\beta-1}/2+\varepsilon p_{0} will clearly satisfy (1−δ)x0<xε<x0(1-\delta)x_{0}<x_{\varepsilon}<x_{0} with probability reaching one in the limit for any δ>0\delta>0. Similarly (1−δ)x0<x2ε=xε−ε2αβsgn(x0)∣x0∣β−1−ε2αβsgn(xε)∣xε∣β−1/2+εp0<xε(1-\delta)x_{0}<x_{2\varepsilon}=x_{\varepsilon}-\varepsilon^{2}\alpha\beta\text{sgn}(x_{0})|x_{0}|^{\beta-1}-\varepsilon^{2}\alpha\beta\text{sgn}(x_{\varepsilon})|x_{\varepsilon}|^{\beta-1}/2+\varepsilon p_{0}<x_{\varepsilon} in the same asymptotic regime. Iterating the argument reveals that (1−δ)x0<xLε<...<xε<x0(1-\delta)x_{0}<x_{L\varepsilon}<...<x_{\varepsilon}<x_{0} with probability tending to one as x0→∞x_{0}\to\infty. Hence a.s. the proposal will be ‘inwards’, as will each intermediate point in the trajectory. To establish geometric convergence we must show that these inwards proposals are accepted with probability tending to one as x0→∞x_{0}\to\infty. A Taylor series expansion of the difference in Hamiltonians for large enough x0x_{0} gives

Since the leading order term is strictly positive then the result is proved. A detailed derivation is provided in the supplementary material .

In the case β=1\beta=1 then as x0→∞x_{0}\to\infty the proposal in fact a.s. becomes xLε=x0−Lε2/2+Lεp0x_{L\varepsilon}=x_{0}-L\varepsilon^{2}/2+L\varepsilon p_{0}, which resembles that of a random walk with inwards drift. Here the acceptance rate a.s. becomes one as the leapfrog integrator becomes exact provided the zero boundary is not crossed, and hence the scheme is geometrically ergodic following Theorem 16.0.1 and the argument of Section 16.1.3 in Chapter 16 of . Again a similar argument holds as x0→−∞x_{0}\to-\infty.

In the case β=2\beta=2 following Example 3.5 in , setting θ:=arccos⁡(1−αε2)\theta:=\arccos(1-\alpha\varepsilon^{2}) the proposal becomes xLε=cos⁡(θL)x0+sin⁡(θL)p0/2α(1−αε2/2)x_{L\varepsilon}=\cos(\theta L)x_{0}+\sin(\theta L)p_{0}/\sqrt{2\alpha(1-\alpha\varepsilon^{2}/2)},which will be inwards provided ∣cos⁡(θL)∣<1|\cos(\theta L)|<1, which will be true for suitably small ε\varepsilon. Similarly provided p0=o(x0)p_{0}=o(x_{0}) then the difference in Hamiltonian values will be

The x02x_{0}^{2} coefficient will be positive provided (1+2α−α2ε2)sin⁡2(θL)>0(1+2\alpha-\alpha^{2}\varepsilon^{2})\sin^{2}(\theta L)>0 which will also be true for small enough ε\varepsilon, hence as x0→±∞x_{0}\to\pm\infty A3 holds and since A2 does also then the result is proven. ∎

3 Necessary conditions for geometric ergodicity

Next we highlight the importance of the growth assumptions we have made on the potential, by showing two general scenarios in which HMC will not produce geometrically ergodic Markov chains.

We begin with the case where the gradient term may grow at a faster than linear rate, meaning that the resulting system of equations (8) is ‘stiff’, in the sense that the derivatives can change very rapidly over small time scales, which can pose a challenge to explicit numerical integrators. We show in Theorem 5.14 that in this scenario a Markov chain produced by the HMC method can exhibit undesirable behaviour.

and that there is a fixed C<∞C<\infty such that whenever ∥y∥≥2∥x∥≥C\|y\|\geq 2\|x\|\geq C then

then the Hamiltonian Monte Carlo method with fixed integration time T=LεT=L\varepsilon does not produce a geometrically ergodic Markov chain for any choice T>0T>0.

The conditions (18) and (19) limit the amount that the potential can oscillate as it approaches ∞\infty, and are introduced to prevent tail oscillations in gradient from making the behaviour of the method too unpredictable to analyse sensibly. They are very lenient and should be satisfied for the vast majority of statistical models of interest for which (17) holds. Below we establish several intermediate results, the first two of which relate to the values of ∥xLε∥\|x_{L\varepsilon}\| when ∥x0∥\|x_{0}\| is large in this scenario.

If (17) holds then there exists an η<∞\eta<\infty such that for all ∥x0∥>η\|x_{0}\|>\eta and any ∥p0∥≤∥x0∥δ\|p_{0}\|\leq\|x_{0}\|^{\delta} for some δ<1\delta<1, it holds that ∥xε∥>2∥x0∥\|x_{\varepsilon}\|>2\|x_{0}\|.

Taking norms after a single leapfrog step gives

Using (17), we can choose an x0x_{0} such that the first term on the right-hand side is larger than 6/ε26/\varepsilon^{2}, and the last term can be made negligibly small as ∥p0∥≤∥x0∥δ\|p_{0}\|\leq\|x_{0}\|^{\delta} for some δ<1\delta<1, which establishes the result. ∎

If (17) holds then there exists an η<∞\eta<\infty such that for all ∥x0∥>η\|x_{0}\|>\eta and any ∥p0∥≤∥x0∥δ\|p_{0}\|\leq\|x_{0}\|^{\delta} for some δ<1\delta<1, it holds that ∥xLε∥≥2L∥x0∥\|x_{L\varepsilon}\|\geq 2^{L}\|x_{0}\|.

Showing the right-hand side is ≥2\geq 2 amounts to upper bounding the middle term, or equivalently lower bounding its reciprocal. We have

for some δ>0\delta>0 which can be made arbitrarily small by choosing ∥x0∥\|x_{0}\| large enough.

Here the right-hand side will be ≥2\geq 2 provided the middle two terms can be bounded above. For the first we lower bound the reciprocal, using (21) gives

The second and last terms on the right hand side can be made arbitrarily small by choosing ∥x0∥\|x_{0}\| large enough. Envoking (18) gives

which therefore shows that ∥x3ε∥≥2∥x2ε∥\|x_{3\varepsilon}\|\geq 2\|x_{2\varepsilon}\|. An entirely analogous argument can be used to show that ∥xiε∥≥2∥x(i−1)ε∥\|x_{i\varepsilon}\|\geq 2\|x_{(i-1)\varepsilon}\| for any fixed ii, establishing the result. ∎

The next result shows that as a result of the fact that ∥xLε∥≥2L∥x0∥\|x_{L\varepsilon}\|\geq 2^{L}\|x_{0}\| when ∥x0∥\|x_{0}\| is large enough, then the acceptance rate will approach in the limit as ∥x0∥→∞\|x_{0}\|\to\infty.

If (17), (18) and (19) hold then for any δ<1\delta<1 it holds that

where (18) is used for the second line. The term inside the bracket can be bounded below by some fixed constant γL>0\gamma_{L}>0, for any fixed L<∞L<\infty. Squaring the result gives

Noting that ∥p0∥≤∥x0∥δ\|p_{0}\|\leq\|x_{0}\|^{\delta} and that for any M<∞M<\infty we can choose an ∥x0∥\|x_{0}\| large enough that

then it follows that ∥p0∥2−∥pLε∥2≤−∥x0∥2\|p_{0}\|^{2}-\|p_{L\varepsilon}\|^{2}\leq-\|x_{0}\|^{2}. Using this, then simply envoking (19) gives the result. ∎

3.2 Heavy tails

In the case where π(x)\pi(x) has ‘heavier than exponential’ tails in some direction the HMC method can also exhibit slow convergence, as lim inf⁡∥x∥→∞∥∇U(x)∥=0\liminf_{\|x\|\to\infty}\|\nabla U(x)\|=0. Intuitively the problem here is that when ∥x∥\|x\| is large then the gradient provides insufficient drift back into the ‘centre’ of the space, meaning the chain can exhibit random walk behaviour and hence convergence can be very slow. Theorem 5.18 makes this intuition rigorous.

If ∥∇U(x)∥<M\|\nabla U(x)\|<M for all x∈Xx\in\mathbf{X}, then a necessary condition for the Hamiltonian Monte Carlo method to produce a geometrically ergodic Markov chain is

From Proposition 3.6, it is sufficient to show that for any ε>0\varepsilon>0 there is a δ>0\delta>0 such that Q(x,Bδ(x))>1−εQ(x,B_{\delta}(x))>1-\varepsilon for all x∈Xx\in\mathbf{X}. Using equation (9) if x0x_{0} is the current point in the chain then

Applying the triangle inequality and then the global bound on ∥∇U(x)∥\|\nabla U(x)\| gives

As p0p_{0} follows a centred Gaussian distribution with fixed covariance then Chebyshev’s inequality gives the result. ∎

In fact, in this case the lack of geometric ergodicity is a property of the flow itself, rather than being a consequence of numerical instabilities as in Theorem 5.14, as shown by the following result.

Theorem 5.18 still holds even if an exact integrator is available for Hamilton’s equations.

Taking the norm and using the upper bound gives

and again Chebyshev’s inequality gives the result. ∎

Results for an position-dependent integration time

An important free parameter in HMC is the integration time TT, which we have previously assumed to be independent of the current position. The representation (9) does however suggest that allowing this to change can have some benefits. If the candidate map is viewed as

then if the ‘DRIFT’ function becomes negligible for large ∥x0∥\|x_{0}\| and fixed TT, then it can be increased in magnitude by making TT larger. We make this simple intuition rigorous for an idealised algorithm on the particular one-dimensional Exponential Family class of models with densities of the form

for some fixed β>0\beta>0. Here any contour Cx0,p0:={(x,p):H(x,p)=H(x0,p0)}C_{x_{0},p_{0}}:=\{(x,p):H(x,p)=H(x_{0},p_{0})\} consists of a single closed path, and the flow is periodic from any fixed starting point. We additionally assume that the period length ζx0,p0>0\zeta_{x_{0},p_{0}}>0 is known, and that we have an exact integrator for Hamilton’s equations. This means that we need not concern ourselves with the acceptance probability (we discuss this issue in Section 7).

At iteration ii (with x0=xi−1x_{0}=x_{i-1}), the dynamic HMC implementation we consider consists of re-sampling p0∼N(0,1)p_{0}\sim N(0,1), and then setting xi=Prx∘φτ(x0,p0)x_{i}=\text{Pr}_{x}\circ\varphi_{\tau}(x_{0},p_{0}), where τ∼U[0,ζx0,p0]\tau\sim U[0,\zeta_{x_{0},p_{0}}]. In words, we flow along the Hamiltonian for τ\tau units of time, where τ\tau is a uniform random variable with maximum value ζx0,p0\zeta_{x_{0},p_{0}} (note that φζx0,p0(x0,p0)=(x0,p0)\varphi_{\zeta_{x_{0},p_{0}}}(x_{0},p_{0})=(x_{0},p_{0})).

Firstly, note that π\pi-irreducibility is more straightforward to see here. To reach any set A∈BA\in\mathcal{B} with π(A)>0\pi(A)>0, we first consider the single contour Cx0,p0C_{x_{0},p_{0}}, and specifically the component of this contour that is connected to (x0,p0)(x_{0},p_{0}). Let Cx0C_{x_{0}} be the projection of this component onto X\mathbf{X}. Then any nonempty set A′⊂Cx0A^{\prime}\subset C_{x_{0}} has positive probability of occuring, as the next point is chosen from a density with support all of Cx0C_{x_{0}}. As the contours are composed of single components, and cover the entire space, then for any AA, the probability of choosing a contour for which this argument can be applied is greater than zero. We provide a figure in the supplementary material to offer more intuition .

We introduce some additional notation in this section. We define the microcanonical expectation of a real-valued function f(xt,pt)f(x_{t},p_{t}), where (xt,pt)=φt(x0,p0)(x_{t},p_{t})=\varphi_{t}(x_{0},p_{0}), i.e. the solution to (8) for tt units of time initialised at (x0,p0)(x_{0},p_{0}), as

This is simply the time expectation of ff from uniformly sampling across Cx0,p0C_{x_{0},p_{0}}.

We first introduce a result from the Physics literature (e.g. ) which relates the kinetic and potential energies.

(Virial Theorem). Under Hamiltonian flow (xs,ps)=φs(x0,p0)(x_{s},p_{s})=\varphi_{s}(x_{0},p_{0}) we have

Define the virial function Gt=xtptG_{t}=x_{t}p_{t}. From the fundamental theorem of Calculus we have

where G˙t:=dGt/dt\dot{G}_{t}:=dG_{t}/dt. In this case

We can now state and prove the main result of this section.

For the one-dimensional Exponential Family class of distributions with density given by (23), the dynamic Hamiltonian Monte Carlo method produces a geometrically ergodic Markov chain for any value of β>0\beta>0.

Note that by conservation of the Hamiltonian, we have

Choose the Lyapunov function V(x)=U(x)+xU′(x)+1V(x)=U(x)+xU^{\prime}(x)+1. Using Theorem 6.1, we can re-write the above expression

Note also that for any η>0\eta>0 there is an Mη<∞M_{\eta}<\infty such that whenever ∣x0∣>Mη|x_{0}|>M_{\eta}

The proof will be complete if we can find a λ<1\lambda<1 such that (1+η)U(x0)≤λV(x0)(1+\eta)U(x_{0})\leq\lambda V(x_{0}) for suitably large ∣x0∣|x_{0}|. Now x0U′(x0)→βU(x0)x_{0}U^{\prime}(x_{0})\to\beta U(x_{0}) here as ∣x0∣→∞|x_{0}|\to\infty, meaning that there is an M<∞M<\infty such that whenever ∣x0∣>M|x_{0}|>M

Taking ∣x0∣≥max⁡(Mη,M)|x_{0}|\geq\max(M_{\eta},M) we can therefore re-write the inequality of interest (1+η)U(x0)≤λV(x0)(1+\eta)U(x_{0})\leq\lambda V(x_{0}) as

Choosing η<β/2\eta<\beta/2 ensures λ<1\lambda<1 and also gives the desired inequality PV(x0)≤λV(x0)PV(x_{0})\leq\lambda V(x_{0}) whenever ∣x0∣>max⁡(Mη,M)|x_{0}|>\max(M_{\eta},M), showing that the resulting Markov chain will be geometrically ergodic. ∎

Discussion

We have established conditions under which geometric ergodicity will and will not hold for Markov chains produced by the Hamiltonian Monte Carlo method. Here we discuss how our results can be extended in various ways, as well as how they translate to standard implementations in widely used software .

Allowing the integration time in HMC to depend on the current point in the chain without an exact integrator will typically mean that some adjustments to α(x0,xT)\alpha(x_{0},x_{T}) must be made to ensure that π(⋅)\pi(\cdot) is still preserved. The reason is that the approximate flow map φT\varphi_{T} may no longer be reversible, as if T1:=T(x0,p0)T_{1}:=T(x_{0},p_{0}) and T2:=T(xT,pT)T_{2}:=T(x_{T},p_{T}) then φT2−1∘φT1\varphi^{-1}_{T_{2}}\circ\varphi_{T_{1}} will typically not be the identity map if T1≠T2T_{1}\neq T_{2}. The two possible ways of changing the integration time T=LεT=L\varepsilon are to adjust either LL or ε\varepsilon. Increasing LL requires more computations per transition, while this is not necessarily true for ε\varepsilon. In the No-U-Turn sampler a binary tree approach is introduced to ensure preservation of detailed balance when LL is altered in different parts of the space . We are not aware of any implementations involving adjustment of ε\varepsilon, however it is likely that similar modifications to α(x0,xT)\alpha(x_{0},x_{T}) are possible here also. Adjusting ε\varepsilon may be a sensible option in some cases, as the leapfrog method is known to ‘almost’ preserve the modified Hamiltonian

as shown for example in . When π(x)\pi(x) is not log-concave in the tails and hence the elements of ∇U\nabla U and ∇t∇U\nabla^{t}\nabla U become negligible as ∥x∥→∞\|x\|\to\infty, this implies that ε\varepsilon can be increased for larger ∥x∥\|x\| without compromising on numerical accuracy.

2 Extension to other integrators

The fixed integration time results in Section 5 refer specifically to the leapfrog integrator implementation of HMC (aside from Proposition 5.19). It should be possible to use the same approach when analysing other explicit symplectic integrators, however for schemes which rely on implicit methods (e.g. ) then composing multiple steps of the integrator as in Proposition 4.2 cannot be done so cleanly. Implicit methods are needed when the Hamiltonian is non-separable, and can often resolve stiffness issues such as those characterised in Theorem 5.14.

This new density will have Gaussian tails for any β>0\beta>0, suggesting a well-behaved sampler can be constructed. Further discussion on the relationship between geometric Markov chain Monte Carlo methods and parameter transformations is given in .

3 Honest bounds

Geometric ergodicity is often called a qualitative bound, as an explicit upper bound on the geometric rate ρ\rho is not established when using the techniques of . With some modifications, however, quantitative bounds can be constructed (e.g. ). We have refrained from doing this here, as these bounds are also often too conservative to be of use in practice .

Monte Carlo estimates for non-asymptotic quantitative bounds using the Ricci curvature approach of are applied to Hamiltonian Monte Carlo in . We note that the applicability of these bounds relies on the assumption of positive curvature in some Wasserstein distance for the underlying Markov chain. When this distance is chosen to be Total Variation, then this is a strictly stronger condition than geometric ergodicity [see Corollary 22 in ], so we feel that our results are a useful pre-cursor to understanding when these estimated bounds are informative in practice.

In the case of MALA, when ∥∇U(x)∥\|\nabla U(x)\| grows at a faster than linear rate for large ∥x∥\|x\| then it is shown in that useful inferences for functionals concentrated in the centre of the space can be made by setting a small enough value for ε\varepsilon. It is likely that the same analysis can be done with HMC, and that the result would be similar, but we leave such explorations for future work.

4 Practitioner guidelines

The main conclusion of our work for practitioners implementing the method in a bespoke manner is to consider the form of ∥∇U(x)∥\|\nabla U(x)\|. If this term either grows very fast or becomes negligibly small when ∥x∥\|x\| is large then it is likely that the Markov chains produced will struggle to explore the tails of π(⋅)\pi(\cdot) effectively. When the gradient grows at a faster than linear rate then a suitably small value for ε\varepsilon must be chosen to counteract this, while when it shrinks then the integration time TT must be made sufficiently large. Of course in either scenario if there is a re-parametrisation of the model that may not suffer these difficulties then this should be applied. Users implementing the method in the Stan software should note that both of these instances are captured by standard output diagnostics. Numerical trajectories that become unstable due to large gradients are classed as ‘divergences’, while a failure to move far enough because of negligible gradients is recorded through the ‘maximum tree depth reached’ warning. If this happens and π(⋅)\pi(\cdot) is known to be proper then the user should set as large a maximum tree depth as is computationally feasible when tail exploration is of keen interest.

Acknowledgements

We thank Alexandros Beskos, Gareth Roberts, Krzysztof Łatuszyński, Gabriel Stoltz and Mark Rowland for useful discussions. SL thanks Nawaf Bou–Rabee for pointing him to .

SL was supported by a PhD scholarship from Xerox Research Centre Europe and EPSRC grant EP/K014463/1 for this project. SB was supported by EPSRC fellowship EP/K005723/1, MB is funded by EPSRC grant EP/J016934/1, and SB and MB also received a 2014 EPRSC NCSML Award for PDRA Collaboration for this project. MG is funded by an EPSRC Established Career Research Fellowship, EP/J016934/1, a Royal Society Wolfson Research Merit Award, and EPSRC grants EP/P020720/1, EP/J016934/3, EP/K034154/1.

References

Appendix A Examples of π𝜋\pi-irreducibility

The below example shows how the Hamiltonian Monte Carlo proposal transition can produce a method which is not π\pi-irreducible, and hence will not be ergodic.

Take π(x)∝e−x2/2\pi(x)\propto e^{-x^{2}/2}, meaning ∇U(x)=x\nabla U(x)=x, and set L=2L=2. Then the HMC proposal becomes

Setting ε=2\varepsilon=\sqrt{2} means 2ε−ε3=02\varepsilon-\varepsilon^{3}=0, so that

With this transition the proposal kernel is simply Q(x,⋅)=δx(⋅)Q(x,\cdot)=\delta_{x}(\cdot), so the chain is not π\pi-irreducible unless π(⋅)=δx(⋅)\pi(\cdot)=\delta_{x}(\cdot).

The following diagram give intuition for the π\pi-irreducibility argument of the idealised Hamiltonian Monte Carlo method.

Appendix B Connections between HMC and Langevin dynamics

Hamiltonian Monte Carlo is based on interspersing Hamiltonian dynamics given by the equations

with intermittent re-sampling of p∼N(0,I)p\sim N(0,I) to inject stochasticity into the system. After a small time period the xx-coordinate will be

Taking δt≪1\sqrt{\delta t}\ll 1 then for suitably regular ∇U(x)\nabla U(x) one can approximate this with the expression

Hence, if the dynamics are only performed for a short period before momentum re-sampling, the dynamics will be close to those of an overdamped Langevin diffusion described by the stochastic differential equation

If instead TT is typically large in between momentum refreshments, then one can instead consider underdamped Langevin dynamics, described by the system

for some γ>0\gamma>0. This system more obviously relates to HMC, since it consists of a Hamiltonian part combined with some stochasticity, which is also injected into the momentum variable VtV_{t}. The stochasticity is however in this case continuously injected in the form of an Ornstein–Uhlenbeck (OU) process. As such, as the dynamics evolve the conservative Hamiltonian flow is constantly perturbed by small random adjustments to the momentum. This is closely connected to the behaviour of generalized HMC, in which integration times are typically smaller and the momentum is only partially refreshed using pnew∼N(ξpold,(1−ξ2)I)p_{new}\sim N(\xi p_{old},(1-\xi^{2})I). Indeed, if ξ:=e−γt\xi:=e^{-\gamma t} then this step is an exact solution to the OU part of the system.

Appendix C Proof of inwards convergence for the Exponential family model class

We provide a verbose proof in the case β∈(1,2)\beta\in(1,2), to elaborate on the short version provided in the main text. In what follows U(x):=α∣x∣βU(x):=\alpha|x|^{\beta} for some α>0\alpha>0, and U(k)(x):=dkU(x)/dxk.U^{(k)}(x):=d^{k}U(x)/dx^{k}. We precede the main result with a technical lemma.

For every i∈{1,...,L}i\in\{1,...,L\}, if p0=o(x0β−1)p_{0}=o(x_{0}^{\beta-1}) then

If β∈(1,2)\beta\in(1,2) then HMC converges inwards.

Take p0=o(x0β−1)p_{0}=o(x_{0}^{\beta-1}), and note that this occurs with probability one as x0→∞x_{0}\to\infty. We write K(p0)−K(pLε)=κ1+κ2K(p_{0})-K(p_{L\varepsilon})=\kappa_{1}+\kappa_{2} where κ1:=εp0[U′(x0)+U′(xLε)+2∑i=1L−1U′(xiε)]/2\kappa_{1}:=\varepsilon p_{0}\left[U^{\prime}(x_{0})+U^{\prime}(x_{L\varepsilon})+2\sum_{i=1}^{L-1}U^{\prime}(x_{i\varepsilon})\right]/2 and κ2:=−ε2[U′(x0)+U′(xLε)+2∑i=1L−1U′(xiε)]2/8\kappa_{2}:=-\varepsilon^{2}\left[U^{\prime}(x_{0})+U^{\prime}(x_{L\varepsilon})+2\sum_{i=1}^{L-1}U^{\prime}(x_{i\varepsilon})\right]^{2}/8. Then

And similarly up to o(x03β−4)o(x_{0}^{3\beta-4}) terms

Since (xLε−x0)=−L2ε2U′(x0)/2+o(xβ−1)(x_{L\varepsilon}-x_{0})=-L^{2}\varepsilon^{2}U^{\prime}(x_{0})/2+o(x^{\beta-1}) then

Now turning to U(x0)−U(xLε)U(x_{0})-U(x_{L\varepsilon}) and using Lemma C.1 we have

So combining gives up to o(x03β−4)o\left(x_{0}^{3\beta-4}\right) terms then H(x0,p0)−H(xLε,pLε)H(x_{0},p_{0})-H(x_{L\varepsilon},p_{L\varepsilon}) is

The coefficient of the leading order term divided by ε4\varepsilon^{4} is L3/4−L4/8+∑i=1L−1(L−(L−i))i2/2=L2/8L^{3}/4-L^{4}/8+\sum_{i=1}^{L-1}(L-(L-i))i^{2}/2=L^{2}/8. Since this is >0>0 then as x0→∞x_{0}\to\infty the result is proved. An analogous argument holds as x0→−∞x_{0}\to-\infty. ∎