Skip to main content
QUICK REVIEW

[Paper Review] Exact Hamiltonian Monte Carlo for Truncated Multivariate Gaussians

Ari Pakman, Liam Paninski|arXiv (Cornell University)|Aug 20, 2012
Markov Chains and Monte Carlo MethodsMathematics33 references7 citations
TL;DR

This paper presents an exact Hamiltonian Monte Carlo (HMC) algorithm for sampling from truncated multivariate Gaussians with linear and quadratic constraints, enabling exact integration of Hamiltonian dynamics without tuning parameters. The method achieves faster mixing and higher efficiency than Gibbs sampling, with runtime highly parallelizable and further accelerated by exploiting structured covariance matrices, extending naturally to piecewise quadratic targets like the Bayesian Lasso.

ABSTRACT

We present a Hamiltonian Monte Carlo algorithm to sample from multivariate Gaussian distributions in which the target space is constrained by linear and quadratic inequalities or products thereof. The Hamiltonian equations of motion can be integrated exactly and there are no parameters to tune. The algorithm mixes faster and is more efficient than Gibbs sampling. The runtime depends on the number and shape of the constraints but the algorithm is highly parallelizable. In many cases, we can exploit special structure in the covariance matrices of the untruncated Gaussian to further speed up the runtime. A simple extension of the algorithm permits sampling from distributions whose log-density is piecewise quadratic, as in the "Bayesian Lasso" model.

Motivation & Objective

  • To develop a parameter-free, exact HMC sampler for multivariate Gaussian targets constrained by linear and quadratic inequalities.
  • To overcome the slow mixing and linear scaling with dimension of Gibbs sampling in high-correlation, constrained spaces.
  • To enable efficient sampling from truncated Gaussians with structured covariance matrices by exploiting exact Hamiltonian integration.
  • To extend the method to piecewise quadratic log-densities, such as those in the Bayesian Lasso model.
  • To provide a highly parallelizable algorithm with runtime dependent on constraint geometry and structure.

Proposed method

  • The algorithm treats the log-density of the truncated multivariate Gaussian as a potential energy and introduces momentum variables to define a Hamiltonian system.
  • It integrates the Hamiltonian equations of motion exactly using closed-form solutions for the dynamics under linear and quadratic constraints.
  • Bounces off hard walls (constraints) elastically, with state updates preserving energy and detailed balance.
  • The time to next wall collision and reflection direction are computed efficiently, enabling exact Metropolis acceptance with no tuning.
  • For structured precision matrices (e.g., sparse or low-rank), the method exploits matrix structure to accelerate computation of dynamics and collision times.
  • The approach extends to piecewise quadratic log-densities by modifying the Hamiltonian at discontinuities, with velocity jumps conserving energy.

Experimental results

Research questions

  • RQ1Can exact Hamiltonian dynamics be leveraged to sample from truncated multivariate Gaussians without tuning parameters?
  • RQ2How does the performance of exact HMC compare to Gibbs sampling in high-dimensional, correlated, constrained Gaussian targets?
  • RQ3Can the exact HMC framework be extended to distributions with piecewise quadratic log-densities, such as the Bayesian Lasso?
  • RQ4What is the impact of constraint geometry and matrix structure on the computational efficiency of the sampler?
  • RQ5To what extent can the algorithm be parallelized to improve runtime in high-dimensional settings?

Key findings

  • The exact HMC sampler achieves faster mixing and higher efficiency than Gibbs sampling in all tested examples, particularly in high-correlation constrained spaces.
  • The algorithm requires no tuning of step size or trajectory length, as energy is conserved exactly due to exact integration of Hamiltonian dynamics.
  • Runtime scales with the number and complexity of constraints but is highly parallelizable, enabling fast implementation on modern architectures.
  • For structured precision matrices (e.g., sparse or low-rank), the method achieves significant speedups by exploiting matrix structure in the dynamics computation.
  • The extension to the Bayesian Lasso model is straightforward and maintains comparable efficiency to existing methods, with added flexibility for additional constraints on coefficients.
  • The method naturally handles discontinuous log-densities by allowing velocity jumps at boundaries while conserving total energy, ensuring valid MCMC sampling.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.