Associative Memory
A damaged pattern is not looked up. It is an initial condition that falls, bit by bit, into a basin carved by stored memories. Overlap rises, energy falls, and the grid settles toward one of a few attractors the network knows how to keep.
The idea
A damaged pattern is not looked up. It is an initial condition that falls, bit by bit, into a basin carved by stored memories. Overlap rises, energy falls, and the grid settles toward one of a few attractors the network knows how to keep.
Science and concept
John Hopfield’s 1982 formulation treats memory as content-addressable dynamics on a network of binary units. Each neuron has two states. Connections are symmetric, self-couplings are removed, and units update asynchronously: a neuron evaluates its local field and flips when that field disagrees with its present state. Hopfield showed that under those conditions an energy-like Lyapunov function decreases at every successful flip, so the network cannot wander forever—it must reach a local minimum.
Memories are not rows in a table. They are prescribed attractors. A cue is a corrupted or partial state; recall is the flow from that cue into the nearest stable pattern. Basin geometry, not string equality, decides which memory wins. When several stored patterns are similar, basins can merge or compete; when the cue is too damaged, the flow may enter a spurious or inverted attractor instead of the intended one.
Two learning rules appear in this sphere. The classical Hebbian / outer-product prescription builds couplings from pairwise correlations among stored patterns. It is local and historically central, but correlated patterns produce crosstalk. The projection (pseudoinverse) rule constructs couplings so that each linearly independent pattern is an exact fixed point of the local fields, at the cost of a nonlocal Gram-matrix inversion. Personnaz, Guyon and Dreyfus introduced this spin-glass associative construction; Kanter and Sompolinsky analysed its Hamiltonian form and showed that, for linearly independent patterns, the embedded states remain global energy minima up to a load α = p/N approaching one—very different from the much lower practical load of pure Hebbian storage for random unbiased patterns.
Capacity figures are assumption-bound. Hopfield’s early simulations for random memories found reliable recall near roughly 0.15N stored patterns before errors became severe; that number is not a universal limit for every pattern library. Curated, structured, or linearly independent libraries behave differently, and projection learning changes the geometry further. Any public capacity claim must name the pattern ensemble and the learning rule.
AL.Floys implements an overlap-form binary Hopfield network: it never materialises a dense weight matrix. Local fields are computed from pattern overlaps, with the diagonal self-coupling subtracted so that a neuron’s own state does not spuriously reinforce itself. Energy is reported against those zero-diagonal fields. The sphere therefore makes Hopfield’s central visual argument—flips, rising overlap, falling energy—without pretending to be a biophysical cortical microcircuit.
History
Associative and content-addressable memory long preceded this model in computer engineering and psychology. Hopfield’s contribution was to show that a simple asynchronous network with symmetric couplings yields an energy landscape whose attractors can store and repair patterns. The paper sits at the junction of statistical physics and neural modelling: Ising-like energy, Monte Carlo-style updates, and collective computation without a central controller.
Hebbian correlation storage connects the model to older learning ideas, while projection and pseudoinverse rules answered a practical defect—poor performance on correlated pattern sets. Later spin-glass analyses mapped spurious states, phase diagrams and load-dependent basins. The atlas inherits that lineage as an interactive attractor demonstration, not as a claim that human autobiographical memory is a Hopfield net.
What this simulates
| Aspect | Current implementation |
|---|---|
| State | Binary grid of ±1 units (sizes 24–64). |
| Updates | Zero-temperature asynchronous sweeps. |
| Learning | projection (default) or hebbian; reset reapplies storage. |
| Diagonal | Self-coupling removed in both rules (Hebbian: P/N; projection: local dᵢ). |
| Patterns | Curated library of twelve glyphs; storedCount selects how many are active. |
| Cue | Chosen library pattern with random bit damage at damageFraction. |
| Telemetry | Best |m| · N, energy, best memory index, inverted flag, flips/sweep. |
| Tools | EXCITE / INHIBIT / SCRAMBLE paint local ±1 edits. |
What to look for
Watch the grid as a state, not as an image gallery. Bits that disagree with the winning memory flip first; the best-overlap chip climbs while energy descends. Under Clean Recall with projection learning, moderate damage usually returns the cue pattern. Under Hebbian Crowd, more stored patterns share the same couplings and basins compete—overlap may stall on a neighbour or an inverted copy. Heavy Damage (half the bits flipped) is a stress regime: pack evidence shows recovery failing at damage 0.5 even when milder cues succeed. Slow Settle keeps flips legible. Dense Library presses storage harder under projection without promising a textbook capacity theorem on screen.
How to explore
Load a preset, then change only one scientific lever at a time. Learning rule and Memories require restart because storage is rebuilt. Cue damage and Cue memory (advanced) also reset the damaged initial state. Sweeps/s only changes presentation pace. Palette is visual. Prefer SCRAMBLE, EXCITE and INHIBIT over any hidden field action—the ecospheres simple dock exposes the three paint tools and the core controls above.
Parameters that teach
- Learning. Projection versus Hebbian is the deepest switch. Projection stabilises the stored set more aggressively when patterns are not orthogonal; Hebbian shows classical crosstalk.
- Memories (
storedCount). More attractors share the same finite network. Raising the count is how visitors feel capacity pressure without treating 0.15N as a law of nature for this glyph library. - Cue damage. The radius of the basin in Hamming space. Below the recovery-matrix cliff the cue returns; near one-half the bits wrong, wrong attractors dominate in measured runs.
- Sweeps/s. Time resolution of asynchronous descent, not a change of energy law.
Presets as experiments
Clean Recall
Projection learning, six memories, damage 0.3. The showcase regime: best overlap should climb toward the cue memory while energy falls.
Hebbian Crowd
Hebbian learning with eight memories. Basins compete; do not expect Clean Recall’s tidy completion.
Heavy Damage
Damage 0.5 under projection. Treat as a wrong-attractor stress test, not a guaranteed repair demo.
Slow Settle
Low sweeps/s so individual flips remain visible.
Dense Library
Eight memories, milder damage, projection—near the curated library’s practical crowding without claiming a universal αc.
Recommended order: Clean Recall → Hebbian Crowd → raise Cue damage on Clean Recall and restart → Heavy Damage.
Interactions
- EXCITE forces local bits toward +1.
- INHIBIT forces local bits toward −1.
- SCRAMBLE randomises bits in the brush radius—an on-canvas way to re-damage a settling or settled state.
- Overlap and energy update from the true binary state; paint is a scientific intervention on that state, not a cosmetic tint.
What this does not mean
This is not biological or autobiographical memory. Neurons here are binary formal units; there is no spike timing, neuromodulation, hippocampus, or personal narrative. “The network remembers like a brain” is false as science and false as product copy.
It is not a database. There is no key lookup. Failure modes are dynamical: spurious minima, inverted patterns, and cues outside every useful basin.
Capacity numbers from random unbiased patterns do not automatically transfer to this glyph library, and projection learning is an implementation extension beyond Hopfield’s original outer-product examples. Paint tools and curated patterns are also engine choices, not parts of the 1982 equation set.
Why it belongs
Associative Memory gives the Mind domain an attractor: Chaos already showed irreversible folding of trajectories; here the irreversible story is repair. Beside Adaptive Networks and Belief Dynamics, it shows a different kind of collective computation—one where the “memory” is a landscape, and a visitor’s damaged cue is simply where that landscape is entered.
Sources
Foundational and primary sources
- J. J. Hopfield, “Neural networks and physical systems with emergent collective computational abilities,” Proceedings of the National Academy of Sciences 79, 2554–2558 (1982). DOI: 10.1073/pnas.79.8.2554.
- L. Personnaz, I. Guyon and G. Dreyfus, “Information storage and retrieval in spin-glass like neural networks,” Journal de Physique Lettres 46, 359–365 (1985). DOI: 10.1051/jphyslet:01985004608035900.
- I. Kanter and H. Sompolinsky, “Associative recall of memory without errors,” Physical Review A 35, 380–392 (1987). DOI: 10.1103/PhysRevA.35.380.
Implementation evidence
- AL.Floys Mind expansion recovery matrix and model notes under
docs/evidence/mind-expansion/associative-memory/(pack@uridolan/al-floys-engines@0.10.1).