# Memory Caching: RNNs with Growing Memory

- **ID:** 461
- **Kind:** paper
- **URL:** https://arxiv.org/abs/2602.24281
- **Authors:** Ali Behrouz, Zeman Li, Yuan Deng, Peilin Zhong, Meisam Razaviyayn, Vahab Mirrokni
- **Venue:** arXiv / Google
- **Published:** 2026
- **Source:** arxiv
- **Language:** en
- **Access:** free
- **License:** CC BY 4.0
- **License family:** Permissive (auto-classified)
- **Tags:** memory-caching, titans, linear-attention, rnn, long-context, google, ssc, grm
- **Topics:** sequence models, recurrent memory, long-context
- **Added:** 2026-08-14
- **Verified:** 2026-08-14
- **Research status:** done
- **Needs deep evaluation:** no
- **Page:** https://papers.projxon.ai/entries/461

## 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.

## Attributes

- **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

## From the source (fetched 2026-10-03)

- **Published:** Feb 27, 2026 (arXiv)
- **arXiv categories:** cs.LG, cs.AI (arXiv)
- **Citations:** 12 (1 influential) (Semantic Scholar)
- **References:** 93 (Semantic Scholar)

## Abstract

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.

## 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.

## Cites, within this collection

- [Titans: Learning to Memorize at Test Time](https://papers.projxon.ai/entries/550) (paper 2025, #550)
- [Eagle and Finch: RWKV with Matrix-Valued States and Dynamic Recurrence](https://papers.projxon.ai/entries/560) (paper 2024, #560)
- [Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attention](https://papers.projxon.ai/entries/564) (paper 2024, #564)
- [MoBA: Mixture of Block Attention for Long-Context LLMs](https://papers.projxon.ai/entries/707) (paper 2025, #707)
- [Nested Learning: The Illusion of Deep Learning Architecture](https://papers.projxon.ai/entries/1109) (paper 2025, #1109)

## Related entries

- Discussed in: [Long context: three bets and a weak spot in evaluation (overview)](https://papers.projxon.ai/entries/1208) (note, #1208)

## Similar entries

- [Dynamic Linear Attention](https://papers.projxon.ai/entries/489) (paper, #489)
- [Balancing Memory Pathways: Analyzing and Improving Memory Utilization in Hybrid LMs](https://papers.projxon.ai/entries/1282) (paper, #1282)
- [LongHarness Bench: Stress-Testing Language Model Harnesses for Long-Context Reasoning](https://papers.projxon.ai/entries/821) (paper, #821)
- [Triadic Linear Attention: Three-Dimensional Recurrent States for Long-Context Sequence Modeling](https://papers.projxon.ai/entries/1244) (paper, #1244)
- [Let's (not) just put things in Context: Test-Time Training for Long-Context LLMs](https://papers.projxon.ai/entries/533) (paper, #533)
- [Context Language Models](https://papers.projxon.ai/entries/793) (paper, #793)
