Seahorse · dream_select · 4 Nov 2026 · LongMemEval · Qwen2.5-1.5B, Qwen2.5-7B, Llama-3.2-3B

Can the model choose which tokens to remember?

A stored memory works if we keep the right few positions of the model’s cache. So far we chose them by hand. This test let the model choose them itself, on real conversational text from a memory benchmark, and checked the answers it later gave.

Partly. Positions picked from the model’s own dreamed questions beat random picks on all three models, and in generated answers on two of three, as pre-registered. But they recover only a small part of what the whole stored turn gives. And even the answer’s own tokens, picked with the label, rarely get used: the model has the content and still declines to answer. Picking the answer is not enough; the memory also has to carry what lets the model commit to it.
Background

Why this test

Seahorse stores a fact as a slice: the model’s own attention memory (keys and values, K,V) for a few positions of the sentence, put back in a later chat. With hand-picked positions (subject, value, full stop) a 3-position slice almost matched the whole sentence (the Subject-Position Test).

A real system can’t hand-pick: nobody labels which word is the answer. So this test asks: given a user turn known to hold a fact, can the model itself choose which k positions to keep? Which turn to store is still given (that is a separate, later problem).

Benchmark: LongMemEval (Wu et al., ICLR 2025), the 64 usable “single-session-user” questions. A user mentions something in passing in an ordinary chat (“I’ve been listening to audiobooks during my daily commute, which takes 45 minutes each way.”), and is later asked about it (“How long is my daily commute to work?”). The turns are natural text, 20 to 98 tokens.

The task
Session 1 “…my daily commute, which takes 45 minutes each way.” one user turn, read once selector picks k positions (k = 2, 4, 8) never sees the question stored slice: K,V of those k positions, all layers Session 2 [slice] + “How long is my daily commute to work?” → model answers Scored two ways: teacher-forced log P(gold answer), and generated answers judged by LongMemEval’s own correctness prompt (three judges).
The contenders

How each selector chooses

S-dreammain bet

The model writes 3 questions it expects the user might ask later about this turn. Keep the positions those questions attend to most.

S-attnno question

Keep the positions the turn’s own later words attend to most (like H2O / Memory3).

S-reconno question

The model repeats the turn; keep the positions it reads to do so. A KVzip-style selector, but averaged over heads and layers with one shared set of positions, where KVzip selects per head.

S-looexpensive reference

Drop each position in turn and keep the ones whose loss hurts the model’s own answers to the dreamed questions most.

randomfloor

k random positions (3 seeds).

gold@kcheats with the label

The answer’s own tokens and their neighbours. Shows what knowing the answer’s position buys.

Technical
  • Dreamer: the same model, greedy, with a frozen prompt (an instruction plus two invented examples; chosen on format only). Each model dreams its own questions and uses its own attention.
  • S-dream score: attention from each dreamed question’s tokens and the last prompt token to each stored content position, averaged over heads and layers, then summed over the 3 questions. Top-k. Choosing what to keep with stand-in queries made before the real question exists is a known idea: EpiCache scores positions with a patched prompt in place of the question (arXiv:2509.17396), Expected Attention with an estimate of future queries (arXiv:2510.00636). S-dream is one form of it.
  • S-attn: mean attention a position receives from later content tokens (mean, not sum, to avoid early-token bias). S-recon: mean attention from the teacher-forced repetition, averaged over heads and layers, with one set of positions kept at every layer and head. KVzip (Kim et al., NeurIPS 2025, arXiv:2505.23416) takes each KV head’s maximum and lets heads keep different positions, so S-recon is KVzip-style, not KVzip. S-loo: drop in log P(own greedy answer to each dream) when the position is removed.
  • Anchors: no memory; R-full (the whole turn as a slice, identical to the turn as an earlier text turn: max |Δlogit| ≤ 3e-4); ctx (turn and question in one user turn).
  • Gold: the gold answer’s tokens plus the next token (56 items where the answer appears verbatim). gold@k fills to k with the nearest neighbours.
Result 1 · teacher-forced

Dreamed questions beat random, but recover little

“Gap closed” puts the answer’s probability on a scale from no memory (0) to the whole stored turn (1). With 4 positions, dreamed questions close about a quarter to a third of the gap, on every model. Random closes almost nothing. The expensive leave-one-out reference does better, and the label-cheating gold does best, so better choices exist.

Gap closed by number of stored positions
0 = no memory, 1 = the whole turn stored. Mean over items (95% CI shown on hover).
S-dreamS-attnS-loo (reference)gold@k (uses the label)random
Pre-registered rule (k = 4): “dreamed questions select well” needed S-dream to beat random and plain attention, and close at least half the gap. It fails on all three models (it beats random everywhere; beats attention only on Llama). “Any attention selector beats random” holds on all three.
Technical: rule numbers
Result 2 · what they pick

Attention-based selectors love full stops

Why so little? Look at what gets picked. Punctuation is about 9% of the tokens in these turns, but half or more of what S-dream and S-recon keep on the Qwen models. Sentence ends attract attention (they summarise the sentence), but they don’t carry the answer. Leave-one-out, which judges positions by their effect on behaviour rather than by attention, rarely picks punctuation and finds the answer’s position far more often.

