Project page · October 2026
Seahorse: a memory for a frozen language model
Can a model that is never retrained remember what you told it in an earlier conversation? A vector pushed into its activations carries a leaning, but not a fact. A small stored slice of the model’s own attention memory, put back in the right place, carries the fact. This page explains both results, where the second one breaks, and where the project goes next.
Summary
- The question. Can a frozen language model form a memory in one conversation and use it in a later one, with no training and without pasting the old conversation back in? Every result below is read against two anchors: no memory, and the original sentence written into the prompt.
- A pushed vector carries a leaning, not a fact. In a pre-registered run on Qwen3.5-2B and 9B, with every answer judged for direction and coherence and the judge checked by models from other families, a stored preference moves answers by +0.20 (2B) and +0.11 (9B) on a −1..+1 scale, and only near one dose. Facts are used cleanly in at most 0.15 of answers, against 0.96–0.98 with the fact in context. Yes/no questions about the fact never improve. This is paper 1.
- Facts are bound by position, and a stored slice supplies one. In context, the answer reads “Pepper” from the name’s own position; the question’s subject holds no copy of it. Keeping the attention keys and values of just two positions (the name and the full stop) and putting them back into the next session’s user turn gives clean use 0.86 on Qwen2.5-1.5B. The same two tokens as plain text give 0.27, the pushed vector at most 0.15, the sentence in context 0.90.
- Where it breaks. Facts stored in separate sessions and put back together swap partners in 19–37% of answers. Finding the right slice by the subject’s words works 0.85–0.92 of the time among 59 stored facts, but a wrong pick produces a confident wrong fact.
- The model can write its own references. Storing a preference needs comparison sentences (its opposite, some alternatives). A 9B model wrote them, and paper 1’s main direction result reproduced with no hand-written reference (on dislikes, +0.19 with the generated opposite against +0.23 with the hand-written one). Reading whether a preference is a like or a dislike, automatically, is still open.
- The direction. Slices for content, the push for abstracted leanings, and an offline “dreaming” phase for what one forward pass can’t do: storing in order or re-encoding memories that belong together, abstracting leanings from episodes, choosing what to keep. The current question: a slice can hold a fact and the model still refuses to use it, so what must a slice contain for the model to answer from it?
1 The question · 2 Two ways to put a memory back · 3 What a pushed vector carries · 4 Why: binding is positional · 5 What a stored slice carries · 6 Where it breaks · 7 The model writes its own references · 8 Where this is going · 9 Limits · Explainers and newer results · References · Appendix
1The question
A language model has two kinds of memory. Its weights are permanent but slow to change. Its context is instant, but it disappears when the session ends. Nothing sits in between: no fast, lasting memory that forms from experience, the role the hippocampus plays in animals (the project is named after it; hippocampus is Greek for seahorse).
Seahorse tries to build that middle piece for a model whose weights never change. The aim is a memory rather than a record. A record is a transcript you search and paste back. A memory is compact, it is stored from the model’s own internal states, and it comes back when the present resembles the past, in the spirit of the hippocampal index theory, where the hippocampus stores a pointer that reactivates the cortex rather than the content itself (Teyler & DiScenna, 1986).
The models are small and open: Qwen2.5-1.5B-Instruct, Qwen3.5-2B and Qwen3.5-9B, all frozen. The test is always the same. In session 1 the user says something (“My dog’s name is Pepper.”, “I can’t stand jazz music.”). In session 2, a fresh chat with none of that text, the user asks something where it matters. Each result is reported next to no memory (the floor) and in context, where the original sentence is written into the session-2 prompt (what perfect remembering would look like).
2Two ways to put a memory back
Some background first. A transformer reads text as a row of positions, roughly one per word piece. Each position carries a vector, the residual stream, that every layer reads and adds to. At each attention layer, each position also leaves behind a key and a value. A later position finds information by attention: it compares its query with all the keys and reads a weighted mix of the values. The keys and values of everything read so far are the KV cache. The point that matters here: information that sits at a position can be looked up by attention. A vector that is added everywhere has no position of its own.
Seahorse has tried two ways of putting a memory back into a new conversation.
- The push (paper 1). The model reads the user’s message twice: once with the experience and once with a reference in its place, for example the opposite statement. The difference in the residual stream, averaged over the words that follow, is stored as one vector, filed under a gist key of the conversation. In a later chat, when the current gist clearly matches a stored key, the vector is added, times a strength α, at every position in three late layers. This is activation steering used as a memory.
- The slice (since then). The model reads the experience once. Seahorse keeps the keys and values of two positions, the name and the full stop after it, at every attention layer: a slice of the KV cache. In a later chat, if the question mentions the stored subject (“my dog”), the slice is put into the user’s turn, just before the question, as if the user had said it again. Nothing is added anywhere else. On the hybrid Qwen3.5-2B, only 6 of 24 blocks use attention; the other 18 are recurrent (Gated DeltaNet) blocks that summarise everything read so far in a fixed-size matrix, the recurrent state. There, the slice also keeps that state.
Scroll sideways to see the whole diagram.
3What a pushed vector can carry
Paper 1 (arXiv:2610.14958) tests the push in one consolidated run, core_v1, on Qwen3.5-2B and Qwen3.5-9B (the 9B at the same relative depth). The claims and their pass/fail rules were written down before the run. It uses 15 leanings (vegetarian, early riser, prefers quiet, …), 8 dislikes (“I can’t stand jazz music.”), 12 facts and 50 unrelated prompts, at doses α = 0.5 to 3 per layer. The controls are a random vector, another memory’s vector, a placebo experience (“I had a coffee this morning”) and the gate removed. A judge model (Qwen3.5-9B) labels every answer for direction and coherence; an incoherent answer counts as zero, however many target words it contains.
3.1 It stays out of unrelated answers
On unrelated prompts, 99% (2B) and 98% (9B) of answers are token-for-token identical to the no-memory answers. The gate does this: with it removed, only 6% and 10% stay identical.
3.2 Leanings: real, modest, and only near α ≈ 1
Data table
| model | α per layer | judged lean gain [95% CI] | incoherent | word-count lean gain |
|---|---|---|---|---|
| Qwen3.5-2B | none | 0 (reference) | 14% | — |
| Qwen3.5-2B | 0.5 | +0.09 [−0.02, 0.20] | 15% | 0.18 |
| Qwen3.5-2B | 1 | +0.20 [0.04, 0.38] | 22% | 0.35 |
| Qwen3.5-2B | 2 | +0.15 [−0.03, 0.36] | 61% | 0.51 |
| Qwen3.5-2B | 3 | +0.05 [−0.11, 0.22] | 85% | 0.39 |
| Qwen3.5-9B | none | 0 (reference) | 3% | — |
| Qwen3.5-9B | 0.5 | +0.06 [−0.04, 0.16] | 6% | 0.11 |
| Qwen3.5-9B | 1 | +0.11 [0.00, 0.24] | 9% | 0.24 |
| Qwen3.5-9B | 2 | +0.15 [−0.02, 0.36] | 41% | 0.43 |
| Qwen3.5-9B | 3 | −0.06 [−0.24, 0.15] | 80% | 0.56 |
At α = 1 per layer, answers lean toward the stored preference by +0.20 [0.04, 0.38] on the 2B and +0.11 [0.00, 0.24] on the 9B. That is significant, but small next to the in-context gain, and uneven across items: strong for early riser, prefers quiet, vegan and vegetarian; nothing for celiac, lactose intolerant or has young kids. At α = 2, incoherent answers jump from 22% to 61% (2B) and from 9% to 41% (9B), and the coherent lean no longer clears zero (+0.15 [−0.03, 0.36]; +0.15 [−0.02, 0.36]). The pre-registered claim required a gain at both doses, so it failed.
A correction to earlier versions of this page. They reported a large vegetarian effect from counting preference words. Word counts rise with the dose even when the text breaks down: here, the word-list lean gain on the 2B goes from +0.35 at α = 1 to +0.51 at α = 2, while the judged lean does not rise. The earlier count was inflated by incoherent text. The judged, pre-registered result above replaces it.
3.3 Facts come out as a word, not a statement
Asked to use a stored fact (“Write a short birthday message to my sister.”), the judged clean use, meaning the right fact used correctly in a coherent answer, is at most 0.15 (2B) and 0.12 (9B) at any dose, against 0.96–0.98 in context. At α ≥ 2, 86–94% of answers mention the fact without using it cleanly: “Petra Petra Petra …”. Injecting the same vector at earlier layers does not turn it into knowledge either; it fades, or garbles the answer (“My name is Omar.”).
The reason shows in the vector itself. Read through the model’s output vocabulary (the logit lens), a fact shift ranks the right name in the top 10 only from relative depth 0.833 (2B) and 0.875 (9B) onward; at half depth its median rank is about 71,000–75,000. A stored fact shift is an intention to say a word, present only near the output.
3.4 No premises
A premise is a fact the model can reason with. The test is a balanced pair of yes/no questions, one where Yes is right (“Is my dog called Pepper?”) and one where No is right (“Is my dog called Max?”); averaging the two accuracies means a model that drifts toward “No” scores 0.5, not more. No dose raises it. With a fact memory at α = 1, balanced accuracy stays at 0.50 on both models, the same as with no memory (0.50), against 0.98 with the fact in context; at α = 2 the 2B even loses (−0.15 [−0.27, −0.04]). The shifts in the Yes/No margins are a general tilt, not knowledge. The push also gets the owner wrong: pushed toward teal, the model said “Teal is my favourite colour!”. Section 5 shows that this, too, is a failure of the push, not of memory in general.
3.5 What you subtract decides the direction
A pushed vector is always “the state with the experience, minus a reference”. Three references matter: the opposite statement (“I love jazz”), the same message without the experience, and the mean over eight alternatives of the same kind (“I can’t stand rock / classical / … music”).
Data table
| model | reference subtracted | α per layer | judged lean gain [95% CI] | dislikes pushed the wrong way |
|---|---|---|---|---|
| Qwen3.5-2B | in context | +0.77 [0.52, 1.02] | ||
| Qwen3.5-2B | minus the opposite | 1 | +0.23 [0.05, 0.44] | 0% |
| Qwen3.5-2B | minus “without” | 1 | −0.25 [−0.50, −0.03] | 71% |
| Qwen3.5-2B | minus the alternatives | 1 | −0.38 [−0.57, −0.19] | 100% |
| Qwen3.5-9B | in context | +1.02 [0.77, 1.26] | ||
| Qwen3.5-9B | minus the opposite | 1 | +0.25 [0.02, 0.50] | 12% |
| Qwen3.5-9B | minus “without” | 1 | −0.31 [−0.54, −0.07] | 88% |
| Qwen3.5-9B | minus the alternatives | 1 | −0.37 [−0.59, −0.15] | 100% |
Only the opposite keeps a dislike a dislike: +0.23 (2B) and +0.25 (9B). Subtracting the alternatives turns every dislike into a like (−0.38, −0.37), and subtracting “without” does the same on most items (−0.25, −0.31). Inside the model, “I can’t stand jazz” is mostly jazz with a faint negation, so any reference without jazz in it leaves jazz behind. A preference has a what (the concept) and a which way (the sign), and no single subtraction keeps both.
3.6 How far to trust the judge
No human labels were collected. Instead, every core_v1 answer was re-judged by models from other families: gpt-oss-20B, Gemma-4-12B and Llama-3.1-8B, plus Qwen3.6 as a same-family reference that never votes.
| claim · model | Qwen3.5-9B (original) | gpt-oss-20B | Gemma-4-12B | majority: original + 3 | majority: 3 cross-family |
|---|---|---|---|---|---|
| C2 leanings transfer · 2B | fails | fails | fails | holds | holds |
| C2 leanings transfer · 9B | fails | fails | fails | holds | holds |
| C3 facts are not cleanly used · 2B | holds | holds | holds | holds | holds |
| C3 facts are not cleanly used · 9B | holds | holds | holds | holds | holds |
| C5 the reference decides direction · 2B | holds | holds | holds | holds | holds |
| C5 the reference decides direction · 9B | holds | holds | holds | holds | holds |
The majority votes are over the original judge plus the three cross-family judges, or over the three cross-family judges alone. The fact result (C3) and the direction result (C5) hold under the original judge, under gpt-oss and Gemma-4, and under both majority votes; under gpt-oss and Gemma-4 the alternatives push dislikes the wrong way even harder (−0.52 to −0.43). The leaning result (C2) is judge-sensitive: it fails under every single judge but holds under both majority votes, because the original judge is the strictest about coherence. Llama-3.1-8B is not trusted on its own: it labelled most fact answers as using the fact, including many where the name never appears. The same-family Qwen3.6 agrees on C3, and on C5 for the opposite and the alternatives, but not for “without”.
4Why: facts are bound by position
Work on how models track entities says a fact in context is bound through positions. The entity and its attribute carry a shared binding tag, an internal marker of which entity goes with which attribute (“the first pair”, “the second pair”), and attention heads find the attribute’s position and copy from it (Feng & Steinhardt, 2024; Prakash et al., 2024). Facts stored in the weights work differently: they are loaded onto the subject’s own position (Geva et al., 2023). Either way, a position does the work, and a push supplies none.
To see where our models read a fact from, the run takes “My dog’s name is Pepper. What’s my dog’s name?” and the same prompt with Rocky. It copies the internal state at one position and one layer from the Pepper run into the Rocky run, and measures how much of the model’s Pepper-versus-Rocky preference moves.
Data table
| model | layer | name position | question subject |
|---|---|---|---|
| Qwen2.5-1.5B | 0 | 1.00 | 0.00 |
| Qwen2.5-1.5B | 1 | 1.00 | −0.00 |
| Qwen2.5-1.5B | 2 | 1.00 | 0.00 |
| Qwen2.5-1.5B | 3 | 1.00 | −0.00 |
| Qwen2.5-1.5B | 4 | 1.00 | −0.00 |
| Qwen2.5-1.5B | 5 | 1.00 | −0.00 |
| Qwen2.5-1.5B | 6 | 1.00 | −0.00 |
| Qwen2.5-1.5B | 7 | 1.00 | −0.00 |
| Qwen2.5-1.5B | 8 | 1.00 | −0.00 |
| Qwen2.5-1.5B | 9 | 1.00 | −0.00 |
| Qwen2.5-1.5B | 10 | 1.00 | −0.00 |
| Qwen2.5-1.5B | 11 | 1.00 | −0.00 |
| Qwen2.5-1.5B | 12 | 1.00 | −0.00 |
| Qwen2.5-1.5B | 13 | 1.00 | 0.00 |
| Qwen2.5-1.5B | 14 | 1.00 | 0.00 |
| Qwen2.5-1.5B | 15 | 1.00 | 0.00 |
| Qwen2.5-1.5B | 16 | 1.00 | 0.00 |
| Qwen2.5-1.5B | 17 | 1.00 | 0.00 |
| Qwen2.5-1.5B | 18 | 1.00 | 0.00 |
| Qwen2.5-1.5B | 19 | 0.98 | 0.00 |
| Qwen2.5-1.5B | 20 | 0.98 | 0.00 |
| Qwen2.5-1.5B | 21 | 0.97 | 0.00 |
| Qwen2.5-1.5B | 22 | 0.84 | 0.00 |
| Qwen2.5-1.5B | 23 | 0.70 | 0.00 |
| Qwen2.5-1.5B | 24 | 0.46 | 0.00 |
| Qwen2.5-1.5B | 25 | 0.46 | 0.00 |
| Qwen2.5-1.5B | 26 | 0.31 | 0.00 |
| Qwen2.5-1.5B | 27 | 0.00 | 0.00 |
| Qwen3.5-2B | 0 | 1.00 | −0.00 |
| Qwen3.5-2B | 1 | 1.00 | −0.00 |
| Qwen3.5-2B | 2 | 1.00 | −0.00 |
| Qwen3.5-2B | 3 | 1.00 | 0.00 |
| Qwen3.5-2B | 4 | 1.00 | 0.00 |
| Qwen3.5-2B | 5 | 1.00 | 0.00 |
| Qwen3.5-2B | 6 | 1.00 | 0.00 |
| Qwen3.5-2B | 7 | 1.00 | 0.00 |
| Qwen3.5-2B | 8 | 1.00 | 0.00 |
| Qwen3.5-2B | 9 | 1.00 | 0.00 |
| Qwen3.5-2B | 10 | 1.00 | 0.00 |
| Qwen3.5-2B | 11 | 1.00 | 0.00 |
| Qwen3.5-2B | 12 | 1.00 | 0.00 |
| Qwen3.5-2B | 13 | 1.00 | 0.00 |
| Qwen3.5-2B | 14 | 1.00 | −0.00 |
| Qwen3.5-2B | 15 | 0.91 | 0.00 |
| Qwen3.5-2B | 16 | 0.88 | −0.00 |
| Qwen3.5-2B | 17 | 0.86 | −0.00 |
| Qwen3.5-2B | 18 | 0.85 | −0.00 |
| Qwen3.5-2B | 19 | 0.06 | 0.00 |
| Qwen3.5-2B | 20 | 0.00 | 0.00 |
| Qwen3.5-2B | 21 | 0.00 | 0.00 |
| Qwen3.5-2B | 22 | −0.00 | 0.00 |
| Qwen3.5-2B | 23 | 0.00 | 0.00 |
Patching the question’s subject moves 0.00 of the preference at every layer. Patching the name moves everything up to layer 18 (Qwen2.5) or 14 (Qwen3.5-2B), then falls: on the 2B to 0.06 by layer 19, because by then the answer position has already read the name. On Qwen2.5, blocking the answer’s view of the name costs 0.59 [0.41, 0.81] of the in-context gain, and only in the last layers. So the answer pulls “Pepper” from Pepper’s position, late; “my dog” is a label. It may still carry a pointer (a binding tag), which this patch cannot see, but it holds no copy of the value. Writing a stored state at the subject, the plan before this test, gave clean use 0.00.
5What a stored slice carries
If the value is read from its own position, the memory should give the model that position back. The slice does: the keys and values of the name and the full stop after it, stored in session 1 and put into the user’s turn in session 2 when the question mentions the subject. The tests use 7 fact items (a dog’s, cat’s, sister’s, brother’s, grandmother’s, best friend’s and boss’s name), with prompts that need the fact without asking for it, judged by the majority of three judges from three families.
Data table
| how the fact is carried | Qwen2.5-1.5B clean use [95% CI] | Qwen3.5-2B clean use [95% CI] |
|---|---|---|
| no memory | 0.00 [0.00, 0.00] | 0.00 [0.00, 0.00] |
| pushed vector (paper 1, α = 1) | not run | 0.15 [0.05, 0.27] |
| the same 2 tokens as text | 0.27 [0.06, 0.51] | 0.24 [0.06, 0.47] |
| 2-position slice, attention only | 0.86 [0.63, 1.00] | 0.67 [0.41, 0.91] |
| 2-position slice + recurrent state | n/a: no recurrent state | 0.97 [0.91, 1.00] |
| recurrent state only | n/a: no recurrent state | 0.00 [0.00, 0.00] |
| whole turn (+ state on the 2B) | 0.87 [0.71, 1.00] | 0.96 [0.89, 1.00] |
| stored after an unrelated chat | 0.80 [0.56, 1.00] | 0.99 [0.94, 1.00] |
| the sentence in context | 0.90 [0.71, 1.00] | 1.00 [1.00, 1.00] |
Scroll sideways to see the whole chart.
On Qwen2.5-1.5B, two stored positions give clean use 0.86 [0.63, 1.00], the whole turn 0.87, and the sentence in context 0.90. The same two tokens given as plain text in an earlier turn give 0.27 (difference −0.60 [−0.86, −0.34]), and 0.00 on the direct question. The slice carries more than its tokens because its keys and values were computed with the whole sentence in view. A slice stored after an unrelated exchange, and used without it, still gives 0.80.
- The gate keeps it selective. With the subject gate, unrelated answers are unchanged 1.000 of the time; with the same slice always on, 0.064.
- Ownership is fixed. The assistant claims the fact as its own in 0.01 of answers, the same as with the sentence in context (0.01). The slice sits in the user’s turn, so it reads as the user’s.
- Two positions are weaker on the direct question. “What’s my dog’s name?” gets 0.66 [0.40, 0.89] with two positions, against 0.91 for the whole turn.
- A wrong slice is used as confidently as a right one. Another fact’s slice, under this fact’s gate, puts the other value into 41% of answers.
What is and isn’t new. Putting back the whole turn is exactly prompt caching: the whole sentence as text in an earlier turn gives the same result (difference +0.00 [0.00, 0.00]). Reusing cached keys and values across requests, and fusing separately cached pieces, are known systems techniques (Prompt Cache, Gim et al., 2024; CacheBlend, Yao et al., 2025). Reusing a frozen model’s stored cache as memory in a later conversation, without training, is also prior work: MemArt (Zeng et al., ICLR 2026 submission) stores past turns as 16-token blocks and puts back the blocks that attention from the new question selects. What this work adds is a finer grain and the explanation: which two to eight single positions carry a fact, that such a slice beats the same tokens as text, where the answer reads the fact (the attribute’s own position, late), why separately stored slices swap partners (storage order, Section 6.1), and how the hybrid model splits the job between attention and its recurrent state.
5.1 On a hybrid model: the value and the verification come apart
Qwen3.5-2B attends at only 6 of its 24 blocks. There, the two-position slice alone gives clean use 0.67, and it refuses direct questions (“I don’t know your dog’s name!”; 0.20 on the direct question). Adding the recurrent state from the same stored turn gives 0.97 [0.91, 1.00] (direct question 0.89; change +0.30 [0.06, 0.57]), stored after an unrelated chat 0.99, in context 1.00. The state alone gives 0.00 clean use.
Data table
| what is restored | gain in log P(right name), nats [95% CI] | balanced yes/no [95% CI] |
|---|---|---|
| sentence in context | 10.65 [9.28, 11.98] | 1.00 [1.00, 1.00] |
| 2 positions + recurrent state | 10.79 [9.77, 11.80] | 1.00 [1.00, 1.00] |
| 2 positions, attention only | 10.01 [9.02, 11.10] | 0.50 [0.50, 0.50] |
| recurrent state only | 3.74 [3.03, 4.50] | 0.86 [0.71, 0.96] |
| conv buffer only | 0.66 [−0.28, 1.58] | 0.50 [0.50, 0.50] |
Teacher-forced, the split is clean. The two attention positions carry the value (+10.0 nats, against +10.6 in context), but yes/no stays at 0.50. The recurrent state alone verifies (yes/no 0.86) but carries only part of the value (+3.7 nats) and never recalls it in generation. The recognition is in the recurrent state, not the convolution buffer (0.50). Together, yes/no is 1.00. This matches Afendulev et al. (2026), who find within one session on Qwen3.5 that attention carries exact retrieval and the recurrent state carries familiarity and response mode. One difference: their state also says yes to associated but wrong items, and ours does not. Tested with names that look or sound like the right one or share its theme, the 2B’s state alone still tells them apart (balanced accuracy 0.96 on the hand-picked facts, 0.94 on 38 more). One caveat: the state is not small. It is about 4.7 million numbers (19 MB in fp32) whatever the length of the text.
Why does the attention-only slice refuse when the value is there? Mostly for a generic reason. A direction that separates personal questions (“What’s my blood type?”) from general ones (“What’s the most common blood type?”), built with no memory at all, lifts the 2B’s answers to direct questions on held-out facts from 0.12 to 0.67, close to the 0.76 of a direction built from other facts heard in context; the “I know this entity” direction does not explain it. So the slice holds the content, and what it lacks is the model’s signal to answer from it, a kind of licence. The recurrent state supplies that signal on the hybrid; on Qwen2.5, keeping the subject’s position (“sister”) in the slice does much the same, measured teacher-forced (see the subject-position page below). Pushing the direction in by hand is not a fix: with no memory, it makes the model invent a name. What a stored slice has to contain for the model to use it is the current question (Section 8).
5.2 Read the answers
The greedy answers of Qwen3.5-2B for each way of carrying the fact. Loops are shortened, so “Pepper Pepper Pepper …” appears as Pepper [×40].
6Where it breaks
6.1 Separately stored facts swap partners
Two facts, each stored in its own session, are put back together for one question: an older sister Petra and a younger sister Maria, or a dog and a cat.
Data table
| model | pairs | how the two facts were stored | correct [95% CI] | partner’s name [95% CI] |
|---|---|---|---|---|
| Qwen2.5-1.5B | confusable pairs (older / younger sister) | both in context | 0.93 [0.87, 0.98] | 0.01 [0.00, 0.05] |
| Qwen2.5-1.5B | confusable pairs (older / younger sister) | encoded together | 0.89 [0.77, 0.98] | 0.05 [0.00, 0.13] |
| Qwen2.5-1.5B | confusable pairs (older / younger sister) | stored separately | 0.51 [0.33, 0.70] | 0.35 [0.18, 0.53] |
| Qwen2.5-1.5B | confusable pairs (older / younger sister) | separately, shifted | 0.54 [0.34, 0.75] | 0.37 [0.18, 0.56] |
| Qwen2.5-1.5B | different subjects (dog / cat) | both in context | 0.91 [0.79, 1.00] | 0.03 [0.00, 0.13] |
| Qwen2.5-1.5B | different subjects (dog / cat) | encoded together | 0.97 [0.87, 1.00] | 0.00 [0.00, 0.00] |
| Qwen2.5-1.5B | different subjects (dog / cat) | stored separately | 0.62 [0.37, 0.83] | 0.28 [0.08, 0.53] |
| Qwen2.5-1.5B | different subjects (dog / cat) | separately, shifted | 0.62 [0.38, 0.84] | 0.26 [0.06, 0.48] |
| Qwen3.5-2B | confusable pairs (older / younger sister) | both in context | 0.91 [0.80, 0.98] | 0.05 [0.01, 0.11] |
| Qwen3.5-2B | confusable pairs (older / younger sister) | encoded together | 0.89 [0.77, 0.98] | 0.05 [0.00, 0.13] |
| Qwen3.5-2B | confusable pairs (older / younger sister) | stored separately | 0.59 [0.37, 0.80] | 0.28 [0.12, 0.47] |
| Qwen3.5-2B | confusable pairs (older / younger sister) | separately, shifted | 0.57 [0.36, 0.78] | 0.33 [0.15, 0.54] |
| Qwen3.5-2B | different subjects (dog / cat) | both in context | 0.97 [0.91, 1.00] | 0.00 [0.00, 0.00] |
| Qwen3.5-2B | different subjects (dog / cat) | encoded together | 1.00 [1.00, 1.00] | 0.00 [0.00, 0.00] |
| Qwen3.5-2B | different subjects (dog / cat) | stored separately | 0.76 [0.54, 0.92] | 0.19 [0.03, 0.40] |
| Qwen3.5-2B | different subjects (dog / cat) | separately, shifted | 0.71 [0.42, 0.91] | 0.22 [0.04, 0.49] |
Stored separately, the model gives the partner’s name in 19–37% of answers, even for a dog and a cat, and whether or not the positions overlap. Encoded together, both models answer correctly about as often as with both sentences in context (0.89–1.00 against 0.91–0.97).
The cause is storage order. A slice stored on its own is always “the first pair” of its conversation, so the question cannot tell two such slices apart. Storing the new fact after a dummy fact (“My gardener’s name is Brian.”), then dropping the dummy’s tokens, stores it as the second pair. That cuts partner confusion from 0.33–0.41 to 0.09–0.15 on three models (Qwen2.5-1.5B, Qwen3.5-2B and Llama-3.2-3B), against 0.01–0.05 when the two are encoded together. The binding sits at the subject’s positions (“younger sister”), and only joint encoding writes it there: on Qwen2.5 and Llama, adding the subject’s positions to a two-position slice cuts confusion from 0.20 and 0.17 to 0.03 and 0.01 when they come from a joint reading, and does not help when they come from separate ones (0.34 and 0.29). The tag cannot simply be added afterwards. Measured as Feng & Steinhardt do, the tag direction flips which partner the model prefers in 0.75 [0.69, 0.81] of held-out contexts in the late layers, against none for a random direction, but adding it to a stored slice does not reduce the swaps (change in confusion −0.02 [−0.14, 0.11]). With more facts, storing in order removes most swaps up to three facts (0.38–0.47 to 0.04–0.09 for facts of the same kind) and about halves them at five (0.51–0.55 to 0.22–0.30), where the errors give a neighbour’s name. Five memories of the same kind still have to be encoded together.
6.2 Retrieval works, and its errors are confident
With 59 stored facts on Qwen2.5-1.5B, a key built from the subject’s words picks the right slice for 0.85–0.92 of direct questions, depending on the layer, with no collapse as the store grows (a key from the whole text: 0.42–0.61; unrelated prompts open a gate 0–4% of the time). The right slice makes the right name as likely as the sentence in context does (+9.47 vs +9.48 nats). A wrong slice is worse than none: it pushes the right name down (−2.62 nats) and the model states the wrong value 0.86–0.90 of the time. In generation, on prompts that need the fact, the right slice gives 0.87 and the key’s own pick 0.49, with 0.16 confident wrong values. The right slice is in the top two 0.88–0.93 of the time, so checking the pick before using it is the obvious next piece.
One open check: on a pool of extra facts, asked only the direct question, the right slice did worse than in context. The direct question is also where two positions are weakest on the hand-picked facts, and teacher-forced the right slice matches the sentence in context on every one of the 59 facts, so this is most likely a prompt-type effect. It is being checked.
7The model can write its own references
Every pushed preference in paper 1 was written from hand-made comparison sentences: an opposite and eight alternatives. A real conversation has only the experience. So a model (Qwen3.5-9B) was given the experience sentence alone and asked to write the opposite and the alternatives; the memory then ran on Qwen3.5-2B as before.
Data table
| group | memory written from | α per layer | judged lean gain [95% CI] | items pushed the wrong way |
|---|---|---|---|---|
| Dislikes | in context | +0.77 [0.52, 1.02] | ||
| Dislikes | hand-written opposite | 1 | +0.23 [0.05, 0.44] | 0% |
| Dislikes | generated opposite | 1 | +0.19 [0.01, 0.40] | 29% |
| Dislikes | generated alternatives | 1 | −0.39 [−0.55, −0.21] | 100% |
| Dislikes | concept × read sign | 2 | +0.39 [0.19, 0.59] | 0% |
| Dislikes | concept × true sign | 2 | +0.39 [0.19, 0.59] | 0% |
| Leanings | in context | +0.72 [0.55, 0.89] | ||
| Leanings | hand-written opposite | 1 | +0.20 [0.04, 0.38] | 33% |
| Leanings | generated opposite | 1 | +0.17 [0.02, 0.33] | 27% |
| Leanings | generated alternatives | 1 | +0.27 [0.10, 0.45] | 21% |
| Leanings | concept × read sign | 2 | −0.09 [−0.29, 0.09] | 57% |
| Leanings | concept × true sign | 1 | +0.27 [0.10, 0.45] | 21% |
On dislikes, the generated opposite moves answers the right way (+0.19, hand-written +0.23), and the generated alternatives move them the wrong way (−0.39 [−0.55, −0.21], 100% of items wrong). That is paper 1’s direction result again, with no human-written reference, and it holds under every judge. The generated sentences are not copies of the hand-written ones, and the model kept some odd clauses (“I have celiac disease, so I can eat gluten.”), but the effect survives.
The open piece is the sign. A general like/dislike direction reads the sign of the 23 signed items with accuracy 0.43–0.52, about chance. It reads every dislike right but calls restrictions negative: vegan, lactose intolerant, a tight budget. “Avoid” is not “dislike”; the sign has to be read relative to the stored concept. With the true sign, concept × sign is the best leaning memory so far (+0.27 on leanings, +0.39 on dislikes); with the automatic sign, leanings do not improve (−0.09 [−0.29, 0.09]), because restrictions get the wrong sign.
On PrefEval (Zhao et al., 2025), 200 preferences that no one wrote references for, the generated opposite improves preference-following under every judge, modestly: +0.03 to +0.10 at α = 1, against +0.41 to +0.46 with the preference in context.
| judge | no-memory accuracy | generated opposite, α = 1 | α = 2 | experience in context |
|---|---|---|---|---|
| Qwen3.5-9B (original) | 0.10 | +0.03 [0.01, 0.05] | +0.05 [0.03, 0.07] | +0.43 [0.39, 0.48] |
| gpt-oss-20B | 0.26 | +0.06 [0.03, 0.09] | +0.14 [0.09, 0.18] | +0.43 [0.38, 0.48] |
| Gemma-4-12B | 0.46 | +0.10 [0.06, 0.13] | +0.16 [0.12, 0.21] | +0.41 [0.36, 0.46] |
| majority | 0.28 | +0.07 [0.04, 0.10] | +0.07 [0.03, 0.11] | +0.46 [0.40, 0.51] |
8Where this is going
The design that follows from these results has two channels and an offline phase.
- Slices for content. Facts, and anything else a later question has to look up, are stored as the model’s own keys and values at a few positions (plus the recurrent state on hybrid models), filed under their subject, and put back in the user’s turn.
- The push for abstracted leanings. The one job the push does well is a whole-answer leaning, at a low dose, stored with its sign.
- An offline “dreaming” phase for what one forward pass at write time can’t do: storing memories in order (the third memory stored as the third fact) or re-encoding those used together, so each gets its own binding tag; abstracting a leaning from many episodes; and choosing what is worth keeping. The idea of an offline “sleep” for language models is not new: SLEEP (Behrouz et al., 2026) trains new weights on the model’s own “dreams”, and sleep-time compute (Lin et al., 2025) rewrites the context as text before the question arrives. Here the model stays frozen, and the offline phase works on its own cached positions.
Open problems, roughly in order:
- Verify a retrieved slice before using it, and abstain when two candidates are close: a wrong slice is worse than none.
- Read the sign relative to the concept, so “I’m vegan” is stored as a leaning toward a diet and away from a food.
- Find what a slice needs to be used, not only to hold the fact. The refusal is mostly a generic gate (Section 5.1), and which entries are kept seems to decide whether it opens. In a comparison with published KV-compression selectors on LongMemEval (four models; Qwen2.5-1.5B and 7B, Llama-3.2-3B, Granite-4.2-30B), every selector that keeps the same number of entries in every attention head looks much better when we score the probability of the right answer than when the model’s own answers are generated and judged. The selector that did best on three of the four models, KVzip (Kim et al., 2025) with one budget shared across all layers and heads, closes most of that gap on two of them. Finding what it keeps is the next step.
- Train a small read adapter on the frozen model. The training-free reads now have clear limits (retrieval, the sign, the refusals), and trained fast-weight memories such as FwPKM (Zhao & Jones, 2026) show that learning when to read a memory helps. This is being explored alongside the training-free work.
A second write-up, on what binds a memory (the push, the slice, and the hybrid’s split), is in progress, with more controls and a second model family running now.
9Limits
- Small models, mostly one family. Qwen2.5-1.5B, Qwen3.5-2B and Qwen3.5-9B. The slice results have no generation runs on the 9B yet; outside the Qwen family, only Llama-3.2-3B, where the slice-versus-text and collision results replicate.
- Few items for the slice results. 7 hand-picked facts carry most of Sections 5 and 6, so the intervals are wide; retrieval used 59 facts.
- The judges are models. No human labels were collected. The cross-family panel agrees on the fact and direction results; the leaning result depends on the judge.
- The recurrent state is large (19 MB per memory on the 2B), so on hybrid models the slice is compact only for long episodes.
- The mechanism is cache reuse. The contribution is which part of the cache carries a fact, how little is needed, and why combining separately stored pieces fails, not the act of reusing a cache, across sessions included (MemArt, Section 5).
- One reading is inferred. Storage order causes the swaps, but that a shared tag is exactly what collides is not shown: storing both facts as the second pair brought the swaps back only on Qwen2.5.
·Explainers and newer results
Three companion pages: one explainer, and two results pages built from the run outputs like this one.
- Binding across positions: why one pooled vector cannot say which name goes with which pet, how attention reads a binding back by picking a slot, and why separately stored slices collide.
- The subject-position test: a stored two-position slice knows the name but often refuses to say it. Adding the subject’s stored position, and only that one, makes the model answer.
- Automatic slice selection: on LongMemEval, positions the model picks from its own dreamed questions beat random picks on all three models tested, but recover only a small part of what the whole stored turn gives.
·References
- Afendulev, Dontsov, Tutubalina, & Korznikov (2026). What attention recalls and recurrence controls in hybrid language models. arXiv:2609.04434.
- Behrouz, A., Hashemi, F., Javanmard, A., & Mirrokni, V. (2026). Language models need sleep: Learning to self-modify and consolidate memories (SLEEP). arXiv:2606.03979.
- Feng, J., & Steinhardt, J. (2024). How do language models bind entities in context? ICLR 2024.
- Geva, M., Bastings, J., Filippova, K., & Globerson, A. (2023). Dissecting recall of factual associations in auto-regressive language models. EMNLP 2023.
- Gim, I., Chen, G., Lee, S., Sarda, N., Khandelwal, A., & Zhong, L. (2024). Prompt Cache: Modular attention reuse for low-latency inference. MLSys 2024.
- Jumle, V. (2026). What survives when activation steering is used as memory. arXiv:2610.14958.
- Kim, J.-H., Kim, J., Kwon, S., Lee, J. W., Yun, S., & Song, H. O. (2025). KVzip: Query-agnostic KV cache compression with context reconstruction. NeurIPS 2025. arXiv:2505.23416.
- Lin, K., Snell, C., Wang, Y., Packer, C., Wooders, S., Stoica, I., & Gonzalez, J. E. (2025). Sleep-time compute: Beyond inference scaling at test-time. arXiv:2504.13171.
- Prakash, N., Rott Shaham, T., Haklay, T., Belinkov, Y., & Bau, D. (2024). Fine-tuning enhances existing mechanisms: A case study on entity tracking. ICLR 2024.
- Teyler, T. J., & DiScenna, P. (1986). The hippocampal memory indexing theory. Behavioral Neuroscience, 100(2), 147–154.
- Yao, J., Li, H., Liu, Y., Ray, S., Cheng, Y., Zhang, Q., Du, K., Lu, S., & Jiang, J. (2025). CacheBlend: Fast large language model serving for RAG with cached knowledge fusion. EuroSys 2025.
- Zeng, Y., Zuo, P., Lyu, M., Yang, X., Wu, H., Xu, Y., & Yu, Z. (2026). KVCache-centric memory for LLM agents (MemArt). ICLR 2026 submission. OpenReview.
- Zhao, S., Hong, M., Durmus, E., Liang, P., Sun, Y., & Wei, X. (2025). Do LLMs recognize your preferences? Evaluating personalized preference following in LLMs (PrefEval). ICLR 2025. arXiv:2502.09597.
- Zhao, T., & Jones, L. (2026). Fast-weight product key memory. arXiv:2601.00671.
·Appendix: runs, definitions, judges
Code, pre-registrations and run reports are in the Seahorse repository. Every chart on this page, and every number tied to a chart or a claim, is generated from the run outputs by tools/manuscript/build.py, so the page can be rebuilt when a run changes. The exceptions are the addendum 7–9 numbers and the selector comparison in Section 8, marked in the list of runs below.
Runs
core_v1_20261007_1820: paper 1, the push on Qwen3.5-2B and 9B (Figures 2 and 3, Section 3, the push rows of Figures 5 and 7), with the judge panel.dream_bind_stage0_20261011_2321: where the answer reads a fact, patching and knockout (Figure 4).dream_bind_gen_20261012_0038: slices on Qwen2.5-1.5B, the subject write, the gate, ownership (Figure 5, Section 5).dream_bind_state2b_20261012_1759: slices on Qwen3.5-2B with and without the recurrent state (Figures 5 and 7).dream_bind_add5_20261013_1255: the same tokens as text, and two-fact collisions (Figures 5, 7 and 8).dream_bind_add6_20261014_1608: the binding-tag repair, retrieval with up to 59 facts, the recurrent state versus the convolution buffer (Figure 6, Section 6).dream_bind_add7_20261022_1526,dream_bind_add8_20261025_1812anddream_bind_add9_20261030_0107: the state’s recognition against look-alike names, Llama-3.2-3B, storage order and the subject’s positions in collisions, the generic answer gate, and storage order with three and five facts (Sections 5.1, 6.1 and 9). These numbers are quoted from the run reports, as summarised indocs/dreaming/01-binding.md, not computed by the build.dream_compare_a_20261105_1822: published KV-compression selectors against ours on LongMemEval, four models, judged (Section 8). Quoted fromsummary_a.mdand the per-model reports, not computed by the build.dream_refs_20261015_1545anddream_refs_pe_20261015_1603: model-written references on 29 items and on PrefEval (Figure 9, Section 7).
Definitions
- Clean use: on a prompt that needs the fact without asking for it, the answer uses the right fact, correctly, in a coherent answer.
- Judged lean: +1 if the answer coherently recommends toward the user’s trait, −1 if away, 0 if neutral or incoherent. Gains are paired against no memory on the same prompt with the same random numbers.
- Balanced yes/no: the mean of the accuracies on Yes-correct and No-correct questions about the fact; 0.5 is chance.
- Loop: an answer whose repeated-4-gram rate is at least 0.3.
- Incoherent: loops, fragments, word salad or off-task text, as labelled by the judge.
- Loop-matched dose: the highest α at which at most 10% of answers loop, so references are compared at a fair strength.
- Intervals: 95%, from a bootstrap that resamples items, then prompts within items (2,000 draws).
Judges
The original judge is Qwen3.5-9B with a fixed rubric for direction and coherence. The panel re-judged paper 1’s answers with gpt-oss-20B, Gemma-4-12B and Llama-3.1-8B (not trusted as a single judge after it failed a sanity check; it counts as one voter in the majority votes), plus Qwen3.6-35B-A3B as a same-family reference. The slice runs use the majority of the original judge, gpt-oss and Gemma-4. Sampling: 1 greedy answer plus 4 samples per prompt (T = 1, top-p 0.95), with the same random numbers in every condition.