Imagine you want to draw random samples from a distribution over many variables — say, the joint state of all pixels in an image, or the topic assignments for every word in a document. Writing down the full distribution is one thing; drawing from it is quite another.
In high dimensions, the joint density is almost never something you can sample directly. Integration is intractable, and rejection sampling wastes nearly every candidate. You need a cleverer way in.
Gibbs sampling offers a surprising answer: instead of tackling the whole distribution at once, fix all variables but one and sample that one from its conditional. Then move to the next variable, and the next, cycling endlessly. The resulting sequence of states forms a Markov chain, and — under mild conditions — its long-run distribution converges to exactly the joint distribution you wanted.
Named for physicist J. Willard Gibbs and introduced into statistical computation by Stuart Geman and Donald Geman in 1984 in the context of image restoration, Gibbs sampling became the workhorse of Bayesian statistics and probabilistic machine learning. It is one of the clearest examples of how a hard global problem dissolves into a sequence of easy local ones.
Comments
Loading comments...