解决长时记忆增强大模型代理的信用分配难题。
Memory-R2: Fair Credit Assignment for Long-Horizon Memory-Augmented LLM Agents

- 提出局部-全局联合优化框架,公平比较不同记忆操作结果。
- 在32轮会话中实现稳定训练,显著提升长程记忆任务性能。
- 适合研究长期记忆、多轮交互的AI代理开发人员使用。
记忆增强的大语言模型代理通过跨会话存储、更新和复用信息,突破有限上下文窗口限制。然而,在多会话环境中使用强化学习训练此类代理时,记忆使过去动作成为未来环境的一部分,导致不同轨迹不再共享相同的中间记忆状态,使基于轨迹的比较本质上不公平。这违背了GRPO等群体相对方法的基本假设——即所有轨迹来自同一有效环境。因此,轨迹级奖励提供的信用信号存在噪声或偏差。为此,我们提出Memory-R2训练框架,其核心算法LoGo-GRPO结合局部与全局群体相对优化:全局目标保留端到端的长程轨迹奖励学习,而局部重采样则在同一中间记忆状态下比较不同记忆操作结果,实现更公平的群体比较和更精准的记忆构建监督。此外,Memory-R2采用共享参数协同学习设计,通过角色特定提示从同一LLM主干中实例化事实提取器与记忆管理器,联合优化记忆形成与演化。为稳定长记忆周期的多步强化学习,引入渐进式课程,逐步将训练周期从8、16扩展至32个会话。这些组件共同构成面向长程多会话场景下记忆增强型大模型代理的有效训练范式。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。