Exact Hamiltonian Monte Carlo for truncated multivariate gaussians

Ari Pakman, Liam Paninski

Research output: Contribution to journalArticlepeer-review


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.

Original languageEnglish
Pages (from-to)518-542
Number of pages25
JournalJournal of Computational and Graphical Statistics
Issue number2
StatePublished - 1 Jan 2014
Externally publishedYes


  • Bayesian modeling
  • Markov chain Monte Carlo

All Science Journal Classification (ASJC) codes

  • Statistics and Probability
  • Discrete Mathematics and Combinatorics
  • Statistics, Probability and Uncertainty


Dive into the research topics of 'Exact Hamiltonian Monte Carlo for truncated multivariate gaussians'. Together they form a unique fingerprint.

Cite this