记忆专业知识是一种习得的技能:知道要编码什么,何时检索,以及如何组织知识——这种能力在认知科学中被称为元记忆。我们将内存管理视为一项可训练的技能,从而将这一观点引入法学硕士。我们将文件系统操作与任务操作一起提升为一流的内存操作,,让模型本身决定如何管理其内存。这种记忆技能沿着两个轴:支持它的结构(提示,文件模式,动作词汇),以及运用它的模型的熟练程度来提高。两个轴都无法进行手动优化: 长期任务中的事件需要运行数千步,,并且单个内存错误可能会在出现之前就隐藏很久,,从而使人工审查完整轨迹变得不切实际。我们引入 AutoMem, 一个自动化两个轴的框架。在第一个循环,中,强大的LLM会审查完整的代理轨迹,并迭代地修改记忆结构,以决定代理如何与其内存文件交互。在第二个循环,中,代理的自己的良好记忆决策从许多情节中被识别出来,并用作训练信号来直接提高模型的的记忆熟练程度。在三个程序生成的长视野游戏中 (Crafter, MiniHack, 和 NetHack), 仅优化内存 - 不修改模型的 任务操作行为 - 提高了基本代理的 性能 ~2x-4x, 带来了与前沿系统(例如 Claude Opus 4.5 和 Gemini 3.1 Pro)竞争的 32B 开放权重模型思考。我们的结果表明,内存管理是一项可独立学习的技能,,也是一个高杠杆目标,可以在长期任务中产生巨大收益。
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的 own good memory decisions are identified from many episodes and used as training signal to sharpen the model的 memory proficiency directly. Across three procedurally generated long-horizon games (Crafter, MiniHack, and NetHack), optimizing memory alone--without modifying the model的 task-action behavior--improved the base agent的 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.
科目: 人工智能 (cs.AI); 计算和语言 (cs.CL); 多代理系统 (cs.MA)
Subjects: Artificial Intelligence (cs.AI); Computation and Language (cs.CL); Multiagent Systems (cs.MA)