Share of picks that are punctuation (k = 4)
Dashed line = punctuation’s share of all tokens in the turns
How often the picks include the answer’s position (k = 4)
56 items where the answer appears verbatim in the turn
S-dream finds the answer no more often than random on the Qwen models (and more often on Llama). S-loo finds it in half to three quarters of items.

Four examples (Qwen2.5-1.5B, k = 4). The answer is underlined; blue tokens are a selector’s picks. Scores are teacher-forced log P(answer): higher is better.

Result 3 · generated answers, judged

In real answers: a small, replicated win, at a low level

Each model generated answers (1 greedy + 4 samples per question), judged by LongMemEval’s own correctness prompt with three judges (agreement 0.93–0.96). The pre-registered rule: S-dream beats random in judged correctness at k = 4, on at least 2 of 3 models. It replicates (Qwen2.5-7B and Llama-3.2-3B yes, Qwen2.5-1.5B no). At k = 8, S-dream also beats plain attention on the 7B and Llama.

Share of judged-correct answers
Light = k = 4, dark = k = 8. Dashed line = the whole turn stored (R-full).
k = 4k = 8whole turn (R-full)
Even with 8 positions, the best automatic selector reaches about a third of answers on the 7B and Llama (R-full: 0.87 and 0.77). Leave-one-out reaches 0.56 on the 7B.
Technical

Pre-registered rule (addendum 1): S-dream − random in judged correctness at k = 4, item bootstrap, lower bound > 0. Qwen2.5-1.5B +0.034 [−0.019, 0.094]; Qwen2.5-7B +0.081 [0.009, 0.162]; Llama-3.2-3B +0.116 [0.034, 0.197]. Replicates (2 of 3).

Judges: the original Qwen3.5-9B (bf16), gpt-oss and Gemma-4, LongMemEval’s single-session-user prompt verbatim (repo commit d6dc8b5); label = majority. 5,320 answers per model, all labelled by all three judges. Sampling: T 1, top-p 0.95, top-k 20, presence penalty 1.5, max 64 new tokens.

Result 4 · the important one

Having the answer isn’t enough to give it

Teacher-forced, keeping just the answer’s own tokens (gold) recovers most of the whole turn: the right answer becomes nearly as likely once the model is made to say it. In free generation the same memory is used far less, and on Qwen2.5-1.5B and Llama the model mostly refuses (“I don’t have specific information about…”), as if nothing had been stored.

This is the same split the Subject-Position Test found with hand-picked facts: some positions carry the content, others carry whatever lets the model commit to using it. Teacher forcing skips the decision to answer, so it hid the problem.

Gold slice: teacher-forced vs generated
Gap closed (0 = no memory, 1 = whole turn)
teacher-forcedgenerated, judged
Refusals in generated answers
Share of answers that refuse or claim no information
no memorygold slicewhole turn

Generated answers (Qwen2.5-7B, greedy):

“What is the name of my cat?” (Luna)
S-dream, k=4correctYour cat’s name is Luna.
S-attn, k=4refusesI’m sorry, but I don’t have any information about your cat’s name…
random, k=4refusesI’m sorry, but I don’t have any information about your cat’s name…
“How long did I wait for the decision on my asylum application?” (over a year)
whole turncorrect…as you mentioned waiting over a year for the decision on your asylum application.
golddeclinesTo provide an accurate answer, I would need more specific information about your asylum application…
“How long is my daily commute to work?” (45 minutes each way)
whole turncorrectYour daily commute to work is 45 minutes each way…
S-dream, k=4half…you mentioned it takes some time each way… One way: assuming it takes X hours.

The commute answer shows the content/licence split in miniature: the model knows a commute was mentioned and that it is “each way”, but not the 45 minutes.

Interpretation

What it means

Established

Automatic selection works a little: dreamed questions beat random on 3 of 3 models teacher-forced and 2 of 3 in judged answers. The pre-registered replication rule holds.

Established

Attention is the wrong signal on its own. It favours sentence ends; it rarely finds the answer. Behaviour-based selection (leave-one-out) does much better with the same dreamed questions.

Established

Content is not enough. Even the answer’s own tokens are mostly not used in free generation. Teacher-forced scores overstate a slice’s usefulness.

Reading (inferred)

A good automatic slice has to keep two kinds of position: the value, and whatever licenses an answer (in templated facts, the subject). Selecting for the answer’s probability alone misses the second.

Directions this suggests (not yet run):

  • A cheaper leave-one-out. Its signal is in behaviour, not attention. A gradient or attribution score with respect to the dreamed answers could approximate it in one pass.
  • Select for answering, not only for content. Score positions by how much they lower the refusal on dreamed questions, as well as by the answer’s probability.
  • Better dreamed questions. Some dreams asked about the help requested, or addressed the assistant as “you”. The 7B dreamed slightly better than the 1.5B (gap closed 0.32 vs 0.25).

Limits. 64 questions; which turn to store was given by the label; turns are short (≤ 98 tokens); one dreamer prompt; the hybrid models (Qwen3.5) are not yet run. The “ctx” anchor (turn and question in one message) scored below the stored turn in generation (e.g. 0.68 vs 0.87 on the 7B): with both in one message the model often answers the turn’s own request instead.

Reference

Files and numbers

Gap closed, every selector and budget