Abstract
We show how the Hamiltonian Monte Carlo algorithm can sometimes be speeded up by "splitting" the Hamiltonian in a way that allows much of the movement around the state space to be done at low computational cost. One context where this is possible is when the log density of the distribution of interest (the potential energy function) can be written as the log of a Gaussian density, which is a quadratic function, plus a slowly varying function. Hamiltonian dynamics for quadratic energy functions can be analytically solved. With the splitting technique, only the slowly-varying part of the energy needs to be handled numerically, and this can be done with a larger stepsize (and hence fewer steps) than would be necessary with a direct simulation of the dynamics. Another context where splitting helps is when the most important terms of the potential energy function and its gradient can be evaluated quickly, with only a slowly-varying part requiring costly computations. With splitting, the quick portion can be handled with a small stepsize, while the costly portion uses a larger stepsize. We show that both of these splitting approaches can reduce the computational cost of sampling from the posterior distribution for a logistic regression model, using either a Gaussian approximation centered on the posterior mode, or a Hamiltonian split into a term that depends on only a small number of critical cases, and another term that involves the larger number of cases whose influence on the posterior distribution is small.
Introduction
Hamiltonian Monte Carlo (HMC) is a gold standard for sampling from complex, high-dimensional distributions because it avoids the "random walk" behavior of simpler algorithms like Metropolis-Hastings. However, HMC has a major bottleneck: it relies on the leapfrog integrator, which discretizes time into small steps. To maintain a high acceptance rate and stay on the "energy surface," these steps must be quite small. Since every single step requires calculating the gradient of the log-posterior (which involves iterating over the entire dataset), HMC can become computationally prohibitive for large-scale Bayesian models. The authors aim to break this trade-off between stepsize and computational cost through a technique called "splitting."
Methodology
The core idea is to "split" the Hamiltonian $H(q, p)$ into multiple terms. Instead of one uniform stepsize for the whole system, the authors propose two main strategies to handle rapid dynamics cheaply and costly dynamics slowly.
Partial Analytic Splitting
The potential energy is split into a Gaussian approximation $U_0$ (centered at the posterior mode) and a "residual" term $U_1$. Because the dynamics of a Gaussian (quadratic) energy function can be solved analytically using matrix exponentials, the algorithm can move long distances according to $U_0$ with zero discretization error. The numerical integrator only has to handle $U_1$, which varies slowly and thus allows for a much larger stepsize.
Data Splitting
In models like logistic regression, not all data points are created equal. Points far from the decision boundary have gradients that change very little as the parameters move. The authors split the data into a small subset of "critical" cases (near the decision boundary) and the remaining "non-critical" cases. They use a nested leapfrog approach: the critical cases are updated frequently with a small stepsize, while the costly, non-critical cases are updated much less frequently with a larger stepsize.
Key Results
The authors evaluated their methods on both synthetic and real-world binary classification tasks, including StatLog (Satellite), CTG (Fetal Cardiotocograms), and Chess (Endgame) datasets. Efficiency was measured using Autocorrelation Time (ACT) adjusted for the number of gradient evaluations and CPU time.
- Speedups: On the simulated dataset, Split HMC with a normal approximation was roughly 3x more efficient than standard HMC in terms of gradient computations.
- Data Splitting Performance: For the real-world datasets (StatLog and CTG), the data splitting method was the clear winner, often achieving 2x to 4x improvements in efficiency.
- Stability: Even with much larger stepsizes for the "slow" components, the acceptance rates remained high (often > 0.70), proving that the splitting didn't sacrifice the validity of the Markov chain.
Discussion
The "aha" moment for data splitting lies in the observation that the posterior shape is dominated by data points the model is "unsure" about. By identifying these points using a preliminary Maximum A Posteriori (MAP) estimate, computational budget can be focused where the gradient is most volatile. The goal is efficiency over absolute discretization accuracy; by splitting the Hamiltonian, the simulation can drift slightly more on the "cheap" parts while staying precise on the "important" parts, leading to faster mixing per unit of CPU time.
While both methods require a preliminary analysis to find the MAP estimate and Hessian, this cost is usually negligible compared to the full MCMC run. Future work may extend these heuristics to multinomial models or integrate Split HMC with variants like the No-U-Turn Sampler (NUTS).
Summary updated