Source-linked AI summary
SEDIMA: Cross-Run Hierarchical Insight Memory for Evolutionary Search Agents
Amirhossein Abaskohi, Mahdi Mostajabdaveh, Zirui Zhou
TL;DR
LLM-driven evolutionary search systems often discard run-specific reasoning, leaving a gap in persistent memory across runs and problems. SEDIMA stores and retrieves hierarchical semantic insights to guide mutations; it improves average final benchmark performance and reaches baseline-best performance in fewer OpenEvolve iterations.
Problem
Evolutionary search systems discard reasoning between runs, while existing reflective-memory approaches remain limited to one trajectory.
Source: §1 · p. 1Method
SEDIMA distills evaluation traces into hierarchical natural-language insights, clusters them semantically, and retrieves relevant guidance for mutation prompts across runs and problems.
Source: §1 · p. 1Results
SEDIMA improves average final performance by 5.5% on AlgoTune and 6.6% on ALE-Bench LITE, and needs 32.3% fewer OpenEvolve iterations on average to reach baseline-best performance.
Source: §5 · p. 5Takeaways & Limitations
The same drop-in memory module works across OpenEvolve and ShinkaEvolve without modifying their search operators.
Source: §5 · p. 5Main results use one run per model–harness pair, and comparisons match evaluated candidates rather than total LLM calls, tokens, time, or cost.
Source: Limitations · p. 5
Abstract
from arXiv · showhide
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 requires 32.3% fewer iterations on average to reach baseline-best performance across the five evaluated backbones.
1 Introduction
LLM-driven evolutionary search can discover and refine programs, but run-local memory leaves agents to rediscover useful edits and revisit ineffective directions. SEDIMA stores hierarchical insights persistently and retrieves semantically relevant guidance for later mutations.
1 Introduction
- Existing systems discard successful and failed reasoning between runs, while their search trajectories can also fluctuate as useful edits are forgotten and reproposed.Prior reflective-memory methods still reset at the end of each evolutionary trajectory.Source: §1 · p. 1
- SEDIMA distills evolution traces into natural-language insights and organizes them as raw traces, distilled insights, and semantically clustered insights with attention-weighted centroids.The centroids emphasize prototypical, high-value lessons during retrieval.Source: §1 · p. 1
- SEDIMA persists across runs and problems, retrieving guidance by semantic content so experience can transfer beyond a single task family.Retrieved guidance is injected into the mutation prompt.Source: §1 · pp. 1–2
- The module writes after evaluation and reads before mutation, leaving selection, population management, and mutation operators unmodified.The same module is integrated into OpenEvolve and ShinkaEvolve without changing their search logic.Source: §1 · p. 2
2 Related Work
Prior evolutionary-search memory methods either remain confined to one trajectory or require broader changes to the search system. SEDIMA instead adds persistent, cross-run memory as a single-agent drop-in module.
2 Related Work
- ReEvo, LoongFlow, and DeltaEvolve keep memory within one trajectory, whereas CORAL and PRISM use persistent memory in long-running multi-agent systems.SEDIMA is presented as a single-agent alternative that leaves search operators unchanged.Source: §2 · p. 2
- SEDIMA brings a distill-embed-retrieve approach to population-based evolution through a non-parametric, hierarchically clustered store with attention-weighted centroids.The centroids let high-value insights dominate retrieval.Source: §2 · p. 2
- The paper claims SEDIMA is the first hierarchical memory for single-agent evolutionary search that transfers across runs and problems without changing search operators.Source: §2 · p. 2
3 SEDIMA
SEDIMA adds a persistent three-level insight memory through a write after evaluation and a read before mutation. It records traces, distills reusable lessons, clusters them semantically, and retrieves recommendations under fixed context limits.
3 SEDIMA
- After evaluation, SEDIMA stores raw traces containing step, parent and child fitness, fitness difference, event source, and evaluation report.Traces remain linked to the higher-level recommendations derived from them.Source: §3 · p. 2
- An LLM converts traces into linked problem- or change-level insights that summarize bottlenecks and observed modification effects in reusable natural language.Each insight is embedded for semantic organization and retrieval.Source: §3 · p. 3
- Insights join the nearest embedding-similar cluster above a cosine-similarity threshold; attention-weighted centroids emphasize prototypical insights, with temperature controlling the emphasis.Optional LLM summaries capture recurring optimization patterns.Source: §3 · p. 3
- Before mutation, semantic retrieval selects relevant clusters and insights, optionally includes linked traces, and has an LLM synthesize three recommendations for the prompt.Retrieval is bounded by fixed cluster, insight, and prompt limits; if no cluster passes threshold, the original mutation prompt is used.Source: §3 · p. 3
- Each write adds a distillation call and insight embedding, while each memory-conditioned mutation adds a query embedding and recommendation-synthesis call.Source: §3 · p. 3
4 Experiments
Across two search harnesses and two benchmarks, SEDIMA improves final performance and reaches baseline-best performance in fewer OpenEvolve iterations. The experiments also test memory provenance and random retrieval under a fixed candidate budget.
4.2 Effectiveness Across Models and Search Harnesses
- Across 20 matched model–harness–benchmark comparisons, all favored SEDIMA (two-sided exact sign test, p = 1.9 × 10−6); averaged across harnesses, SEDIMA raised AlgoTune performance 5.5% and ALE-Bench LITE performance 6.6%.Individual main-table cells remain single-run results.Source: §4.2 · p. 4
4.3 Search Dynamics
- 32.3% fewer OpenEvolve iterations on average were needed across five backbones to reach baseline-best performance.For GPT-5.4, SEDIMA first passed the baseline-best speedup at step 55, compared with step 78 for baseline.Source: §4.3 · p. 4, Figure 2 · p. 4
4.4 Cross-Run Persistence and Transfer
- Same-benchmark memory improved over cold memory by 4.8% on AlgoTune and 6.7% on ALE-Bench, while other-benchmark memory still gained 1.8% and 2.9%, respectively.In-domain experience remained more effective than transferred experience.Source: §4.4 · p. 4, Table 3 · p. 5
- Random retrieval performed only marginally above no memory: 1.62 versus 1.61 on AlgoTune-20 and 1102.6 versus 1094.3 on ALE-Bench LITE.Full SEDIMA reached 1.69 and 1173.6, respectively, supporting the role of retrieving relevant experience rather than merely adding prior text.Source: §4.4 · pp. 4–5
5 Conclusion
SEDIMA adds persistent hierarchical insight memory to evolutionary search, conditioning mutations with retrieved guidance while leaving search operators unchanged. It improves benchmark performance and reduces OpenEvolve iterations, while its unbounded store motivates future consolidation and forgetting.
5 Conclusion
- 5.5% improvement on AlgoTune and 6.6% on ALEBench LITE average final performance under 100 evaluated candidates; OpenEvolve uses 32.3% fewer iterations to baseline-best across five backbones.The iteration comparison is an average across the five evaluated backbones.Source: §5 · p. 5
- SEDIMA distills raw traces into natural-language insights, organizes them in attention-weighted semantic clusters, and retrieves relevant guidance for future mutations.It writes after evaluation and reads before mutation, integrating unchanged with OpenEvolve and ShinkaEvolve without modifying their search operators.Source: §5 · p. 5
- Semantic rather than genealogical retrieval lets insights transfer to problems and benchmark families from which they were not derived.Source: §5 · p. 5
- The current memory store grows without bound, motivating consolidation and forgetting mechanisms at larger scales.Source: §5 · p. 5
Limitations
SEDIMA's reliability and scalability depend on the quality of stored insights, retrieval settings, and memory management. The evaluation also has limits in compute accounting, run count, and comparator scope.
Limitations
- Inaccurate LLM summaries, weak semantic matches, or noisy evaluation reports may store and reuse misleading guidance; fixed clustering and retrieval hyperparameters and unbounded memory may reduce efficiency and relevance at scale.Source: Limitations · p. 5
- Comparisons match evaluated candidates, not LLM calls, tokens, wall-clock time, or cost, so fewer evolution steps do not establish lower total compute.SEDIMA adds distillation, embedding, and recommendation-synthesis operations.Source: Limitations · p. 5
- Main results use one run per model–harness pair, and the experiments compare SEDIMA with matched memoryless harnesses rather than alternative memory-based systems.Per-step, ablation, and transfer analyses use three seeds.Source: Limitations · p. 5
Ethical Considerations
The ethical discussion notes risks from LLM-derived insights and added computational costs, alongside safeguards and licensing practices. Memory construction and retrieval combine online updates, evidence-grounded recommendations, and attention-weighted semantic clustering.
Ethical Considerations
- Persistent memory may amplify underlying LLM biases, hallucinations, or unsupported reasoning, while additional calls increase computational and environmental cost despite a fixed retrieval-token budget.Source: Ethical Considerations · p. 5
- The work uses public licensed benchmarks, models, and implementations, involves no human subjects or newly collected personal data, and reports author verification of technical decisions and conclusions.Released artifacts are to document dependencies and redistribute third-party data or model outputs only when licenses permit.Source: Ethical Considerations · p. 5
A Memory Construction and Retrieval Details
- Cluster representatives use attention weights derived from member semantic centrality; a singleton uses its sole embedding, and as τ increases without bound the weights approach uniformity and the representative approaches mean pooling.Source: A Memory Construction and Retrieval… · p. 7
- Retrieved insights can include linked traces, and synthesis returns three recommendations using the query, similarity scores, and available evidence; without a relevant cluster, the original mutation prompt remains unchanged.Cluster and insight similarities are retained separately, and the top Ki insights are selected.Source: A Memory Construction and Retrieval… · p. 7
- Each evaluated candidate updates persistent memory with a raw trace, distilled insight, and embedding, making earlier same-run and prior-run experience available to later mutations.Source: A Memory Construction and Retrieval… · p. 7
B Experimental Setup Details
The experiments use matched benchmark and search protocols, report format-specific ALE-Bench results, and illustrate how retrieved experience guides a facility-location optimization.
B Experimental Setup Details
- AlgoTune measures harmonic-mean per-task speedups on numerical programming tasks; ALE-Bench LITE reports average performance across ten AtCoder contests, split into short- and long-format problems.Fitness uses public local cases, while final results use private evaluation; ALE-Bench absolute scores are intended for matched comparisons because the 100-step budget is below published submissions.Source: B Experimental Setup Details · pp. 7–8
- Runs use up to 100 evolution steps with one child per step, preserve each harness’s original search procedures, and isolate evaluation problems from prior memory until deployment.The store updates online during evaluation, allowing later steps to retrieve earlier trajectory insights; the same model handles mutation and memory-generation tasks within a run.Source: B Experimental Setup Details · p. 8
C ALE-Bench Results by Contest Format
- SEDIMA improves ALE-Bench LITE short-format performance by 8.1% under OpenEvolve and 6.9% under ShinkaEvolve, versus long-format gains of 6.2% and 5.1%, respectively.The larger short-format gains suggest recurring strategies transfer more readily, while long-format improvements indicate retrieved insights remain useful for problem-specific search.Source: Table 4 · p. 8, C ALE-Bench Results by Contest Format · p. 8
D Qualitative Example of Memory Use
- A facility-location candidate improves from 2.36× to 3.99× speedup over the same reference implementation after replacing CBC with OR-Tools CP-SAT.The later candidate is 1.69× faster than the intermediate one, a further 40.9% runtime reduction.Source: D Qualitative Example of Memory Use · p. 8
D.1 Intermediate Candidate and Remaining Bottleneck
The example traces a solver-bound facility-location candidate through SEDIMA’s write, semantic retrieval, and application cycle, while noting that the observed speedup also reflects a changed termination policy.
D.1 Intermediate Candidate and Remaining Bottleneck
- The intermediate candidate’s main bottleneck is CBC branch-and-bound on a dense binary model, despite some Python-side construction and result-extraction overhead.The formulation uses nfnc binary assignment variables in addition to nf facility-opening variables.Source: §D.1 · p. 9
D.2 Writing the Experience to SEDIMA
- After evaluation, SEDIMA stores the execution trace, distills it into a reusable insight, and embeds it in a semantic cluster spanning related allocation tasks.Level 1 retains task-specific evidence; the higher levels organize experiences for transfer.Source: §D.2 · p. 9
D.3 Reading the Memory and Applying the Retrieved Insight
- A query describing the current implementation and bottleneck retrieves a related scheduling insight, which guides replacing CBC with CP-SAT, using native exactly-one constraints, and scaling coefficients to integers.The source experience is from scheduling rather than facility location; retrieval matches structural patterns such as Boolean decisions and exactly-one constraints.Source: §D.3 · pp. 9–10
D.4 Interpretation
- The retrieved insight leads to a 3.99× candidate, but its 30-second limit and acceptance of feasible solutions complicate comparison with CBC, which returns only proven-optimal solutions.The authors say the observed gain may reflect both solver formulation and termination policy, and recommend comparing objective values and optimality rates.Source: §D.4 · p. 10
E Ablation Studies
Ablations compare the full memory against component and embedding alternatives, with results favoring semantic organization and stronger retrieval representations.
Memory components
- Full SEDIMA improves over no memory by 5.0% on AlgoTune-20 and 7.2% on ALE-Bench LITE, achieving the strongest performance on both benchmarks.The component ablation averages three seeds and five mutation models; AlgoTune uses the first 20 tasks and ALE-Bench the full LITE set.Source: E Ablation Studies · p. 10
- Replacing attention-weighted representatives with mean centroids modestly reduces performance, while removing semantic clustering causes a larger decline; random retrieval is only marginally above no memory.The authors interpret these results as benefits from prototypical insights, hierarchical organization, and retrieving relevant experience rather than merely adding text to prompts.Source: E Ablation Studies · pp. 10–11
Embedding model
- Qwen3-Embedding-4B performs best, but Qwen3-Embedding-8B and GTE-Qwen2-7B-Instruct remain close, and every tested embedding configuration beats the no-memory baseline.Performance declines more noticeably with BGE-M3 and Qwen3-Embedding-0.6B, which the authors associate with weaker cluster assignment and retrieval quality.Source: E Ablation Studies · p. 11
F Per-Problem Results
Per-problem results vary across tasks and formats, while the appendix prompts specify how SEDIMA turns evaluation records and retrieved evidence into insights and mutation recommendations.
F.1 AlgoTune
- AlgoTune performance is task-dependent: graph, optimization, control, and numerical tasks can show larger speedups than low-level kernels, and aggregate gains are not driven by one model or problem category.ShinkaEvolve generally performs slightly better per task than OpenEvolve, while the strongest mutation model varies across tasks.Source: §F.1 · p. 11
F.2 ALEBench
- ALE-Bench scores vary across problems and formats, with short contests typically scoring higher, but strong long-format results such as ahc027 show performance is not limited to shorter searches.GPT-5.4 has the strongest overall scores, followed by Qwen 3.7 Max and Gemini 3 Pro; ShinkaEvolve is generally stronger across models and tasks.Source: §F.2 · p. 11
G Prompts
- The prompts generate bottleneck and change-level insights, summarize shared patterns within clusters, and synthesize exactly three grounded recommendations from retrieved evidence for the next mutation.The prompts ask change-level insights to describe the modification and observed performance effect, and cluster summaries to preserve distinctions among reported effects.Source: G Prompts · pp. 12, 13, 18, 19