PreprintCited by 1Topic ModelingMultimodal Machine Learning ApplicationsNatural Language Processing Techniques

When to Memorize and When to Stop: Gated Recurrent Memory for Long-Context Reasoning

Open access
Sheng, Leheng, Zhang, Yongtao, Ma, Wenchang, Shi, Yaorui, Huang, Ting, Wang, Xiang, Zhang, An, Shen, Ke +1 more·2026·arXiv

Abstract

While reasoning over long context is crucial for various real-world applications, it remains challenging for large language models (LLMs) as they suffer from performance degradation as the context length grows. Recent work MemAgent has tried to tackle this by processing context chunk-by-chunk in an RNN-like loop and updating a textual memory for final answering. However, this naive recurrent memory update faces two crucial drawbacks: (i) memory can quickly explode because it can update indiscriminately, even on evidence-free chunks; and (ii) the loop lacks an exit mechanism, leading to unnecessary computation after even sufficient evidence is collected. To address these issues, we propose GRU-Mem, which incorporates two text-controlled gates for more stable and efficient long-context reasoning. Specifically, in GRU-Mem, the memory only updates when the update gate is open and the recurrent loop will exit immediately once the exit gate is open. To endow the model with such capabilities, we introduce two reward signals $r^{\text{update}}$ and $r^{\text{exit}}$ within end-to-end RL, rewarding the correct updating and exiting behaviors respectively. Experiments on various long-context reasoning tasks demonstrate the effectiveness and efficiency of GRU-Mem, which generally outperforms the vanilla MemAgent with up to 400\% times inference speed acceleration.

Integrity signals

Registry

DataCite · 10.48550/arxiv.2602.10560

Cites

2 of 2 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?

  • The agent remains prone to accumulating noisy or irrelevant information in memory, leading to memory explosion and performance decay as interactions unfold.

    “Consequently, the agent remains prone to accumulating noisy or irrelevant information in memory, leading to memory explosion and performance decay as the interactions unfold (Sheng et al., 2026).”

    From Meta-Cognitive Memory Policy Optimization for Long-Horizon LLM Agents (2026) · cites this paper as Sheng et al., 2026

  • Recursive summarization inherently accumulates semantic noise introduced by LLMs, which can induce cascading hallucinations and ultimately degrade long-horizon collapse.

    “recursive summarization inherently accumulates semantic noise introduced by LLMs, which can induce cascading hallucinations and ultimately degrade long-horizon collapse (Zhang et al., 2025b; Ji et al., 2023; Sheng et al., 2026).”

    From Meta-Cognitive Memory Policy Optimization for Long-Horizon LLM Agents (2026) · cites this paper as Sheng et al., 2026

Cites

Flagged first, then by citations

Cited by

Sorted by citations

  • Meta-Cognitive Memory Policy Optimization for Long-Horizon LLM Agents

    Liu, Z., Hao, Z., Chen, Y., Wang, H., Hou, J., Ding, R., Yang, Y., Ji, W., Xia, W., & Liu, F. (2026) · arXiv · Cited by 7 · see citing works

    “Despite this advantage, recursive summarization inherently accumulates semantic noise introduced by LLMs, which can induce cascading hallucinations and ultimately degrade long-horizon collapse (Zhang et al., 2025b; Ji et al., 2023; Sheng et al., 2026).”

Authors
Sheng, L., Zhang, Y., Ma, W., Shi, Y., Huang, T., Wang, X., Zhang, A., Shen, K., & Chua, T.-S.
Affiliations
  • National University of Singapore (SG)
  • ByteDance (China) (CN)
  • University of Science and Technology of China (CN)
Venue
arXiv
Publisher
arXiv
Published
2026
ISSN
2331-8422 (ISSN-L)
OpenAlex
W7128676761
Cited by
0
References
2
Type
posted content
Language
en
Open access
Locations
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University)
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Multimodal Machine Learning Applications
  • Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
Keywords
long-context reasoning, large language models, exit mechanism, reward signals, reinforcement learning, inference efficiency

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