Part III’s tools now build actual generative models. We start where the deep learning story began: Boltzmann machines.
§20.1 Boltzmann machines
A Boltzmann machine boltzmann machine An energy-based model, today usually one WITH latent variables (an EBM without latents is more often called a Markov random field / log-linear model). defined in ch. 16 — open in glossary is an energy-based model over binary variables. With hidden units it splits into visible and latent :
The Boltzmann machine energy (eqs 20.2–20.3)
| visible–visible and hidden–hidden couplings — the FULLY connected Boltzmann machine allows them (the RBM will forbid both) | weight matrices | |
| the visible–hidden couplings | n_v × n_h | |
| low energy = high probability, via P(v,h)=exp(−E)/Z. Adding hidden units makes the BM a UNIVERSAL approximator of discrete distributions | scalar |
Like all Boltzmann machines it has an intractable partition function, so training uses the maximum-likelihood approximations of chapter 18. One striking property: the update for a weight between two units depends only on the two units’ co-statistics — a local rule.
Fire together, wire together
In the positive phase, two units that frequently activate together have their connection strengthened — a Hebbian learning hebbian learning 'Fire together, wire together': a local learning rule strengthening a connection between two units that frequently co-activate; the Boltzmann-machine positive phase is an instance. defined in ch. 20 — open in glossary rule, and one of the oldest hypotheses for how biological neurons learn. It is “biologically plausible” in a way back-propagation is not: a synapse can update from only the firing of the two cells it physically touches, with no separate network to carry gradients backward. (The negative phase is harder to explain biologically — one speculation from §18.2 is that dream sleep supplies its samples.)
§20.2 Restricted Boltzmann machines
The restricted Boltzmann machine restricted boltzmann machine (rbm) An energy-based model with binary v, h and energy −bᵀv − cᵀh − vᵀWh, with NO intra-layer edges → factorial p(h|v) & p(v|h) with sigmoid conditionals → efficient block Gibbs sampling; the canonical deep-learning graphical model. defined in ch. 16 — open in glossary (harmonium) is the workhorse — the building block stacked into the deeper models below. “Restricted” = no visible–visible and no hidden–hidden edges (drop and ), leaving a bipartite graph:
Its energy is the interaction term alone, (eq 20.5). The partition function is provably intractable, so can’t be evaluated — but the bipartite restriction buys everything that matters.
§20.2.1 The gift of the bipartite structure
Because no unit shares a layer with a unit it depends on, the layer-wise conditionals factorize, and each is a plain sigmoid:
Factorial, sigmoidal conditionals (eq 20.14)
| the hidden units are conditionally INDEPENDENT given v (and vice versa), so the whole layer is one product of Bernoullis | factorial | |
| each conditional is exactly the RBM sigmoid of §16.7.1 — cheap to evaluate AND to sample from | probability |
Factorial conditionals mean block Gibbs sampling: draw the entire hidden layer at once, then the entire visible layer, alternating. Replay it — this is the Markov chain the RBM is trained and sampled with:
No hidden–hidden or visible–visible edges means every unit in a layer is conditionally independent of the rest of its layer given the other layer — so the whole block samples at once, each unit from a simple sigmoid. Alternating h, v, h, v… is block Gibbs sampling, and it is what makes the RBM cheap to train (ch18).
§20.2.2 Training the RBM
Because we can evaluate and differentiate and sample efficiently by block Gibbs, the RBM trains with any of the intractable-Z methods of chapter 18:
| What training needs | The RBM gives it | |
|---|---|---|
| A tractable positive phase | the posterior p(h|v) | exact, in closed form |
| A cheap negative phase | samples from the model | efficient block Gibbs |
| Compatible training methods | an intractable-Z method | CD · SML · ratio matching |
This combination — exact posterior, easy sampling — is what makes the RBM the reusable brick of deep probabilistic models. Stack it and the difficulties return: the deep belief networks and deep Boltzmann machines next combine intractable partition functions and intractable inference.
Check yourself — Boltzmann machines & RBMs
1.What does adding hidden units to a Boltzmann machine achieve?
2.Why is Boltzmann machine learning called 'local' and biologically plausible?
3.What does the 'restricted' in restricted Boltzmann machine mean, and why does it matter?
4.Why is the RBM the easiest undirected model to train, compared to a deep Boltzmann machine?
5.Predict the outcome — in BlockGibbsLab you click 'sample the hidden block' for an RBM. What is computed?