on holding a shape
Every printable ASCII character here is a memory under pressure.
The form is stored once — a small grid of charges, nothing more — and then deliberately ruined: cells flipped at random until the shape dissolves into static. What follows is not drawing but remembering. The network has no picture to copy from; it has only the relationships it learned, and it feels its way back down the slope of its own energy until a familiar shape settles out of the noise.
I am drawn to that moment of settling. We tend to think of memory as storage, but a Hopfield network insists it is something more active and more fragile — a basin you fall into, a pattern that reasserts itself only because the parts agree on what they used to be. Sometimes it lands cleanly. Sometimes it settles into a shape that was never stored at all. The recall is never guaranteed; it is earned, pass by pass.
The characters are the most ordinary marks we have — letters, digits, the punctuation we type without thinking. Rendering them on simulated phosphor, behind the curve and glow of a screen that no longer exists, is a way of asking what it costs to hold even the simplest form against entropy. Each one carries its own small piece of generated music, so that recognition arrives as sound as well as image: the instant the noise resolves, the network, briefly, sings.
Each piece is a single, self-contained HTML file — the network, its noise, and its score all in one place — looping its recall endlessly in the browser: the memory recovered, lost again, and recovered once more, without end.
— Pattern Retrieval, by Adam Ilenich
// store one pattern as Hebbian weights const W = Array.from({length: N}, () => new Float32Array(N)); for (let i = 0; i < N; i++) for (let j = 0; j < N; j++) if (i !== j) W[i][j] = A[i] * A[j]; // recall: relax toward the basin floor let h = 0; for (let j = 0; j < N; j++) h += W[i][j] * state[j]; h += LAMBDA * A[i]; // λ = 0.35 state[i] = h >= 0 ? 1 : -1; // sgn(h) // energy — every pass lowers it for (let i = 0; i < N; i++) for (let j = 0; j < N; j++) E += -0.5 * W[i][j] * s[i] * s[j];