让大模型自动学会记忆管理,显著提升长任务表现。
AutoMem: Automated Learning of Memory as a Cognitive Skill

- 将记忆操作视为可训练技能,让模型自主决定存取与组织知识。
- 在三个生成类游戏中性能提升2至4倍,32B模型媲美顶级闭源系统。
- 适合研究长时序任务、智能体记忆机制或高效推理的开发者。
记忆能力是可习得的:知道存什么、何时取、如何组织知识——认知科学中称为元记忆。本文将此视角引入大模型,把记忆管理作为可训练技能。我们把文件操作提升为与任务动作并列的一等记忆动作,让模型自主管理记忆。该技能沿两个维度提升:支撑它的结构(提示、文件架构、动作词汇)和模型执行该技能的熟练度。两者均难以手动优化:长周期任务每轮运行数千步,一次记忆错误可能长期隐匿,人工审查完整轨迹不现实。为此提出AutoMem框架:第一循环中,强模型审查完整智能体轨迹,迭代优化记忆结构;第二循环中,从多轮次中提取良好记忆决策作为信号,直接提升模型记忆熟练度。在三个程序生成的长周期游戏(Crafter、MiniHack、NetHack)中,仅优化记忆就使基础智能体性能提升约2-4倍,使32B开源模型达到Claude Opus 4.5和Gemini 3.1 Pro Thinking等前沿系统的竞争力。结果表明,记忆管理是独立可学习的高杠杆技能,在长周期任务中带来显著收益。
原文摘要 · Abstract (English)
Memory expertise is a learned skill: knowing what to encode, when to retrieve, and how to organize knowledge--a capacity known in cognitive science as metamemory. We bring this perspective to LLMs by treating memory management as a trainable skill. We promote file-system operations to first-class memory actions alongside task actions, letting the model itself decide how to manage its memory. This memory skill improves along two axes: the structure that supports it (prompts, file schemas, action vocabulary), and the proficiency of the model exercising it. Both axes resist manual optimization: episodes in long-horizon tasks run for thousands of steps, and a single memory mistake can hide long before it surfaces, making human review of full trajectories impractical. We introduce AutoMem, a framework that automates both axes. In the first loop, a strong LLM reviews complete agent trajectories and iteratively revises the memory structure that shapes how the agent interacts with its memory files. In the second loop, the agent's own good memory decisions are identified from many episodes and used as training signal to sharpen the model's memory proficiency directly. Across three procedurally generated long-horizon games (Crafter, MiniHack, and NetHack), optimizing memory alone--without modifying the model's task-action behavior--improved the base agent's performance ~2x-4x, bringing a 32B open-weight model competitive with frontier systems such as Claude Opus 4.5 and Gemini 3.1 Pro Thinking. Our results show that memory management is an independently learnable skill, and a high-leverage objective yielding large gains on long-horizon tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。