Global and local variables
The topic Latent Dirichlet allocation ended with a cost problem. Mean-field VI for LDA updates the proportions and responsibilities of every document, and only then recomputes the topics . For a corpus of a million documents the topics move once per million local updates. This topic makes them move after every small batch.
The trick works for a whole class of models. Their joint density splits into a part shared by all objects and one factor per object:
Here are the global variables: every object depends on them. Each is a local variable: it belongs to object alone, and given the pair is independent of all other pairs. In LDA the topics are global, while the proportions and the assignments of a document are local; so in LDA the global variables are written , and the letter keeps its LDA meaning.
The running example is the two-component Gaussian mixture of the topic EM and Bayesian PCA, now with a prior on the means. The components have unit variances, and to keep the example small their weights are fixed at . Each mean gets a broad prior:
The means are global, the labels are local.
The mean-field family mirrors the split: , with a global variational parameter and local parameters (for the mixture, the responsibilities ). The ELBO splits the same way, into a global term and a sum of local ones:
Coordinate ascent from the topic Variational inference alternates two steps: update all local parameters, then update . The first pass is the most wasteful one: local updates are computed under a random initial , and all of them are used for a single global step.