acceptodds
Under review as a conference paper at ICLR 2027

EvoMem: Memory-Augmented Evolution for Code Optimization

Abstract

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 mechanism for transferring mutation knowledge across LLM-based evolutionary program-search runs. 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.

Primary area:
transfer learning, meta learning, and lifelong learning
Keywords:
llm, evolution, memory, agentic systems

Reviews

Among:
Shape:
1234this paper, Bottom 27%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.00 over 3 reviews, above 27% of the others.
Reviewer_QbFROpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The main idea of this paper is to reuse successful mutation strategies across related tasks and domains. They introduce EvoMem, a mechanism for transferring mutation knowledge across LLM-based evolutionary program-search runs. After each run, it extracts and stores promising ideas, and retrieves relevant instructions for next task/domain. They show improvement across several tasks including geometric optimization, multi-hop question answering, GPU kernel optimization, and related benchmarks.

Critical strengths
  1. I think this paper focus in an very important question.
  2. The experiments show good improvement.
  3. The paper show clear ablation studies.
Critical weaknesses
  1. For my understanding, memory retrieval depends on semantic relevance, but I think semantic relevance does not necessarily lead to a beneficial mutation. memory retrieval. I think this is pretty important for cross-task knowledge transfer.
  2. The paper uses CER to measure search efficiency, but for my understnding this metric doesn't include the additional computational overhead. such as task filtering, multi-view retrieval, LLM-based selection...I think those may cause token consumption and latency. I don't think average token usage for the evolution and memory-generation phases is clear enough. For example, latency and embedding cost is not clear to me.
  3. I didn't find a mechanism in the framework for detecting or resolving conflicts between historical optimization strategies and the current task. A memory that improves performance in one task may degrade performance in another.
  4. Although the paper evaluates cross-task memory transfer. But I think the improvements may primarily bacasue of near-tasks rather than generalizable strategies across substantially different problems. So how does it truly tsnafer between tasks is still unclear. In the setting, I feel like there always be some similar tasks. I'm curious how it performs when the target task is dissimilar to all other tasks. So most retrieved memories may be irrelevant or even harmful.
  5. I think the idea of extracting successful experiences into memory and retrieving them to guide future decisions has been explored a lot in agent memory research area. I feel like EvoMem largely combines existing techniques. What fundamentally new methodological contributions are introduced is a bit unclear to me.
Questions for authors

See weakness

2 comments

Thank you for your detailed comments on how memory is selected, transferred, and evaluated. We share your concern that semantic relevance alone does not ensure a beneficial mutation. EvoMem therefore uses an agentic retrieval procedure that considers the current task, metric, parent program, and mutation context, as described in Section 3.4 and Appendix D.3. The agent first identifies potentially relevant source tasks and then uses keyword search, direct identifier lookup, and vector search over several card fields. Task summaries, mechanism descriptions, explanations, and metadata provide complementary information for this process. After combining the results, the agent assesses whether they are sufficient and may issue a focused follow-up query within a fixed iteration budget.

The selected advice then passes through a second level of assessment in the evolutionary loop. The mutation model can adapt or disregard a recommendation, and every resulting candidate undergoes the same correctness checks and objective evaluation as in the baseline. These checks and the subsequent population selection provide the practical safeguards when a historical strategy is unsuitable for the current task. Lineage and usage statistics preserve the evidence produced by this process: origin analysis considers parents, alternative children, and descendants, while usage tracking records per-task counts, fitness changes, and their medians. Post-run analysis retains this history alongside the idea, allowing its description to be interpreted in light of the conditions under which it was associated with improvement or deterioration.

This more involved selection process also brings the additional costs raised in your review. CER captures the number of evaluated candidates needed to reach a reference score, so assessing overall time or monetary savings requires considering memory construction and retrieval as well. In five completed geometric source runs, construction after evolution took a median of 5.49 minutes and a mean of 8.32 minutes. These measurements cover preparation of the bank from completed results and exclude the source evolution itself; the resulting bank can then be reused across later runs. Retrieval adds recurring costs for task filtering, query planning, embedding computation and search, and LLM-based selection and refinement. We use all-MiniLM-L6-v2 for embeddings, as specified in Appendix G. The phase-level token averages in Section 4 describe LLM usage, while latency also depends on model response times, retrieval, and execution scheduling. The practical trade-off is therefore whether the savings in candidate generation and evaluation outweigh these additional operations.

