36
votes
Accepted
Hamiltonian Monte Carlo vs. Sequential Monte Carlo
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 ...
16
votes
What is the purpose of "transformed variables" in Stan?
Objects declared in the transformed parameters block of a Stan program are:
Unknown but are known given the values of the objects in the ...
15
votes
Accepted
For Hamiltonian Monte Carlo, why does negating the momentum variables result in a symmetric proposal?
One of the reasons why the original construction of Hamiltonian Monte Carlo can be tricky to understand is that it is more restrictive than necessary, if only to simplify the theoretical proofs. In ...
14
votes
Accepted
Hamiltonian monte carlo
I believe the most up-to-date source on Hamiltonian Monte Carlo, its practical applications and comparison to other MCMC methods is this 2017-dated review paper by Betancourt:
The ultimate ...
13
votes
Accepted
Hamiltonian Monte Carlo: how to make sense of the Metropolis-Hasting proposal?
The deterministic Hamiltonian trajectories are useful only because they are consistent with the target distribution. In particular, trajectories with a typical energy project onto regions of high ...
11
votes
Accepted
Understanding the Typical Set for Markov chain Monte Carlo sampling
$\mathrm{d}q$ is uniform across the entire space and that's the problem! Unfortunately as we consider higher-dimensional spaces out intuition of uniform starts failing us and we end up in conceptual ...
11
votes
Accepted
Hamiltonian Monte Carlo (HMC): what's the intuition and justification behind a Gaussian-distributed momentum variable?
It's not so much that we are after $\pi(E)$, it's just that if $\pi(E)$ and $\pi(E|q)$ are dissimilar then our exploration will be limited by our inability to explore all of the relevant energies. ...
9
votes
Accepted
Plotting the typical set of a Gaussian distribution
One of the confusing things about concentration of measure is that we're trying to demonstrate deviations away from our naive, low-dimensional intuition. Here that is demonstrated in how the radial ...
9
votes
Accepted
How does Hamiltonian Monte Carlo work?
Before answering the question about an intuitive way to think about Hamiltonian Monte Carlo, it's probably best to get a really firm grasp on regular MCMC. Let's set aside the satellite metaphor for ...
8
votes
Accepted
MCMC sampling for a model with a multinomial choice--so the parameters need to sum to 1
The problem does not seem to stand with MCMC but with the prior modelling. If the data comes from a Multinomial distribution
$$\mathcal D_k(n,p_1,\ldots,p_k)$$
where the probability vector $\mathbf{p}=...
7
votes
Accepted
Proposal distribution in Hamiltonian Monte Carlo
The proposal distribution for the original Hamiltonian Monte Carlo algorithm is just a delta function around the final point in the numerical trajectory with the momentum negated,
$$K(z' | z) = \delta ...
7
votes
Hamiltonian Monte Carlo for dummies
As mentioned in the comments by cwl, bjw and Sycorax, the following resources are useful (I can recommend them from my own experience as well):
Statistical rethinking by R. McElreath has a short but ...
7
votes
Accepted
Reconciling Langevin MC methods as one-step HMC versus as diffusion or brownian motion
The easiest way to understand why Langevin dynamics targets the "correct distribution" is to look at the corresponding Fokker-Planck equation.
Let me be more precise. Let us assume that our target ...
6
votes
Accepted
Why does Stan initialize an MCMC chain with a random value generated uniformly from [-2, 2] instead of a random value generated from the prior?
The biggest problem with drawing from the prior is if a user is using a rather flat prior. For example, if a user is using a logistic regression model and they don't want the prior to have much of an ...
5
votes
Accepted
Can I use Hamiltionian Monte Carlo when my likelihood is not a direct function of my parameters?
It looks like you might be re-inventing Approximate Bayesian Computation (ABC). The core of ABC is to simulate many synthetic datasets and compare the synthetic data to the observed data based on some ...
4
votes
Hamiltonian monte carlo
Hamiltonian Monte Carlo (HMC), originally called Hybrid Monte Carlo, is a form of Markov Chain Monte Carlo with a momentum term and corrections.
The "Hamiltonian" refers to Hamiltonian mechanics.
...
4
votes
Accepted
What does it mean to have a "transient state" or a "transient phase" in an Ising model?
Conventional approaches uses something called single-spin-flip dynamics, depending on acceptance probability, either Metropolis or Glauber dynamics. See IsingLenzMC R package and associated paper ...
3
votes
For Hamiltonian Monte Carlo, what should be done when one of the steps in the leapfrog path yields no solution?
For the most basic version of HMC, the procedure is:
using the leapfrog integrator, generate a trajectory $L$ steps long, which approximates Hamiltonian dynamics
propose a move to the $L^{\text{th}}...
3
votes
Accepted
What could lead to this misbehavior for the expected sample size (ESS)?
This is actually not an error - it is possible for the effective sample size to be larger than the actual sample size. This means that your MCMC samples provide more information about the parameter, ...
2
votes
Proposal distribution in Hamiltonian Monte Carlo
The proposal distribution in Hamiltonian Monte Carlo does not have an explicit form in general. Instead, samples from it are defined operationally: first sample an initial velocity and then move the ...
2
votes
Accepted
Is there an HMC algorithm that estimates a model with noncontinuous parameters?
Currently, no- such a solution does not exist. Core developers on PyMC3 actually addressed this, noting that it's a high impact problem but the solution remains over the horizon. (I'll dig for a ...
1
vote
How to diagnose HMC results like r-hat for a Mixture Model?
This is only a partial answer, but in general you can go a long way by adding an order constraint to your model: enforcing $\theta_1 \lt \theta_2 \lt\dots\lt \theta_k$. This is trickier to do if $\...
1
vote
Accepted
volume preservation in MCMC
Better late than never. I also thought about this question when I first came across the paper, and my self-given answer is the following. In MCMC, if we are at $x$ and we get at $y$ what we want to ...
1
vote
Accepted
Regarding Gibbs sampling and HMC in fitting Bayesian model, their differences and advantages
It is incorrect to state that a Gibbs sampler requires the exact densities of the full conditionals. A Gibbs sampling algorithm requires a collection of conditional distributions that
correspond to a ...
1
vote
Can someone explain how dual averaging helps the No U-Turn Sampler (NUTS) choose step-size adaptively?
I stumbled on this while looking for an answer to my own misunderstanding of the step size algorithm, so your mileage my vary on this answer...
With that said, the idea is that the slice sampler is ...
1
vote
Can I do HMC with the wrong Hamiltonian?
If I understood well, the critical point in the second step of the HMC algorithm is that the proposal is volume preserving and reversible, but I am free to use another position energy function than ...
1
vote
Strange substitution in HMC
If $K$ is a Markov kernel(with density $k$) with stationary distribution $P$ (with density $p$), then, if $(X_t)_t$ is a stationary Markov chain associated with $K$,
\begin{align*}\mathbb E\left[\frac{...
1
vote
Accepted
NUTS algorithm efficient transition kernel
The way to interpret this is as a function that could be applied to any potential $w'$. Specifically,
When $\lvert \mathcal C^\mathit{new} \rvert > \lvert \mathcal C^\mathit{old} \rvert$, $T$ ...
1
vote
For Hamiltonian Monte Carlo, why does negating the momentum variables result in a symmetric proposal?
Below is only my opinion since I am also a beginner to HMC.
I think it's already clear in your desciption. The negation of momentum is unnecessary in practice because we actually only want the ...
1
vote
Accepted
How to know if the derivatives exist in Hamiltonian Monte Carlo?
The following is a rough exposition of what the requirement for differentiability on the parameters means here.
$U$ involves the log posterior up to an additive constant where $\theta$ are the model ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
hamiltonian-monte-carlo × 51markov-chain-montecarlo × 41
bayesian × 14
monte-carlo × 13
sampling × 7
metropolis-hastings × 7
simulation × 5
gibbs × 3
stan × 3
mcmc-acceptance-rate × 3
probabilistic-programming × 2
r × 1
machine-learning × 1
probability × 1
distributions × 1
mathematical-statistics × 1
normal-distribution × 1
mixed-model × 1
forecasting × 1
inference × 1
sample-size × 1
likelihood × 1
markov-process × 1
prior × 1
multinomial-distribution × 1