Introduction
A linear-attention layer reads its whole prefix through a state of fixed size. In its original form the state is a sum of key-value outer products [1], and the field has since improved how that matrix is written: data-dependent decay [2, 3], the delta rule with a gate [4, 5], efficient linear-attention architectures [6], bilinear recurrences with closed-loop control [7], richer state transitions [8, 9, 10], several memories with a router [11], bounded slots [12] and test-time optimisation of the state [13, 14, 15]. All of these keep the state as real-valued matrices updated by every token, and all of them meet the same limit: a superposition of many associations holds the gist of a context well and its exact contents poorly, so a fact seen once, thousands of tokens ago, is recovered only approximately or not at all.
The task asks for one model that does both jobs: an ordinary language model at short range, and a reader of a context far longer than the state could store verbatim. Two features of the task shape our answer. The state budget is set for the whole model, and how it is spread over the layers is part of the design. And a state scalar may hold anything the mixer chooses, including an integer. We therefore ask a different question from the methods above: if a large part of the budget is spent on a discrete record of what was observed, rather than on a compressed matrix, how much of a long context becomes exactly recoverable, and what does ordinary language modelling lose?
Method
Our model has 12 layers. Each layer owns its whole block: a pre-norm token mixer, a residual add, and a gated feed-forward layer. Eleven layers carry only a small temporal state. The first layer carries, in addition, a retrieval memory that takes most of the model-wide state budget.
A short exact window with keys revised in hindsight
Every layer compresses its normalised input to a latent and keeps the latents of the last 128 tokens as state; keys and values are recomputed from them, so the window costs 128 scalars per token instead of a full key and value. Eight of the twelve heads (sharing two key-value groups) attend inside that window.
The key of a token is ambiguous until the next few words show what role it plays. We therefore let later tokens revise it. Token contributes a witness vector with precision , and evidence survives only while a learned stay gate stays open, so a change point cuts it off:
A query at age sees the raw key for , the revision for , for and for . Each revision is published only once the words it depends on have been observed, so the read stays causal.
def _mature_keys(self, enc, key, value, pos):
# The key attached to an observation can become more precise after
# the next few words disambiguate its role. A change point cuts off
# that evidence. Each revision is published only at its own delay.
b,s,g,d=key.shape
stages=self.revision_times
stop,precision=self.revision_weight(enc).float().unflatten(-1,(g,2)).unbind(-1)
stay=(self.revision_life+stop).sigmoid().unsqueeze(-1)
weight=F.softplus(precision+self.revision_precision).unsqueeze(-1)
witness=self.revision_witness(enc).unflatten(-1,(g,-1))
posterior=key.float()
mass=torch.ones_like(weight)
survival=torch.ones_like(weight)
pad=stages[-1]
gates=F.pad(stay,(0,0,0,0,0,pad))
weights=F.pad(weight,(0,0,0,0,0,pad))
witness=F.pad(witness,(0,0,0,0,0,pad))
keys=[self._rotate(self._unit(key),pos)]
values=[value]
for lag in range(1,pad+1):
survival=survival*gates[:,lag:lag+s]
evidence=survival*weights[:,lag:lag+s]
observation=witness[:,lag:lag+s]
posterior=posterior+evidence*observation
mass=mass+evidence
if lag in stages:
estimate=(posterior/mass).type_as(key)
keys.append(self._rotate(self._unit(estimate),pos))
values.append(value)
return keys,valuesThe window attention adds a per-head log-age prior and an extra null slot with a zero value. Its logit is the log-partition of the prior plus a learned offset plus , where is the query's token-dependent bandwidth, so a query can put its mass on nothing when no key in the window matches.
Chunk summaries at a layer-specific rate
The remaining four heads of each layer read a coarser history. The layer cuts its latents into chunks of tokens (cycling with the layer index), summarises each chunk and keeps the last 32 summaries. A summary is two points rather than one, and , where is the chunk's attention-weighted mean and its weighted principal axis scaled to the standard deviation along it, so the pair preserves the mass, the centroid and the spread along one data-dependent direction.
def _summarize(self,raw):
# Match the mass, the centroid and the covariance along one
# data-dependent principal direction of each chronological section.
weights=self.summarize(raw).float().softmax(2)
mean=(weights*raw.float()).sum(2,keepdim=True)
if self.atoms==1:
return mean.type_as(raw)
dx=raw.float()-mean
contrast=(dx*self.axis_seed).sum(-1,keepdim=True)
axis=F.normalize((weights*contrast*dx).sum(2,keepdim=True),dim=-1,eps=1e-5)
contrast=(dx*axis).sum(-1,keepdim=True)
rms=(weights*contrast.square()).sum(2,keepdim=True).clamp_min(1e-5).rsqrt()
axis=(weights*contrast*dx).sum(2,keepdim=True)*rms
return torch.cat((mean-axis,mean+axis),2).type_as(raw)A feed-forward layer with a short causal filter
The feed-forward layer is a SiLU-gated layer of width 2472 whose first 768 value channels are passed through a causal depthwise filter over the current and three previous tokens before the gate. Each channel's four taps are a softmax of at initialisation, with preferred delays spread from 0 to 2.4, so different channels start as different short moving averages. The three carried input rows per channel are declared as the layer's convolution cache.
The first layer: a tape of observations and the passages that recur in it
The first layer's input is the token embedding, so its retrieval memory works on token identities. Each position is turned into a discrete observation: the 64-dimensional response is cut into three fields, each field is assigned to the nearest of 1024 learned centres, and the three cell indices are hashed into one integer . Since the embedding is fixed per token, is in effect a learned hash of the token. The state then holds:
- a tape of the most recent observation identities, one integer each;
- an entity directory: for each distinct identity, the latest residual-quantized code of its response, so a retrieved identity can be decoded back to a vector;
- an archive of retired 64-token pages, each with 40 tokens of leading context, chosen when they leave the tape;
- small side tables: a hashed frequency count of observations, a short buffer of recent word surprisals, a sparse skip index and a four-entry frontier for edit tracking.
Nothing else is carried. The suffix indexes used for lookup are deterministic functions of the tape and are rebuilt from it at every call, so they cost no state.
Lookup. For each position we hash the preceding 1, 2, 4 and 8 observations into suffix identifiers, sort the tape's identifiers of the same lengths, and take the most recent tape positions whose suffix equals the query's. Each such position proposes its successor on the tape as a continuation. Further candidates come from the archive and from a search for rare "landmark" words that appeared before the matching phrase: a word is ranked by its surprisal under the in-tape frequency, and a past occurrence of the phrase is supported when the same rare word sits at a plausible displacement before it.
def _tape_postings(self,catalog,request,seen,clock):
b,size=catalog.shape
t=request.shape[1]
word=catalog.long()
context=F.pad(word,(8,0)).unfold(1,8,1)[:,:-1].flip(-1)
writes=self._context_ids(context).transpose(1,2)
routes=self._context_ids(request).transpose(1,2)
n=writes.shape[1]
times=torch.arange(size,device=word.device)
ordered,perm=(writes*(size+1)+times).sort(dim=-1)
limit=(routes*(size+1)+times[seen:seen+t]).contiguous()
upper=torch.searchsorted(ordered.contiguous(),limit,right=True)
rows=torch.arange(1,self.link_rows+1,device=word.device)
at=(upper.unsqueeze(-1)-rows).clamp_min(0)
batch=torch.arange(b,device=word.device)[:,None,None,None]
bank=torch.arange(n,device=word.device)[None,:,None,None]
pos=perm[batch,bank,at]
fits=(upper.unsqueeze(-1)>=rows)&(writes[batch,bank,pos]==routes.unsqueeze(-1))
found=torch.where(fits,pos+clock-seen,-1)
extra,chart=self._joined_positions(ordered,routes,torch.where(fits,pos,-1),catalog,seen,clock)
chance=self._coincidence(ordered,catalog,seen,clock)
return found.transpose(1,2).reshape(b,t,-1),extra,chart,chanceScoring. A candidate whose preceding observations agree with the query's for the first positions gets, for each of three mixture components ,
with learned gains and offsets . We then add evidence that does not come from the literal match: agreement of landmark words, a bonus for a match that continues past the point where rival sources diverge, and a correction for coincidence. For a matched phrase of width we split it into two halves of sizes in , count the earlier occurrences and of each half, and take the expected number of accidental joint matches over observations. Its surprise , paid for the number of widths tried,
raises a candidate's score by . A match that would happen by chance in a text of this length therefore earns no credit, however long it is.
ix=loc.clamp(0,table.shape[1]-1)
successor=table[batch[:,None,None],ix].long()
ih=(loc.unsqueeze(-1)-past).clamp(0,table.shape[1]-1)
cue=table[batch[:,None,None,None],ih]
actual=context[:,lo+1:hi+1].unsqueeze(2)
same=(cue==actual)&(loc[...,None]-past>=boundary.unsqueeze(-1))
prefix=same.float().cumprod(-1)
scores=F.linear(prefix,self.suffix_gain.float(),self.null_odds.float()).float()
scores=scores+self.skip_prior*new_source.unsqueeze(-1)
valid=unique&(successor>0)&same[...,0]
valid_places=torch.where(valid)
scores=scores.masked_fill(~valid.unsqueeze(-1),-100.)
length=prefix.sum(-1).long()
extent=self._match_extent(catalog,seen,table,loc,boundary,valid_places)
common=chart[-1].clamp_min(self.context_size).unsqueeze(-1)
if clock>=self.raw_span:
count=born.shape[-1]
common=torch.cat((common.expand_as(extent[:,:,:-count]),chart_old[-1].clamp_min(self.context_size).unsqueeze(-1).expand_as(born)),-1)
shared=torch.minimum(extent,common)
verify=self._verify_sparse(loc,shared,table,0,0,boundary,words,info,offset,valid_places)
if clock>=self.raw_span:
fresh=self._join_evidence(chart,dated[:,:,:-count],valid[:,:,:-count],shared[:,:,:-count],start)
remote=self._join_evidence(chart_old,past_loc,valid[:,:,-count:],shared[:,:,-count:],0)
verify=verify+torch.cat((fresh,remote),-1)
else:
verify=verify+self._join_evidence(chart,dated,valid,shared,start)
# A continuation of the literal match past the branch point is
# independent evidence that these two contexts have a common origin.
longer=(extent-common).clamp_min(0).float()
verify=verify+longer.clamp_max(12.)
scores=self._join_allocation(scores,from_base,valid,length)
scores=self._condition_sources(scores,verify,valid,length)
scores=self._admit_coincidence(scores,coincidence,extent,valid)
credit=self._origin_evidence(coincidence,extent)
scores=self._persistent_sources(scores,dated,successor,extent,valid,credit)
weights=F.pad(scores.transpose(-1,-2),(0,1)).softmax(-1)[...,:-1]
mixture=self.select(z[:,lo:hi]).softmax(-1).unsqueeze(-1)
mass=(weights.float()*mixture.float()).sum(-2)
alive=(self.origin_prior+credit+torch.log1p(verify.clamp(0.,16.))).sigmoid()Persistence. When several sources share the longest matching ending but propose different continuations, the question is whether the latest one will repeat or all of them are exchangeable. Among such sources ordered by date, we count adjacent agreements and estimate the chance agreement from unordered matching pairs with the adjacent ones removed. With a learned inertia , the persistence hypothesis predicts agreement at rate , which gives the log-odds
and a trust . The candidates' weights become a mixture: of the exchangeable forecast and of the forecast that repeats the latest continuation.
def _persistent_sources(self,scores,dated,successor,extent,valid,credit):
# Two forecasts share the evidence for the most specific ending.
# An exchangeable source uses all matching responses. A persistent
# source may repeat its latest response. Consecutive agreements
# compared with random pairs update the odds between the forecasts.
top=extent.masked_fill(~valid,0).amax(-1,keepdim=True)
member=valid&(extent==top)&(credit>0)
take=torch.where(member.sum(-1)>=2)
keep=member[take]
date=dated[take]
value=successor[take]
order=date.masked_fill(~keep,-1).argsort(dim=-1,stable=True)
ordered=value.gather(-1,order)
live=keep.gather(-1,order)
count=keep.sum(-1).double()
adjacent=((ordered[...,1:]==ordered[...,:-1])&live[...,:-1]).sum(-1).double()
# Unordered matching pairs estimate the chance agreement under
# exchangeability. Remove the very neighbors being tested.
sorted_values=value.masked_fill(~keep,-1).sort(-1).values.contiguous()
labels=value.contiguous()
end=torch.searchsorted(sorted_values,labels,right=True)
start=torch.searchsorted(sorted_values,labels)
matches=.5*((end-start-1)*keep).double().sum(-1)
comparisons=.5*(count-1.)*(count-2.)
chance=(.5+(matches-adjacent).clamp_min(0.))/(1.+comparisons)
inertia=torch.as_tensor(self.source_inertia,dtype=torch.float64,device=scores.device).sigmoid()
persistence=chance+inertia*(1.-chance)
odds=adjacent*(persistence/chance).log()+(count-1.-adjacent)*torch.log1p(-inertia)
posterior=(torch.as_tensor(self.persistence_prior,dtype=torch.float64,device=scores.device)+odds).sigmoid()
focus=credit[take].masked_fill(~keep,0.).amax(-1).double()
trust=posterior*inertia*(-torch.expm1(-focus))
latest=ordered[:,-1:]
final=(value==latest)&keep
old=scores[take].double()
conditional=old.masked_fill(~keep.unsqueeze(-1),-float('inf'))
latest_score=old.masked_fill(~final.unsqueeze(-1),-float('inf'))
mass=(latest_score.logsumexp(-2)-conditional.logsumexp(-2)).exp()
change=(1.-trust[:,None,None])+trust[:,None,None]*final.unsqueeze(-1)/mass.clamp_min(1e-20).unsqueeze(-2)
revised=old+torch.where(keep.unsqueeze(-1),change.clamp_min(1e-20).log(),torch.zeros_like(change))
return scores.index_put(take,revised.type_as(scores))Edits. The four strongest sources are kept for one more step in a small frontier. If the next observation differs from what a source predicted, the source may have met a substitution, an insertion or an omission; each hypothesis receives a learned prior, and a substitution is weighted by how close the two observations are in response space. Confirmation one token later re-aligns the source.
Readout. The weights are a softmax over candidates plus a zero-logit null, mixed over the three components by . Each candidate's successor identity is looked up in the entity directory and decoded to a response vector; the weighted response is projected back to the model width and added to the residual stream with a learned gain times the input's RMS. The first layer thus writes a forecast of the next token's representation into the residual stream, and the remaining layers decide how to use it.
Storing responses compactly
The entity directory stores each response as a two-stage residual vector quantization over eight 8-dimensional fields, each field rotated into a common frame by its own orthogonal butterfly. The codebooks are initialised from the 240 roots of the lattice and the 16 coordinate poles at three radii, and the atoms of each record are stored in decreasing order of the distortion each removed. When the directory is full we keep, across records, the atom prefixes with the largest gain per scalar, priced along the upper concave hull of each record's cumulative fidelity. On decoding, the stored order is itself used: it is a set of inequalities on the forgotten coordinates, and we move the estimate along them by a Gaussian moment match; a learned predictor fills in fields whose atoms were dropped.
Archive
When the tape fills, every group of pages that is about to leave is scored on two empirical quantities measured over its whole residence: how surprising its words were under the tape's own unigram and bigram counts, and how often its word pairs recurred. A dual price decides how many pages of each kind stay; overlapping pages share their common words. Archived pages can be matched like the tape, using their original dates.
Training
The first layer adds five auxiliary terms to the language-model loss: fitting the identity centres and the quantizer to the responses, the completion predictor, a frequency prior, and a ranking term on positions where both right and wrong candidates exist, with weights 0.04, 0.02, 0.045, 0.012 and 0.025. The model trains with a peak learning rate of 0.0024 and micro-batches of 8 with 8 accumulation steps.
seen = min(position,self.local_window)
near = torch.cat((tail[:,self.local_window-seen:],enc),1)
d=self.head_v_dim
key,val=F.linear(near,self.expand.weight[:-2*d]).unflatten(-1,(self.groups-1,2*d)).chunk(2,-1)
pos=torch.arange(position-seen,position+t,device=x.device).float()
query=self._unit(self.query(z).unflatten(-1,(self.heads,d)))
band=(self.log_band+.5*self.bandwidth(z).float().tanh()).clamp(-1.5,1.8).exp()
query=query*band.unsqueeze(-1).type_as(query)
local_q,far_q=query.split((self.heads-self.heads//self.groups,self.heads//self.groups),-2)
keys,values=self._mature_keys(near,key,val,pos)
local=self._local(self._rotate(local_q,pos[seen:]),keys,values,band[...,:local_q.shape[-2]])
coarse,cache=self._sections(enc,tail,far_q,position,cache,return_state)
attended=torch.cat((local,coarse),-2).reshape(b,t,w)
y = x+self.project(attended)
if self.indexed:
replay,old,aux = self._associations(z,enc,tail,position,old,return_state,x)
amp = x.float().square().mean(-1,keepdim=True).clamp_min(1e-8).sqrt()
y = y+replay*(self.gain*amp).type_as(replay)
v0,g = self.ff(self.post(y)).chunk(2,-1)
features,windows=self._event_features(v0,g,None if state is None else state[3:6],return_state)
result = y+self.c_proj(features)Results
| Method | ① | ② | ③ | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Validation loss ↓ | LAMBADA perplexity ↓ | WikiText-2 perplexity ↓ | Long-window validation loss ↓ | Long-window tail loss ↓ | Long-window WikiText-2 loss ↓ | NIAH-1 NLL ↓ | NIAH-1 16k ↓ | RULER S-NIAH-2 NLL ↓ | RULER S-NIAH-3 NLL ↓ | SQuAD answer accuracy ↑ | |
| GPT-6.2 Astra | 3.277 | 40.64 | 32.00 | 3.223 | 3.218 | 3.391 | 3.059 | 3.281 | 2.987 | 0.544 | 22.52 |
| Linear Transformer | 3.976 | 68.01 | 86.42 | 6.423 | 8.181 | 6.288 | 8.202 | 10.47 | 8.257 | 5.434 | 3.820 |
| GLA | 3.407 | 44.39 | 41.98 | 3.358 | 3.348 | 3.698 | 6.600 | 7.210 | 6.065 | 4.208 | 14.18 |
| Gated Slot Attention | 3.406 | 44.65 | 41.27 | 3.354 | 3.342 | 3.681 | 3.076 | 5.355 | 4.791 | 3.983 | 11.33 |
| Mixture-of-Memories | 3.369 | 41.88 | 36.95 | 3.318 | 3.308 | 3.560 | 3.881 | 6.364 | 4.432 | 3.137 | 14.14 |
| Gated DeltaNet | 3.314 | 40.80 | 33.19 | 3.260 | 3.253 | 3.443 | 1.611 | 4.315 | 4.616 | 2.873 | 17.53 |
| Gated DeltaNet-2 | 3.283 | 39.76 | 31.63 | 3.230 | 3.223 | 3.392 | 2.981 | 5.777 | 4.613 | 2.886 | 19.81 |
| Kimi Delta Attention | 3.290 | 40.64 | 32.47 | 3.236 | 3.227 | 3.416 | 1.968 | 4.780 | 4.379 | 2.671 | 19.40 |
| Comba | 3.296 | 40.09 | 32.13 | 3.243 | 3.235 | 3.410 | 1.808 | 2.811 | 4.320 | 2.488 | 19.64 |
| RWKV-7 | 3.296 | 40.83 | 33.48 | 3.244 | 3.235 | 3.455 | 2.062 | 5.083 | 4.734 | 3.291 | 16.49 |
| Mamba-2 | 3.301 | 42.22 | 36.73 | 3.250 | 3.239 | 3.564 | 4.690 | 7.259 | 5.939 | 4.079 | 13.67 |
| Mamba-3 | 3.300 | 42.16 | 34.02 | 3.248 | 3.243 | 3.480 | 4.238 | 7.385 | 5.562 | 3.583 | 17.36 |
| OmegaNet | 3.402 | 44.87 | 39.14 | 3.349 | 3.339 | 3.612 | 2.775 | 3.648 | 5.282 | 3.307 | 13.34 |
| In-Place TTT | 3.400 | 42.25 | 40.49 | 3.372 | 3.407 | 4.204 | 8.899 | 14.51 | 5.262 | 3.684 | 13.64 |
| IP-TTCD | 3.443 | 43.61 | 46.75 | 6.330 | 12.14 | 4.212 | 6.838 | 14.92 | 6.414 | 4.665 | 13.14 |
| TTT-Linear | 3.416 | 44.01 | 39.08 | 3.477 | 3.657 | 3.687 | 2.107 | 5.414 | 6.012 | 4.065 | 13.34 |
| MesaNet | 3.379 | 44.55 | 36.09 | 3.326 | 3.317 | 3.526 | 2.603 | 5.960 | 4.184 | 2.871 | 16.09 |
| Mamba-3 MIMO | 3.273 | 40.48 | 32.60 | 3.220 | 3.212 | 3.430 | 3.820 | 6.731 | 4.299 | 2.774 | 18.23 |
- ① 124M FineWeb pretraining · 4k context · validation, WikiText-2 and LAMBADA
- ② Same checkpoint · 16k-window validation / WikiText-2
- ③ Same checkpoint · SQuAD completion + RULER needle recall at 4k and 16k
Retrieval. This is where the discrete memory pays off. On Recall our retrieval NLL (3) is 0.544, against 2.488 for the strongest baseline, Comba [7]. Our retrieval NLL (2) is 2.987 against 3.894 (GDN-2, half batch), and our SQuAD answer accuracy is 22.52 against 19.81 (Gated DeltaNet-2 [5]). On the longer NIAH-1 probe we reach 3.281, second to Comba [7] at 2.811. On the first planted-item probe at its shorter length the picture reverses: our NIAH-1 NLL of 3.059 is behind nine of the eighteen baselines, the best being Gated DeltaNet [4] at 1.611. Our memory is built for exact recurrence of a phrase; we do not know from our own measurements which property of this probe it fails to exploit.
Ordinary language modelling. On Pretrain our validation loss is 3.277, ahead of Gated DeltaNet-2 at 3.283 and behind the strongest baseline, GDN-2, half batch, at 3.271. Our LAMBADA perplexity of 40.64 and WikiText-2 perplexity of 32.00 are likewise close to, and not ahead of, the strongest baselines (39.54 and 30.79).
Long context. On Long-ctx the same holds: a long-context validation loss of 3.223 against 3.218, a tail loss of 3.218 against 3.212, and a long-context WikiText-2 loss of 3.391 against 3.364. The tail loss is lower than the loss over the whole input, so the model does not degrade on late positions, but the gain that retrieval brings on recall does not show up as a gain in average cross-entropy on natural long text.
How we got here
The method was reached through about two dozen promoted versions, each one tested on our own development probes: models trained on public web and book text, repeated passages and random bindings placed at increasing gaps, and paraphrased questions. The numbers below are our development measurements, as recorded in the trace.
- The starting idea was to store a context together with its successor. Early reference runs showed Gated DeltaNet [4] reaching a held-out loss of 4.88 on a small run while its loss on a passage repeated 2,048 tokens later stayed at 5.33. Our first successor memory recovered 94.7% of random associations at 8,192 tokens after training on 512-token sequences, but its gain on natural text was small, and a later paired control showed its benefit near zero at 8,192 tokens.
- Storing each response once and referring to it was the first large step: the gain from a matching passage at a 32,768-token gap rose from 0.065 to 0.845 nats. A shared occurrence index then moved repeated-passage loss at an 8,192-token gap from 1.988 to 1.030 while the held-out loss also improved slightly, and an evidence-calibrated version reached a validation loss of 3.870 against 3.960 for Gated DeltaNet-2 at the same 105 million training tokens.
- The compressed dictionary came from a diagnosis: on 32k-token binding probes, losing the stored value caused more failures than choosing the wrong source. Sixteen quantized coordinates kept a cosine of 0.960 to the original response, and in matched 65,536-token tests passage-copy accuracy rose from 38% to 77% and binding accuracy from 14% to 55%, at a cost of 3.870 to 3.872 in held-out loss.
- Hindsight keys lowered held-out cross-entropy from 3.8740 to 3.8453 at 104.9 million tokens, but raised repeated-passage loss at 8,192 tokens from 0.8782 to 0.9640; we then tested whether the larger tape we were developing at the same time could recover it.
- Landmark words and shared endings answered a specific failure: at an 8,192-token gap the mixer answered all 72 literal six-choice queries, but only 16.7% when 48 entries shared the same ending; indexing a distinguishing word from the preceding passage raised that 48-way accuracy to 70.8% for literal queries and from 8.3% to 23.6% for paraphrased ones. Measuring all candidates against the shared ending later raised paraphrase choice on a longer-ending test from 35% to 79% with literal choice at 100%.
- The coincidence test replaced a dead end. A diagnostic showed the mixer found the right source for all 576 test bindings at 8,192 tokens but put only 0.66 of the probability mass on the answer. Our first remedy, an online trust estimator, lowered binding accuracy from 64.6% to 56.6%; estimating instead how often the matching phrase could occur by chance raised it to 78.1% with the same weights, and at a 1,048,576-token gap from 32.8% to 58.6% on 30 held-out streams.
- The edit frontier came from a one-word substitution one token before the answer, which dropped literal recovery to 8.6%; keeping the earlier source alive one more observation raised it to 89.8%. The unrestricted version slightly increased ordinary text loss, which is why the frontier ranks its sources by the evidence that they share an origin with the current passage.
Several directions did not survive as tried. A two-hop association read failed, which we traced to an overcounted transition, and it is not part of the final design. A sparse index that extended the searchable history from about 95,000 to 241,000 tokens recovered 91% of binding sources at a 196,608-token gap, but skipping common one-token cues hurt ordinary language loss, so we went on to test a version that keeps those cues. A diversity rule for retained passages gave mixed results and was not adopted. Throughout, paraphrase remained harder than literal repetition. Our largest matched run also showed the cost on ordinary text: at 1.05 billion training tokens an earlier archive version reached 3.3606 cross-entropy against 3.3488 for Gated DeltaNet-2 [5].
Limitations
- Recall is bought with exact matching. Most of our state holds integers: observation identities, dates and codebook indices. That is what makes a phrase seen once recoverable after a long gap, and it is also why the memory helps little when the wording changes. Our own development probes showed paraphrase consistently below literal repetition.
- No gain on ordinary or long-context language modelling. On Pretrain and Long-ctx we are close to the strongest baselines but behind them on every measure, so the retrieval memory has not been shown to improve average cross-entropy.
- The first planted-item probe is a weakness. On Recall nine baselines beat our NIAH-1 NLL, and we have no measured explanation.
- The final version had the least testing. Our longest matched comparisons against Gated DeltaNet-2 were run on earlier versions; the last versions were promoted in the final minutes of the run on the strength of shorter tests, so their effect on ordinary text at full scale was not measured before submission.
- Complexity and speed. The first layer is over a thousand lines of sorting, searching and hashing, with many hand-set constants (the initial gains in the suffix score, the radius of landmark search, the archive guard and page size). Our final throughput check measured about 64,800 training tokens per second on one GPU; an earlier version had measured 87,625. The design is far harder to implement efficiently, or to reason about, than a matrix-valued recurrence.
- The memory sits in one layer. All retrieval happens on the token identities seen by the first layer, before any contextual processing; the deeper layers only keep short windows and chunk summaries, so recall of anything other than a surface phrase depends on what the first layer's forecast lets them reconstruct.
References
- Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas et al. (2020). Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention. ICML.
- Songlin Yang, Bailin Wang, Yikang Shen et al. (2024). Gated Linear Attention Transformers with Hardware-Efficient Training. ICML.
- Tri Dao, Albert Gu (2024). Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality. ICML.
- Songlin Yang, Jan Kautz, Ali Hatamizadeh (2025). Gated Delta Networks: Improving Mamba2 with Delta Rule. ICLR.
- Ali Hatamizadeh, Yejin Choi, Jan Kautz (2026). Gated DeltaNet-2: Decoupling Erase and Write in Linear Attention. NeurIPS.
- Kimi Team, Yu Zhang, Zongyu Lin et al. (2025). Kimi Linear: An Expressive, Efficient Attention Architecture.
- Jiaxi Hu, Yongqi Pan, Jusen Du et al. (2025). Comba: Improving Bilinear RNNs with Closed-loop Control.
- Bo Peng, Ruichong Zhang, Daniel Goldstein et al. (2025). RWKV-7 "Goose" with Expressive Dynamic State Evolution. COLM.
- Julien Siems, Timur Carstensen, Arber Zela et al. (2025). DeltaProduct: Improving State-Tracking in Linear RNNs via Householder Products. NeurIPS.
- Aakash Lahoti, Kevin Y. Li, Berlin Chen et al. (2026). Mamba-3: Improved Sequence Modeling using State Space Principles. ICLR.
- Jusen Du, Weigao Sun, Disen Lan et al. (2026). MoM: Linear Sequence Modeling with Mixture-of-Memories. ICLR.
- Yu Zhang, Songlin Yang, Ruijie Zhu et al. (2024). Gated Slot Attention for Efficient Linear-Time Sequence Modeling. NeurIPS.
- Yu Sun, Xinhao Li, Karan Dalal et al. (2025). Learning to (Learn at Test Time): RNNs with Expressive Hidden States. ICML.
- Johannes von Oswald, Nino Scherrer, Seijin Kobayashi et al. (2026). MesaNet: Sequence Modeling by Locally Optimal Test-Time Training. ICLR.
- Ali Behrouz, Zeman Li, Praneeth Kacham et al. (2026). ATLAS: Learning to Optimally Memorize the Context at Test Time. ICML.
- Guhao Feng, Shengjie Luo, Kai Hua et al. (2026). In-Place Test-Time Training. ICLR.
- Zixuan Wang, Xingyu Dang, Rui-Jie Zhu et al. (2026). Learning What to Remember: Test-Time Training via Context Distillation.