ChatPaper.aiChatPaper

AutoMem:记忆作为认知技能的自动化学习

AutoMem: Automated Learning of Memory as a Cognitive Skill

July 1, 2026
作者: Shengguang Wu, Hao Zhu, Yuhui Zhang, Xiaohan Wang, Serena Yeung-Levy
cs.AI

摘要

记忆专长是一种习得性技能:知道编码什么、何时检索以及如何组织知识——这种能力在认知科学中被称为元记忆。我们将这一视角引入大语言模型(LLM),将记忆管理视为一种可训练的技能。我们将文件系统操作提升为与任务操作同等重要的第一类记忆操作,让模型自主决定如何管理其记忆。这种记忆技能沿着两个维度提升:支撑它的结构(提示词、文件模式、动作词汇表),以及运用该技能的模型熟练度。这两个维度均难以手工优化:长视界任务中的回合动辄运行数千步,而一次记忆失误可能在显现之前早已隐藏很久,导致人工审查完整轨迹不切实际。我们提出AutoMem框架,自动优化这两个维度。在第一个循环中,一个强大的LLM审查完整的智能体轨迹,并迭代修正塑造智能体与其记忆文件交互方式的记忆结构。在第二个循环中,从多个回合中识别出智能体自身良好的记忆决策,并将其用作训练信号,直接提升模型的记忆熟练度。在三个程序生成的长视界游戏(Crafter、MiniHack和NetHack)中,仅优化记忆——而不修改模型的任务动作行为——就将基础智能体的性能提升了约2至4倍,使一个320亿参数的开权模型与Claude Opus 4.5和Gemini 3.1 Pro Thinking等前沿系统相抗衡。我们的结果表明,记忆管理是一种独立可习得的技能,并且是一个在长视界任务中产生巨大收益的高杠杆优化目标。
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.