InquiryLoom

资料

Self-Improvement Memory Enables Continual Recursive Self-Improvement

复制链接

按 Ctrl+C(Mac 上 ⌘C)复制下面的文字;手机上长按选择“复制”。

分享海报提修改建议

Xin Yu et al. (Google / Penn State)

译自英文 · 看原文

An AI agent can improve its performance by changing the software that manages its prompts, tools and execution, without retraining the underlying model. This paper introduces Self-Improvement Memory (SIM), which preserves the reasons behind previous software changes and their measured results so that optimization can continue when the model or task distribution changes.

Problem

Recursive self-improvement (RSI) typically optimizes an agent harness against a fixed model and benchmark. Transferring the resulting harness to a new setting does not necessarily transfer its benefits: a completion check, tool parser or retrieval strategy that works for one model or dataset may fail in another.

The final harness contains the implementation, but may not explain why a change was introduced, which failures it targeted, or whether those failures were actually resolved. Without this history, subsequent optimization can repeat unsuccessful attempts or remove useful mechanisms without understanding their purpose.

Method

The authors define Continual Recursive Self-Improvement (CRSI) as continued harness optimization after a change of benchmark or policy model, assuming a compatible executable interface. Cross-dataset continuation keeps the policy fixed; cross-model continuation keeps the benchmark and evaluation split fixed.

SIM accompanies the evolved harness into the next optimization stage. Unlike memory used by an agent to solve tasks, SIM is consumed by the agents responsible for improving the harness itself.

Agent harness optimization can reuse past improvement experience without updating the task-solving model’s weights

Implementation

Each memory entry represents a root-cause hypothesis, such as premature task completion. It contains a history of selected modifications, their rationale, predicted task-level improvements, observed outcomes, and provenance (domain, benchmark, policy model and optimization round).

The optimization loop works as follows:

  1. The evaluator executes the current harness and collects scores, traces and errors.

  2. The proposer reads the harness, run history and SIM, then proposes candidate modifications.

  3. The selector screens candidates and chooses among evaluated modifications, considering performance, complexity, specificity and regression risk.

  4. SIM records the selected modification and measured outcomes, appending to an existing problem or creating a new entry. Unsuccessful predictions are retained; if no candidate is accepted, SIM remains unchanged.

Optimization architecture

SIM architecture showing source-to-target transfer, evaluator, proposer, pre-execution screening, candidate evaluation, selection, retained harness, memory reads and updates, and held-out evaluation outside the loop
Optimization architecture redrawn from Method §§3.1–3.3 and Figure 2; policy weights remain frozen within each run.示意图

Conceptual diagram based on Sections 3.1–3.3 and Figure 2. The policy model remains frozen throughout.

Both proposer and selector read the complete memory. Held-out evaluation is excluded from optimization feedback.

Remembering the rationale and outcomes of earlier harness changes helps preserve useful requirements while adapting their implementation

Results

Experiments cover coding, text classification, agentic workspace and engineering design. The authors compare fresh optimization from the seed harness, transfer of the evolved harness alone, transfer with root causes only, and transfer with full SIM. The three transfer conditions share the same starting harness and optimization budget.

SettingReported final held-out score advantage
Six cross-dataset transitionsFull SIM exceeds harness-only transfer by 2.43–4.35 points
Same cross-dataset transitionsFull SIM exceeds root-cause-only memory by 0.20–6.06 points
Four Opus-to-Gemini transitionsFull SIM exceeds harness-only transfer by 3.60–11.33 points
Ten independent coding source runsMean paired advantage of 2.36 points over harness-only transfer; p = 0.003

Transferring harness improvement history alongside code improves adaptation to new datasets in six tested settings

The workspace experiment illustrates why continued optimization matters: the transferred harness starts at 68.41, below the new model's seed score of 73.89. After optimization, harness-only transfer reaches 73.42, whereas full SIM reaches 84.75.

Workspace transfer: held-out scores

ConditionStarting scoreFinal scoreGain
Harness only68.4173.42+5.01
Full SIM68.4184.75+16.34
flowchart LR
 A[Transferred harness: 68.41] --> B[Harness only: 73.42]
 A --> C[Full SIM: 84.75]
示意图

Matched starting harness and optimization budgets; scores from Section 4.3.1. Gains are calculated from the reported endpoints.

An agent harness that improves performance in its original environment can underperform the seed harness after a dataset or model change

Additional research findings

Transferring optimization history improves agent harness adaptation across model families in four tested domains

Root-cause diagnoses alone do not reliably improve agent harness adaptation without the history of attempted fixes and their outcomes

Optimization memory can improve target-task performance while reducing regression on previously optimized coding tasks

Optimization memory can reach a stronger coding-agent harness earlier in a fixed-round adaptation budget

