Manuscript Offprint

arXiv:2610.02361

SEDIMA: Cross-Run Hierarchical Insight Memory for Evolutionary Search Agents

Amirhossein Abaskohi, Mahdi Mostajabdaveh, Zirui Zhou

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Large language model (LLM)-driven evolutionary search is a powerful paradigm for automated program and algorithm discovery, yet existing systems are largely memoryless: each run explores from scratch, so agents repeatedly rediscover the same improvements and re-encounter the same dead ends. We introduce SEDIMA, a persistent hierarchical insight memory for evolutionary search agents. SEDIMA distills raw traces into natural-language insights, clusters them by semantic similarity using attention-weighted centroids, and retrieves relevant guidance to condition future mutations, accumulating transferable knowledge across runs and problems rather than within a single trajectory. As a drop-in module that leaves the search operators unmodified, SEDIMA improves average final performance by 5.5% on AlgoTune and 6.6% on ALE-Bench LITE under a fixed budget of 100 evaluated candidates. Under OpenEvolve, SEDIMA reaches baseline-best performance with 32.3% fewer iterations on average across the five evaluated backbones 1^{1}.

1 Introduction

Recent advances have turned LLMs from one-shot code generators into iterative search operators. Rather than producing a single solution, these systems repeatedly select promising candidates, use an LLM to propose semantically informed modifications, evaluate the resulting programs, and retain the strongest variants for further refinement (Romera-Paredes et al., 2023; Novikov et al., 2025). This formulation has enabled progress in mathematical discovery, algorithm design, and heuristic synthesis, while open-source frameworks such as OpenEvolve, ShinkaEvolve, and LLM4AD have made the approach increasingly accessible (Sharma, 2025; Lange et al., 2025; Liu et al., 2026).

Despite this success, these systems are fundamentally memoryless: each run begins from scratch and discards the reasoning that produced its successes and failures the moment the run terminates. This is wasteful in two ways. Across runs, an agent applied to a new task re-derives modifications it has already discovered and re-explores directions that were previously neutral or useless, because it retains no record of why a past edit helped or hurt. Within a single run, the search trajectory is unstable: solution quality fluctuates sharply across iterations as the agent proposes, forgets, and re-proposes locally useful edits, with no persistent signal consolidating what is working. Recent work begins to close this gap by conditioning mutation on reflective signals rather than raw code (Ye et al., 2024; Wan et al., 2025; Jiang et al., 2026), but in each case memory remains within a single evolutionary trajectory and resets when a new run begins.

We introduce SEDIMA, a persistent hierarchical insight memory for evolutionary search agents. SEDIMA distills raw evolution traces into compact natural-language insights capturing why an edit succeeded or failed, then organizes them into a three-level hierarchy: raw traces, distilled insights, and semantically clustered insights whose cluster representatives are formed by attention-weighted centroids, so that prototypical, high-value lessons dominate retrieval. To condition a mutation, SEDIMA retrieves relevant guidance by semantic similarity and injects it into the prompt.

Two properties distinguish how this memory is used. First, it persists across runs and problems, so each run is warm-started with distilled experience rather than starting cold. Second, because insights are retrieved by semantic content rather than genealogical lineage, guidance learned on one problem can surface for another that is only loosely related, letting experience transfer be

∗^{*}Corresponding author: aabaskoh@cs.ubc.ca.

1^{1}Code is available on GitHub.

Figure

Figure 1: Overview of SEDIMA. A persistent three-level memory (right) augments an evolutionary search loop (left, dashed): evaluated children are distilled into hierarchical insights on save, and relevant insights are injected into the mutation prompt on retrieval.

yond a single task family. Crucially, SEDIMA interfaces with the underlying search at exactly two points, a write on evaluation and a read into the mutation prompt, leaving selection, population management, and mutation operators unmodified. This makes it a drop-in module rather than a redesign: we integrate the same memory, unchanged, into two independent open-source harnesses, OpenEvolve (Sharma, 2025) and ShinkaEvolve (Lange et al., 2025), with no modification to either codebase's search logic.

References (32)