Plasticity & Networks · Lesson 3 of 3 · ~6 min

Memories as attractors

Predict

A 25-pixel network stores a T and an X in one weight matrix. Corrupt $5$ T pixels and run the network. Where does the state end up?

Click Load T, Corrupt 5, then Run dynamics, and watch the overlaps.
Try
Try itClick Load T, Corrupt 5, Run dynamics. Repeat with Load X. Last, reload T, flip $15$ pixels, and run.
Notice

Five flips drop overlap T to $0.60$. One sweep restores $1.00$; later sweeps change nothing: a fixed point. The X behaves the same. At $15$ flips it lands elsewhere, often the T's negative.

Explain

Storage is Hebbian: one outer product per pattern, diagonal zeroed:

$$W = T\,T^{\top} + X\,X^{\top}, \qquad x \leftarrow \operatorname{sign}(Wx)$$

Multiplying by $W$ makes the memories vote. Ignoring the zeroed diagonal, $Wx = T\,(T \cdot x) + X\,(X \cdot x)$, so each pulls by its overlap with $x$. A memory here is an attractor: a fixed point the dynamics fall into from anywhere in its basin.

PREREQUISITERecall is power iteration with a sign step: apply the matrix until one direction wins.
About this model

What it represents: a Hopfield network of 25 binary units with Hebbian outer-product weights — the standard minimal model of associative, content-addressable memory, run here with synchronous sweeps.

What it leaves out: Hopfield's own analysis updates one unit at a time (asynchronously), which guarantees an energy function that only decreases; synchronous sweeps like these can in principle fall into two-step cycles, which is one reason the instrument caps runs at 10 steps. Capacity is severe: outer-product storage holds only about $0.14N$ patterns — three or four for $N = 25$ — before memories interfere, and each pattern's negative is stored for free whether wanted or not. The biological mapping is loose throughout: real cortical circuits are not symmetric, not binary, and not updated in lockstep.

Source: Gerstner, Kistler, Naud and Paninski, Neuronal Dynamics, Ch. 17.2 (EPFL, free online) — the Hopfield model, its energy function, and its capacity limits.

Apply
Checkpoint — prove it to yourself

You corrupt $5$ of the T's $25$ pixels. Before running the dynamics, what does the overlap-T stat read?

Why does the corrupted state fall back to the T rather than to the X?

Transfer: power iteration applies $A$ repeatedly and converges to the dominant eigenvector. Recall applies $W$ and sign repeatedly. What plays the role of the dominant direction?

Key idea

In this network a memory is an attractor. Start anywhere in its basin and the dynamics return the whole pattern.

← All lessons