Model rewrites its own memory prompts, then distills the gains into weights: Kimi-K2.6 scores 11.4 points higher than hand-designed schemes
Meta's Self-Improving Memory lets the same model act as both task agent and meta agent, automatically revising the LOAD and OFFLOAD prompts, then distilling the optimization trajectories back into the weights. On three Continual Learning Bench tasks, optimized prompts average 56.0, best hand-designed 44.6, generic 36.1; after distillation, under the generic prompt it reaches 43.1 vs. 37.6.
Meta's Jason Weston posted a thread on X introducing Self-Improving Memory. The core approach: let the model discover for itself how to manage memory, then distill the discovered behavior into the weights. The task agent and meta agent use the same model, Kimi-K2.6.
Agent memory usually relies on hand-written prompts: after completing a subtask, use an OFFLOAD prompt to tell it to write what it learned into a persistent memory directory; before the next subtask begins, use a LOAD prompt to tell it to read that back. Context is cleared between subtasks, and only the memory directory in the file system persists across tasks. The problem is that no single hand-written memory strategy wins on all tasks. In Figure 2, the four hand-designed schemes Summary, Retrieval, Skill, and Hypothesis each win and lose on Database, Codebase, and Spectrum.


The method has two stages.
The first stage is harness optimization. The meta agent reads the task agent's trajectories, finds places where memory use failed, and revises the LOAD and OFFLOAD prompts. Each candidate is run through 5 full task streams and ranked by average score; the top 4 are selected as parents for further revision. The initial pool is 4 human-written harnesses.

The second stage is harness distillation. Run tasks with the optimized prompts and record complete trajectories; replace the optimized prompts in the trajectories with the generic prompts while keeping the model outputs; fine-tune the attention projection layers with LoRA rank 64, with loss computed only on assistant tokens, including reasoning and tool calls.

Results: the optimized prompts average 56.0 across the three tasks, vs. 44.6 for the best hand-designed and 36.1 for the generic. That is 11.4 points above hand-designed and 19.9 above generic. Codebase improves the most, by 20.6 points. After distillation, using only the generic prompt at test time, it averages 43.1, compared with 37.6 for SFT on generic trajectories, 5.5 points higher, about 14.6%. It is 7.0 points above No SFT's 36.1, but the blog says this comparison is descriptive because the base model was evaluated separately.

One detail worth noting: the meta agent generated 44 revisions, and 37 did not beat the previous round's best. Database and Spectrum reached 53.8 and 49.9 in the first round of search and then stopped improving; Codebase only reached 64.3 by the fourth round. The key to automated search is not that the model improves by itself, but evaluation and selection. Without score-based filtering, most modifications are noise.

The case study is on Codebase. The Summary harness is only 34.3, generic is 33.5, and the best seed is 43.7. Trajectories report that notes grew larger and larger and that the repository path was repeatedly rediscovered. After changing it to reuse recorded paths and failure rules, it reached 52.2. The next round reported that files were append-only and had no index; after changing to a compact quickstart, an indexed registry, and separate fix files, it reached 55.7. Another Summary revision that kept only the details of the last two fixes scored only 36.6.

The most interesting part of this work is moving prompt gains into the weights. But distillation only recovers 5.5 points; the 11.4-point gain from optimized prompts does not all go into the model. The blog also acknowledges that the improvement may come partly from memory organization and retrieval and partly from task-solving behavior, and that separating the mechanisms would require behavioral analysis. In addition, the search targets only the LOAD and OFFLOAD instructions; the optimized harness and generic harness differ only in these two sets of prompts, so no additional correction step is needed when switching back to the generic prompt. The meta agent and task agent are the same model, meaning the model trains on skills it discovered itself.
Blog: https://facebookresearch.github.io/RAM/blogs/self_improving_memory
Thread: https://x.com/jaseweston/status/2122691693543817397
Authors include Tong Chen, Chuanyang Jin, Eryk Helenowski, Weizhe Yuan, Jason Weston, Ilia Kulikov, Xian Li, and Swarnadeep Saha.
发布时间: 2026-11-18 00:28