PreprintCited by 1Topic ModelingNatural Language Processing TechniquesMultimodal Machine Learning Applications

Memory Caching: RNNs with Growing Memory

Open access
Behrouz, Ali, Li, Zeman, Deng, Yuan, Zhong, Peilin, Razaviyayn, Meisam, Mirrokni, Vahab·2026·arXiv

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.

Integrity signals

Registry

DataCite · 10.48550/arxiv.2602.24281

Cites

4 of 4 references verified0 citation errors · 0 not checkable

Statistics

Recomputing p-values needs the paper’s full text.

Claims the paper makes

We couldn’t retrieve this paper’s full text, so its claims and self-check weren’t run. The registry and citation checks still apply.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • Memory Caching caches state checkpoints within a sequence to extend effective context during inference, while PRECOG caches states offline at indexing time.

    “Memory Caching [9] caches state checkpoints within a sequence to extend effective context during inference, while PRECOG caches states offline at indexing time .”

    From Structured Memory for Edge Language Models: Persistent Context and Corpus Retrieval via O(1) SSM State Injection (2026) · cites this paper as [9]

Cites

  • Scaling Laws for Neural Language Models

    Kaplan, J., McCandlish, S., Henighan, T., Brown, T. B., Chess, B., Child, R., Gray, S., Radford, A., Wu, J., & Amodei, D. (2020) · arXiv · Cited by 1,749 · cited 1× · see citing works

    “This success often is attributed to their ability to learn at scale (Kaplan et al., 2020) and in-context (Brown et al., 2020), both of which are the byproduct of their primary building block–attention module–that acts as an associative memory with growing capacity (Ramsauer et al., 2021; Bietti et…”
  • “Particularly, we review the concepts of attention and its linear variants, followed by a discussion on parametric in-context learning and nested learning paradigm (Behrouz et al., 2026; 2025b), which we build Memory Caching on.”
    InfluentialSelf-citation
  • ATLAS: Learning to Optimally Memorize the Context at Test Time

    Behrouz, A., Li, Z., Kacham, P., Daliri, M., Deng, Y., Zhong, P., Razaviyayn, M., & Mirrokni, V. (2025) · arXiv · doi:10.48550/arxiv.2505.23735 · cited 2×

    “Recently, Behrouz et al. (2025a) introduced Sliding Window Linear Attention (SWLA), in which the memory updates its weights based on a set of c ≥ 1 past tokens (contrary to the online RNNs, where the memory is updated solely based on the last token).”
    Self-citation
  • Implicit Language Models are RNNs: Balancing Parallelization and Expressivity

    Schöne, M., Rahmani, B., Kremer, H., Falck, F., Ballani, H., & Gladrow, J. (2025) · arXiv · doi:10.48550/arxiv.2502.07827 · cited 1×

    “…Merrill et al., 2024; Lim et al., 2024; Behrouz et al., 2026; 2025a; Sch¨one et al., 2025; Karami & Mirrokni, 2025; Von Os-wald et al., 2023; Gonzalez et al., 2024; Hu et al., 2025), with emphasis on accelerating their training (Gonzalez et al., 2024; Lim et al., 2024; Sch ¨ one et al., 2025).”

Flagged first, then by citations

Cited by

Sorted by citations

Authors
Behrouz, A., Li, Z., Deng, Y., Zhong, P., Razaviyayn, M., & Mirrokni, V.
Venue
arXiv
Publisher
arXiv
Published
2026
ISSN
2331-8422 (ISSN-L)
OpenAlex
W7133206309
Cited by
0
References
4
Type
posted content
Language
en
Open access
Locations
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University) (cc-by)
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
  • Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Multimodal Machine Learning Applications
Keywords
memory caching, recurrent neural networks, transformer models, long-context understanding, language modeling, memory modules

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review