GEAR: Genetic AutoResearch for Agentic Code Evolution

Ahmadreza Jeddi, Minh Ngoc Le, Hakki C. Karaimer, Konstantinos G. Derpanis, Babak TaatiarXiv 2026

TL;DR

Autonomous AI research agents typically rely on a simple "keep-or-discard" hill-climbing strategy, which throws away good ideas if they don't immediately beat the current best result. GEAR (Genetic AutoResearch) introduces a population-based genetic search framework that tracks multiple promising research paths simultaneously using mutation and crossover. By preserving diverse ideas and even allowing the search policy itself to self-evolve, GEAR avoids premature plateaus and significantly outperforms single-path baselines.

What Problem Does This Paper Address?

Automated machine learning (AutoML) has recently shifted from basic code generation to long-horizon autonomous agents that can edit code, run training jobs, and evaluate results. However, existing systems usually rely on single-incumbent hill climbing: they make a change, test it, and keep it only if it strictly improves upon the previous best.

The authors argue that this strategy is fundamentally flawed for complex research. It prematurely discards partially successful ideas, complementary local optima, or highly efficient architectures that might temporarily underperform but hold valuable insights. Real human research spans multiple concurrent directions; a single incumbent cannot represent these alternatives, causing the agent to lose valuable ideas once discarded.

Methods

The authors introduce GEAR (GEnetic AutoResearch), a drop-in search controller that replaces hill climbing with a population-based frontier search over research states.

Figure 2. In GEAR, the agent consults the frontier, selects a parent (or a pair of parents) trading off productivity, novelty, and coverage, spawns a child by mutation or crossover, runs the fixed training job, and either promotes the child into the frontier or discards it.

Key components of the GEAR framework include:

  • Frontier Population: GEAR maintains a bounded pool of "elite" nodes. Each node represents a research state containing a code commit, validation metrics, and metadata. Nodes are explicitly assigned roles: BEST (lowest loss), LEAN (lowest memory), or DIVERSE (structurally/descriptively unique).
  • Genetic Operators: The agent expands the frontier using Mutation (modifying code from a single parent) and Semantic Crossover (transplanting a coherent idea from a secondary parent into a primary parent's codebase).
  • Parent Selection: A deterministic controller selects parents using a composite Upper Confidence Bound (UCB)-style score that balances historical productivity, description novelty (via Jaccard distance), and global coverage.

The paper evaluates three distinct structural variants of GEAR:

  1. GEAR-Prompt: The LLM agent manages the population dynamics purely through natural-language instructions.
  2. GEAR-Fixed: The genetic search policy is externalized into a fixed, programmatic controller script.
  3. GEAR-Evolve: The controller code itself is treated as a mutable artifact. The agent can explicitly choose to modify its own search policy to fix algorithmic bottlenecks during the run.
Figure 3. GEAR variants. We study three implementations of the genetic search policy while keeping the underlying AutoResearch experimental setup fixed. In GEAR-PROMPT, the policy is described in natural language and executed by the agent as part of its reasoning. In GEAR-FIXED, the policy is externalized into a deterministic controller that handles parent selection, operator scheduling, and promotion. In GEAR- EVOLVE, the controller itself becomes part of the search and can be modified by the agent over time.

Datasets

The framework is evaluated on a standard language modeling task: training a GPT-2 style language model to minimize validation bits-per-byte (bpb). Each experiment runs under a strict budget of 5 minutes on a single NVIDIA H100 GPU. The data pipeline, tokenizer, and evaluation harness are held constant to isolate the performance of the search strategies.

Key Insights and Ideas

  • Sustained Exploration Beats Greedy Exploitation: Standard hill-climbing agents quickly exhaust obvious tweaks and plateau. GEAR's role-based population (especially the LEAN and DIVERSE slots) keeps alternative paths alive, allowing the agent to combine seemingly unrelated ideas later in the search.
  • Compositional Trajectories: Breakthroughs often require multi-step changes that initially look like regressions. For example, increasing model depth initially failed because the default batch size under-trained the larger model. GEAR preserved this deep model in its frontier, later combining it with a halved batch size discovery to achieve a massive performance leap.
  • Meta-Evolution Works: Allowing the agent to modify its own search controller (GEAR-Evolve) yielded the best results. The agent actively diagnosed and fixed flaws in its own crossover logic (e.g., implementing ancestry tracking to prevent parent-child inbreeding), proving that AI agents can successfully optimize their own research strategies.

Key Results

All three GEAR variants comfortably outperformed the baseline framework across 100 experiment steps.

Figure 1. Genetic AutoResearch (GEAR) variants all surpass the AutoResearch baseline’s plateau after 100 experiments. Light grey dots are discarded experiments. Bold dots mark new global bests. GEAR-FIXED and GEAR-PROMPT converge to similar quality, while GEAR-EVOLVE pulls ahead from roughly experiment 25 onward and eventually reaches the lowest bpb of the four.
  • Performance: The baseline completely plateaued after experiment 50 at a validation bpb of 0.98232. Meanwhile, GEAR-Prompt reached 0.98001, GEAR-Fixed reached 0.97914, and GEAR-Evolve achieved the best overall score of 0.97658.
  • Sample Efficiency: GEAR-Evolve was highly efficient, crossing the baseline's final plateau by experiment 40—much faster than GEAR-Prompt (experiment 72) and GEAR-Fixed (experiment 84).
  • Resource Optimization: Thanks to its explicit LEAN role tracking, GEAR-Evolve discovered a highly optimized configuration using only 33.5 GB of peak VRAM, compared to over 60 GB for the baseline and other variants.

Limitations and Future Work

The authors acknowledge or imply a few key limitations:

  • Scope of Evaluation: The benchmarks were restricted to a minimal, single-file language modeling setup with a short 5-minute training horizon. Testing GEAR on repository-scale codebases or longer training runs remains future work.
  • API Costs: The system relies heavily on a powerful LLM backend (Claude 4.7 Opus) to perform code mutations, crossovers, and meta-reflections, which can become computationally expensive over long horizons.
  • Algorithmic Constraints: The current crossover mechanism relies on the LLM's ability to textually merge ideas; more structured code-merging techniques could improve stability.

Summary updated

BibTeX
@misc{jeddi2026gear,
  author = {Ahmadreza Jeddi and Minh Ngoc Le and Hakki C. Karaimer and Konstantinos G. Derpanis and Babak Taati},
  title = {{GEAR: Genetic AutoResearch for Agentic Code Evolution}},
  year = {2026},
  eprint = {2605.13874},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.13874},
}
Figure