Summary (Overview)
- Key Contribution: The paper introduces NoteBank, a training-free, plug-and-play sparse episodic memory system that decouples evidence preservation from recurrent computation in linear attention models, challenging the prevailing view that fixed-size recurrent states impose a fundamental ceiling on long-context capability.
- Major Result: At one million tokens, NoteBank raises Gated DeltaNet's mean accuracy across six RULER retrieval tasks from 1.7% to 70.3%, with no significant retrieval degradation from 4K to 1M tokens.
- Efficiency: The approach adds ≤0.025% to analytical FLOPs and requires persistent context storage approximately 1/2,600 that of a Transformer's full MHA KV cache at matched width, depth, and precision.
- Generality: Benefits extend across multiple architectures—from 1.3B research models (GDN, GDN-2, Mamba-2) to larger post-trained models (Mamba-2-8B, Qwen3.5-9B)—with improvements on LongBench-v1/v2 and MemoryAgentBench.
- Key Insight: Poor long-range retention through a recurrent state need not imply an inability to use distant evidence once that evidence is independently preserved and made accessible.
Introduction and Theoretical Foundation
Background and Motivation
Long-context capability enables language models to reason over extensive documents, conversations, and interaction histories. However, full softmax attention requires quadratic computation and a key-value cache that grows linearly with sequence length. Linear attention offers an alternative by compressing history into a fixed-size memory state updated as each new token arrives.
The Core Challenge
The paper identifies a fundamental tension in linear attention models: a single recurrent state must serve two competing roles:
- Ongoing computation: The state must continually transform and compress history
- Long-term memory: Specific past evidence must remain recoverable even when relevance emerges only later
As history grows while the state remains fixed in size, continual compression risks irreversibly discarding evidence before its future relevance is known. Prior work establishes finite-state limits on exact copying (Jelassi et al., 2024), identifies recency bias and over-smoothing in selective state-space models (Wang et al., 2025b), and documents substantial associative-recall gaps in efficient attention alternatives (Arora et al., 2024b).
Theoretical Foundation
The paper builds on the mathematical framework of linear attention. For a single layer and head, the backbone's feature transformations produce query and key vectors and a value vector from input representations at token position . The recurrent memory update is:
where serves as a compressed memory of the prefix, controls memory retention and transformation, and controls write strength. Standard additive linear attention sets and ; gated and delta-rule variants modify these updates.
The problem setup considers a pretrained model processing context before receiving a question . The model reads causally, retaining an inference state consisting of recurrent states and auxiliary caches. When arrives, it generates a response . Access to preceding context is limited to what remains in , meaning evidence must be preserved before the model knows which information the question will require.
Methodology
NoteBank Architecture
NoteBank maintains a sparse episodic archive alongside the backbone's unchanged state updates. After processing context tokens, the archive is:
where is the number of stored notes, contains a span's original token IDs, and each address is a compact vector derived from native query features within that span.
Write (Top-W Selection)
The context is partitioned into consecutive, non-overlapping chunks of tokens. Once a chunk accumulates tokens, the writer scores tokens by native-key distinctiveness:
where contains positions in the chunk containing , and is the normalised mean of keys in that chunk. Hats denote normalisation.
For each selected text segment with token positions , the address is constructed by selecting the token with highest key-distinctiveness score per layer-head channel:
Addressing (Top-R Retrieval)
When the question arrives, it is processed from a copy of the retained inference state. Each layer-head channel scores every stored note by maximum cosine similarity and votes for its highest-scoring note:
Up to notes with the most votes are retrieved, with earlier-inserted notes preferred in ties.
Readout with Native Replay
The backbone reads retrieved text through its native forward computation:
Replay introduces at most tokens and traverses the full backbone. Optionally, lightweight LoRA adapters can be trained while keeping pretrained weights frozen.
Memory and Computational Overhead
Memory: With indexed layer-head channels and at most notes per completed -token chunk:
Computation: Writing adds work; addressing requires one additional forward pass over the question plus exhaustive matching at cost ; readout adds at most replay tokens.
Empirical Validation / Results
Training-Free Long-Range Retrieval
The paper evaluates six RULER-NIAH tasks (three single-needle and three multi-key/multi-query/multi-value tasks) across document lengths from 4K to 1M tokens, with 100 samples per task.
Key Results (Figure 3):
- At 1M tokens, NB-TF exceeds Plain by 68.6, 66.6, and 37.8 percentage points on GDN, GDN-2, and Mamba-2, respectively
- Plain and JRT (full-prompt repetition) approach zero accuracy as context grows
- NB-TF maintains roughly 70% accuracy on GDN and GDN-2 at 1M tokens
Real-World Tasks (LongBench)
Table 1: LongBench-v1 Results (1.3B backbones)
| Backbone | Method | Single-doc QA | Multi-doc QA | Summarisation | Few-shot | Overall |
|---|---|---|---|---|---|---|
| Transformer† | Plain | 13.40 | 18.97 | 8.43 | 23.40 | 16.05 |
| GDN | Plain | 6.88 | 7.02 | 13.99 | 34.08 | 15.49 |
| GDN | JRT | 7.72 | 6.63 | 14.79 | 33.56 | 15.67 |
| GDN | NB-TF | 6.66 | 7.33 | 13.52 | 36.76 | 16.07 |
| GDN | NB-LoRA | 19.06 | 20.48 | 11.37 | 41.22 | 23.03 |
| Mamba-2 | Plain | 2.22 | 2.10 | 11.27 | 11.56 | 6.79 |
| Mamba-2 | JRT | 2.39 | 1.89 | 9.21 | 8.34 | 5.12 |
| Mamba-2 | NB-TF | 5.98 | 5.36 | 16.51 | 25.88 | 13.43 |
| Mamba-2 | NB-LoRA | 17.84 | 15.54 | 7.46 | 27.52 | 17.10 |
†Reference results from Behrouz et al. (2026), trained with 16K contexts.
Plug-and-Play on Off-the-Shelf LLMs
Table 2: Results on Larger Models Without Training
| Benchmark | Backbone | Plain | + NB-TF | Δ |
|---|---|---|---|---|
| MemoryAgentBench | Mamba-2-8B | 0.0 | 14.7 | +14.7 |
| MemoryAgentBench | Qwen3.5-9B | 55.7 | 56.8 | +1.1 |
| LongBench-v2 | Qwen3.5-9B | 46.1 | 49.3 | +3.2 |
Efficiency Analysis
- FLOPs: At 1M tokens, NoteBank adds only 0.0171%–0.0250% to full-model analytical FLOPs
- Storage: At 1M tokens, GDN adds 24.4 MiB of GPU addresses plus ~1.0 MiB CPU text/metadata; total persistent context storage is 74.5 MiB (~1/2,600 of a matched MHA KV cache)
- Latency: NoteBank increases latency by 10.6%–13.2% (at 1M tokens: 125.11 → 140.64 s)
- Memory: Peak GPU memory rises from 2.93 to 3.27 GiB at 1M tokens
Routing Strategy Comparison
Table 3: Effect of Routing Strategy (LoRA readers fixed)
| Routing Signal | Auxiliary Retriever | RULER @ 1M (GDN) | RULER @ 1M (Mamba-2) | LongBench (GDN) | LongBench (Mamba-2) |
|---|---|---|---|---|---|
| Random | None | 1.7 | 0.0 | 21.96 | 13.83 |
| Input embedding | None | 30.8 | 20.8 | 22.40 | 16.70 |
| Native (NB) | None | 59.8 | 37.6 | 23.03 | 14.25 |
| BM25 | Lexical index | 64.0 | 52.7 | 23.50 | 18.66 |
| BGE | External encoder | 45.4 | 34.0 | 23.77 | 17.24 |
Memory Access vs. Read Adaptation
Table 4: Separating Memory Access from Read Adaptation (GDN)
| Memory Access | RULER @ 1M (Frozen) | RULER @ 1M (LoRA) | LongBench (Frozen) | LongBench (LoRA) |
|---|---|---|---|---|
| w/o NoteBank | 1.7 | 1.7 | 15.49 | 22.72 |
| w/ NoteBank | 59.8 | 58.4 | 16.07 | 23.03 |
Key finding: Long-range retrieval recovery does not require read adaptation (59.8 vs. 58.4 with LoRA on RULER), while adaptation accounts for most LongBench gains on GDN.
Theoretical and Practical Implications
Challenging the Fixed-State Ceiling
The paper's central theoretical contribution is demonstrating that the long-context capability of pretrained recurrent models can substantially exceed what their conventional fixed-state memory interface exposes. This reframes the debate about linear attention limitations: poor long-range retention through the recurrent state need not imply an inability to use distant evidence.
Decoupling Computation from Memory
NoteBank establishes a principled separation of concerns:
- Recurrent state handles ongoing computation
- Sparse episodic archive handles evidence preservation
- Native replay handles evidence utilisation
This decoupling is achieved without modifying backbone weights or architecture, requiring no external embedding model, separately trained retriever, or separate neural reader.
Practical Implications
- Plug-and-play deployment: NoteBank works with existing pretrained checkpoints, making it immediately applicable to deployed models
- Near-zero overhead: The negligible compute and storage costs make it feasible for production long-context applications
- Architecture-agnostic: Benefits extend across gated delta networks, state-space models, and hybrid architectures
- Routing headroom: The analysis reveals substantial room for improvement in retrieval quality, suggesting future work on better addressing mechanisms
Limitations and Open Questions
- Routing headroom exists, particularly for Mamba-2 (oracle routing raises score from 40.4 to 61.6 at 1M tokens)
- Read adaptation benefits are task-dependent (NB-LoRA underperforms NB-TF on summarisation)
- The paper notes that answer containment in oracle notes is a proxy diagnostic, not a guaranteed performance upper bound
Conclusion
The paper introduces NoteBank, a training-free, plug-and-play sparse episodic memory that separates evidence preservation from recurrent computation in linear attention models. By archiving selected text spans before questions are known, addressing them with native features, and reading retrieved evidence through native forward computation via replay, NoteBank recovers substantial long-context capability at negligible cost.
Key takeaways:
- The fixed-state ceiling is not fundamental: Pretrained recurrent models can use distant evidence far beyond what their recurrent states expose
- Native computation suffices: The backbone itself can write, address, and read memory without external components
- Near-free capability recovery: 37.8–68.6 percentage-point gains at 1M-token retrieval with ≤0.025% FLOPs overhead and 1/2,600 the storage of matched MHA KV cache
- Broad applicability: Works across architectures and scales, from 1.3B research models to 8-9B post-trained models
Future directions identified by the authors include improving writing, routing, and reading mechanisms, with selective training of these components potentially yielding further gains in evidence preservation, access, and utilisation.
Related papers
- Athanor: An Agent-Native System for Autonomous Post-Training Research
A team of four autonomous agents post-trained a 4B base model to vendor-instruct level in 104 hours for $12,000, without teacher models or human advice.
- DuoDiscover: Scaling Autonomous Discovery Beyond the Evaluation Bottleneck
DuoDiscover co-discovers optimization targets and cheap proxy evaluators with fidelity testing, achieving up to 15x speedups and beating human experts across software and chip design.
- Recursive Reward Improvement via Adversarial Meta-Prompt Evolution
RRI improves its own reward functions via adversarial rubric hacking and repair, boosting HealthBench Professional scores by up to 12.4 points with zero training data.