# Memory Caching: RNNs with Growing Memory

메모리 캐싱: 메모리가 커지는 RNN

Ali Behrouz, Zeman Li, Yuan Deng, Peilin Zhong, Meisam Razaviyayn, Vahab Mirrokni · arXiv · 2026년 2월 27일

- **연구 문제** 고정 크기 메모리를 쓰는 순환 신경망은 긴 문맥의 회상 과제에서 Transformer에 뒤처지는데, 이 논문은 캐시된 메모리 체크포인트로 유효 메모리를 시퀀스 길이에 따라 키우는 방법을 다룹니다.
- **연구 방법** 입력을 세그먼트로 나누어 각 세그먼트의 메모리 상태를 캐시하고, 현재 토큰의 출력을 캐시 메모리와 온라인 메모리의 집계로 계산합니다.
- **주요 결과** Titans와 DLA 같은 순환 모델에 MC 변형을 적용하면 언어 모델링 평균과 Needle-in-a-Haystack 점수가 향상되었지만, 회상 과제에서는 Transformer가 여전히 가장 높습니다.

## 고정 크기 메모리의 한계

순환 신경망은 입력 전체를 고정 크기 메모리 상태에 압축하므로 연산 비용이 시퀀스 길이에 선형으로 늘어나는 장점이 있지만, 오래된 정보를 잊어버리는 구조적 한계가 있습니다. 반면 Transformer는 과거 토큰의 키와 값을 모두 보관하여 회상 과제에 강하지만 어텐션의 계산량이 시퀀스 길이의 제곱에 비례합니다. 이 논문은 두 극단 사이에서 순환 모델의 유효 메모리 용량을 시퀀스 길이에 따라 키우는 방법으로 Memory Caching (MC)을 제안합니다. 핵심 질문은 고정 메모리 순환 모델이 세그먼트별 메모리 체크포인트를 저장해 두고 현재 질의에 필요한 과거 정보를 다시 읽을 수 있게 하면, 효율성을 크게 잃지 않으면서 회상과 장문 처리 성능을 높일 수 있는가 하는 것입니다.

## 세그먼트별 메모리 캐싱과 집계 방식

MC는 입력 시퀀스를 길이가 정해진 세그먼트로 나누고, 각 세그먼트의 온라인 메모리를 갱신합니다. 세그먼트가 끝나면 그 시점의 메모리 상태를 캐시에 남기며, 이후 토큰의 출력은 현재 온라인 메모리와 이전 세그먼트들의 캐시 메모리를 집계 함수로 결합하여 계산합니다. 가장 단순한 Residual Memory는 이들의 출력을 단순히 더합니다. Gated Residual Memory (GRM)는 토큰 입력과 세그먼트 문맥의 유사도로 각 세그먼트의 기여를 게이트하므로 캐시 출력이 토큰마다 달라집니다. Memory Soup은 캐시된 메모리의 파라미터를 입력 의존 가중치로 결합하여 토큰별 메모리 모듈을 만들며, 선형 메모리에서는 GRM과 수학적으로 같아지고 깊은 메모리에서는 달라집니다.

Sparse Selective Caching (SSC)은 라우터가 토큰별로 관련도가 높은 과거 세그먼트를 상위 k개 골라 계산하여 비용을 줄입니다. 세그먼트 수를 N이라 하면 검색 단계의 비용은 토큰당 N에 비례하여 전체적으로 O(NL)이 되고, N이 1이면 일반 순환 모델이 되며 N이 L이면 모든 토큰을 캐시하는 방식이 됩니다.

