Betancourt 2015 - Hierarchical Geometry and the Funnel
Summary
A hierarchical model groups local parameters θi under shared global parameters ϕ. With sparse data the posterior is a funnel: a region of high density but low volume below a region of low density but high volume, with comparable probability mass and sharply varying curvature. Because the correlation between the log-scale v and each θi flips strongly with position, no global rotation or rescaling removes it.
Overview
The exposition treats the one-level hierarchy as typical of all hierarchical pathologies. The footnote notes that not all parameters need share one hierarchy (multilevel models).
Main Content
One-level hierarchical model (eq. 1, Fig. 1)
Data D=(Di), local parameters θ=(θi), global parameters ϕ:
π(θ,ϕ∣D)∝i=1∏nπ(Di∣θi)π(θi∣ϕ)π(ϕ).
The θi interact only through ϕ, which lets data inform all of the θi (partial pooling).
One-way normal model (eq. 2)
yi∼N(θi,σi2), θi∼N(μ,τ2), i=1..I. In the general notation D=(yi,σi), ϕ=(μ,τ), θ=(θi). “Global” and “local” labels break down in multi-layer models.
Why it is pathological. All n contributions at the bottom depend on ϕ, so a small change in ϕ produces large changes in density. With sparse data the density has a funnel shape. Both regions carry comparable probability mass, so a successful sampler must cope with dramatic variation in curvature.
The funnel distribution (Neal 2003; Fig. 2)
With no data, μ=0 and a log-normal prior on the variance τ2=ev:
π(θ1,…,θn,v)∝i=1∏nN(θi∣0,(e−v/2)2)N(v∣0,32).
Notation note: the formula as printed in Sec. I uses xi for the local variables and scale e−v/2, while the Appendix Stan model is theta ~ normal(0, exp(v/2)). The two differ by v→−v and describe the same funnel up to reflection; v∼N(0,32) marginally either way. Footnote 2: the exponential link between latent v and variance arises naturally whenever a positive parameter is transformed to an unconstrained one for sampling.
Position-dependent correlation
The hierarchy induces large correlations between v and each θi, with a strength that varies strongly with position (Fig. 2 visualises the eigenvectors of ∣∂2logp/∂θi∂θj∣ scaled by eigenvalues). The funnel’s symmetry makes the correlations cancel globally, so no global correction (rotation or rescaling of parameters) can simplify the distribution.
Reproducing the funnel in numpy
import numpy as nprng = np.random.default_rng(0)n, N = 100, 100000v = rng.normal(0, 3, N) # marginal of vtheta = rng.normal(0, np.exp(v/2)[:, None], (N, n)) # Stan model: theta ~ normal(0, exp(v/2))# A fixed step size h must satisfy h*sqrt(curvature) < 2: curvature in theta_i is exp(-v), soprint(np.exp(-v).min(), np.exp(-v).max()) # curvature spans many orders of magnitude
With v∼N(0,9) the curvature e−v varies over more than ten orders of magnitude across draws, which is why one step size cannot serve the whole funnel.
Examples (PyMC-style)
Centred (funnel-prone) vs non-centred parameterisation in PyMC 5 (untested sketch):
import pymc as pmwith pm.Model() as centred: mu = pm.Normal("mu", 0, 5); tau = pm.HalfCauchy("tau", 2.5) theta = pm.Normal("theta", mu, tau, shape=J) # funnel: divergences when tau -> 0 pm.Normal("y", theta, sigma, observed=y)with pm.Model() as noncentred: mu = pm.Normal("mu", 0, 5); tau = pm.HalfCauchy("tau", 2.5) z = pm.Normal("z", 0, 1, shape=J); theta = pm.Deterministic("theta", mu + tau*z) pm.Normal("y", theta, sigma, observed=y)