arXiv:2609.02138stat.MLSep 2026

Manuscript Offprint

arXiv:2609.02138

HyperMC: Multi-Fidelity Hyperparameter Tuning for Stochastic Gradient MCMC

Ming Tan, Xiyun Jiao

Abstract

Stochastic gradient Markov chain Monte Carlo (SGMCMC) methods enable scalable Bayesian inference, but their performance depends strongly on hyperparameters such as the step size, mini-batch size, and number of leapfrog steps. Since most SGMCMC algorithms lack a Metropolis–Hastings acceptance rate, standard acceptance-based tuning methods are not directly applicable. We propose HyperMC, a multi-fidelity tuning framework that combines Hyperband-style resource allocation with kernel Stein discrepancy (KSD) evaluation. By running multiple successive-halving brackets, HyperMC balances broad exploration of a continuous hyperparameter space with increasingly accurate evaluation of promising configurations under a fixed computational budget. We further introduce Robust HyperMC, which uses global grid initialization followed by elite-guided local refinement to reduce sensitivity to random candidate generation and noisy finite-budget evaluations. Under suitable approximation and concentration conditions for the estimated KSD, we establish that the successive-halving component selects a near-optimal configuration among the sampled candidates with high probability and derive a sufficient computational budget for successful selection. Experiments on logistic regression, probabilistic matrix factorization, and Bayesian neural networks show that HyperMC improves posterior approximation or predictive calibration relative to MAMBA, grid search, and heuristic baselines, while Robust HyperMC yields more stable and reproducible tuning results.

Keywords: SGMCMC, kernel Stein discrepancy, hyperparameter optimization

1 Introduction

Markov chain Monte Carlo (MCMC) methods provide a general framework for sampling from complex posterior distributions, but their practical performance is often highly sensitive to user-specified hyperparameters. For classical algorithms, such as random-walk Metropolis and the Metropolis-adjusted Langevin algorithm, proposal scales and step sizes can be calibrated using theoretically motivated acceptance-rate criteria (Roberts et al. 1997, Roberts and Rosenthal 1998). These diagnostics also form the basis of adaptive MCMC methods that update tuning parameters during sampling (Andrieu and Thoms 2008, Vihola

*. Corresponding author.

©2026 Ming Tan and Xiyun Jiao.

2012). However, such approaches rely on a Metropolis-Hastings correction and therefore cannot be directly applied to stochastic gradient MCMC methods.

Stochastic gradient MCMC (SGMCMC) algorithms, including SGLD, SGHMC, and SGNHT, replace full-data gradients with mini-batch estimates and are therefore suitable for large-scale Bayesian inference. Their accuracy and computational efficiency, however, depend strongly on several interacting hyperparameters, such as the step size, mini-batch size, friction parameters, and number of leapfrog steps. In the absence of an acceptance probability, practitioners commonly rely on heuristic rules, optimization-inspired adaptation, or computationally expensive grid search. Stein-based discrepancies, particularly the kernel Stein discrepancy (KSD), provide an alternative criterion for evaluating posterior sample quality without requiring normalized target densities or reference samples. Building on this idea, MAMBA formulates SGMCMC tuning as a multi-armed-bandit problem and uses successive halving to allocate computation among candidate configurations (Coullon et al. 2023). Nevertheless, MAMBA selects configurations from a predefined discrete grid and relies on a single successive-halving schedule. Its performance may therefore depend strongly on the resolution of the candidate set, while the method cannot flexibly balance the number of configurations explored against the budget allocated to each configuration.

References (41)