Table of Contents
Fetching ...

Controlled Self-Evolution for Algorithmic Code Optimization

Tu Hu, Ronghao Chen, Shuo Zhang, Jianghao Yin, Mou Xiao Feng, Jingping Liu, Shaolei Zhang, Wenqi Jiang, Yuqi Fang, Sen Hu, Yi Xu, Huacan Wang

TL;DR

The paper tackles the inefficiency of existing self-evolution approaches for algorithmic code optimization under limited exploration budgets. It introduces Controlled Self-Evolution (CSE), a framework built on three pillars: Diversified Planning Initialization, Genetic Evolution, and Hierarchical Evolution Memory, to promote broad exploration, targeted, feedback-guided edits, and experiential reuse across tasks. Through experiments on EffiBench-X across multiple LLM backbones, CSE consistently outperforms baselines on execution time and memory metrics, with faster early progress and sustained improvements throughout evolution. Ablation studies and memory analyses demonstrate that memory plays a critical, context-dependent role in accelerating convergence and avoiding repeated failures. The work provides a practical, backbone-agnostic strategy for efficient code optimization and suggests avenues for distilling evolution trajectories back into base models.

Abstract

Self-evolution methods enhance code generation through iterative "generate-verify-refine" cycles, yet existing approaches suffer from low exploration efficiency, failing to discover solutions with superior complexity within limited budgets. This inefficiency stems from initialization bias trapping evolution in poor solution regions, uncontrolled stochastic operations lacking feedback guidance, and insufficient experience utilization across tasks.To address these bottlenecks, we propose Controlled Self-Evolution (CSE), which consists of three key components. Diversified Planning Initialization generates structurally distinct algorithmic strategies for broad solution space coverage. Genetic Evolution replaces stochastic operations with feedback-guided mechanisms, enabling targeted mutation and compositional crossover. Hierarchical Evolution Memory captures both successful and failed experiences at inter-task and intra-task levels.Experiments on EffiBench-X demonstrate that CSE consistently outperforms all baselines across various LLM backbones. Furthermore, CSE achieves higher efficiency from early generations and maintains continuous improvement throughout evolution. Our code is publicly available at https://github.com/QuantaAlpha/EvoControl.

Controlled Self-Evolution for Algorithmic Code Optimization

TL;DR

The paper tackles the inefficiency of existing self-evolution approaches for algorithmic code optimization under limited exploration budgets. It introduces Controlled Self-Evolution (CSE), a framework built on three pillars: Diversified Planning Initialization, Genetic Evolution, and Hierarchical Evolution Memory, to promote broad exploration, targeted, feedback-guided edits, and experiential reuse across tasks. Through experiments on EffiBench-X across multiple LLM backbones, CSE consistently outperforms baselines on execution time and memory metrics, with faster early progress and sustained improvements throughout evolution. Ablation studies and memory analyses demonstrate that memory plays a critical, context-dependent role in accelerating convergence and avoiding repeated failures. The work provides a practical, backbone-agnostic strategy for efficient code optimization and suggests avenues for distilling evolution trajectories back into base models.

Abstract

Self-evolution methods enhance code generation through iterative "generate-verify-refine" cycles, yet existing approaches suffer from low exploration efficiency, failing to discover solutions with superior complexity within limited budgets. This inefficiency stems from initialization bias trapping evolution in poor solution regions, uncontrolled stochastic operations lacking feedback guidance, and insufficient experience utilization across tasks.To address these bottlenecks, we propose Controlled Self-Evolution (CSE), which consists of three key components. Diversified Planning Initialization generates structurally distinct algorithmic strategies for broad solution space coverage. Genetic Evolution replaces stochastic operations with feedback-guided mechanisms, enabling targeted mutation and compositional crossover. Hierarchical Evolution Memory captures both successful and failed experiences at inter-task and intra-task levels.Experiments on EffiBench-X demonstrate that CSE consistently outperforms all baselines across various LLM backbones. Furthermore, CSE achieves higher efficiency from early generations and maintains continuous improvement throughout evolution. Our code is publicly available at https://github.com/QuantaAlpha/EvoControl.
Paper Structure (43 sections, 17 equations, 16 figures, 3 tables)

This paper contains 43 sections, 17 equations, 16 figures, 3 tables.

Figures (16)

  • Figure 1: Controlled Self-Evolution improves exploration efficiency. (a) Existing self-evolution wastes budget on low-quality regions due to initialization bias, uncontrolled evolution and repeated failure. (b) CSE guides exploration toward higher-quality solutions through diversified initialization, controlled evolution, and experience reuse.
  • Figure 2: Overview of the CSE. Our method consists of three key components: Diversified Planning Initialization, Genetic Evolution, and Hierarchical Evolution Memory.
  • Figure 3: Best-so-far MI vs. generations. At each generation $t$, we report the best-so-far MI.
  • Figure 4: Synergy between Memory and other modules. We report MI and the gain $\Delta$MI from adding Memory to each module combination.
  • Figure 5: A Case Study of CSE evolution dynamics. To quantify progress, we plot the best-so-far raw memory-time integral (lower is better) against the number of generations. The case highlights the concrete logic of key initialization, mutation, and crossover steps, and contrasts the final evolved solution against the human solution.
  • ...and 11 more figures