Optimization memory improves coding-agent harness adaptation in nine of ten independently initialized paired experiments

A shared agent harness optimized using feedback from multiple models can match the average performance of individually optimized harnesses

Continually inheriting an optimized agent harness across model generations does not always beat fresh optimization

Limitations

The experiments assume compatible harness interfaces and fixed optimization procedures. Independent repetitions focus on coding; other domains use one optimization run per condition. SIM is evaluated as a combined procedure, so the effects of inherited memory and subsequent memory updates are not isolated. The complete memory is supplied without retrieval or truncation, leaving long-term scaling an open question.

Full-history agent harness optimization has not established scalability to long histories or the separate benefit of inherited memory

The central contribution is to preserve the experience of improving an agent, not merely the improved agent implementation. The reported results support this approach under the tested transitions, rather than establishing that every future model or dataset change will benefit.

翻译:deepseek-flash

AI agent 可以通过修改管理其提示词、工具与执行流程的软件来提升性能,而无需重新训练底层模型。本文提出自我改进记忆(Self-Improvement Memory,SIM),它保留以往软件改动背后的原因及其实测结果,从而使模型或任务分布发生变化时优化仍能继续。

问题

递归自我改进(RSI)通常针对固定的模型和基准来优化 agent harness。把由此得到的 harness 迁移到新环境并不必然带来同等收益:对某个模型或数据集有效的完成检查、工具解析器或检索策略,在另一个模型或数据集上可能失效。

最终得到的 harness 包含具体实现,但可能无法说明某项改动为何引入、针对的是哪些失败,或者这些失败是否真的得到了解决。缺少这段历史,后续优化就可能重复失败的尝试,或在未理解其用途的情况下移除有用的机制。

方法

作者将持续递归自我改进(Continual Recursive Self-Improvement,CRSI)定义为在基准或策略模型发生变化之后继续对 harness 进行优化,前提是存在兼容的可执行接口。跨数据集延续保持策略固定;跨模型延续保持基准与评测划分固定。

SIM 会随演化后的 harness 一同进入下一个优化阶段。与 agent 用于解决任务所依赖的记忆不同,SIM 的消费方是负责改进 harness 本身的 agent。

智能体框架优化可以复用过去的改进经验,而无需更新任务求解模型的权重

智能体框架是控制语言模型如何接收上下文、调用工具并完成任务的软件。Yu 等人将自我改进记忆(SIM)置于外层优化循环中:提议者和选择器会参考先前框架改动的理由与实测结果,而执行任务的模型保持冻结。优化器可以通过修改框架而非训练任务求解模型,在任务或模型变化之间复用经验。在匹配的跨数据集实验中,相较于仅迁移演化后的框架,完整记忆使最终留出分数提升了 2.43–4.35 分。

Xin Yu et al. (Google / Penn State)

2 条引文v2

实现

每条记忆条目对应一个根因假设,例如任务过早完成。它包含所选改动的历史、改动理由、预测的任务级改进、观测到的结果以及来源信息(领域、基准、策略模型和优化轮次)。

优化循环的运作方式如下:

  1. 评估器执行当前 harness,并收集分数、轨迹和错误。

  2. 提议器读取 harness、运行历史和 SIM,然后提出候选改动。

  3. 选择器筛选候选,并在已评估的改动之间进行选择,考量性能、复杂度、针对性和回归风险。

  4. SIM 记录被选中的改动及实测结果,将其追加到已有问题条目或新建条目中。未成功的预测也会被保留;若没有任何候选被接受,则 SIM 保持不变。

优化架构

SIM 架构,展示从源到目标的迁移、评估器、提议器、执行前筛选、候选评估、选择、保留的 harness、记忆的读取与更新,以及循环之外的留出评估
根据 Method §§3.1–3.3 和 Figure 2 重新绘制的优化架构;策略权重在每次运行中保持冻结。示意图

基于第 3.1–3.3 节和图 2 的概念图。策略模型全程保持冻结。

提议器和选择器都会读取完整记忆。留出集评测不参与优化反馈。

记住先前执行框架变更的理由和结果,有助于在调整其实现方式的同时保留有用的需求

完成门控是一种执行框架检查,用于防止智能体过早宣布任务完成。在 Yu 等人的编码迁移实验中,两个优化器继承同一门控;拥有自我改进记忆(SIM)的那个优化器能看到门控的引入原因及其先前结果,在保留完成验证的同时增加适合新任务的检查。没有 SIM 时,优化器会收紧门控,不得不两次修复完成死锁,并把继承来的门控错误归因于自己的第一轮。将某一反复出现的问题下的修改、理由、预测结果与实际结果以及评估背景一并存储,有助于区分持久性需求与过时的实现。

Xin Yu et al. (Google / Penn State)

3 条引文v2

