Memory Caching: RNNs with Growing Memory
Summary
Memory Caching (MC) segments the sequence, caches each segment's memory state, and aggregates online plus cached memories at retrieval. Four variants: Residual Memory, Gated Residual Memory (GRM), Memory Soup, and Sparse Selective Caching (SSC). Complexity O(NL) interpolates RNN O(L) and Transformer O(L^2). Applied to Linear Attention, SWLA, DLA, and Titans. On 760M/30B-token and 1.3B/100B-token FineWeb training, MC lifts language-modeling and commonsense averages; Titans+GRM is strongest. Closes part of the recall gap vs Transformers on NIAH, in-context retrieval, LongBench, and MQAR. No official code on the abs page.
- Venue
- arXiv / Google
- Source
- arxiv
- Access
- free
- License
- CC BY 4.0
- License family
- Permissive
- Language
- en
- Purpose
- Let RNN memory capacity grow with sequence length by caching hidden-state checkpoints
- Scale
- 760M params / 30B tokens and 1.3B / 100B tokens from FineWeb; train context 2K–32K (default 4K, segment 256); NIAH/retrieval/LongBench trained at 16K
- Used for
- Unknown
- Time period
- 2026-02-27 (arXiv 2602.24281 v1)
- Author type
- human
- Added
- Aug 14, 2026
- Verified
- Aug 14, 2026
- Research status
- done
- Found via
- #random-papers
From the source
- Published
- Feb 27, 2026
- arXiv categories
- cs.LG, cs.AI
- Citations
- 12 (1 influential)
- References
- 93
Abstract (from arXiv)
Transformers have been established as the de-facto backbones for most recent advances in sequence modeling, mainly due to their growing memory capacity that scales with the context length. While plausible for retrieval tasks, it causes quadratic complexity and so has motivated recent studies to explore viable subquadratic recurrent alternatives. Despite showing promising preliminary results in diverse domains, such recurrent architectures underperform Transformers in recall-intensive tasks, often attributed to their fixed-size memory. In this paper, we introduce Memory Caching (MC), a simple yet effective technique that enhances recurrent models by caching checkpoints of their memory states (a.k.a. hidden states). Memory Caching allows the effective memory capacity of RNNs to grow with sequence length, offering a flexible trade-off that interpolates between the fixed memory (i.e., $O(L)$ complexity) of RNNs and the growing memory (i.e., $O(L^2)$ complexity) of Transformers. We propose four variants of MC, including gated aggregation and sparse selective mechanisms, and discuss their implications on both linear and deep memory modules. Our experimental results on language modeling, and long-context understanding tasks show that MC enhances the performance of recurrent models, supporting its effectiveness. The results of in-context recall tasks indicate that while Transformers achieve the best accuracy, our MC variants show competitive performance, close the gap with Transformers, and performs better than state-of-the-art recurrent models.
Tags
Topics
sequence models, recurrent memory, long-context
Research notes
- Primary: arxiv abs (CC BY 4.0, cs.LG/AI). Correspondence alibehrouz@google.com. No official code on abs; unofficial community reimplementations exist and were not treated as the authors' release. Discord posted abs link.
Notes about this
- Note
Long context: three bets and a weak spot in evaluation (overview)
An overview of the 33 entries on long-context modelling: cheaper attention, memory beside attention, and managing context from outside, plus what the benchmarks do and do not show. Written by Claude Opus 5.5.
Cites, within this collection
- Titans: Learning to Memorize at Test Time
- Eagle and Finch: RWKV with Matrix-Valued States and Dynamic Recurrence
- Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attention
- MoBA: Mixture of Block Attention for Long-Context LLMs
- Nested Learning: The Illusion of Deep Learning Architecture
Similar entries
- Paper Dynamic Linear Attention
- Paper Balancing Memory Pathways: Analyzing and Improving Memory Utilization in Hybrid LMs
- Paper LongHarness Bench: Stress-Testing Language Model Harnesses for Long-Context Reasoning
- Paper Triadic Linear Attention: Three-Dimensional Recurrent States for Long-Context Sequence Modeling
- Paper Let's (not) just put things in Context: Test-Time Training for Long-Context LLMs
- Paper Context Language Models