2025-10-15 · 专家 · 自然语言处理 · 机器学习

Memory as Action: Autonomous Context Curation for Long-Horizon Agentic Tasks

这篇论文提出了一种名为“Memory-as-Action”的框架,通过让智能体主动管理其工作记忆,从而在长周期智能体任务中实现自主的上下文管理。

更新于 2025-10-21。作者:Yuxiang Zhang、Jiangming Shu、Ye Ma、Xueyuan Lin、Shangxi Wu、Jitao Sang。

中文摘要

大型语言模型在长期目标任务中面临挑战,因为它们的受限记忆容易被分散或无关的上下文所淹没。现有的工作记忆方法通常依赖于与代理核心策略脱节的来自外部、启发式的机制。在这项工作中,我们将工作记忆管理重新定义为一种可学习的内在能力。我们提出了一种新的框架,即“记忆即行动”,其中代理通过执行作为统一策略一部分的明确编辑操作来主动管理其工作记忆。这种公式允许通过强化学习训练的代理在给定的资源约束下平衡记忆管理和长期任务目标。然而,这种记忆编辑操作打破了LLM交互中持续增长前缀的标准假设,导致了我们所说的轨迹断裂。这些非前缀变化破坏了标准策略梯度方法所需的因果连续性,使得这些方法无法应用。为了解决这个问题,我们提出了一种新的算法,即动态上下文策略优化,通过在记忆行动点对轨迹进行分段,并将轨迹级优势应用于生成的动作段,从而实现稳定的端到端强化学习。我们的结果表明,以端到端的方式联合优化任务推理和记忆管理不仅减少了整体计算消耗,还提高了任务性能,这是由针对模型内在能力的自适应上下文管理策略所驱动的。

英文摘要

Large Language Models face challenges in long-horizon agentic tasks as their constrained memory is easily overwhelmed by distracting or irrelevant context. Existing working memory methods typically rely on external, heuristic mechanisms that are decoupled from the agent's core policy. In this work, we reframe working memory management as a learnable, intrinsic capability. We propose a novel framework, Memory-as-Action, where an agent actively manages its working memory by executing explicit editing operations as part of a unified policy. This formulation allows an agent, trained via reinforcement learning, to balance memory curation against long-term task objectives under given resource constraints. However, such memory editing actions break the standard assumption of a continuously growing prefix in LLM interactions, leading to what we call trajectory fractures. These non-prefix changes disrupt the causal continuity required by standard policy gradient methods, making those methods inapplicable. To address this, we propose a new algorithm, Dynamic Context Policy Optimization, which enables stable end-to-end reinforcement learning by segmenting trajectories at memory action points and applying trajectory-level advantages to the resulting action segments. Our results demonstrate that jointly optimizing for task reasoning and memory management in an end-to-end fashion not only reduces overall computational consumption but also improves task performance, driven by adaptive context curation strategies tailored to the model's intrinsic capabilities.

解读

一句话总结

这篇论文提出了一种名为“Memory-as-Action”的框架,通过让智能体主动管理其工作记忆,从而在长周期智能体任务中实现自主的上下文管理。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt