Memory-R2: Fair Credit Assignment for Long-Horizon Memory-Augmented LLM Agents
- URL: http://arxiv.org/abs/2605.21768v1
- Date: Wed, 20 May 2026 22:02:00 GMT
- Title: Memory-R2: Fair Credit Assignment for Long-Horizon Memory-Augmented LLM Agents
- Abstract summary: Memory-augmented LLM agents enable interactions that extend beyond finite context windows.<n>Training such agents with reinforcement learning in multi-session environments is challenging.<n>We introduce Memory-R2, a training framework for memory-augmented LLM agents.
- Score: 27.2861945963127
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Memory-augmented LLM agents enable interactions that extend beyond finite context windows by storing, updating, and reusing information across sessions. However, training such agents with reinforcement learning in multi-session environments is challenging because memory turns the agent's past actions into part of its future environment. Once different rollouts write, update, or delete different memories, they no longer share the same intermediate memory state, making trajectory-level comparisons fundamentally unfair. This violates a key assumption behind group-relative methods such as GRPO, where rollouts are compared as if they were sampled from the same effective environment. Consequently, trajectory-level rewards provide noisy or biased credit signals for long-horizon memory operations. To address this challenge, we introduce Memory-R2, a training framework for long-horizon memory-augmented LLM agents. Its core algorithm, LoGo-GRPO, combines local and global group-relative optimization. The global objective preserves end-to-end learning from long-horizon trajectory-level rewards, while local rerollouts compare different memory-operation outcomes from the same intermediate memory state, yielding fairer group comparisons and more precise supervision for memory construction. Beyond credit assignment, Memory-R2 jointly optimizes memory formation and memory evolution with a shared-parameter co-learning design, where a fact extractor and a memory manager are instantiated from the same LLM backbone through role-specific prompts. To stabilize multi-step RL over long memory horizons, we adopt a progressive curriculum that increases the training horizon from 8 to 16 to 32 sessions. Together, these components provide an effective training paradigm for memory-augmented LLM agents in long-horizon multi-session settings.
Related papers
- Memory as a Controlled Process: Learned Adaptive Memory Management for LLM Agents [72.3752981234916]
Large Language Model (LLM) agents increasingly rely on external memory systems to accumulate experience across tasks.<n>We present Memory as a Controlled Process (MemCon), a framework that models memory operations as a Markov Decision Process.<n>MemCon consistently outperforms multiple memory baselines by up to 15.2 points in task success while reducing token consumption by 5-20%.
arXiv Detail & Related papers (2026-07-15T08:32:40Z) - Rosetta Memory: Adaptive Memory for Cross-LLM Agents [16.39618390394249]
Memory is the key component for transforming a stateless LLM into a persistent, evolving agent through experience accumulation, long-horizon planning, and continual self-improvement.<n>In practice, users frequently switch between LLMs, for example using Claude for coding and GPT for writing across tasks, or routing different steps to different backbones within a single task for cost-effective trade-offs.<n>Making upstream memory effectively adapt to and activate downstream LLMs remains a critical yet underexplored problem.<n>Specifically, we approach the above upstream-downstream memory adaptation problem from both the write and read sides, and design two profile-conditioned
arXiv Detail & Related papers (2026-06-05T13:50:59Z) - MemTrain: Self-Supervised Context Memory Training [40.64801276577851]
Existing memory-agent approaches are typically trained end-to-end with reinforcement learning on downstream tasks.<n>MemTrain is a self-supervised training framework for enhancing context-memory capability of LLM agents.<n>MemTrain consistently improves downstream memory-intensive reasoning performance across different models.
arXiv Detail & Related papers (2026-06-02T05:56:24Z) - MemGym: a Long-Horizon Memory Environment for LLM Agents [69.79226770543049]
We present MemGym, a benchmark for agentic memory that unifies existing agent gyms and in-house memory-grounded pipelines.<n>MemGym reports memory-isolated scores that decouple memory performance from reasoning, retrieval, and tool-use ability.<n>Our synthetic pipelines for MEMGYM-CODEQA and MEMGYM-DR are length-controllable, ablation-verified at every stage, and tightly aligned with downstream scenarios.
arXiv Detail & Related papers (2026-05-20T07:25:33Z) - Learning How and What to Memorize: Cognition-Inspired Two-Stage Optimization for Evolving Memory [53.8372503928207]
Large language model (LLM) agents require long-term user memory for consistent personalization.<n>Existing memory systems mainly rely on static, hand-crafted update rules.<n>We introduce MemCoE, a cognition-inspired two-stage optimization framework that learns how memory should be organized and what information to update.
arXiv Detail & Related papers (2026-05-01T14:45:20Z) - Scaling Teams or Scaling Time? Memory Enabled Lifelong Learning in LLM Multi-Agent Systems [36.7638915908205]
Large language model (LLM) multi-agent systems can scale along two distinct dimensions.<n>We introduce a conceptual scaling view of multi-agent systems that jointly considers team size and lifelong learning ability.<n>We propose textbfLLMA-Mem, a lifelong memory framework for LLM multi-agent systems under flexible memory topologies.
arXiv Detail & Related papers (2026-03-27T19:34:23Z) - Agentic Memory: Learning Unified Long-Term and Short-Term Memory Management for Large Language Model Agents [57.38404718635204]
Large language model (LLM) agents face fundamental limitations in long-horizon reasoning due to finite context windows.<n>Existing methods typically handle long-term memory (LTM) and short-term memory (STM) as separate components.<n>We propose Agentic Memory (AgeMem), a unified framework that integrates LTM and STM management directly into the agent's policy.
arXiv Detail & Related papers (2026-01-05T08:24:16Z) - Memory-R1: Enhancing Large Language Model Agents to Manage and Utilize Memories via Reinforcement Learning [89.55738101744657]
Large Language Models (LLMs) have demonstrated impressive capabilities across a wide range of NLP tasks, but they remain fundamentally stateless.<n>We present Memory-R1, a reinforcement learning framework that equips LLMs with the ability to actively manage and utilize external memory.
arXiv Detail & Related papers (2025-08-27T12:26:55Z) - MEMO: Fine-grained Tensor Management For Ultra-long Context LLM Training [24.066283519769968]
Large Language Models (LLMs) have been trained using extended context lengths to foster more creative applications.<n>We propose MEMO, a novel framework for fine-grained activation memory management.<n>MeMO achieves an average of 1.97x and 1.80x MFU compared to Megatron-LM and DeepSpeed.
arXiv Detail & Related papers (2024-07-16T18:59:49Z) - RMM: Reinforced Memory Management for Class-Incremental Learning [102.20140790771265]
Class-Incremental Learning (CIL) trains classifiers under a strict memory budget.
Existing methods use a static and ad hoc strategy for memory allocation, which is often sub-optimal.
We propose a dynamic memory management strategy that is optimized for the incremental phases and different object classes.
arXiv Detail & Related papers (2023-01-14T00:07:47Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.