If you store memories in the Hebbian weights of a recurrent network of N binary neurons, how many can it hold before interference destroys recall — and is the collapse at the Amit–Gutfreund–Sompolinsky critical load α_c ≈ 0.138 a sharp first-order cliff rather than graceful decay?
Units: dimensionless critical load α_c = P_max/N (AGS 1985 replica value; secondary known value m_c = 0.967, the retrieval overlap at the first-order jump)

▶ Run this simulationRead how it works
Memory weighed at its breaking point: a from-scratch zero-temperature Hopfield network — Hebbian sums and sign updates ONLY, no 0.138, no replica theory, no erfc in the generator — returns the storage-capacity transition α_c(∞) = 0.13886 ± 0.00254 vs the Amit–Gutfreund–Sompolinsky replica value 0.138 (rel 0.62%, 0.34 SE) by N^(−1/2) finite-size scaling of blind recall crossings at N = 500–4000 (width slope −0.58 confirms the exponent independently), the cliff edge holds the AGS first-order jump m = 0.9704 vs 0.967 with an EMPTY forbidden band (0/665 trials at intermediate overlap), and the naive signal-to-noise rival is falsified by 0.49 absolute in m at α = 0.2 while its own one-step premise erfc(1/√(2α))/2 is separately CONFIRMED to 0.1–3% — error feedback, not one-step noise, sets how much a network can remember; and the SHIPPED module is now EXECUTED — its capacity sweep is Object.is-identical to the oracle's own gate-I mirror, its chart finally states a MEASURED number (α̂ = 0.193 at seed 7) instead of only the textbook dashed line, and that +27% excess over 0.138 is priced as finite size by the oracle's own α₅₀(N) = 0.1389 + 0.843·N^(−1/2) — the same estimator run at twice the size lands +0.00002 from that line
Generator: a from-scratch zero-temperature Hopfield network — P = αN random ±1 patterns, Hebbian couplings W_ij = (1/N)Σ_μ ξ_i^μ ξ_j^μ with zero diagonal, asynchronous random-order sign updates descending the energy to a fixed point; local fields via the exact integer overlap identity N·h_i = Σ_μ ξ_i^μ M_μ − P·s_i (no N×N matrix, no float-tie ambiguity; exact ties keep state). No 0.138, no replica theory, no erfc in the generator. Recovery channels: (1) recall probability R(N, α) over a blind α grid 0.115–0.205 at N = 500/1000/2000/4000 (40/24/14/7 instances × 5 patterns each); pseudo-critical crossing α_c(N) at R = ½, extrapolated against N^(−1/2) — the exponent fixed a priori by the CLT rounding argument and checked independently by the transition-width scaling — with bootstrap SE (200 replicas); (2) the AGS first-order jump: recalled-trial overlap in the two grid bins bracketing the crossing, plus a forbidden-band (m ∈ [0.55, 0.85]) bimodality count; (3) the one-step Gaussian-crosstalk law at four loads (N = 4000, up to 4×10⁴ events/point); (4) rival falsification at α = 0.2; (5) variance-matched random symmetric Gaussian matrix control; (6) 30%-corrupted-cue basin perturbation; (7) verbatim HopfieldModule._measure mirror (N = 400, Float32 W, h ≥ 0 → +1 tie rule, module seed formula, 4 seeds). Gates A–I, all seeded, ~53 s. MODULE CERTIFICATE (gates J–O, added this run): src/modules/HopfieldModule.ts is sha-pinned (a0182ddf34de…), mechanically type-stripped by 55 pairs each asserted to hit exactly once plus an empty TS-residue scan, and EXECUTED in Node against Babylon/DOM recorder stubs — init at seed 7 (twin seed 9), then a 7200-call lockstep at fl(1/120) (60 s of engine time) against an independent hand replica whose capacity sweep IS channel (7)'s mirrorRun, plus clock twins at fl(1/60)/0/999 and the dispose teardown. Gate I was re-pointed from the retired grid readout to the estimator the module now displays, and the mirror was widened from 4 seeds to 24 plus a 6-seed run at N = 800. 15/15 gates, ~110 s.
α_c(N) = 0.1769 → 0.1650 → 0.1576 → 0.1525 over N = 500 → 4000, strictly monotone, extrapolating on N^(−1/2) to 0.13886 ± 0.00254 (0.34 SE from 0.138); transition width 0.0358 → 0.0110 with log-log slope −0.581 (CLT rounding ~N^(−1/2), the independent check of the extrapolation exponent); recalled-trial overlap at the cliff edge 0.9704 vs AGS m_c = 0.967 with ZERO of 665 trials at intermediate overlap m ∈ [0.55, 0.85] — the collapse is first-order, never graceful; one-step unstable-bit fraction matches ½erfc(1/√(2α)) to 3.0/0.3/0.3/0.1% at α = 0.1/0.15/0.2/0.3; 30%-corrupted cues complete to m ≥ 0.9 with R = 1.00 at α = 0.05, shrinking to 0.46 at α = 0.11 and 0.00 at α = 0.14 (the basin contracts as the cliff approaches).
0.00254
a variance-matched random symmetric Gaussian W (sd √P/N, zero diagonal) under the identical settle dynamics yields only |m| = 0.160 mean / 0.196 max toward the probe — the known zero-T dynamical remanence of a random-matrix quench, decisively below the 0.9 retrieval threshold — at the equivalent of α = 0.05 where the Hebbian network recalls perfectly (R = 1.00): retrieval lives in the outer-product STRUCTURE of W, not in the settling dynamics or the coupling statistics
The screen is the finite-size answer and now says so. Executed over the 24 mirror seeds, the number the chart prints is α̂(N=400) = 0.17535 ± 0.00239 (sd 0.0117) — 27% ABOVE the AGS α_c = 0.138 that the same chart draws as a dashed line. That excess is finite size, not error: this run's own finite-size line, α₅₀(N) = 0.13886 + 0.843·N^(−1/2) fitted at N = 500–4000 with 0.138 nowhere in the fit, predicts 0.18102 at N = 400, so the shipped estimator sits −0.00567 (−3.1%, 2.4 SE) from it — and re-run at twice the size it gives α̂(800) = 0.16869 ± 0.00536 against a predicted 0.16867, a gap of +0.00002. Residual protocol differences that the −3.1% absorbs, all disclosed: the module builds a full Float32 N×N weight matrix while the oracle's main channel uses the exact integer overlap identity; the module's tie rule is h ≥ 0 → +1 while the oracle keeps state on an exact tie; the module caps at 25 sweeps against the oracle's 60 with early abandon; and the module runs 5 trials of one pattern per load against 5 patterns per instance. The live 5-memory demo is a different regime entirely and is labelled as such on screen (α = 5/400 = 0.013 ≪ α_c): it is a demonstration of pattern completion, not a measurement, and it completes every cue to overlap exactly 1.000.
The Amit–Gutfreund–Sompolinsky storage-capacity transition of the Hopfield model (PRL 55, 1530, 1985; Ann. Phys. 173, 30, 1987): zero-temperature retrieval states vanish at α_c ≈ 0.138 with a discontinuous jump from m_c ≈ 0.967, and the one-step error rate is the textbook Gaussian-crosstalk law erfc(1/√(2α))/2 (Hertz–Krogh–Palmer ch. 2; Hopfield 1982 for the model). Non-circular because the generator contains only Hebbian sums and sign updates: the capacity emerges from finite-size scaling of blind recall counts (0.138 and 0.967 live only in the scorer), the N^(−1/2) extrapolation exponent is fixed by the CLT rounding argument and independently confirmed by the width scaling (slope −0.58), and the same machinery both CONFIRMS the rival's one-step premise (to 0.1–3%) and falsifies its conclusion (by 0.49 in m) — the avalanche is measured, not assumed.
npm run derisk -- hopfield (scripts/hopfield-derisk.mjs — 15/15 gates (A capacity FSS, B size scaling, C first-order cliff, D one-step law, E rival falsified, F random-matrix control, G basin contraction, H threshold robustness, I module mirror at N=400 over 24 seeds, J module pinned/stripped, K executed init ≡ mirror ≡ replica, L 7200-call lockstep at fl(1/120), M clock twins, N display reconciled with the finite-size line, O dispose), deterministic, ~110 s)scripts/oracles/hopfield.reference.jsonD. J. Amit, H. Gutfreund & H. Sompolinsky, Phys. Rev. Lett. 55, 1530 (1985); Ann. Phys. 173, 30 (1987); J. J. Hopfield, PNAS 79, 2554 (1982); J. Hertz, A. Krogh & R. G. Palmer, Introduction to the Theory of Neural Computation (1991), ch. 2