arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.27377cs.AI
收藏

REM:编码智能体经验记忆中的存储内容、召回时机与遗忘策略

REM: What to Store, When to Recall, What to Forget in Experience Memory for Coding Agents

Amazon(亚马逊);Yale University(耶鲁大学)

Xinyi Lisa Chen, Pedro Herrero-Vidal, Xiaohan Chen, Xiaojing Yu, Cris Liu, Bingqing Song, Bin Xu, Suleiman A. Khan, You-Lin Chen

AI总结:

该研究提出REM框架,通过存储内容、召回时机、遗忘策略三个决策管理编码智能体的经验记忆,在仓库级漏洞修复任务上提升了检索准确率与任务解决率,降低了成本。

摘要:

大型语言模型(LLM)智能体如今可通过数百次思考-行动步骤自主完成长周期任务,如仓库级编码,但每次运行产生的经验很少会被后续复用。现有记忆系统聚焦于检索,寻找最相关的过往轨迹,然而检索无法感知运行中的智能体,因此无法判断智能体何时需要某段经验、在哪个节点需要、或需要多久。我们提出REM(可复用经验记忆),这是一个从智能体的思考-行动循环内部管理记忆生命周期的框架,通过三个明确决策实现:存储内容方面,每条完成的轨迹会被整合为阶段结构化文档,其体积比原轨迹小两个数量级;召回时机方面,该文档会在任务开始时注入,而成本更高的实现记录则会被保留,直到循环内的门控机制检测到智能体陷入困境;遗忘策略方面,该记录在单次使用后就会被移除。在仓库级漏洞修复任务(SWE-ContextBench Lite)上,REM的相关轨迹检索准确率优于所有现有最先进记忆系统(匹配@1为68.7%,对比组为55.6%),且在所有重复实验中,任务最终解决率提升(27.6%对比24.9%),同时成本降低17%。即便采用神谕检索,将相同经验以摘要或原始轨迹形式注入也无法达到该效果。对三个决策中的任意一个进行消融都会降低解决率。这些结果共同表明,经验复用的瓶颈并非检索准确率,而是经验在其生命周期中的存储与管理方式,为智能体记忆研究开辟了控制理论视角。

英文摘要:

Large language model (LLM) agents now autonomously complete long-horizon tasks, such as repository-level coding, through hundreds of think-act steps, yet the experience each run produces is rarely reused on the next. Prior memory systems concentrate on retrieval, finding the most relevant past trajectory. Retrieval cannot observe the running agent, so it cannot decide whether the agent needs an experience, at which point, or for how long. We introduce REM (Reusable Experience Memory), a framework that manages the memory lifecycle from inside the agent's think-act loop through three explicit decisions. What to store: each completed trajectory is consolidated into a phase-structured document, two orders of magnitude smaller than the trajectory. When to recall: the document is injected at the start of the task; the costlier implementation record is withheld until an in-loop gate detects the agent struggling. What to forget: the record is evicted after a single exposure. On repository-level bug fixing (SWE-ContextBench Lite), REM retrieves the related trajectory more accurately than every state-of-the-art memory system (68.7% vs. 55.6% match@1) and improves, in every replicate, end-task resolution (27.6% vs. 24.9%) at 17% lower cost. Injecting the same experience as a summary or raw trajectory, even when oracle-retrieved, does not. Ablating any of the three decisions reduces resolution. Altogether, these results demonstrate that the bottleneck in experience reuse is not retrieval fidelity but how experience is stored and governed across its lifecycle, opening a control-theoretic perspective on agent memory.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