Questions tagged [hamiltonian-monte-carlo]
Tag for questions related to Hamiltonian Monte Carlo.
54
questions
0
votes
0
answers
10
views
Combining MCMC with Variatonal Inference
I have a Gibbs sampler that is mixing terribly slowly. I have a hunch that if I sample a parameter pair as a single block, it would improve convergence.
I tried HMC within Gibbs, but it's also slow. I ...
0
votes
1
answer
29
views
How to diagnose HMC results like r-hat for a Mixture Model?
I have the following distribution $$
\begin{align}
\boldsymbol \pi&\sim\text{Dirichlet}([1,\cdots 1]\in R^K)\\
\boldsymbol \theta&\sim P(\boldsymbol \theta)
\\
\mathbf y&\sim \sum _{i=1}^K\...
2
votes
0
answers
14
views
Lots of variability in the effective sample size but stable parameter estimates?
I ran 4 chains with NUTS and made a forest plot, but I cannot show the plot here. In words, what I am seeing is the there is a lot of variability in the effective sample size (ESS) in the chains. ...
0
votes
0
answers
32
views
Does Hamiltonian Monte Carlo explore the target distribution uniformly?
I am trying to incorporate HMC into an algorithm that requires me to generate samples that are uniformly distributed in the distribution being sampled. Ie, the samples are not necessarily uniformly ...
1
vote
0
answers
20
views
What is the intuition for the limited variation in potential energy for HMC?
In A General Metric for Riemannian Manifold Hamiltonian Monte Carlo (Betancourt, 2013), the author writes:
The first [5] and still most common choice of the conditional density, $\pi(p|q)$, is a ...
1
vote
0
answers
35
views
Prior term in SGHMC implementation
I am working with SGHMC (Stochastic Gradient Hamiltonian Monte Carlo) models.
I found an implimentation of the algorithm in pytorch here. The part of the code that represents momentum variable update (...
2
votes
1
answer
85
views
What could lead to this misbehavior for the expected sample size (ESS)?
I am using Hamiltonian Monte Carlo (HMC) to sample the posterior of a continuous-time Markov Chain (CTMC).
However, after running 10 parallel chains with 100 draws each, the effective sample size (ESS)...
0
votes
0
answers
17
views
Why is HMC sampling parallelizable after stationary?
why is HMC sampling parallelizable after stationary? Is it related with some kind of sequential bottlenecks?
0
votes
0
answers
17
views
Beginner's example: fitting algorithm to obtain the estimated posterior distributions of the input model parameters using black box models
Some years ago when I was a student I used the DiffeRential Evolution Adaptive Metropolis (DREAM) algorithm (Vrugt 2016) in MATLAB with the goal of fitting experimental data (e.g., the concentration ...
2
votes
0
answers
91
views
The guidelines for choosing different MCMC algorithms [closed]
MCMC has several types of algorithms: Metropolis-Hastings, Gibbs, Adaptive MH, Hamiltonian Monte Carlo. What are their respective pro/cons, and how to choose them in the Bayesian analysis?
2
votes
1
answer
106
views
What does it mean to have a "transient state" or a "transient phase" in an Ising model?
I downloaded a simple implementation of the Ising model in C# from this link.
I have understood more or less the entire code except the following routine:
...
4
votes
0
answers
654
views
Hamiltonian Monte Carlo vs. "Metropolis-Hastings with a Hamiltonian step"
In Hamiltonian Monte Carlo the proposal is accepted with probability:
$$
\alpha\left(\mathbf{x}_n(0),\mathbf{x}_n(L\Delta t)\right)
=
\min\left(1, \frac{\exp\left[-H\left(\mathbf{x}_n(L\Delta t),\...
2
votes
0
answers
80
views
Hamiltonian trajectory stays in the typical set?
I'm currently studying Hamiltonian MCMC by reading Betancourt's 2014 and Neal's 2011 pedagogical papers, but I still don't understand why following a Hamiltonian trajectory for our proposed update ...
1
vote
0
answers
62
views
volume preservation in MCMC
In the paper of MCMC using Hamiltonian dynamics, there is the following statement on volume preservation. What does it mean exactly? I am not very clear about the ...
0
votes
0
answers
22
views
what is the advantage of using Hamilton dynamics in sampling methods? [duplicate]
I am wondering apart form being gradient based sampling methods, what is the advantages of using Hamiltonian MCMC?
0
votes
0
answers
21
views
Use Monte Carlo to produce new 'p' correlated data from existing data [duplicate]
As mentioned above, I have a problem where I need to generate new data Y from an existing data X such that Y is p correlated to X.
I know their are several ways to do it but I want to know if monte ...
2
votes
0
answers
175
views
Step-size adaptation of NUTS within Gibbs
I am trying to solve a hierarchical problem with a Gibbs sampler. I do not have closed-form expressions for the conditionals, thus I have to use another MCMC method within the Gibbs scheme to sample ...
1
vote
1
answer
520
views
Regarding Gibbs sampling and HMC in fitting Bayesian model, their differences and advantages
I have a question regarding the two MCMC algorithms, Gibbs sampling and Hamiltonian Monte Carlo (HMC) for performing the Bayesian analysis.
If using Gibbs sampling, my understanding is that we need to ...
8
votes
1
answer
732
views
MCMC sampling for a model with a multinomial choice--so the parameters need to sum to 1
this is a head-scratcher for me, but a very interesting problem. So I have a stochastic simulation model for a hiring process. Basically different groups get hired into a company with different ...
3
votes
0
answers
186
views
Hamiltonian Monte Carlo (or Langevin Monte Carlo) on a Sphere
I want to perform Hamiltonian Monte Carlo (HMC) or Langevin Monte Carlo (LMC) on a spherical domain $\mathbb{S}^{D-1}$ embedded in a Euclidean space $\mathbb{R}^D$. My energy function is a deep neural ...
1
vote
0
answers
58
views
NUTS Sampler: runaway stepsize
I've been trying to implement a NUTS sampler according to the Gelman 2014 paper, and I've been finding that my log-stepsize $\log \epsilon$ runs away towards $-\infty$ for reasonable values of $\delta=...
2
votes
1
answer
318
views
Can someone explain how dual averaging helps the No U-Turn Sampler (NUTS) choose step-size adaptively?
I have read both the original NUTS paper and also the dual averaging paper by Nesterov but due to my lack of background knowledge in optimisation, I don't really understand how dual averaging works.
...
10
votes
1
answer
721
views
How does Hamiltonian Monte Carlo work?
I made the below graphic to explain how I currently understand the HMC algorithm. I'd like verification from a subject matter expert if this understanding is or isn't correct. The text in the below ...
1
vote
0
answers
65
views
What is the inference behind the momentum variable and the Kinetic energy for a weakly non-linear inverse problems in the HMC method?
We generate an auxiliary momentum variable in the HMC method to provide gradient for the propagation of trajectory (m, p) (model or position, momentum) in the phase space.
If we look into Newton's ...
0
votes
1
answer
62
views
Can I do HMC with the wrong Hamiltonian?
I am a novice HMC user. I am reading Neal's chapter in the Handbook of MCMC. I think I can present the HMC algorithm as :
Sample a new momentum
Propose a new momentum and a new position using a ...
3
votes
0
answers
82
views
Deriving a momentum proposal distribution for Hamiltonian Monte Carlo -- non-Gaussian kinetic energies
I am trying to understand how to derive the optimal way to generate momenta in HMC.
In the gaussian case, I think the approach is that if one samples proportional to the Gaussian, the log likelihoods ...
2
votes
1
answer
42
views
For Hamiltonian Monte Carlo, what should be done when one of the steps in the leapfrog path yields no solution?
When estimating a very complex (potentially discontinuous) model with Hamiltonian Monte Carlo, what should be done when one of the steps in the leapfrog path yields no solution? The issue is that ...
0
votes
1
answer
48
views
Strange substitution in HMC
I try to read paper, MCMC using Hamiltonian dynamics). The author, Neal states(P28):
To begin, Cruetz nodes that the following relationship holds when any Metropolis-style algorithm is used to ...
2
votes
0
answers
39
views
Optimal Scaling HMC proof
I'm reading the paper https://arxiv.org/pdf/1001.4460.pdf
I get very confused when reading the author proof of the theorem (4.2)
Here are few points.
(1) The expected squared jump distance is ...
5
votes
1
answer
544
views
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?
From Stan reference,
The default is to randomly generate initial values between -2 and 2 on
the unconstrained support
It seems to me that it makes more sense to randomly generate initial values ...
9
votes
2
answers
917
views
Reconciling Langevin MC methods as one-step HMC versus as diffusion or brownian motion
I have a basic understanding of Hamiltonian monte carlo and why it works. I've read that Langevin MC is basically a special case of HMC when you only step the dynamics forward a single timestep before ...
2
votes
1
answer
86
views
NUTS algorithm efficient transition kernel
I'm reading this paper, but I'm struggling to understand the following transition kernel.
$T(w^{'}|w,\mathcal{C})=\left\{\begin{matrix}
\frac{\mathbb{I}[w^{'}\in\mathcal{C}^{new}]}{|\mathcal{C}^{new}|...
1
vote
0
answers
116
views
Does specifying normalizing constant significantly improves Hamiltonian Monte Carlo?
From my understanding the energy function needs only be specified such that it is proportional to the log density, and not specifying the normalizing constant should not greatly impact the sampling ...
5
votes
1
answer
112
views
Is there an HMC algorithm that estimates a model with noncontinuous parameters?
Is there an HMC algorithm that estimates a model with noncontinuous parameters? All of the intuition I have for how HMC surfs around in the phase space is based on examples for posterior distributions ...
2
votes
0
answers
152
views
Why volume preservation is important for Metropolis update? [duplicate]
I think my question is naive but I would like to ask why why volume preservation is important for MCMC and specifically Metropolis update.I'm reading the following paper https://arxiv.org/pdf/1206....
0
votes
0
answers
22
views
Hamiltonian MCMC information gathering [duplicate]
I started gathering information about Hamiltonian MCMC and I would like to ask if someone knows some good papers or books.If it possible notes that give a detailed explanation of Hamiltonian MCMC.
...
4
votes
0
answers
186
views
Is the MC produced by HMC reversible?
I know that the deterministic dynamics in Hamiltonian Monte Carlo/Hybrid Monte Carlo are reversible and the numerical integrators one uses to approximate them are reversible too. But HMC consists of 2 ...
11
votes
1
answer
6k
views
What is the purpose of "transformed variables" in Stan?
I find references to transformed values in the Stan Reference and User Guides, and example code but no clear tutorial explanation. I'd be grateful for a link.
Michael Betancourt, in his Stan ...
4
votes
0
answers
167
views
Adaptive selection of Mass values in Hamiltonian Monte-Carlo?
I know there are good solutions for adaptive selection of path lengths and step-size for Hamiltonian Monte-Carlo (e.g. the NUTS sampler), but for the sampler to work efficiently we also require that ...
1
vote
1
answer
76
views
Can I use Hamiltionian Monte Carlo when my likelihood is not a direct function of my parameters?
By "not a direct function of my parameters" I mean the following. I have some observed K-dimensional data and a model that can generate synthetic data based on 6 free parameters.
I use this model to ...
10
votes
0
answers
1k
views
No-U-Turn Sampler (NUTS) for Hamiltonian Monte Carlo (HMC): how do I understand the doubling process?
I'm reading the original NUTS paper by Hoffman and Gelman, but couldn't fully understand the recursively doubling process.
The following figure is taken from the paper.
The NUTS process starts ...
15
votes
1
answer
2k
views
Hamiltonian Monte Carlo for dummies
Could you provide a step-by-step for dummies explanation of how Hamiltonian Monte Carlo work?
PS: I've already read the answers here, Hamiltonian monte carlo, and here, Hamiltonian Monte Carlo vs. ...
16
votes
1
answer
2k
views
Hamiltonian Monte Carlo: how to make sense of the Metropolis-Hasting proposal?
I am trying to understand the inner working of Hamiltonian Monte Carlo (HMC), but can't fully understand the part when we replace the deterministic time-integration with a Metropolis-Hasting proposal. ...
10
votes
1
answer
1k
views
Understanding the Typical Set for Markov chain Monte Carlo sampling
I started reading "A Conceptual Introduction to Hamiltonian Monte Carlo" today, and I've gotten stuck on understanding Betancourt's explanation of what a "typical set" is.
If $q_1, q_2, \ldots, q_n$ ...
11
votes
1
answer
2k
views
Hamiltonian Monte Carlo (HMC): what's the intuition and justification behind a Gaussian-distributed momentum variable?
I am reading an awesome introductory HMC paper by Prof. Michael Betancourt, but getting stuck in understanding how do we go about the choice of the distribution of the momentum.
Summary
The basic ...
13
votes
2
answers
1k
views
For Hamiltonian Monte Carlo, why does negating the momentum variables result in a symmetric proposal?
I have been going through Radford Neal's excellent HMC book chapter in detail. However, there is one detail that I'm really obsessing with now, and I'm not sure if I'm thinking about it right. When ...
7
votes
2
answers
828
views
Proposal distribution in Hamiltonian Monte Carlo
I have been reading A Conceptual Introduction to Hamiltonian Monte Carlo by Betancourt (https://arxiv.org/abs/1701.02434), which is a great introduction to HMC, but there is one part that I can't get ...
6
votes
1
answer
940
views
Plotting the typical set of a Gaussian distribution
There is this article where the author Michael Betancourt uses this image to convey the concept of the typical set in a distribution.
I would like to plot the typical set of a univariate or a ...
4
votes
1
answer
316
views
How to know if the derivatives exist in Hamiltonian Monte Carlo?
In section 3.2 of Radford Neal's take on HMC he says:
We must also be able to compute the partial derivatives of the log of the density function. These derivatives must therefore exist, except ...
27
votes
1
answer
5k
views
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 ...