loci
Where a memory is put decides what it can do. The full write-up: every number, table and caveat.
The technical write-up
Vector-HaSH (Chandra, Sharma, Chaudhuri & Fiete, Nature 2025) stores memories the way the hippocampus is thought to: a fixed scaffold of grid-cell modules combines into 3,600 addresses, each an error-correcting fixed point, and content is bound to addresses by heteroassociation. The paper leaves one choice open: where each memory goes. loci studies that choice. A Gaussian account of the cue path with no fitted parameters predicts how often a noisy cue finds its own address, for any placement. The theory’s error law implies a filing rule: store where your recall points. And filing for recall turns out not to find the structure a memory needs to imagine. The main answers were pre-registered and tested on seeds no pilot had touched; exploratory checks are marked, and criteria that failed are reported where their numbers are. This is a study of how scaffold memories work and fail, not a better memory.
- 11 of 13
- pre-registered criteria passed as registered, round 2
- 0.24–0.31
- unseen combinations constructed when filed for recall, against 0.95–1.00
- Vector-HaSH port · 3,600 addresses · seeds 40–49 · pre-registered · Python
- 2026 · Memory and imagination
- noisy cue → cue map · ridge → place cells → grid modules 3 · 4 · 5 → address → read-outcoefficients · snap
- error law → filing rule → placementstore where recall points
- replay → placementexact descent
- read-out → filing through the read-out
The open choice
A cue recalls by snapping to an address and reading out what is stored there. For content without a spatial layout, the paper says “the scaffold trajectory can be arbitrarily chosen”. loci asks what that choice decides: what a memory can recall, and what it can imagine.
Its sensory error matches FieteLab/VectorHaSH at c71317d to every printed digit. A separate audit lists twelve places where the code does something a reader of the paper would not expect, each with its file, line and measured effect.
This is a study of how scaffold memories work and fail, not a better memory. kNN over the stored patterns keeps 800,000 bits, against the scaffold’s 840,000 weights, and recalls everything.
A zero-fit theory of noisy recall
| half the place cells | 0.004 |
|---|---|
| masked cues, 50% unknown | 0.004 |
| sentence embeddings | 0.007 |
| a fourth grid module | 0.007 |
| factor counts no module matches | 0.008 |
| other module periods | 0.009 |
| loads between the developed ones | 0.007 |
| cue dimension 2,000 | 0.010 |
| the paper's own write rule | 0.029 |
| new in these conditions | mean |error| |
|---|---|
| sentence embeddings (MiniLM, sign-projected) | 0.007 |
| factor counts that match no module (7 / 12 / 4) | 0.008 |
| other scaffolds: periods (5, 6, 7), a fourth module | 0.009, 0.007 |
| half and double the place cells | 0.004, 0.008 |
| other cue dimensions (Ns 500, 2,000) | 0.007, 0.010 |
| masked cues instead of flipped (25%, 50% unknown) | 0.006, 0.004 |
| loads between the developed ones (P/Ns 0.3, 0.5, 0.7) | 0.007 |
| the paper’s own write rule (pseudo-inverse) | 0.029, optimistic |
| all 156 | 0.009; every one within 0.05; r = 0.999 |
Mean |error| per family of held-out runs. bench/oos.py re-verifies the hashes and the scores.
Recall is a chain, and every link has known statistics. A cue becomes coefficients over the stored items whose first two moments are exact; the place-cell input is Gaussian by the central limit theorem over the cue’s bits; the ReLU is moment-matched; the grid input is then Gaussian over all grid cells; and recall is the probability that every module’s argmax lands on the right phase. Nothing is fitted and no cue is drawn.
It was developed on 180 conditions, where its mean error was 0.010. Then it was frozen and hashed, and run on 156 held-out runs — 14 new settings, each with its placements, on 3 seeds — that change something it had not seen: new content, scaffolds, noise types and sizes. The predictions were hashed before the bars were written and before any measurement; results/oos/FROZEN.txt logs the order, including a first measurement launch that crashed and wrote nothing. Re-running the frozen code reproduces the hashed predictions exactly.
The error law alone fails. Project the coefficients through the phase indicators instead of the scaffold’s templates and the mean error on the same conditions is 0.187. The law ranks placements; the magnitudes live in the scaffold.
A filing rule from the error law
| random | 0.438 |
|---|---|
| encoded by the rule | 0.677 |
| k-means | 0.765 |
| encoded, then replayed | 0.839 |
| oracle: the true factors | 0.888 |
| content | random | k-means | encoded | then replayed | oracle |
|---|---|---|---|---|---|
| 3 factors, 9 / 16 / 5 values | 0.438 | 0.765 | 0.677 | 0.839 | 0.888 |
| 3 factors, 7 / 12 / 4 | 0.430 | 0.764 | 0.666 | 0.815 | 0.826 |
| 4 factors on 3 modules | 0.441 | 0.770 | 0.681 | 0.832 | – |
| a 5 × 4 hierarchy | 0.462 | 0.650 | 0.668 | 0.795 | – |
| life-log sentences | 0.277 | 0.636 | 0.539 | 0.743 | 0.800 |
Noisy cues (10% of bits flipped) that find their own address through the paper’s snap, P/Ns = 0.8, seeds 40–49.
The error law changes by exact amounts when an item moves. For a new item, the cheapest free address is the one where its own recall coefficients are largest: store where your recall points. For a stored item, recall with its own trace set aside is exact coordinate descent on the law: move it to where that recall points. That is replay.
Encoded then replayed, the rule beats k-means on five kinds of content, by 0.05–0.15 at the headline condition. Replay does most of the optimising: replay from random addresses gets within 0.04 of it. The encoding’s value is that the memory is organised from the first item on, 0.68 against 0.44 before any replay.
What the rule needs, the network cannot yet do. The rule needs K and every stored pattern, together more state than the memory’s 840,000 weights. In pilots the network’s own read-out delivers the rule’s choice for 78–86% of new items; run through it end to end, filing recalls 0.57–0.69 after replay, above random and below k-means (3 seeds, exploratory).
Filing for recall does not find the structure imagination needs
| filed by the true factors | recall 0.991 → constructs 0.999 |
|---|---|
| filed by the recall rule | recall 0.997 → constructs 0.307 |
| filed at random | recall 0.961 → constructs 0.004 |
| filed by | recall | constructs | recombined events completed |
|---|---|---|---|
| random | 0.430 / 0.961 | 0.001 / 0.004 | 0.002 / 0.002 |
| the true factors (oracle) | 0.878 / 0.991 | 0.948 / 0.999 | 0.895 / 0.983 |
| the recall rule, replayed | 0.832 / 0.997 | 0.241 / 0.307 | 0.204 / 0.267 |
| the recall rule, annealed replay | 0.841 / 0.997 | 0.190 / 0.262 | 0.153 / 0.195 |
| kNN on the stored patterns | 1.000 | 0 | 0 |
Factored content, 10% flips, seeds 40–49. Each cell is the paper’s snap / the nearest of all 3,600 place codes.
For each value of one factor, one partner of another is never experienced with it. Asked for the gist of that combination, does the memory construct it: land on an empty address whose read-out carries every factor? Two read-outs are compared, the paper’s snap and the nearest of all 3,600 place codes, a read-out the paper’s network does not have. Filed by the true factors, the memory constructs 0.95–1.00 of the combinations. Filed by the recall rule, it constructs 0.24–0.31, while recalling as well through the nearest read-out and 0.05 worse through the snap. Filed at random, none.
This is a failure of search, not of the objective. The error law strongly prefers the aligned filing (0.78 against 1.38). Recall accuracy barely distinguishes the two, so it cannot guide search there.
A recollection check separates imagining from remembering. Through the nearest read-out, familiarity tells recombined events from studied ones less than half as well as when empty states are not valid (d′ 3.1 against 7.5); recollection, which checks the cue’s detail against the read-out, separates them almost perfectly (d′ 10.2; 4.6 through the snap).
A disclosure: these criteria were registered after the previous experiment had run on the same seeds, and one clause was registered on the decoder where a known gap vanishes. The table gives both read-outs; under the paper’s own snap, four of seven bars are missed.
The cliff is in the cue
| cue | pseudo-inverse (the paper) | noise-matched ridge | Hebbian | kNN |
|---|---|---|---|---|
| clean | 1.000 | 1.000 | 0.699 | 1.000 |
| 5% of bits flipped | 0.001 | 0.851 | 0.604 | 1.000 |
| 10% flipped | 0.001 | 0.668 | 0.501 | 1.000 |
| 20% flipped | 0.001 | 0.303 | 0.264 | 1.000 |
| 25% of bits unknown | 0.001 | 0.793 | 0.575 | 1.000 |
| 50% unknown | 0.000 | 0.479 | 0.386 | 1.000 |
Right address recovered at P = Ns. Mean over Ns = 500, 1,000 and 3,600; 10 seeds; the paper’s placement.
Round 1 established the setting. With the paper’s write rule, noisy recall collapses when the items stored reach the cue dimension: the pseudo-inverse’s minimum sits at exactly P = Ns for every Ns and every kind of noise, and past it the scaffold snaps to a valid but wrong address. A noise-matched ridge removes the dip. None of this is new as mathematics; it is double descent. What is new is where it sits: in the cue map, at the right-hand edge of every capacity plot in the paper.
What did not survive
- A memory that files itself
- The first round-2 write-up said so. The rule is computed from more state than the memory holds, and through the network’s own read-out it files below k-means.
- Accuracy is silent about structure
- Overstated. Through the paper’s snap, the recall-filed memory recalls worse than the oracle-filed one at 20% flips. What holds is narrower: recall barely distinguishes the two, so it does not guide search there.
- The price of imagination is recall
- Treating never-stored states as valid costs nothing under aligned placement, with a decoder that admits every address. The apparent cost belonged to the paper’s per-module snap. The price is false memory, for decoders that read place activity alone.
- Consolidation discovers structure
- No recall-driven procedure tried aligned the modules with the factors at full phase resolution. It happened when a granularity was supplied from outside.
Pre-registered criteria, round 2
| criterion (as registered) | result | through the paper’s snap | |
|---|---|---|---|
| T1 | out of sample: mean error ≤ 0.02, ≥ 90% within 0.05 | pass: 100% | |
| T2 | no condition family’s mean error > 0.04 | pass: worst 0.029 | |
| T3 | on E4’s rows: mean ≤ 0.02 and worst ≤ 0.06 | fail: worst 0.068 | |
| S1 | the rule ≥ k-means + 0.05 on every content | pass: +0.051 to +0.145 | |
| S2 | the rule within 0.03 of the oracle | fail | |
| S3 | encoding alone ≥ random + 0.15 | pass: +0.21 to +0.26 | |
| I1 | construction: oracle ≥ 0.9 / 0.9 / 0.8, random ≤ 0.05 (nearest) | pass | miss: 0.817 |
| I2 | every state valid costs the aligned memory ≤ 0.01 (nearest) | pass | |
| I3 | recall-filed: recall within 0.02, construction ≥ 0.4 lower (nearest) | pass: −0.69 / −0.73 | miss on recall: −0.046 |
| I4 | replaying an aligned memory for recall lowers construction | pass: −0.10 | |
| I5 | r(construction, completion) ≥ 0.9; oracle completion ≥ 0.8 (nearest) | pass: r = 0.998, partly by construction | miss: 0.79 / 0.73 |
| I6 | recollection d′ ≥ 5 while familiarity d′ ≤ 4 (nearest) | pass: 10.2 and 3.1 | miss: 4.6 / 3.8 |
| I7 | construction ≤ 0.05 at P = Nh; ≥ 0.9 with a 1% ridge | pass: 0.003; 0.982 |
As registered, 11 of 13 pass; under the paper’s own snap, four of E5’s seven would have missed. Seeds 40–49 and 30–32, none touched by a pilot. bench/criteria.py and bench/oos.py recompute every row.