AutoMem: Automated Learning of Memory as a Cognitive Skill

Shengguang Wu, Hao Zhu, Yuhui Zhang, Xiaohan Wang, Serena Yeung-Levy

arXiv:2607.01224 · 2026-07-04 공개 · arXiv · PDF

llm-training long-horizon-tasks agent-trajectories automated-memory metamemory file-system-operations crafter minihack

Abstract

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.

한국어 요약

한 줄 요약

AutoMem은 메모리 관리를 학습 가능한 능력으로 자동화하여, 32B 모델의 성능을 2~4배 향상시키는 프레임워크이다.

핵심 기여도

핵심 아이디어

AutoMem은 인간의 **metamemory**(메타메모리) 개념을 기반으로, 메모리 관리를 학습 가능한 능력으로 정의한다. 이는 단순히 메모리 저장소를 설계하는 것이 아니라, **어떤 정보를 저장할지, 언제 검색할지, 어떻게 조직할지를 모델 스스로 결정하도록 유도**하는 접근법이다.

이를 위해 **파일 시스템 연산**(read, write, search, append, create)을 **first-class memory actions**로 정의하여, 모델이 직접 메모리와 상호작용하도록 허용한다. 이는 기존 메모리 기반 접근법과 달리, 메모리 사용 결정을 모델이 스스로 하도록 유도하는 핵심 차이점이다.

AutoMem은 메모리 능력 향상을 두 축(구조, 능력)으로 나누어 자동화한다. 첫 번째 축은 **메모리 구조**(prompt, 파일 스키마, 액션 어휘)를 개선하는 것이고, 두 번째 축은 **메모리 사용 능력**(proficiency)을 훈련하는 것이다. 이 두 축은 수동 최적화가 어렵기 때문에, **meta-LLM**을 활용해 자동화한다.

기술적 접근법

주요 결과

의의 및 한계

AutoMem은 메모리 관리를 **학습 가능한 능력**으로 정의하고, 이를 자동화함으로써 **장기적 태스크 성능을 크게 향상**시킬 수 있음을 입증한다. 이는 기존 메모리 기반 접근법과 달리, **메모리 사용 결정을 모델이 스스로 학습하도록 유도**하는 새로운 패러다임을 제시한다.

그러나, AutoMem은 **메모리 최적화에만 집중**하며, **기본 작업 행동**(task-action behavior)은 수정하지 않기 때문에, **전체 성능 향상을 위해서는 메모리 외 다른 능력도 함께 학습해야 할 수 있다**는 한계가 있다. 또한, **meta-LLM의 판단이 최적일 수 없다는 가능성**도 존재한다.

실용적 활용

AutoMem은 **장기적 태스크**(예: 게임 플레이, 복잡한 계획 수립, 문서 분석 등)를 수행하는 **LLM 에이전트**에 적용 가능하다. 특히, **메모리 관리가 핵심인 상황**(예: 지도 탐색, 인벤토리 관리, 전략적 기록 유지 등)에서 유용하며, **오픈 모델을 대규모 모델 수준으로 성능 향상**시키는 데 활용할 수 있다.