AI学会自己管记忆,性能翻4倍
大模型做长任务时经常忘事,就像人记不住上周三午饭吃了什么。但研究者发现,记忆管理本身可以像骑自行车一样被训练。他们搞了个叫AutoMem的框架,让AI自己学会什么时候该记、什么时候该查、怎么整理知识——这招叫元记忆。具体做法是:先让一个更强的AI看完整任务录像,帮模型优化记忆结构(比如文件怎么命名、提示词怎么写);然后从大量任务中挑出模型自己做得好的记忆决策,拿这些当教材来训练它。结果在三个需要上千步才能完成的游戏里,光优化记忆、不改模型其他能力,性能就提升了2到4倍,一个320亿参数的开源模型直接追平了顶级闭源模型。这告诉你:记忆不是AI的附属品,而是一项可以单独练的技能。
📄 原文摘要(英文)
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.