[Paper Review] Roll-back Hamiltonian Monte Carlo
This paper introduces Roll-back Hamiltonian Monte Carlo (RBHMC), a novel HMC framework for sampling from truncated distributions with smooth underlying densities. By replacing discontinuous truncation boundaries with a sharp sigmoid approximation, RBHMC enables differentiable dynamics and efficient sampling in constrained spaces, achieving performance comparable to Gibbs sampling in Bayesian non-negative matrix factorization while maintaining computational efficiency.
We propose a new framework for Hamiltonian Monte Carlo (HMC) on truncated probability distributions with smooth underlying density functions. Traditional HMC requires computing the gradient of potential function associated with the target distribution, and therefore does not perform its full power on truncated distributions due to lack of continuity and differentiability. In our framework, we introduce a sharp sigmoid factor in the density function to approximate the probability drop at the truncation boundary. The target potential function is approximated by a new potential which smoothly extends to the entire sample space. HMC is then performed on the approximate potential. While our method is easy to implement and applies to a wide range of problems, it also achieves comparable computational efficiency on various sampling tasks compared to other baseline methods. RBHMC also gives rise to a new approach for Bayesian inference on constrained spaces.
Motivation & Objective
- To address the challenge of applying Hamiltonian Monte Carlo (HMC) to truncated distributions, which suffer from discontinuities and non-differentiability at truncation boundaries.
- To develop a general-purpose, easy-to-implement HMC framework that maintains computational efficiency for arbitrary truncation boundaries.
- To enable effective Bayesian inference on constrained parameter spaces where traditional HMC fails due to non-smooth potential functions.
- To provide a scalable alternative to Gibbs sampling and rejection-based methods in models with non-negative or bounded priors.
Proposed method
- Introduce a sharp sigmoid function $\sigma(x; \mu) = \frac{1}{1 + \exp(-\mu x)}$ to approximate the unit step function at truncation boundaries, ensuring smoothness and differentiability.
- Replace the discontinuous indicator function $\mathds{1}_{\text{ROI}}(\mathbf{x})$ in the target density with $\sigma(\mathbf{x}; \mu)$, creating a smooth potential function $\tilde{U}(\mathbf{x})$ over the entire sample space.
- Construct an approximate potential $\tilde{U}(\mathbf{W}, \mathbf{A})$ for Bayesian non-negative matrix factorization by adding log-sigmoid terms $\log[1 + \exp(-\mu \mathbf{W}_{ij})]$ and $\log[1 + \exp(-\mu \mathbf{A}_{ij})]$ to the original log-posterior.
- Perform HMC on the smooth potential $\tilde{U}$ using standard leapfrog integration with parameters $\varepsilon$ (step size), $L$ (trajectory length), and $\mu$ (sigmoid steepness).
- Ensure the particle rolls back from the boundary by simulating dynamics on the rising potential surface, mimicking physical roll-back behavior.
- Use the resulting samples from $\tilde{U}$ as approximate draws from the true truncated posterior, with minimal distortion when $\mu$ is large.
Experimental results
Research questions
- RQ1Can HMC be effectively extended to truncated distributions with arbitrary, non-smooth boundaries while preserving computational efficiency?
- RQ2How well does a sigmoid-based smooth approximation of the truncation boundary preserve the target distribution’s statistical properties?
- RQ3Does RBHMC outperform traditional Gibbs sampling in terms of reconstruction accuracy and sampling efficiency for Bayesian non-negative matrix factorization?
- RQ4Can RBHMC be applied to general Bayesian models with non-conjugate, constrained priors without requiring specialized derivations?
Key findings
- RBHMC achieves a mean absolute difference of 0.4023819 between the observation matrix and the reconstructed matrix from sampled components, outperforming Gibbs sampling's 0.4065109.
- The standard deviation of the mean absolute difference across 10 runs was 0.0013394 for RBHMC and 0.0013314 for Gibbs, indicating comparable stability.
- The reconstructed base images from RBHMC samples closely restored the original patterns in the synthetic data, demonstrating accurate posterior sampling.
- RBHMC maintains computational efficiency comparable to other HMC-based methods on constrained spaces, despite the added approximation.
- The method is general-purpose and requires no conjugacy or specific boundary structure, making it widely applicable to non-conjugate Bayesian models with constraints.
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.