Physics / Math
Hopfield memory
Damage a stored memory with a brush, predict whether it comes back, and watch the network repair it one neuron at a time - each flip lowering the energy by 2|h| - or fall into another memory or a spurious mixture, named as such.

What happens
The network is 100 Ising spins with Hebbian couplings, W_ij = (1/N) Σ ξ_i ξ_j over the stored patterns, energy E = −½ s·W·s, and Glauber dynamics at temperature T — at T = 0 a flip never raises E, so retrieval is a descent. The bowl below is the mean-field free energy over the overlap plane of two stored patterns: its four wells are the memories, the ball is the network itself, and above T = 1 the wells fill in — memory melts into a paramagnet. Store more patterns than 0.138 N and the wells crowd: recall from a corrupted cue starts failing, which is the capacity shown rather than quoted. The eight shapes are correlated, as drawn things are, and the Hebb rule dislikes that; the eight random patterns beyond them are not. Every flip fires its couplings as wires — pink excitatory, blue inhibitory.
Equations used in the module
Equations W_ij = (1/N) Σ_μ ξ_i^μ ξ_j^μ (Hebb) h_i = Σ_j W_ij s_j, s_i ← sign(h_i) E = −½ Σ W_ij s_i s_j falls at every flip


