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.