mlsanityData to 7 Oct 2026

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

arXiv 2602.10560 ↗First posted 11 Feb 2026cs.CL cs.AIcited by 8

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

  1. 2025QwenLong-L1: Towards Long-Context Large Reasoning Models with Reinforcement Learning23 May

Other references · 34

  1. 2023GPT-4 Technical Reportcited by 18,132
  2. 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
  3. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
  4. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
  5. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
  6. 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
  7. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
  8. 2020Longformer: The Long-Document Transformercited by 3,362
  9. 2025DAPO: An Open-Source LLM Reinforcement Learning System at Scalecited by 2,678
  10. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
  11. 2020Big Bird: Transformers for Longer Sequencescited by 1,673
  12. 2019Generating Long Sequences with Sparse Transformerscited by 1,523
22 more
  1. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
  2. 2014On the Properties of Neural Machine Translation: Encoder-Decoder Approachescited by 1,303
  3. 2023MemGPT: Towards LLMs as Operating Systemscited by 1,295
  4. 2025Understanding R1-Zero-Like Training: A Critical Perspectivecited by 1,276
  5. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
  6. 2025Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Modelscited by 1,175
  7. 2025Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memorycited by 722
  8. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
  9. 2024A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Modelscited by 450
  10. 2025Absolute Zero: Reinforced Self-play Reasoning with Zero Datacited by 323
  11. 2023Effective Long-Context Scaling of Foundation Modelscited by 301
  12. 2025MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory Agentcited by 235
  13. 2026GDPO: Group reward-Decoupled Normalization Policy Optimization for Multi-reward RL Optimizationcited by 175
  14. 2025A Comprehensive Survey on Long Context Language Modelingcited by 113
  15. 2025SPICE: Self-Play In Corpus Environments Improves Reasoningcited by 78
  16. 2025MemOS: An Operating System for Memory-Augmented Generation (MAG) in Large Language Modelscited by 68
  17. 2025Mem-α: Learning Memory Construction via Reinforcement Learningcited by 49
  18. 2025VisPlay: Self-Evolving Vision-Language Models from Imagescited by 42
  19. 2025Look Back to Reason Forward: Revisitable Memory for Long-Context LLM Agentscited by 37
  20. 2025Search and Refine During Think: Facilitating Knowledge Refinement for Improved Retrieval-Augmented Reasoningcited by 34
  21. 2025Search Self-play: Pushing the Frontier of Agent Capability without Supervisioncited by 31
  22. 2025The Alignment Waltz: Jointly Training Agents to Collaborate for Safetycited by 10

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 8.

8 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026G-MemLLM: Gated Latent Memory Augmentation for Long-Context Reasoning in Large Language Models
  2. 2025Overflow Prevention Enhances Long-Context Recurrent LLMs
  3. 2025Beyond Memorization: Extending Reasoning Depth with Recurrence, Memory and Test-Time Compute Scaling
  4. 2026Dynamic Long Context Reasoning over Compressed Memory via End-to-End Reinforcement Learning
  5. 2026ReContext: Recursive Evidence Replay as LLM Harness for Long-Context Reasoning
  6. 2026Why Limit the Residual Stream to Layers and Not Tokens? Persistent Memory for Continuous Latent Reasoning
  7. 2026MemSifter: Offloading LLM Memory Retrieval via Outcome-Driven Proxy Reasoning
  8. 2025Beyond Context Limits: Subconscious Threads for Long-Horizon Reasoning