The Kissing Number case helps illustrate what the selection procedure retrieves when experience from different domains is combined. Our big bank audit covers 2,517 cards, with KernelBench accounting for the majority of cards. Banks from Circle Packing transfer experiments make up 9.9% of the corpus but supply 79.4% of card-selection events for Kissing Number 11D and 82.6% for Kissing Number 12D, including repeated retrievals. The selected cards describe multi-start SLSQP with perturbed initializations, vectorized pairwise-distance constraints, diverse initial configurations, and constraints expressed through squared distances. These are numerical optimization and constraint-handling strategies that can apply across distinct geometric formulations. The example thus illustrates how retrieval concentrates on relevant mechanisms within a heterogeneous bank, with shared geometric constraints providing a basis for transfer from circle packing to high-dimensional sphere configurations.

This connection between an idea, its evolutionary history, and its later use is also central to the methodological contribution we aim to make. EvoMem organizes memory around reusable mutation ideas linked to source programs, task context, introduction events, and subsequent outcomes. It consolidates those ideas across runs and selects advice in the context of the current task and parent program. By retaining the identities of selected cards, it also allows later analysis to connect their use with observed fitness changes. Our focus is on making this reuse of mutation knowledge traceable and informed by evolutionary evidence, while preserving the evaluator and selection process that determine which programs succeed on the target task.

Thank you for the clarifications. However, my main concerns remain unresolved, especially W2 total computational overhead, W4 transfer without very related tasks. I think the novelty also remains unclear. I will maintain my original score.

Reviewer_VrxXOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper introduces EvoMem, which organizes experience from successful mutations in program evolution into retrievable memories to guide mutations on later tasks. The evaluation excludes memories originating from the target benchmark and compares search with and without memory across geometric optimization, question answering, scientific computing, and GPU kernels. The results show improved final performance on some tasks or fewer candidate evaluations to reach the baseline score.

Critical strengths
  1. The evaluation excludes memories from the target benchmark, yet gains remain on multiple tasks, supporting the reuse of optimization experience from other tasks. Kissing Number shows no improvement in final score but requires fewer candidate evaluations, illustrating value beyond final performance.

  2. The Circle Packing ablation uses five independent trials per condition. Full EvoMem achieves mean fitness 2.9338, versus 2.8805 for generic advice and 2.8151 without memory, with lower variability. Random memory and retrieval-only memory do not reproduce its mean gains, indicating that the improvement here is more than simply adding context (Table 2).

Critical weaknesses
  1. The main cross-task experiments mostly compare memory with no memory, while the variants testing how experience is distilled and organized are evaluated primarily on Circle Packing. Appendix H compares card-selection policies over the same distilled bank, so it does not isolate the value of distillation; Table 2's retrieval-only variant also removes re-ranking, and the source of generic advice is unspecified. These results support the full system but leave its methodological contribution over more direct experience reuse insufficiently established.

  2. The statistical units for some Table 1 results remain unclear. The paper specifies three seeds, Appendix H details pairing and budgets for three mathematical problems, and Appendix G says "most experiments" use 30 generations; these disclosures leave the completed pair counts, task-specific stopping rules and AlgoTune/KernelBench aggregation insufficiently specified. This limits verification of the main-table gains and between-run variability.

Questions for authors
  1. How was the generic advice in Table 2 obtained, and did it use the same source-run information as EvoMem? This affects whether the comparison distinguishes mutation-knowledge distillation from general advice.

  2. For the non-mathematical tasks in Table 1, did the baseline and EvoMem use the same candidate-evaluation budgets and stopping rules?

  3. In Table 1, Minimum Autocorrelation and Kakeya Parallelograms (64) report negative minimum gains (-0.47% and -0.13%) but minimum CERs of 0.84 and 0.70, whereas CER is set to 0 when the memory-enabled run does not reach the baseline's final best score. Could you clarify whether gains and CERs use the same run pairs, horizon and final quantity, and how the gain sign is handled for the minimized Kakeya objective?

1 comment

Thank you for your careful review of the experimental comparisons. To clarify the source of generic advice, this condition replaced memory content with a fixed, task-independent recommendation whose wording was predefined independently of the source runs. The base instruction was: “Review the requirements carefully. Preserve valid behavior, make one focused improvement, check edge cases and numerical stability, and prefer a simple robust implementation. Verify the result before finalizing.” The purpose of this control is to assess the benefit of the complete memory pipeline over general guidance about correctness and verification.

The experience used by EvoMem comes from the change descriptions and rationales recorded during source-run mutations. Its write phase, described in Sections 3.2–3.3 and Appendix D, consolidates overlapping ideas, preserves their provenance, and uses lineage evidence to identify a high-value subset. This organization is intended to make repeated, task-specific observations from multiple runs available as reusable advice within a limited context budget. It is this experience-based advice that the generic recommendation replaces in the control condition.

