# 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.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 1, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7947440147399902, "perplexity": 1197.9213180767504}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-47/segments/1573496668682.16/warc/CC-MAIN-20191115144109-20191115172109-00403.warc.gz"}