TL;DR
While pairing Large Language Models (LLMs) with evolutionary search yields impressive scores on code generation and mathematical benchmarks, what are these agents actually doing under the hood? This paper introduces EvoTrace and EvoReplay to show that instead of discovering novel algorithmic structures, evolutionary coding agents spend much of their budget on repetitive code cycling and basic hyperparameter tuning that could be easily replaced by standard optimization techniques.
What Problem Does This Paper Address?
LLM-driven evolutionary code search (like FunSearch or AlphaEvolve) iteratively mutates, combines, and selects code based on automated execution feedback. Although these frameworks excel at finding high-scoring solutions for complex mathematical and algorithmic problems, evaluating them solely on their final benchmark scores creates a black box.
We don't actually know how the improvements happen. Is the agent discovering a brilliant new algorithm, simply re-tuning constants in an existing strategy, or overfitting to the evaluator's test cases? To design better automated discovery systems, we need to inspect the entire search trajectory, not just the final output.
Methods
The authors tackle this lack of transparency by developing a unified methodology to analyze the inner workings of evolutionary coding loops:
- EvoReplay: A replay-based evaluation framework that reconstructs local search states from a trace. It allows researchers to run controlled interventions—such as re-running prompts, substituting models, ablating components, or applying post-hoc tuning—to see how stable and meaningful the code improvements truly are.
- LLM-as-Judge Edit Taxonomy: The authors developed a 9-category taxonomy to classify every single code modification made during a search run (e.g., Bug fix, External dependency, Architectural change, Composition, Local refinement, Pruning, Refactor, Efficiency, and Hyperparameter tuning).
- Bayesian Optimization (BO) Baseline: To isolate structural code changes from simple parameter tuning, the authors introduced a baseline that takes a single mid-run program, extracts its numeric constants using an LLM, and tunes them using standard Bayesian Optimization (
skopt.gp_minimize) over 24 evaluation calls.
Datasets
The paper introduces EvoTrace, a standardized dataset containing 121 evolutionary coding-search runs across:
- 4 Frameworks: OpenEvolve, GEPA, EvoX, and ShinkaEvolve.
- 5 LLMs: Including reasoning models (
deepseek-reasoner,claude-sonnet-4-6) and non-reasoning baselines. - 16 Tasks: 6 Python mathematical discovery tasks (e.g., circle packing, Heilbronn placement) and 10 C++ competitive programming problems from ALE-bench Lite (AtCoder Heuristic Contest).
In total, the dataset normalizes 10,672 unique programs, 18,400 LLM calls, and full parent-child lineage graphs into a unified schema.
Key Insights and Ideas
- The Frequency-Utility Mismatch: Evolutionary agents spend the vast majority of their time making Hyperparameter tuning and Local refinement edits. However, the edits that actually drive the largest score breakthroughs are rare structural changes like introducing External dependencies, improving Efficiency, or making Architectural changes.
- Deterministic Cycling (The "Memory" Problem): Evolutionary coding agents suffer from severe short-term amnesia. Across nearly every run, roughly 30% of all added code lines are byte-identical re-introductions of lines that were previously deleted earlier in the same lineage, typically within just 5 iterations.
- Evolution as an Expensive Parameter Sweeper: On mathematical benchmarks, late-stage evolutionary progress is rarely structural. Instead, the search loop acts as a slow, computationally expensive hyperparameter optimizer.
- Overfitting to Public Feedback: In competitive programming tasks, improvements in public evaluation scores often fail to translate to held-out private test sets, revealing that agents frequently exploit quirks in the evaluator rather than writing generalized code.
Key Results
- Tuning Gap: Applying a 24-call Bayesian Optimization pass to a single intermediate program's parameters matched or exceeded the final evolutionary run's score in 13 out of 15 math cases. In one instance (
heilbronn_tri_dsr_nodiff), post-hoc BO achieved a score 1.70× higher than the final evolved program. - Code Growth Patterns: Math tasks accumulate modest line-of-code (LOC) and hyperparameter growth over time, whereas competitive programming tasks (ALE) tend to refine large initial seed programs in place without changing their overall size.
- Overfitting Rates: Two out of the four evaluated evolutionary frameworks overfit on at least 30% of the competitive programming problems they encountered.
Limitations and Future Work
The authors note that their single-program tuning ceiling analysis was primarily focused on mathematical benchmarks; extending this diagnostic to more diverse algorithmic domains remains an open path. Additionally, prompt replay stability could be explored with larger sample sizes and more varied local perturbations.
For future system design, the prevalence of code cycling and shallow lineages suggests that instead of simply scaling up search budgets, researchers should focus on building history-aware agents. Promising directions include implementing deletion-aware novelty filters, lineage-aware credit assignment, or prompting strategies that explicitly show the LLM its own parent's deletion history to prevent it from repeating past mistakes.
Summary updated