# Hamiltonian Monte Carlo vs. Sequential Monte Carlo

I am trying to get a feel for the relative merits and drawbacks, as well as different application domains of these two MCMC schemes.

• When would you use which and why?
• When might one fail but the other not (e.g. where is HMC applicable but SMC not, and vice versa)
• Could one, very naively granted, put a measure of utility on one method compared to the other (i.e. is one, generally, better)?

I am currently reading Betancourt's excellent paper on HMC.

• SMC is not an MCMC technique, i.e. there is no Markov chain that is constructed when using SMC. – jaradniemi Mar 3 '17 at 16:55
• Sometime you use mcmc within smc. And sometimes you use smc within mcmc. At the time of my writing this I am not aware of any papers that combine the use of hmc and smc, though. – Taylor Mar 4 '17 at 16:21
• I myself would like to understand better the relation between SMC (aka, particle filtering) and HMC. Thanks for the question! I do note this paper, which seems at first glance to represent some kind of melding of the two approaches: arxiv.org/pdf/1504.05715v2.pdf – David C. Norris Apr 9 '17 at 23:48

Hamiltonian Monte Carlo performs well with continuous target distributions with "weird" shapes. It requires the target distribution to be differentiable as it basically uses the slope of the target distribution to know where to go. The perfect example is a banana shaped function.

Here is a standard Metropolis Hastings in a Banana function: Acceptance rate of 66% and very poor coverage.

Here is with HMC: 99% acceptance with good coverage.

SMC (the method behind Particle Filtering) is almost unbeatable when the target distribution is multimodal, especially if there are several separate areas with mass. Instead of having one Markov Chain trapped within a mode, you have several Markov chains running in parallel. Note that you use it to estimate a sequence of distributions, usually of increasing sharpness. You can generate the increasing sharpness using something like simulated annealing (put a progressively increasing exponent on the target). Or typically, in a Bayesian context, the sequence of distributions is the sequence of posteriors: $$P(\theta|y_1) \;,\; P(\theta|y_1,y_2)\;,\;... \;,\; P(\theta|y_1,y_2,...,y_N)$$

For instance, this sequence is an excellent target for SMC:

The parallel nature of the SMC makes it particularly well suited for distributed/parallel computing.

Summary:

• HMC: good for elongated weird target. Does not work with non continuous function.
• SMC: good for multimodal and not-continuous cases. Might converge slower or use more computing power for high dimensional weird shapes.

Source: Most of the images come from a paper I wrote combining the 2 Methods (Hamiltonian Sequential Monte Carlo). This combination can simulate pretty much any distribution we can throw at it, even at very high dimensions.