结果

实验涵盖编码、文本分类、agent 工作区和工程设计。作者比较了以下四种方式:从种子 harness 重新优化、仅迁移演化后的 harness、仅附带根因迁移、以及附带完整 SIM 迁移。三种迁移条件共享相同的起始 harness 和优化预算。

设置报告的最终留出集分数优势
六次跨数据集迁移完整 SIM 比仅迁移 harness 高出 2.43–4.35 分
相同的跨数据集迁移完整 SIM 比仅含根因的记忆高出 0.20–6.06 分
四次 Opus 到 Gemini 的迁移完整 SIM 比仅迁移 harness 高出 3.60–11.33 分
十次独立的编码来源运行相对于仅迁移 harness 的平均配对优势为 2.36 分;p = 0.003

在六种测试设置中,将 harness 改进历史随代码一并迁移,可以提升对新数据集的适应能力

迁移一个经过优化的 agent harness(模型外围的软件)会保留其代码,但不一定会保留代码背后的证据。Yu 等人比较了以下几种情况:从同一个演化后的 harness 继续优化但不使用自我改进记忆(SIM)、仅使用根本原因、以及使用包含诊断、编辑、预测和实测结果的完整记录。在涵盖编码、分类、工作区和工程的六次数据集切换中,完整 SIM 在 0–100 的留出评分尺度上比仅迁移 harness 高出 2.43–4.35 分。这表明,在让 agent 适应新的任务分布时,将优化经验连同实现一起迁移是有益的。

Xin Yu et al. (Google / Penn State)

2 条引文v2

工作区实验说明了持续优化为何重要:迁移后的 harness 起始得分为 68.41,低于新模型的种子得分 73.89。优化之后,仅迁移 harness 达到 73.42,而完整 SIM 达到 84.75。

工作区迁移:留出分数

条件起始分数最终分数增益
仅测试框架68.4173.42+5.01
完整 SIM68.4184.75+16.34
flowchart LR
 A[Transferred harness: 68.41] --> B[Harness only: 73.42]
 A --> C[Full SIM: 84.75]
示意图

匹配起始测试框架与优化预算;分数来自第 4.3.1 节。增益根据报告的端点计算。

一个在原始环境中提升性能的 agent harness,在数据集或模型变更后,表现可能不如种子 harness。

进化后的 harness 包含针对特定环境调优的提示词、工具和执行控制。在 Yu 等人的跨数据集实验中,源优化在全部六个设置中使留出源分数提升 2.75–6.41 分,但有一个分类 harness 在新数据集上从 72.92 起步,而未优化的种子为 75.72。当一个使用 Claude Opus 5.5 进化的 harness 被迁移到同一基准和划分上的 Gemini 3.8 Flash 时,它在全部四个领域中都低于 Gemini 的种子(低 0.60–5.48 分),而仅 harness 的继续优化在其中三个领域仍低于全新优化。因此,源环境的提升不足以证明 harness 会使新环境受益;应针对目标种子重新评估它。

Xin Yu et al. (Google / Penn State)

3 条引文v2

其他研究结果

在四个测试领域中,迁移优化历史可提升 agent harness 在不同模型家族间的适配效果

Yu 等人将使用 Claude Opus 5.5 优化的 harness(控制 agent 执行的软件)迁移到 Gemini 3.8 Flash,同时保持基准和划分固定不变。继续采用自我改进记忆(SIM),其中保存先前的诊断、编辑和实测结果,使四个领域的最终留出分数比仅迁移代码高出 3.60–11.33 分。在工作区中,两者均从 68.41 开始;仅代码迁移最终达到 73.42,而完整记忆达到 84.75。因此,即使继承的 harness 在新模型上初始表现不佳,优化历史也可能有用。

Xin Yu et al. (Google / Penn State)

2 条引文

仅靠根因诊断,在没有尝试过哪些修复及其结果的历史记录的情况下,无法可靠地改善智能体 harness 的自适应能力

Yu 等人比较了数据集变化后继续优化智能体 harness 的三种方式:仅迁移代码、代码加反复出现故障的诊断,或代码加自我改进记忆(SIM),后者还会记录修改内容、理由、预测和观察到的结果以及来源。在六次迁移中,仅含诊断的记忆比仅含代码的记忆差 1.82 分到好 2.40 分不等;完整 SIM 在每种设置下都比仅含诊断的记忆高出 0.20–6.06 分。其含义是,记住哪里出了错,不如记住尝试过什么以及实际发生了什么可靠。

Xin Yu et al. (Google / Penn State)

2 条引文

优化记忆可以提升目标任务表现,同时减少对先前已优化编码任务的性能回退