For the non-mathematical comparisons in Table 1, we can also confirm that each baseline–EvoMem pair used the same numerical candidate limit and the same stopping rule. Invalid candidates and retries counted toward the budget, and search stopped when the limit was reached. Both conditions therefore received the same allowance of candidate attempts, although the number of valid outputs could differ.

Gains and CERs use the same matched pairs (three per task) and the same budget. The gain compares the two runs' final best scores, and CER takes the baseline's final best as the target. For the minimized Kakeya objective, the gain is gi=(Fibaseline−Fimemory)/∣Fibaseline∣g_i = (F_{i}^{baseline} − F_{i}^{memory})/|F_{i}^{baseline}|, so a positive value is an improvement. In each task, the negative minimum gain comes from a single pair in which the memory-enabled run did not reach the baseline's final score. Contrary to the text, Table 1 charges such runs the full budget instead of setting CER to 0, so 0.70 and 0.84 are upper bounds, not observed speedups. Under the stated convention, the average CERs remain above 1 (1.09 and 1.98), and in the other pairs memory reached the baseline's score 1.4-4.3 times faster.

Reviewer_BApJOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper proposes EvoMem, a memory-augmented framework for LLM-based evolutionary code optimization. It extracts successful mutation strategies from previous evolutionary runs and stores them as structured memory cards with provenance information. During subsequent searches, relevant memories are retrieved and incorporated into mutation prompts. The framework is implemented on top of GigaEvo and evaluated across mathematical optimization, question answering, scientific computing, and GPU kernel optimization tasks. The results suggest that persistent memory can improve search efficiency and solution quality.

Critical strengths
  1. The paper addresses a meaningful limitation of evolutionary code search: useful optimization knowledge is often lost between runs.
  2. The memory extraction, filtering, deduplication, and retrieval pipeline is clearly described and integrates naturally with the existing evolutionary process.
  3. The experiments cover multiple task domains and demonstrate promising improvements. The ablation study in Table 2 also provides useful evidence for the effectiveness of the complete framework.
Critical weaknesses
  1. The overall approach resembles existing memory-augmented agent frameworks that extract, store, and retrieve past experiences. Although EvoMem incorporates evolutionary lineage information, its specific contribution beyond conventional memory retrieval is not sufficiently isolated. A clearer comparison with simpler memory mechanisms would strengthen the novelty claim.
  2. Most experiments use only three random seeds, and the detailed ablation study is limited to Circle Packing (32). Additionally, the candidate-efficiency ratio does not account for memory construction and retrieval overhead. A more comprehensive discussion of these limitations would strengthen the practical conclusions.
Questions for authors
  1. What is the main advantage of using evolutionary lineage information compared with simply storing successful mutation descriptions and retrieving them based on semantic similarity?
  2. Does the reported candidate-efficiency ratio account for the additional computational and LLM costs of memory construction and retrieval? If not, could the authors briefly discuss their impact on overall optimization efficiency?
1 comment

Thank you for your review and for the questions about evolutionary lineage and practical efficiency. Our motivation for retaining lineage is to give each stored idea a history of the circumstances in which it appeared and the outcomes associated with it. A single mutation may introduce several changes, and an improvement in its overall fitness does not necessarily mean that all of those changes were helpful. The description and rationale explain what was changed, while the evolutionary history provides additional evidence for assessing its usefulness.

To make this evidence available during memory construction, EvoMem links ideas to their introduction events, parent programs, alternative children from the same parent context, and subsequent descendants. As described in Sections 3.2–3.3, the analysis considers gains relative to the strongest parent, comparisons with alternative children, and later descendant performance. These observational signals help identify a subset of ideas with stronger support for reuse. In this way, the descriptions used for retrieval remain connected to the evidence behind them, including the context needed to interpret an apparent improvement.

Your question about the cost of this additional processing is also well taken. CER describes efficiency in terms of evaluated candidates and excludes the computational and LLM costs of constructing and retrieving memory. For the construction stage, our measurements across five completed geometric source runs give a median of 5.49 minutes and a mean of 8.32 minutes, with a range of 4.77–20.72 minutes. This interval runs from the end of evolution to completion of the bank write and includes idea processing, clustering, card preparation, and indexing; the source evolutionary run itself is outside that interval. Once constructed, the bank can be reused, allowing this preparation cost to be shared across subsequent runs.

Retrieval, however, adds recurring costs through task filtering, search, and LLM-based selection. The practical benefit therefore depends on how those costs compare with the savings from generating and evaluating fewer candidates. We use CER to characterize candidate efficiency, with overall time and monetary savings depending on the evaluation workload, retrieval overhead, and reuse of the bank. We also appreciate your point about the experimental scope: the small number of seeds and the concentration of the detailed ablation on Circle Packing warrant caution when generalizing the component-level findings.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.