Show it a corrupted version of something it has seen. It falls back into the original.
Take a bunch of neurons, each either on (+1) or off (−1), and wire every neuron to every other one. That's the whole architecture — no layers, no input or output side. The pattern of on/off across all neurons is the state.
Now shape the wiring so that a handful of specific patterns become stable: once the network is in one, nothing wants to change. Every other state is unstable and slides toward the nearest stable one. Those stable states are the memories.
The consequence: you don't look a memory up by address, you look it up by resemblance. Half a face, a smudged letter, three notes of a song — feed in something close enough and the network completes it.
Every possible state has an energy. The learning rule digs valleys at the patterns you stored, and each neuron update can only ever move the state downhill. So the network cannot oscillate or wander — it always settles. This one picture explains essentially everything else.
Schematic. Blue dots are stored patterns. The grey circle is a spurious minimum — a valley nobody asked for, formed where stored patterns blend. Real landscapes live in 2N dimensions; this is a 1-D slice.
100 neurons in a 10×10 grid, three letters stored. Corrupt the picture, then hit Recall: neurons are updated one at a time, each just doing on if my neighbours pull me on. Energy drops monotonically until nothing changes.
Click any cell to flip it by hand.
Energy after each neuron update. It only ever goes down — that's the guarantee.
Ready.
One pass, no gradient descent, no training loop. For each stored pattern, strengthen the connection between every pair of neurons that agree in it and weaken it between pairs that disagree — neurons that fire together, wire together.
Wij = Σpatterns ξiξj → symmetric, zero diagonal. That symmetry is what makes the energy landscape well-defined and the network guaranteed to settle.
Not much, and it fails badly rather than gracefully. Cram in too many patterns and the valleys merge into each other; past a sharp threshold the network stops recalling anything you stored.
Simulated: 100 neurons, patterns cued with 5% noise, 40 trials per point. The cliff sits near α = 0.138 — about 0.14 memories per neuron, the classic Amit–Gutfreund–Sompolinsky capacity. 100 neurons buy you roughly 14 memories, and 10,000 weights to store them in.
Hopfield's 1982 paper made "memory" a physics problem: an energy function whose minima you can design. That framing seeded Boltzmann machines and the whole energy-based-model line, and won Hopfield a share of the 2024 Nobel Prize in Physics.
The capacity ceiling turned out to be an artefact of the simple Hebbian rule. Swap the energy function for a sharper one and capacity grows exponentially with N — and the resulting update rule is, term for term, the softmax attention step inside a Transformer. "Attention is a Hopfield network" is a literal statement, not an analogy.