Breaking the Communication Barrier in Federated Sampling with Adaptive Hamiltonian Monte Carlo
Organizations: Independent Researcher · Purdue University
Abstract
This work proposes the Adaptive Federated Hamiltonian Monte Carlo (AFHMC) for Bayesian federated learning (FL) tasks. The prior work on HMC applications for FL achieves communication cost under log-convex distributions, already demonstrating its advantage over the Langevin dynamic-based counterpart. Based on a refined analysis, this paper further reveals the benefit of HMC for the FL regime by incorporating a control mechanism for local node shifts. We prove that AFHMC at most requires communication cost up to a logarithmic term, which is significantly better than the existing results. Moreover, the proposed method adapts to client heterogeneity. Under low-heterogeneity settings (i.e., the target sampling precision is higher than the heterogeneity level), the communication rate of AFHMC can be as good as , resembling the communication costs for FL optimization tools. To the best of our knowledge, this provides the first logarithmic communication complexity result for federated sampling, even though it requires low heterogeneity. Numerically, we also justify AFHMC's advantage under the low-heterogeneity regime. Our code is available at https://github.com/laaaarrywang/Adaptive-Federated-HMC
Figures & tables
| Algorithm | Condition beyond | Rate of communication | Rate of gradients |
| Assumptions 4.1 - 4.2 | (up to logarithmic terms) | ||
| Centralized HMC | Hessian Lipschitz under infinity | none | |
| Mangoubi & Vishnoi (2018) | norm (Assum. 1 in their paper) | ||
| VR-FALD | Hessian Lipschitz under L2 | ||
| Plassier et al. (2023) | norm (Assum. HX1 in their paper) | ||
| FA-HMC | Hessian Lipschitz under L2 |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Stepsize | FA-LD | FA-HMC | AFHMC |
|---|---|---|---|
| Rounds (seeds 0, 1, 2) | Mean sd | |||
|---|---|---|---|---|
| 2 | 7 | 0.04243 | 161, 153, 149 | |
| 50 | 35 | 0.008485 | 213, 212, 212 | |
| 100 | 50 | 0.006 | 220, 220, 220 | |
| 150 | 61 | 0.004899 | 229, 229, 229 | |
| 200 | 71 | 0.004243 | 231, 231, 230 | |
| 250 | 79 | 0.003795 | 237, 237, 237 |
| Original ( ) | ( ) | Thm. 4.1 ( ) | |||||||
|---|---|---|---|---|---|---|---|---|---|
| 2 | 42 | 84 | 1 | 0.04243 | 327.9 | 0.01682 | 13.0 | 0.05878 | 85.7 |
| 50 | 162 | 324 | 4 | 0.008485 | 4092.3 | 0.007521 | 752.1 | 0.00899 | 960.2 |
| 100 | 220 | 440 | 5 | 0.006 | 7621.3 | 0.006325 | 1682.8 | 0.006 | 2213.9 |
| 150 | 263 | 526 | 6 | 0.004899 | 9523.9 | 0.005715 | 2694.0 | 0.004736 | 2774.3 |
| 200 | 294 | 588 | 6 | 0.004243 | 15968.2 | 0.005318 | 3911.7 | 0.004005 | 6298.0 |
| Metric | Method | Rounds | Mean SE | ||
|---|---|---|---|---|---|
| Accuracy | FA-LD | 1 | 3600 | ||
| FA-HMC | 10 | 3600 | |||
| FA-HMC | 50 | 3600 | |||
| FA-HMC | 100 | 3600 | |||
| AFHMC | 10 | 1800 | |||
| AFHMC | 50 | 1800 |
| Method | |||||||
|---|---|---|---|---|---|---|---|
| FA-LD | 1 | 0.8089 | 0.8085 | 0.8080 | 0.8076 | 0.8075 | |
| FA-HMC | 10 | 0.8270 | 0.8272 | 0.8273 | 0.8277 | 0.8274 | |
| FA-HMC | 50 | 0.8362 | 0.8369 | 0.8376 | 0.8381 | 0.8384 | |
| FA-HMC | 100 | 0.8369 | 0.8381 | 0.8391 | 0.8401 | 0.8408 | |
| AFHMC | 10 | 0.8389 | 0.8403 | 0.8413 | 0.8419 | 0.8422 | |
| AFHMC | 50 | 0.8373 | 0.8386 | 0.8391 | 0.8399 | 0.8402 |
Federated Learning
Federated learning trains shared models across data holders without requiring them to pool their raw data.
See all 1,048 papers