MCMC Methods: From Theory to Distributed Hamiltonian Monte Carlo over PySpark
The Hamiltonian Monte Carlo (HMC) method is effective for Bayesian inference but suffers from synchronization overhead in distributed settings. We propose two variants: a distributed HMC (DHMC) baseline with synchronized, globally exact gradient evaluations and a communication-avoiding leapfrog HMC (CALF-HMC) method that interleaves local surrogate micro-steps with a single–global Metropolis–Hastings correction per trajectory. Implemented on Apache Spark/PySpark and evaluated on a large synthetic logistic regression (N=107, d=100, workers J∈{4,8,16,32}), DHMC attained an average acceptance of 0.986, mean ESS of 1200, and wall-clock of 64.1 s per evaluation run, yielding ≈18.7 ESS/s; CALF-HMC achieved an acceptance of 0.942, mean ESS of 5.1, and 14.8 s, i.e., ≈0.34 ESS/s under the tested surrogate configuration. While DHMC delivered higher ESS/s due to robust mixing under conservative integration, CALF-HMC reduced the per-trajectory runtime and exhibited more favorable scaling as inter-worker latency increased. The study contributes (i) a systems-oriented communication cost model for distributed HMC, (ii) an exact, communication-avoiding leapfrog variant, and (iii) practical guidance for ESS/s-optimized tuning on clusters.
Authors
- Aristeidis Karras (ORCID: https://orcid.org/0000-0002-4632-6511)
- Christos Karras (ORCID: https://orcid.org/0000-0002-4253-7661)
- Leonidas Theodorakopoulos (ORCID: https://orcid.org/0000-0002-0891-6780)
- George A. Krimpas (ORCID: https://orcid.org/0009-0007-0008-547X)
- Alexandra Theodoropoulou (ORCID: https://orcid.org/0009-0004-6314-7795)
- Charalampos-Panagiotis Bakalis (ORCID: https://orcid.org/0009-0006-8837-2248)
Institutions
- University of Patras (GR)
Publication Details
- Journal
- Algorithms
- Published
- 2025-10-17
- DOI
- https://doi.org/10.3390/a18100661
- Citations
- 1
- Primary Topic
- Markov Chains and Monte Carlo Methods
- Type
- article
- Field-Weighted Citation Impact
- 2.63