arXiv:2608.10795cs.AIcs.NE2026-08

让大模型代码优化记住成功经验,下次更快找到好方案。

EvoMem: Memory-Augmented Evolution for Code Optimization

论文配图:EvoMem: Memory-Augmented Evolution for Code Optimization
图 1 · 摘自论文原文
  • 把每次优化中成功的代码修改存成带上下文的建议,供以后调用。
  • 在几何优化、GPU内核等任务上,平均提升搜索速度或目标指标。
  • 适合做代码生成、自动优化的研究者和工程师参考。

进化式代码搜索中的有效突变策略可能包含可复用的知识,不仅适用于单次运行,甚至可在相关任务与领域间迁移。然而,现有基于大模型的进化框架通常丢弃此类知识,重复发现相似思路,限制了跨轮次与跨任务学习。我们提出EvoMem,一种用于大模型驱动的程序进化搜索的持久记忆架构,能够捕获并重用候选突变知识。EvoMem将成功的突变事件转化为结构化、任务感知的建议。其运作分为两阶段:每轮结束后,提取并存储具有溯源信息的优质想法;后续进化中,根据当前任务与程序上下文检索少量相关指令,指导突变操作。在几何优化、多跳问答、GPU内核优化及相关基准测试中,实验显示多数设置下目标指标或搜索速度均有正向平均提升,同时揭示任务间的差异性。整体而言,EvoMem表明持久记忆能减少冗余探索,提升成功策略的复用与适应能力。

原文摘要 · Abstract (English)

Successful mutation strategies in evolutionary code search may contain reusable knowledge that is useful beyond a single run, and in some cases may transfer across related tasks and domains. However, existing LLM-driven evolutionary frameworks largely discard such knowledge, repeatedly rediscovering similar ideas and limiting opportunities for cross-run and cross-task learning. We introduce EvoMem, a persistent memory architecture for LLM-based evolutionary program search that captures and reuses candidate mutation knowledge. EvoMem converts successful mutation events into structured, task-aware advice for future runs. It operates in two phases: after each run, it extracts and stores promising ideas with provenance, and during subsequent evolution, it retrieves a small set of relevant instructions based on the current task and program context to guide mutation. Across geometric optimization, multi-hop question answering, GPU kernel optimization, and related benchmarks, our experiments show positive average improvements in target metrics or search speed for most evaluated settings, while also revealing variability across tasks. Overall, EvoMem provides evidence that persistent memory can reduce some redundant exploration and improve the reuse and adaptation of successful strategies in LLM-driven evolutionary search.

代码优化大模型进化算法

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。