![Figure 1: The Overall Memory Caching Method. Each token attends to its online memory as well as a set of cached memories from the past](https://refivu.com/papers/87ba67cb-e3d7-4a89-927f-f795be747cb8/figures/figure-40cf03ae2f8ef88f34c5a18a752f8ded.png?thumb=512)

**Figure 1** : The Overall Memory Caching Method. Each token attends to its online memory as well as a set of cached memories from the past.

[원문](https://arxiv.org/abs/2602.24281v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ali Behrouz, Zeman Li, Yuan Deng, Peilin Zhong, Meisam Razaviyayn, Vahab Mirrokni · Memory Caching: RNNs with Growing Memory · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.

![Figure 2: Sparse Selective Caching (SSC) of Memories. A router measures the contextual similarity of each token to its past segments and chooses a subset of pa…](https://refivu.com/papers/87ba67cb-e3d7-4a89-927f-f795be747cb8/figures/figure-584442b3f62bd86c2ec66184b6261ad0.png?thumb=512)

**Figure 2** : Sparse Selective Caching (SSC) of Memories. A router measures the contextual similarity of each token to its past segments and chooses a subset of past cached memory for better efficiency.

[원문](https://arxiv.org/abs/2602.24281v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ali Behrouz, Zeman Li, Yuan Deng, Peilin Zhong, Meisam Razaviyayn, Vahab Mirrokni · Memory Caching: RNNs with Growing Memory · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.

## 언어 모델링과 장문 검색 결과

언어 모델링과 상식 추론 실험에서 760M 파라미터와 30B 토큰 설정의 평균 점수는 Titans(LMM)에서 51.56이었고 Titans에 GRM을 적용하면 52.55가 되었습니다. 1.3B 파라미터와 100B 토큰 설정에서는 Titans(LMM)의 평균이 56.82이고 GRM 적용 시 58.33입니다. 장문 검색인 Needle-in-a-Haystack의 S-NIAH-2 과제에서 16K 문맥 길이의 Titans(LMM) 정확도는 75.4였으며, GRM 적용 시 88.2로 올라갔습니다. 이 수치는 특정 모델 계열과 학습 설정에서 얻은 것이며, 다른 모델과 데이터에서 같은 크기의 향상이 나온다고 일반화할 수는 없습니다.

또한 4K와 8K 문맥의 결과는 본문 표에 별도로 나와 있으므로 16K 결과와 구분해서 읽어야 합니다.

![Table 1: Performance of models on language modeling and common-sense reasoning tasks](https://refivu.com/papers/87ba67cb-e3d7-4a89-927f-f795be747cb8/figures/figure-ba4f636aafcd6bf9552ee47d6c1919a0.png?thumb=512)

**Table 1** : Performance of models on language modeling and common-sense reasoning tasks.

[원문](https://arxiv.org/abs/2602.24281v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ali Behrouz, Zeman Li, Yuan Deng, Peilin Zhong, Meisam Razaviyayn, Vahab Mirrokni · Memory Caching: RNNs with Growing Memory · 원문 그림 인용 · 원본 PDF 10쪽에서 그림 영역을 추출했습니다.

![Table 2: Needle-In-A-Haystack experiments with three levels of difficulty: single-needle tasks—S-NIAH-1 (passkey retrieval), S-NIAH-2 (numerical needle), and S…](https://refivu.com/papers/87ba67cb-e3d7-4a89-927f-f795be747cb8/figures/figure-88b22c7df5c2c49464401bcdb078465e.png?thumb=512)

**Table 2** : Needle-In-A-Haystack experiments with three levels of difficulty: single-needle tasks—S-NIAH-1 (passkey retrieval), S-NIAH-2 (numerical needle), and S-NIAH-3 (UUID-based needle).

[원문](https://arxiv.org/abs/2602.24281v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ali Behrouz, Zeman Li, Yuan Deng, Peilin Zhong, Meisam Razaviyayn, Vahab Mirrokni · Memory Caching: RNNs with Growing Memory · 원문 그림 인용 · 원본 PDF 11쪽에서 그림 영역을 추출했습니다.

## 회상 과제의 격차와 해석의 범위

In-context 회상 과제에서는 Transformer가 가장 높은 정확도를 보였습니다. MC 변형은 Transformer와의 격차를 줄이고 기존 최신 순환 모델보다 나은 성능을 보였지만, 이 결과는 Transformer를 능가했다는 뜻이 아닙니다. 또한 Log-Linear 기준선이 장문 검색에서 약한 이유에 대해 저자들은 하나의 메모리가 16K 시퀀스에서 8K 토큰 규모의 큰 초기 세그먼트를 압축해야 하기 때문이라고 해석합니다. 이는 저자들의 해석이며, 이 실험만으로 원인을 확정하지는 않습니다. 이 글의 결과는 제시된 모델 계열, 학습 문맥 길이, 세그먼트 설정과 평가 과제에 한정됩니다.

![Figure 3: An illustrative example of memory caching with constant and logarithmic size segments. Logarithmic segmentation while computationally appealing, resu…](https://refivu.com/papers/87ba67cb-e3d7-4a89-927f-f795be747cb8/figures/figure-1a27e91dce28e984af7a4c9149701bee.png?thumb=512)

**Figure 3** : An illustrative example of memory caching with constant and logarithmic size segments. Logarithmic segmentation while computationally appealing, results in either long subsequences that might cause memory overflow, and/or short subsequences that prevents the memory to properly optimizes itself in the inner-loop.

[원문](https://arxiv.org/abs/2602.24281v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ali Behrouz, Zeman Li, Yuan Deng, Peilin Zhong, Meisam Razaviyayn, Vahab Mirrokni · Memory Caching: RNNs with Growing Memory · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

## 논문 정보

- **저자**: Ali Behrouz, Zeman Li, Yuan Deng, Peilin Zhong, Meisam Razaviyayn, Vahab Mirrokni
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2026년 2월 27일
- **등록일**: 2026년 10월 29일
- **수정일**: 2026년 2월 27일
- **버전**: v1
- **arXiv**: 2602.24281
- **분류**: cs.LG · cs.AI
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2602.24281v1) · [원문 PDF ↗](https://arxiv.org/pdf/2602.24281v1)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

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.

## 원문 인용

Ali Behrouz, Zeman Li, Yuan Deng, Peilin Zhong, Meisam Razaviyayn, Vahab Mirrokni (2026). Memory Caching: RNNs with Growing Memory. arXiv:2602.24281v1. https://arxiv.org/abs/2602.24281v1

**BibTeX**

```
@misc{behrouz2026memory,
  title = {{Memory Caching: RNNs with Growing Memory}},
  author = {Ali Behrouz and Zeman Li and Yuan Deng and Peilin Zhong and Meisam Razaviyayn and Vahab Mirrokni},
  year = {2026},
  eprint = {2602.24281},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.24281v1}
}
```

## 이 논문의 용어

- [Perplexity](https://refivu.com/terms/2b204e513801-perplexity)
- [트랜스포머](https://refivu.com/terms/515e8433c447-transformer)
- [LongBench](https://refivu.com/terms/ff37fb1a4d82-longbench)
- [FineWeb](https://refivu.com/terms/0127c93cbae4-fineweb)
- [Mixture of Experts](https://refivu.com/terms/5fa1c1ebf77b-mixture-of-experts)
- [linear attention](https://refivu.com/terms/102ebaed8489-linear-attention)
- [needle-in-a-haystack](https://refivu.com/terms/d2affe3634bd-needle-in-a-haystack)
- [RNNs](https://refivu.com/terms/bbff9ad96e8f-rnns)
- [log-linear attention](https://refivu.com/terms/16f478d91c75-log-linear-attention)
- [multi-query associative recall](https://refivu.com/terms/1a99c0a83763-multi-query-associative-recall)
- [residual memory](https://refivu.com/terms/e46502185f7f-residual-memory)
- [Titans](https://refivu.com/terms/c55a010bd7d0-titans)

## 다른 논문 해설

- [Tucker Attention: A generalization of approximate attention mechanisms](https://refivu.com/papers/372047e0-cd32-4ae3-8113-17871388745b-tucker-attention-a-generalization-of-approximate-attention.md)
- [AdaSplash-2: Faster Differentiable Sparse Attention](https://refivu.com/papers/c0088d29-0ad2-4489-9b71-b3ce2a62b4a6-adasplash-2-faster-differentiable-sparse-attention.md)
- [Benign Overfitting in Adversarial Training for Vision Transformers](https://refivu.com/papers/a90339d2-e025-49a0-97df-3e6493ad2bd1-benign-overfitting-in-adversarial-training-for-vision.md)
- [Towards Certified Unlearning for Deep Neural Networks](https://refivu.com/papers/850d7d8a-affd-45b9-b183-28ff19d787ac-towards-certified-unlearning-for-deep-neural-networks.md)
- [Focus and Dilution: The Multi-stage Learning Process of Attention](https://refivu.com/papers/e6b90367-c1c2-4867-8bbc-18e92193520d-focus-and-dilution-the-multi-stage-learning-process.md)
- [HEXST: Hexagonal Shifted-Window Transformer for Spatial Transcriptomics Gene Expression Prediction](https://refivu.com/papers/7c3bd06d-0848-44d9-94e6-1fc1eab7d611-hexst-hexagonal-shifted-window-transformer-for-spatial.md)
- [ParamMem: Augmenting Language Agents with Parametric Reflective Memory](https://refivu.com/papers/e683550d-5bf5-4bee-9dd5-feb3f61f87c2-parammem-augmenting-language-agents-with-parametric.md)
- [Does Generation Require Memorization? Creative Diffusion Models using Ambient Diffusion](https://refivu.com/papers/e84ba794-295c-477e-8db1-aad14edc5ec3-does-generation-require-memorization-creative-diffusion.md)
- [Theoretical Perspectives on Data Quality and Synergistic Effects in Pre- and Post-Training Reasoning Models](https://refivu.com/papers/d765cc9b-8638-48b5-91ea-b39958db214e-theoretical-perspectives-on-data-quality-and-synergistic.md)
- [Dimension-Independent Convergence of Underdamped Langevin Monte Carlo in KL Divergence](https://refivu.com/papers/206df735-cc15-48eb-9820-3e1c893270c1-dimension-independent-convergence-of-underdamped-langevin.md)
- [Intrinsic Task Symmetry Drives Generalization in Algorithmic Tasks](https://refivu.com/papers/6029a9e0-e1c4-49b8-b05f-aeeaa51e8355-intrinsic-task-symmetry-drives-generalization-in-algorithmic.md)
- [ConTSG-Bench: A Unified Benchmark for Conditional Time Series Generation](https://refivu.com/papers/3465b2e4-e304-4ed6-9ff6-cecf12bf86cf-contsg-bench-a-unified-benchmark-for-conditional-time.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/87ba67cb-e3d7-4a89-927f-f795be747cb8-memory-caching-rnns-with-growing-memory)
