[Paper Review] Spherical Hamiltonian Monte Carlo for Constrained Target Distributions
This paper proposes Spherical Hamiltonian Monte Carlo (SHMC), a novel MCMC method for sampling from constrained target distributions by mapping the parameter space to the unit ball and augmenting it to a D-dimensional sphere. By leveraging geodesic flows on the sphere, SHMC ensures proposals remain within constraints, significantly improving sampling efficiency over standard HMC and random walk Metropolis in constrained settings, as demonstrated on truncated Gaussians, Bayesian regression, and neural synchrony models.
Statistical models with constrained probability distributions are abundant in machine learning. Some examples include regression models with norm constraints (e.g., Lasso), probit models, many copula models, and Latent Dirichlet Allocation (LDA) models. Bayesian inference involving probability distributions confined to constrained domains could be quite challenging for commonly used sampling algorithms. For such problems, we propose a novel Markov Chain Monte Carlo (MCMC) method that provides a general and computationally efficient framework for handling boundary conditions. Our method first maps the <i>D</i>-dimensional constrained domain of parameters to the unit ball [Formula: see text], then augments it to a <i>D</i>-dimensional sphere <b>S</b><sup><i>D</i></sup> such that the original boundary corresponds to the equator of <b>S</b><sup><i>D</i></sup> . This way, our method handles the constraints implicitly by moving freely on the sphere generating proposals that remain within boundaries when mapped back to the original space. To improve the computational efficiency of our algorithm, we divide the dynamics into several parts such that the resulting split dynamics has a partial analytical solution as a geodesic flow on the sphere. We apply our method to several examples including truncated Gaussian, Bayesian Lasso, Bayesian bridge regression, and a copula model for identifying synchrony among multiple neurons. Our results show that the proposed method can provide a natural and efficient framework for handling several types of constraints on target distributions.
Motivation & Objective
- Address the inefficiency of standard HMC in sampling from constrained target distributions, where proposals often violate domain constraints.
- Overcome the computational burden of boundary reflection or infinite potential barriers used in existing constrained HMC methods.
- Develop a geometric framework that implicitly enforces constraints through manifold augmentation, enabling natural and efficient sampling.
- Improve computational efficiency by splitting Lagrangian dynamics and analytically solving geodesic flows on the sphere.
- Demonstrate the method’s effectiveness across diverse constrained models, including Bayesian regression and copula-based neural synchrony detection.
Proposed method
- Map the D-dimensional constrained parameter space bijectively to the unit ball 𝔹₀ᴰ(1), ensuring all constrained values are represented within the unit ball.
- Augment the D-dimensional parameter space to a (D+1)-dimensional sphere 𝕊ᴰ by introducing an auxiliary variable θ_{D+1}, such that the boundary of the unit ball corresponds to the equator of the sphere.
- Define a Hamiltonian dynamics on the sphere using a Lagrangian formulation, where the kinetic energy is derived from the velocity in the ambient space and the potential energy enforces the spherical constraint.
- Split the Lagrangian dynamics into components, allowing analytical solution of the geodesic flow on the sphere, which corresponds to the shortest path on the manifold.
- Use the leapfrog integrator to numerically simulate the dynamics on the sphere, generating proposals that are guaranteed to remain within the original constrained domain.
- Apply the Metropolis-Hastings acceptance step to correct for numerical errors in the integration, preserving detailed balance and target distribution invariance.
Experimental results
Research questions
- RQ1Can a geometric transformation of the constrained parameter space to a sphere enable efficient and boundary-compliant MCMC sampling?
- RQ2How can geodesic flows on the sphere be analytically solved to improve computational efficiency in Hamiltonian Monte Carlo?
- RQ3To what extent does Spherical HMC outperform standard HMC, random walk Metropolis, and wall HMC in terms of effective sample size and computational cost on constrained distributions?
- RQ4Can the proposed method be generalized to various types of constraints by mapping them to the unit ball?
- RQ5How does the method perform on real-world constrained models such as Bayesian Lasso, bridge regression, and copula models for neural synchrony?
Key findings
- Spherical HMC achieved a minimum effective sample size per second of 1.98×10⁻² for β₁₄ under the rewarded stimulus, significantly outperforming Wall HMC (4.23×10⁻³) and RWM (7.08×10⁻⁴).
- For β₃₄ under the non-rewarded stimulus, Spherical HMC achieved a minimum effective sample size per second of 2.25×10⁻², compared to Wall HMC’s 3.63×10⁻³ and RWM’s 5.74×10⁻⁴.
- The method successfully detected significant neural synchrony between the 1st and 4th neurons under rewarded stimuli and between the 3rd and 4th neurons under non-rewarded stimuli, with posterior distributions showing clear separation from zero.
- Trace plots for β₁₄ and β₃₄ showed rapid mixing and low autocorrelation, indicating high sampling efficiency and convergence stability.
- The use of analytical geodesic flows reduced numerical integration errors and improved the acceptance rate, with Spherical HMC maintaining an average acceptance probability of 0.83 and 0.81 across scenarios.
- The method was robust across multiple constraint types, including q-norm constraints and the diamond-shaped parameter space of the FGM copula model, after mapping to the unit ball via square root transformation.
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.