On 11/28/12 11:44 PM, Jeffrey Arnold wrote:
> Thanks Ben and Bob. I have a somewhat better intuition now. That part of the reference manual looks really good.
>
> This is somewhat related, but does parameter expansion have any effect in Stan?
I'll quote from Matt, who's much more articulate on
these matters:
From Matt Hoffman, 14 Aug 2012
=========================================
All I did was replace the hierarchical prior
σ ~ U(0, 1000)
μ ~ N(0, 1000)
θ_j ~ N(μ, σ)
with the equivalent non-hierarchical prior
σ ~ U(0, 1000)
μ ~ N(0, 1000)
\tilde θ_j ~ N(0, 1)
θ_j = \tilde θ_j * σ + μ.
Basically, it's just a change of variables that makes the nasty
heavy-tailed hierarchical prior into a simple product prior on a
different measure space. In graphical model terms, this reads as
taking apart the hierarchy and making all of the nodes point directly
at the data.
Empirically, the model as originally written fails to get into the
left tail of σ (and rejects a lot when it gets close), whereas the
reparameterized model has no such problems. Mixing also seems faster,
which isn't too surprising, given that the reparameterized model has a
much smaller range of log-probabilities (std. dev. of about 2.6)
compared with the original model (std. dev. of about 6.5).
=========================================
It's like the funnel only a more realistic example and Matt
throws in an explanation of why it works.
> More generally, a list of which
> heuristics / tricks from gibbs sampling carry over to HMC would be very useful.
We're still working a lot of that out ourselves!
What will help most for Stan is any transformation that
makes the posterior more like N(0,I).
Either scaling or rotation on their own should be OK,
but together they can be problematic.
In general, it helps to apply transforms if they
-- eliminate varying scales in different parts of the posterior
that would ideally be suited to different step sizes
-- anything that gets rid of correlation related to the above
The funnel transform is an example of both. Also,
-- anything that makes the scale more uniform
at varying points in the space
For the artificial funnel example, there's strong correlation
driving position-dependent scaling, which is easy to convert
to unit normal.
-- anything that makes thin tails or thick tails more normal
The above example from Matt is an example of thinning the tails,
and the triangle distribution (in the current v.1.0.3 manual)
by transforming through constraints -- that's an implicit logit
transform that changes the tail behavior.
Anyone else have anything else for the list? I can include
it in the reparameterization section of the manual.
- Bob