Treating memory management as a trainable cognitive skill boosts LLM performance 2x–4x in long-horizon tasks

AutoMem automates both memory structure design and model proficiency via two feedback loops, bringing a 32B open-weight model to parity with frontier systems on procedurally generated games.

PaperTop Universitycs.AIarXiv:2607.01224v1
Shengguang Wu · Hao Zhu · Yuhui Zhang · Xiaohan Wang · Serena Yeung-Levy

Stanford University

Research Digest··2 min read
The authors introduce AutoMem, a framework that treats memory management as a learnable skill for LLMs by promoting file-system operations to first-class actions. By automating the optimization of memory structure (prompts, schemas, action vocabulary) and model proficiency (training on good memory decisions), AutoMem improved base agent performance by approximately 2x to 4x across three long-horizon games without altering task-action behavior.

What they did

The authors developed AutoMem, consisting of two automated loops. The first loop uses a strong LLM (e.g., GPT-4o) to review complete agent trajectories and iteratively revise the memory structure—prompts, file schemas, and action vocabulary—that governs how the agent interacts with its memory files. The second loop identifies the agent's own good memory decisions from many episodes and uses them as training data to directly sharpen the model's memory proficiency via supervised fine-tuning. They evaluated on three procedurally generated long-horizon games: Crafter, MiniHack, and NetHack, using a 32B open-weight model as the base agent. Performance was measured by game score after 5,000 steps.

Key findings

  • Optimizing memory alone (without modifying task-action behavior) improved base agent performance by 2x–4x across all three games.
  • The 32B model with AutoMem memory management became competitive with frontier systems such as Claude Opus 4.5 and Gemini 3.1 Pro Thinking.
  • Both optimization loops contributed: the first loop (structure revision) provided most of the gain in initial experiments, while the second loop (proficiency training) further improved consistency and generalization.

Why it matters

This work shows that memory management is an independently learnable and high-leverage skill for LLMs, separate from task-specific reasoning. It opens the possibility of decoupling memory optimization from model architecture or task policy, potentially allowing lightweight memory upgrades to boost performance on long-horizon tasks without retraining the entire model.

Caveats

The evaluation is limited to procedurally generated games with discrete action spaces and well-defined objectives; it remains unclear how well AutoMem transfers to real-world open-ended tasks or environments with more complex observation spaces. The reliance on a strong LLM (GPT-4o) for the first loop may introduce cost and latency overhead, and the second loop requires collecting many episodes to identify good memory decisions, which may not be feasible in safety-critical settings.

§

Analysis

The paper aligns with growing interest in metacognitive skills for agents, such as self-reflection and memory editing. Unlike prior work that manually engineered memory prompts or relied on external orchestrators, AutoMem fully automates the memory design process. The finding that a 32B model can match frontier models via memory optimization alone is striking, but the games are relatively simple compared to web navigation or robotics tasks. Future work should test generalization to more diverse domains.

newspaper

Research Digest

Articles published under the Zotpaper byline are synthesized from multiple source publications by our AI editor and reviewed by our editorial process. Each story combines reporting from credible outlets to give readers a balanced, comprehensive view.