[Paper Review] Faster Hamiltonian Monte Carlo by Learning Leapfrog Scale
This paper proposes an enhanced Hamiltonian Monte Carlo (eHMC) algorithm that learns the empirical distribution of leapfrog integration times from NUTS burn-in phases to automatically select the number of steps $L$ in HMC, significantly improving sampling efficiency. By replacing NUTS's computationally expensive recursive path-building with a calibrated, random $L$ drawn from an estimated distribution, eHMC achieves higher effective sample size (ESS) and lower Kolmogorov-Smirnov distances than NUTS and standard HMC with minimal tuning.
Hamiltonian Monte Carlo samplers have become standard algorithms for MCMC implementations, as opposed to more basic versions, but they still require some amount of tuning and calibration. Exploiting the U-turn criterion of the NUTS algorithm (Hoffman and Gelman, 2014), we propose a version of HMC that relies on the distribution of the integration time of the associated leapfrog integrator. Using in addition the primal-dual averaging method for tuning the step size of the integrator, we achieve an essentially calibration free version of HMC. When compared with the original NUTS on several benchmarks, this algorithm exhibits a significantly improved efficiency.
Motivation & Objective
- To reduce the computational overhead of NUTS, which wastes effort on backtracking and path expansion beyond necessary.
- To develop a calibration-free HMC variant that automatically selects the number of leapfrog steps $L$ using empirical data from NUTS.
- To improve sampling efficiency in HMC by learning a distribution of optimal $L$ values that reflect the target's geometry.
- To demonstrate that random $L$ selection based on learned distributions outperforms fixed or NUTS-style adaptive $L$ in terms of ESS and convergence.
Proposed method
- The method learns the empirical distribution $\hat{P}_{\mathcal{L}}$ of the longest leapfrog path lengths observed during a NUTS burn-in phase.
- At each HMC iteration, the number of leapfrog steps $L$ is randomly drawn from $\hat{P}_{\mathcal{L}}$ instead of being adaptively built via recursive doubling.
- The step size $\epsilon$ is tuned using primal-dual averaging, ensuring automatic adaptation without manual calibration.
- The algorithm maintains detailed balance via Metropolis-Hastings acceptance, preserving the correct target distribution.
- The approach avoids NUTS’s path retracing by using a pre-learned distribution of efficient path lengths.
- The method is integrated into a standard HMC framework, replacing the NUTS path-finding logic with a learned $L$-sampling strategy.
Experimental results
Research questions
- RQ1Can learning the distribution of optimal leapfrog integration times from NUTS improve HMC efficiency?
- RQ2Does replacing NUTS’s recursive path expansion with a learned, random $L$ selection reduce computational waste while maintaining or improving mixing?
- RQ3Can a calibration-free HMC variant achieve higher effective sample size (ESS) and lower estimation error than NUTS?
- RQ4How does the performance of the proposed eHMC compare to NUTS and standard HMC in terms of ESS and convergence metrics?
Key findings
- eHMC achieves significantly higher effective sample size (ESS) than NUTS, with ESS values of $16.2 \times 10^{-3}$ for $\beta$ compared to NUTS’s $6.26 \times 10^{-3}$.
- eHMC reduces the maximum Kolmogorov-Smirnov (KS) distance by up to 30% compared to NUTS and 20% compared to prHMC at the same computational cost.
- The algorithm requires fewer simulations to achieve the same precision, as shown by lower KS distances and higher ESS per gradient evaluation.
- The performance gain is attributed to both globally appropriate $L$ values and reduced computation from avoiding NUTS’s path expansion overhead.
- eHMC outperforms NUTS in terms of ESS and expected square jump distance (ESJD), even though it does not optimize $L$ per iteration.
- The method demonstrates that learning $L$ from NUTS burn-in data yields a robust, efficient, and calibration-free HMC alternative.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.