跨领域记忆迁移让编程智能体学会通用开发技巧,提升代码生成效果。
Memory Transfer Learning: How Memories are Transferred Across Domains in Coding Agents

- 用统一记忆池整合异构领域的开发经验,实现跨域知识共享。
- 平均性能提升3.7%,主要得益于验证流程等元知识的迁移。
- 抽象程度决定迁移效果,高阶洞察更易泛化,低阶代码易适得其反。
基于记忆的自我进化已成为编程智能体的有前景范式。然而,现有方法通常将记忆使用限制在同质任务领域内,未能利用不同现实编码问题间共有的基础设施(如运行环境和编程语言)。为此,我们研究了通过统一记忆池从异构领域进行记忆迁移学习(MTL)。在6个编码基准上,采用四种记忆表示(从具体执行轨迹到抽象洞察)进行评估。实验表明,跨域记忆使平均性能提升3.7%,主要源于验证流程等元知识的迁移,而非特定任务代码。重要的是,抽象程度决定可迁移性:高层洞察泛化能力强,而底层轨迹因过度具体常引发负迁移。此外,迁移效果随记忆池规模增大而提升,甚至可在不同模型间实现记忆传递。本工作确立了突破单域记忆壁垒的实证设计原则。
原文摘要 · Abstract (English)
Memory-based self-evolution has emerged as a promising paradigm for coding agents. However, existing approaches typically restrict memory utilization to homogeneous task domains, failing to leverage the shared infrastructural foundations, such as runtime environments and programming languages, that exist across diverse real-world coding problems. To address this limitation, we investigate \textbf{Memory Transfer Learning} (MTL) by harnessing a unified memory pool from heterogeneous domains. We evaluate performance across 6 coding benchmarks using four memory representations, ranging from concrete traces to abstract insights. Our experiments demonstrate that cross-domain memory improves average performance by 3.7\%, primarily by transferring meta-knowledge, such as validation routines, rather than task-specific code. Importantly, we find that abstraction dictates transferability; high-level insights generalize well, whereas low-level traces often induce negative transfer due to excessive specificity. Furthermore, we show that transfer effectiveness scales with the size of the memory pool, and memory can be transferred even between different models. Our work establishes empirical design principles for expanding memory utilization beyond single-domain silos. Project page: https://memorytransfer.github.io/
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。