让大模型自己决定存什么删什么,提升长任务表现
Memory as Action: Autonomous Context Curation for Long-Horizon Agentic Tasks
- 把记忆管理当作可学习的动作,用强化学习自动优化
- 模型精度接近16倍大的模型,上下文长度减少51%
- 适合需要长期规划的AI代理任务,如复杂推理与决策
长上下文大语言模型虽有更强容量,但在长时序任务中仍需有效管理工作记忆以缓解注意力稀释问题。现有方法依赖外部机制,缺乏对智能体推理状态的认知,导致决策不佳。本文提出 Memory-as-Action(MemAct)框架,将工作记忆管理视为可学习的策略动作,通过在上下文中进行删除、插入等就地编辑操作,实现信息保留与任务性能的端到端联合优化。为应对动态上下文更新带来的计算挑战,引入动态上下文策略优化,恢复训练效率而不损害推理完整性。实验表明,MemAct-RL-14B 在准确率上媲美16倍更大的模型,平均上下文长度减少51%,所学策略能适应模型能力并跨任务复杂度泛化。
原文摘要 · Abstract (English)
Long-context Large Language Models, despite their expanded capacity, require careful working memory management to mitigate attention dilution during long-horizon tasks. Yet existing approaches rely on external mechanisms that lack awareness of the agent's reasoning state, leading to suboptimal decisions. We propose Memory-as-Action (MemAct), a framework that treats working memory management as learnable policy actions. By formulating context management as in-place editing operations (deletion, insertion), MemAct enables joint optimization of information retention and task performance through end-to-end reinforcement learning. To address the computational challenges of dynamic context updates, we introduce Dynamic Context Policy Optimization, which restores training efficiency without compromising reasoning integrity. Experiments show that MemAct-RL-14B matches the accuracy of models $16\times$ larger while reducing average context length by 51\%, with learned strategies that adapt to model capabilities and generalize across task complexities.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。