[Paper Review] Hamiltonian Monte Carlo with Energy Conserving Subsampling
This paper proposes Energy Conserving Subsampling (HMC-ECS), a Hamiltonian Monte Carlo method that maintains high sampling efficiency and energy conservation by using the same data subsample to compute both the Hamiltonian dynamics and the Metropolis-Hastings acceptance step. The method achieves accurate Bayesian inference on large datasets with significantly reduced computational cost, outperforming SGLD and SG-HMC while remaining robust to moderate-quality control variates.
Hamiltonian Monte Carlo (HMC) samples efficiently from high-dimensional posterior distributions with proposed parameter draws obtained by iterating on a discretized version of the Hamiltonian dynamics. The iterations make HMC computationally costly, especially in problems with large datasets, since it is necessary to compute posterior densities and their derivatives with respect to the parameters. Naively computing the Hamiltonian dynamics on a subset of the data causes HMC to lose its key ability to generate distant parameter proposals with high acceptance probability. The key insight in our article is that efficient subsampling HMC for the parameters is possible if both the dynamics and the acceptance probability are computed from the same data subsample in each complete HMC iteration. We show that this is possible to do in a principled way in a HMC-within-Gibbs framework where the subsample is updated using a pseudo marginal MH step and the parameters are then updated using an HMC step, based on the current subsample. We show that our subsampling methods are fast and compare favorably to two popular sampling algorithms that utilize gradient estimates from data subsampling. We also explore the current limitations of subsampling HMC algorithms by varying the quality of the variance reducing control variates used in the estimators of the posterior density and its gradients.
Motivation & Objective
- To address the computational bottleneck of Hamiltonian Monte Carlo (HMC) in large-data settings by enabling efficient subsampling without sacrificing sampling efficiency.
- To preserve the key advantage of HMC—high acceptance probability for distant proposals—when using data subsamples.
- To develop a principled subsampling strategy where both dynamics and acceptance decisions are based on the same subsample, ensuring energy conservation.
- To evaluate the robustness of the method to varying quality of variance-reducing control variates in posterior density and gradient estimation.
- To compare HMC-ECS empirically with SGLD and SG-HMC in terms of sampling efficiency and accuracy on high-dimensional posteriors.
Proposed method
- Proposes a HMC-within-Gibbs framework that alternates between sampling a data subsample via a pseudo-marginal Metropolis-Hastings step and updating parameters using HMC based on the current subsample.
- Introduces two variants: perturbed HMC-ECS, which targets a slightly biased posterior but converges to the true posterior in total variation at rate O(n⁻¹m⁻²), and signed HMC-ECS, which uses importance sampling to produce consistent estimators.
- Employs second-order control variates based on a Taylor expansion around the posterior mode to reduce variance in likelihood and gradient estimators.
- Uses the same subsample for both simulating Hamiltonian dynamics and computing the MH acceptance ratio, ensuring energy conservation and high acceptance probabilities.
- Applies control variates of zeroth and first order to assess sensitivity to approximation quality in variance reduction.
- Implements numerical integration using a symplectic integrator to approximately preserve the Hamiltonian energy over time.
Experimental results
Research questions
- RQ1Can HMC be efficiently scaled to large datasets by subsampling data while preserving high acceptance probabilities and efficient exploration?
- RQ2Does using the same data subsample for both dynamics and MH acceptance maintain energy conservation and sampling efficiency?
- RQ3How sensitive is HMC-ECS to the quality of control variates used in estimating the log-posterior and its gradient?
- RQ4How does HMC-ECS compare in sampling efficiency and accuracy to SGLD and SG-HMC on high-dimensional posteriors?
- RQ5Can HMC-ECS achieve accurate inference with computational cost significantly below full-data HMC?
Key findings
- HMC-ECS achieves sampling efficiency and accuracy comparable to full-data HMC, even on datasets with 29 and 81 parameters, while being substantially faster.
- The perturbed HMC-ECS variant converges to the true posterior in total variation at rate O(n⁻¹m⁻²), ensuring asymptotic consistency.
- Signed HMC-ECS produces simulation-consistent estimators of posterior expectations via importance sampling, enabling valid inference.
- HMC-ECS remains effective with first-order control variates, but fails with zeroth-order approximations due to excessive variance.
- HMC-ECS outperforms SGLD and SG-HMC in both sampling efficiency and accuracy, particularly in high-dimensional settings.
- The method is robust to moderate degradation in control variate quality, but performance degrades significantly when using crude approximations like zeroth-order Taylor expansions.
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.