When to Memorize and When to Stop: Gated Recurrent Memory for Long-Context Reasoning
On the map: LLM reasoning → Test-time compute and efficient thinking
Abstract (arXiv)
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 rupdate and rexit 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.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Placed in Test-time compute and efficient thinking, one of 17 directions in LLM reasoning. Builds on 35 of its 41 references that are in the map. First posted on arXiv 11 Feb 2026.
Builds on
35 of 41 references.
Closest ancestors · 1
Same direction, newest first
Other references · 34
- 2023GPT-4 Technical Reportcited by 18,132
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2025DAPO: An Open-Source LLM Reinforcement Learning System at Scalecited by 2,678
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
- 2019Generating Long Sequences with Sparse Transformerscited by 1,523
22 more
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
- 2014On the Properties of Neural Machine Translation: Encoder-Decoder Approachescited by 1,303
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,295
- 2025Understanding R1-Zero-Like Training: A Critical Perspectivecited by 1,276
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
- 2025Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Modelscited by 1,175
- 2025Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memorycited by 722
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
- 2024A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Modelscited by 450
- 2025Absolute Zero: Reinforced Self-play Reasoning with Zero Datacited by 323
- 2023Effective Long-Context Scaling of Foundation Modelscited by 301
- 2025MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory Agentcited by 235
- 2026GDPO: Group reward-Decoupled Normalization Policy Optimization for Multi-reward RL Optimizationcited by 175
- 2025A Comprehensive Survey on Long Context Language Modelingcited by 113
- 2025SPICE: Self-Play In Corpus Environments Improves Reasoningcited by 78
- 2025MemOS: An Operating System for Memory-Augmented Generation (MAG) in Large Language Modelscited by 68
- 2025Mem-α: Learning Memory Construction via Reinforcement Learningcited by 49
- 2025VisPlay: Self-Evolving Vision-Language Models from Imagescited by 42
- 2025Look Back to Reason Forward: Revisitable Memory for Long-Context LLM Agentscited by 37
- 2025Search and Refine During Think: Facilitating Knowledge Refinement for Improved Retrieval-Augmented Reasoningcited by 34
- 2025Search Self-play: Pushing the Frontier of Agent Capability without Supervisioncited by 31
- 2025The Alignment Waltz: Jointly Training Agents to Collaborate for Safetycited by 10
Built on by
Citing papers per year: 2026: 8.
8 papers.
- 2026Meta-Cognitive Memory Policy Optimization for Long-Horizon LLM Agentscited by 4
- 2026Rethinking How to Remember: Beyond Atomic Facts in Lifelong LLM Agent Memorycited by 2
- 2026RPMem: Learning Long-Term Recurrent Parametric Memory Across Sessions for LLM Agentscited by 1
- 2026Multi-Head Recurrent Memory Agentscited by 0
- 2026PI-Mem: Pushing Long-Context Reasoning to 3.6M Tokens with Parallel-Iterative Memorycited by 0
- 2026PARSER: Read in Parallel, Reason in Depth for Long-Context LLM Agentscited by 0
- 2026The Model Knows When to Stop: Training-Free Early Stopping for Long-Context Readingcited by 0
- 2026CoEM: Empowering Long-Context Reasoning with Commit-on-Evidence Memorycited by 0
- 2026CoEM: Empowering Long-Context Reasoning with Commit-on-Evidence Memory29 Sep 2026
- 2026The Model Knows When to Stop: Training-Free Early Stopping for Long-Context Reading28 Sep 2026
- 2026RPMem: Learning Long-Term Recurrent Parametric Memory Across Sessions for LLM Agents20 Sep 2026
- 2026PARSER: Read in Parallel, Reason in Depth for Long-Context LLM Agents6 Sep 2026
- 2026PI-Mem: Pushing Long-Context Reasoning to 3.6M Tokens with Parallel-Iterative Memory4 Aug 2026
- 2026Multi-Head Recurrent Memory Agents1 Jul 2026
- 2026Meta-Cognitive Memory Policy Optimization for Long-Horizon LLM Agents28 May 2026
- 2026Rethinking How to Remember: Beyond Atomic Facts in Lifelong LLM Agent Memory19 May 2026
Similar, not cited
Close in wording, no citation either way
- 2026G-MemLLM: Gated Latent Memory Augmentation for Long-Context Reasoning in Large Language Models
- 2025Overflow Prevention Enhances Long-Context Recurrent LLMs
- 2025Beyond Memorization: Extending Reasoning Depth with Recurrence, Memory and Test-Time Compute Scaling
- 2026Dynamic Long Context Reasoning over Compressed Memory via End-to-End Reinforcement Learning
- 2026ReContext: Recursive Evidence Replay as LLM Harness for Long-Context Reasoning
- 2026Why Limit the Residual Stream to Layers and Not Tokens? Persistent Memory for Continuous Latent Reasoning
- 2026MemSifter: Offloading LLM Memory Retrieval via Outcome-Driven Proxy Reasoning
- 2025Beyond Context Limits: Subconscious Threads for Long-Horizon Reasoning