Zain Ali

← loci, in brief

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
  1. noisy cue → cue map · ridge → place cells → grid modules 3 · 4 · 5 → address → read-outcoefficients · snap
  2. error law → filing rule → placementstore where recall points
  3. replay → placementexact descent
  4. 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

mean |error| of the frozen theory, by what each condition changed · 156 conditions
mean |error| of the frozen theory, by what each condition changed · 156 conditions
half the place cells0.004
masked cues, 50% unknown0.004
sentence embeddings0.007
a fourth grid module0.007
factor counts no module matches0.008
other module periods0.009
loads between the developed ones0.007
cue dimension 2,0000.010
the paper's own write rule0.029
new in these conditionsmean |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 module0.009, 0.007
half and double the place cells0.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 1560.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

noisy cues that find their own address · 3 factors, 10% of bits flipped, P/Ns = 0.8
noisy cues that find their own address · 3 factors, 10% of bits flipped, P/Ns = 0.8
random0.438
encoded by the rule0.677
k-means0.765
encoded, then replayed0.839
oracle: the true factors0.888
contentrandomk-meansencodedthen replayedoracle
3 factors, 9 / 16 / 5 values0.4380.7650.6770.8390.888
3 factors, 7 / 12 / 40.4300.7640.6660.8150.826
4 factors on 3 modules0.4410.7700.6810.832–
a 5 × 4 hierarchy0.4620.6500.6680.795–
life-log sentences0.2770.6360.5390.7430.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

recall, and construction of never-experienced combinations · factored content, 10% flips · read by the nearest of all 3,600 place codes
recall, and construction of never-experienced combinations · factored content, 10% flips · read by the nearest of all 3,600 place codes
filed by the true factorsrecall 0.991 → constructs 0.999
filed by the recall rulerecall 0.997 → constructs 0.307
filed at randomrecall 0.961 → constructs 0.004
filed byrecallconstructsrecombined events completed
random0.430 / 0.9610.001 / 0.0040.002 / 0.002
the true factors (oracle)0.878 / 0.9910.948 / 0.9990.895 / 0.983
the recall rule, replayed0.832 / 0.9970.241 / 0.3070.204 / 0.267
the recall rule, annealed replay0.841 / 0.9970.190 / 0.2620.153 / 0.195
kNN on the stored patterns1.00000

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

cuepseudo-inverse (the paper)noise-matched ridgeHebbiankNN
clean1.0001.0000.6991.000
5% of bits flipped0.0010.8510.6041.000
10% flipped0.0010.6680.5011.000
20% flipped0.0010.3030.2641.000
25% of bits unknown0.0010.7930.5751.000
50% unknown0.0000.4790.3861.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)resultthrough the paper’s snap
T1out of sample: mean error ≤ 0.02, ≥ 90% within 0.05pass: 100%
T2no condition family’s mean error > 0.04pass: worst 0.029
T3on E4’s rows: mean ≤ 0.02 and worst ≤ 0.06fail: worst 0.068
S1the rule ≥ k-means + 0.05 on every contentpass: +0.051 to +0.145
S2the rule within 0.03 of the oraclefail
S3encoding alone ≥ random + 0.15pass: +0.21 to +0.26
I1construction: oracle ≥ 0.9 / 0.9 / 0.8, random ≤ 0.05 (nearest)passmiss: 0.817
I2every state valid costs the aligned memory ≤ 0.01 (nearest)pass
I3recall-filed: recall within 0.02, construction ≥ 0.4 lower (nearest)pass: −0.69 / −0.73miss on recall: −0.046
I4replaying an aligned memory for recall lowers constructionpass: −0.10
I5r(construction, completion) ≥ 0.9; oracle completion ≥ 0.8 (nearest)pass: r = 0.998, partly by constructionmiss: 0.79 / 0.73
I6recollection d′ ≥ 5 while familiarity d′ ≤ 4 (nearest)pass: 10.2 and 3.1miss: 4.6 / 3.8
I7construction ≤ 0.05 at P = Nh; ≥ 0.9 with a 1% ridgepass: 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.

Back to loci, in brief