CMU Introduction To Deep Learning 11-785, Fall 2026: Lecture 27
Overview
The lecture develops stochastic Hopfield networks as Boltzmann machines, showing how Boltzmann probabilities lead to logistic neuron updates and how maximum-likelihood training separates updates on desired patterns from updates on freely sampled states. To expand memory beyond the visible pattern size, it adds hidden “don’t-care” neurons whose values are inferred, then introduces restricted Boltzmann machines (RBMs) as a faster architecture that supports short alternating updates and was used to pretrain deep classifiers.
Key takeaways
- A Hopfield memory is stationary when every neuron agrees with its local field and stable when small perturbations return to the stored pattern.
- Hebbian Hopfield learning has limited capacity: the lecture gives bounds of N/(4 log N) for perfect recall and N/(2 log N) under an error-tolerant criterion, despite an O(N) theoretical scale for intended memories.
- A stochastic Hopfield neuron samples +1 according to a logistic function of its local field because the ratio of the two possible neuron states’ Boltzmann probabilities is logistic.
- Boltzmann-machine learning uses a positive phase on target patterns and a negative phase on freely sampled states; their difference is the weight gradient.
- Hidden units increase representational capacity by allowing multiple low-energy extensions of one visible pattern, while training can ignore hidden values by maximizing the visible pattern’s marginal probability.
- An RBM’s bipartite structure removes within-layer connections, enabling alternating visible-hidden updates and making it practical to use RBM weights for deep-network pretraining.
Chapters
- The class opens as the final lecture of the semester, with brief microphone and presentation setup.
- A Hopfield network is a fully connected binary network with symmetric weights, where each neuron responds to the local field from the other neurons.
- Sequential neuron updates lower network energy in the deterministic model.
- Unlike conventional memory, which retrieves data by address, a Hopfield network retrieves a pattern from its content.
- A noisy or incomplete pattern can be cleaned up by network evolution; examples included Bugs Bunny and Chip ’n Dale images.
- An image with n × n pixels requires n² neurons, one for each pixel.
- A stored pattern is stationary when every neuron’s local field agrees with that neuron’s current value.
- A stationary pattern is stable when a small perturbation leads the network back to the same pattern.
- The lecture revisits Hopfield’s estimate of about 0.14N stored patterns under Hebbian learning, while noting later capacity bounds of N/(4 log N) for perfect recall and N/(2 log N) under an error-tolerant criterion.
- Hebbian learning has limited capacity; the theoretical number of intended memories can scale as O(N), though excessive storage also creates many spurious memories.
- The proposed capacity strategy appends K hidden bits to N visible bits, creating patterns with N + K neurons.
- Only visible neurons encode the pattern of interest; the hidden neurons provide extra representational capacity.
- For a 256-bit image, the example appends 768 hidden bits, turning each stored representation into a 1,024-bit pattern.
- Random hidden-bit assignments can extend visible patterns, but tailored assignments may improve recall of the visible portion.
- A single visible pattern can be paired with multiple hidden extensions, increasing the number of low-energy states that retrieve the same visible content.
- The lecture frames hidden-bit selection as finding extensions that make the visible pattern more memorable.
- The Ising-model analogy adds temperature: physical dipoles can keep flipping rather than settling permanently into one configuration.
- A thermodynamic system is described by a probability distribution over states, with expected energy computed from state probabilities and state energies.
- Entropy, written as −K times the sum of P log P, represents disorder; Helmholtz free energy balances expected energy against this entropy.
- Minimizing Helmholtz free energy yields the Boltzmann distribution, where a state’s probability is proportional to exp(−E/(KT)).
- Higher-energy states remain possible at nonzero temperature but become exponentially less likely.
- Simulated annealing gradually lowers temperature so the system can move toward a global minimum rather than becoming trapped immediately in a local one.
- A stochastic Hopfield network updates neurons probabilistically so its equilibrium state distribution follows the Boltzmann distribution.
- At nonzero temperature, a neuron can flip even when the flip raises energy; the probability depends on the local energy difference.
- The network’s weights define the energy landscape and therefore the distribution from which the network generates states.
- Flipping a single neuron changes the energy by a quantity determined by its local field, including weighted neighboring states and its bias.
- Taking the ratio of Boltzmann probabilities for the neuron being +1 versus −1 produces a logistic conditional probability.
- The update samples +1 with that logistic probability and −1 otherwise, connecting the familiar logistic activation to statistical mechanics.
- Inference cycles through neurons, computes each local logistic probability, and samples a new binary value.
- After an initial settling period, repeated samples can be averaged to estimate the network’s expected state and recover a binary output.
- For denoising, all neurons can evolve; for completion, known input bits stay fixed while missing bits are sampled.
- The temperature scales the local field inside the logistic update, controlling how sharply neuron probabilities favor lower-energy values.
- At T = 1 the standard field behavior is recovered; as T approaches zero, updates become deterministic, and as T approaches infinity, states become equally likely.
- Because updates are stochastic, convergence can be monitored with a running average of energy or log probability rather than a single step.
- Training a Boltzmann model means increasing the probability of target patterns and reducing probability assigned to unwanted patterns.
- The gradient has a positive contribution from target data and a negative contribution from states sampled while the network runs freely.
- Both contributions resemble Hebbian averages of neuron-pair products, with the negative phase discouraging spurious memories.
- The normalization term in the log likelihood requires an expectation over all possible network states, an exponential-size space that cannot be enumerated for large networks.
- The lecture estimates this negative-phase expectation by repeatedly initializing and evolving the network to collect samples.
- For each weight, the update compares average neuron-pair products in target patterns against average products in freely generated samples.
- With hidden neurons, each complete state combines a visible pattern V and a hidden pattern H; training maximizes the marginal probability of V.
- The positive phase fixes visible units and samples hidden units, producing candidate low-energy extensions for each training pattern.
- The negative phase releases the entire network and samples states that compete with the desired visible patterns.
- A four-neuron illustration stores two target patterns and compares their average pairwise products with those from unwanted states.
- When more capacity is needed, extra neurons are added and connected to both the original and one another.
- Clamping each target’s visible bits and allowing the added neurons to settle produces extended target patterns for the positive update.
- A restricted Boltzmann machine removes visible-to-visible and hidden-to-hidden connections, leaving a bipartite visible-hidden graph.
- This structure allows alternating visible and hidden updates; the lecture describes a short three-step approximation using early and later pairwise samples to reduce computation.
- RBMs became useful for pretraining deep classifiers: learned RBM weights initialized the classifier and helped it converge faster to better solutions.
- The lecture closes by noting RBM uses in generative modeling, classification, and regression, while acknowledging that sampling can still be slow.
- The final minutes mention extensions including deep Boltzmann machines, wake-sleep algorithms, and mean-field approximations.
- For further study, the class points students toward CMU courses in machine learning, reinforcement learning, deep learning theory, and robotics.
- The lecture ends with the course’s final thanks and applause.
Transcript excerpt
0:10 I probably just need to stretch it. >> This is my laptop going bad. >> Okay, let's see if it all right. Top one more. [snorts]
1:11 >> Waiting for my mic. And the microphone speak up. >> Because sometimes I go to the board. >> Sorry. >> I I'll speak >> My name is kind of like just pick up the audience. >> Okay, I'll speak up I'll speak loudly when I'm there. >> Um >> I felt it. I looked over. Something is swelling in my ear. [laughter] I was like wishing it was comfortable
1:57 [laughter] >> Yeah, I'm so down. >> Why? >> The last class of the semester. >> It's exciting. >> Yeah, so it's a full house and for the last time this semester I had to wake up at 4:30 or 5:00. Do you live in like Pittsburgh? [clears throat] >> Give me time. I'm slow. Come on. I don't jump up. I think like brush your teeth, have a shower, have a breakfast come because once I'm here. [snorts]
2:51 Good morning everybody. Can you hear me? Okay. Welcome to this the last class of the semester. And uh I assume that all of you are fully aware by now that project presentation that you have First of all upload videos by the end of by the end of the week, right? So I'm missing my mic until Masa comes here. I'm going to try to speak into the desktop mic.
3:39 I will wander over to the board and when I do please remind me to speak loudly. Today is not a loud voice today for me. I'm going to try nonetheless just so that I can be picked up, right? So uh what was the last thing we discussed? >> Energy based model. What kind of were
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Carnegie Mellon University Deep Learning.