Teh 2010 - Stick-Breaking Construction
Summary
Sethuraman’s construction writes with , , . It is the basis of truncated samplers and variational methods, and the target of the truncation check in practical DP mixtures.
Main Content
Stick-breaking representation (Sethuraman 1994; Teh Eq. 13)
Then . The law of is (Griffiths-Engen-McCloskey).
Intuition: start with a unit stick, break at , give the left piece to atom 1, then recursively break the remainder. The advantages over earlier existence proofs: it is direct, needs no regularity on or , and suggests novel inference.
Properties used in practice.
- , geometric decay, so weights decrease exponentially. Small puts most mass on few atoms; large spreads mass.
- Truncation at sticks sets ; truncation error after sticks is with mean (leftover mass). A truncation is adequate when the leftover mass is negligible, which can be checked a posteriori.
- Ordering by size is only stochastic; atoms are labelled by index, which creates label switching in posteriors (Concept - Label Switching and Label-Invariant Summaries).
Examples
How many sticks are needed?
For and a leftover-mass tolerance of : , so sticks. For : , so .
import numpy as np
rng = np.random.default_rng(0)
def gem(alpha, K):
b = rng.beta(1, alpha, K)
return b * np.concatenate([[1], np.cumprod(1 - b)[:-1]])
w = gem(2.0, 50)
print(w.sum(), w[:3]) # ~1, then decreasing weights
print(np.ceil(np.log(1e-3) / np.log(2/3))) # 17 -> use 18PyMC-style sketch (untested, PyMC 5)
import pymc as pm, pytensor.tensor as pt
K = 20
with pm.Model() as m:
alpha = pm.Gamma("alpha", 1.0, 1.0)
w = pm.StickBreakingWeights("w", alpha=alpha, K=K - 1) # length K, sums to 1
mu = pm.Normal("mu", 0, 10, shape=K)
sd = pm.HalfNormal("sd", 5, shape=K)
pm.NormalMixture("y", w=w, mu=mu, sigma=sd, observed=y)
# diagnostics: leftover mass, label-invariant summaries (co-clustering), not component labelsConnections
DP mixtures and sampling: Teh 2010 - DP Mixture Models and Applications. The IBP has an analogous stick-breaking form with : Griffiths 2011 - Two-Parameter IBP, Stick-Breaking and Beta Process. Mean-field VI on the stick-breaking parameterisation: Mean-Field Family and Coordinate Ascent VI (CAVI).