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.