在 Yu 等人的 AHE 编码测试框架从 Terminal-Bench 2.1 迁移到 Terminal-Bench 4 的实验中,所有迁移条件的源留出分数均从相同的 90.22 开始。完整自我改进记忆(SIM)保留了此前的编辑理由和评估结果,在 225 次源 rollout 中仅损失三次成功,而仅保留根因记忆损失四次,仅迁移测试框架损失六次。其目标分数还提升了 6.67 分,而仅保留根因记忆仅提升 0.61 分。这表明,在保留先前优化证据的情况下,适应新任务未必需要牺牲同样多的既往性能。

Xin Yu et al. (Google / Penn State)

1 条引文

在固定轮次的适应预算下,优化记忆能更早达到更强的编码智能体运行框架

Yu 等人比较了两种编码框架种子 AHE 和 Terminus-2 从 Terminal-Bench 2.1 到 Terminal-Bench 4 的适应过程。完整自我改进记忆(SIM)为优化器提供更早的诊断和实测结果,在两个种子的第 1–10 轮中均为最佳或并列最佳。对于 AHE,它在第 5 轮超过了最强对照组 20.61 的最终留出分数;对于 Terminus-2,则在第 2 轮超过。这表明记忆可以减少达到给定性能阈值所需的优化轮数。

Xin Yu et al. (Google / Penn State)

1 条引文

优化记忆在十个独立初始化的配对实验中有九个改善了编码智能体测试框架的适配

Yu 等人在 Terminal-Bench 2.1 上进化出十个独立的 Terminus-2 测试框架,随后在匹配的目标模型、任务、初始测试框架和优化预算条件下,将每一个继续在 Terminal-Bench 4 上运行两次。使用自我改进记忆(SIM)的那次运行——该记忆保留先前的诊断、编辑和结果并追加新的内容——在十对中胜出九对;有记忆时的平均最终得分为 21.70,无记忆时为 19.33。配对提升为 2.36 分(95% CI 1.05–3.68;p = 0.003),支持在这一编码设置中存在可重复的收益,而非由某一次幸运的初始化所驱动。

Xin Yu et al. (Google / Penn State)

2 条引文

使用来自多个模型的反馈进行优化的共享 agent harness,可以达到单独优化的各 harness 的平均性能

Yu 等人使用一个通用 harness(模型外围的软件)在 Grok、Claude Opus 和 Gemini 上测试文本分类。一种使用来自全部三个模型的反馈的统一合成方法取得了 75.24 的平均留出分数,相比之下,分别针对每个模型优化的独立 harness 为 75.20,共享的未优化种子为 73.28。顺序持续优化达到 74.20,而针对单个模型单独优化后再共享的 harness 平均得分为 66.84–72.24。该实验表明,使用来自其目标模型的反馈来优化共享 harness,可以作为维护独立实现的一种可行替代方案。

Xin Yu et al. (Google / Penn State)

2 条引文

跨模型世代持续继承优化后的智能体运行框架,并不总能胜过重新进行优化

Yu 等人将演化得到的运行框架与自我改进记忆(Self-Improvement Memory,SIM,一种记录既往运行框架诊断与编辑的机制)沿代传承,在 Terminal-Bench 2.1 上跨代应用于一系列 Gemini 模型。相对于在每一代上独立优化原始种子,继承式优化在 Gemini 3.5 Flash 上得分为 76.8,对比 73.3;在 Gemini 3.8 Flash 上为 90.5,对比 88.9;但在 Gemini 4 Argon 上为 94.8,对比 95.6。因此,一连串过往改进可以帮助新模型,但仍应将其与重新优化得到的基线进行比较,而不是假定其更优。

Xin Yu et al. (Google / Penn State)

1 条引文

局限性

实验假设 harness 接口兼容且优化流程固定。独立重复实验集中在编码领域;其他领域每个条件仅运行一次优化。SIM 是作为整体流程评估的,因此继承记忆与后续记忆更新的各自作用未被单独区分。完整记忆是整体提供的,未做检索或截断,因此长期扩展性仍是一个未解问题。

全历史智能体框架优化尚未确立对长历史或继承记忆单独收益的可扩展性

Yu 等人的自我改进记忆(SIM)存储先前的诊断和选定的框架编辑,两个优化智能体每轮都读取完整记录,既不检索也不截断。他们的比较同时改变了整个记忆流程:继承的源经验和新的目标阶段更新都被启用,因此测得的优势无法单独归因于其中任何一方。该论文支持的是所测试的完整记忆流程,而不是得出无限记忆可扩展或仅凭继承记忆就能解释这些增益的结论。

Xin Yu et al. (Google / Penn State)

3 条引文v2

核心贡献在于保留改进 agent 的经验,而不仅仅是改进后的 agent 实现。所报告的结果支持在已测试的迁移情形下采用这一方法,但并未证明未来每一次模型或数据集的变化都会从中受益。