Abstract
Selecting the step size for the Metropolis-adjusted Langevin algorithm (MALA) is necessary in order to obtain satisfactory performance. However, finding an adequate step size for an arbitrary target distribution can be a difficult task and even the best step size can perform poorly in specific regions of the space when the target distribution is sufficiently complex. To resolve this issue we introduce autoMALA, a new Markov chain Monte Carlo algorithm based on MALA that automatically sets its step size at each iteration based on the local geometry of the target distribution. We prove that autoMALA has the correct invariant distribution, despite continual automatic adjustments of the step size. Our experiments demonstrate that autoMALA is competitive with related state-of-the-art MCMC methods, in terms of the number of log density evaluations per effective sample, and it outperforms state-of-the-art samplers on targets with varying geometries. Furthermore, we find that autoMALA tends to find step sizes comparable to optimally-tuned MALA when a fixed step size suffices for the whole domain.
Introduction
Sampling from complex, high-dimensional probability distributions is fundamental to modern Bayesian statistics. While the Metropolis-adjusted Langevin algorithm (MALA) is a staple in the MCMC toolkit, it faces a significant challenge: step size selection. A step size that is too large leads to frequent rejections, while one that is too small results in inefficient exploration.
Most gradient-based MCMC methods, including the popular No-U-Turn Sampler (NUTS), rely on a fixed step size $\epsilon$ chosen during a warmup phase. This approach fails for distributions with varying local geometry, such as "funnel" distributions. In these cases, a fixed step size must be tuned to the most restrictive region (the "neck"), making exploration painfully slow in more expansive regions.
Methods: Dynamic Step Size and Reversibility
autoMALA addresses this by automatically tuning its step size at every iteration to match the local terrain. The algorithm employs two key mechanisms:
- Local Adaptation: At each iteration, autoMALA starts with an initial step size guess. It iteratively halves or doubles this step size until the Metropolis-Hastings acceptance ratio falls within a randomly sampled target window $[a, b]$.
- Reversibility Check: To maintain theoretical correctness (detailed balance), the algorithm performs a reversibility check. After proposing a move to a new state $x'$, it verifies if the same step size would have been selected starting from $x'$. If this check fails, the move is rejected.
Unlike other adaptive methods with high computational overhead, autoMALA’s adaptation cost scales linearly with dimension, making it practical for high-dimensional problems.
Experimental Evaluation
The authors evaluated autoMALA against state-of-the-art samplers on synthetic "stress tests" like Neal’s funnel and real-world Bayesian models using horseshoe priors (e.g., Ionosphere, Sonar, and Prostate datasets).
Key Results
- Efficiency on Funnels: On Neal’s funnel, autoMALA required significantly fewer gradient evaluations per effective sample compared to NUTS. It provided much more accurate estimates of the mean and variance in the difficult regions of the distribution.
- Robustness: autoMALA is remarkably robust to poor initial step size guesses, quickly converging to a sensible range through a round-based tuning scheme.
- Variable Selection: In tasks with horseshoe priors, autoMALA consistently outperformed NUTS, particularly in low-data regimes where posterior geometry is most erratic.
Conclusion and Future Work
autoMALA demonstrates that local adaptation can significantly improve MCMC performance on targets with varying geometries. While the current work proves invariance, future research will focus on formal proofs of irreducibility and extending this involution-based adaptation to other sampling frameworks. The implementation is available in the Pigeons.jl package.
Summary updated