From Understanding to Excelling: Template-Free Algorithm Design through Structural-Functional Co-Evolution

Zhe Zhao, Haibin Wen, Pengkun Wang, Ye Wei, Zaixi Zhang, Xi Lin, Fei Liu, Bo An, Hui Xiong, Yang Wang, Qingfu ZhangarXiv 2025 · DOI

Introduction

Automating algorithm design has long been a goal in computational science, evolving from traditional hyper-heuristics to recent Large Language Model (LLM) driven approaches like FunSearch and EoH. While these tools have demonstrated success in evolving code snippets for complex problems, they often encounter a "glass ceiling" imposed by human-defined templates. In these systems, a human expert provides a fixed "skeleton" or workflow, and the AI is restricted to optimizing specific functions (the "muscles") within that structure. This reliance on predefined architectures limits innovation; if the initial human-designed structure is suboptimal, the resulting algorithm remains trapped in a local optimum.

To address this, researchers have developed the Structural-Functional Co-Evolution (CAE) framework. CAE empowers LLMs to design complex algorithms from scratch, optimizing both the individual code modules and the overarching algorithmic architecture simultaneously.

Methodology: The CAE Framework

The CAE framework operates through a three-stage process designed to move beyond template-bound generation.

1. Semantic Understanding and Formal Modeling

The process begins by transforming natural language problem descriptions into a formal triplet model $(R, O, C)$, representing Requirements, Objectives, and Constraints. This ensures the LLM has a rigorous understanding of the problem space before generation begins.

High-level workflow generation from problem descriptions to structured execution graphs.

2. Adaptive Generation

Unlike previous methods that fill in blanks in a template, CAE constructs a complete, custom workflow. It identifies necessary functional modules and maps their dependencies to build an entire execution graph tailored to the specific problem.

3. Bi-dimensional Co-evolution

The core innovation of CAE is its bi-dimensional optimization strategy, which evolves the algorithm along two distinct axes:

  • Functional Dimension: Local refinements are performed on specific modules using short-term reflection, crossover, and mutation.
  • Structural Dimension: The system explores novel architectures by recombining modules from different candidate solutions or completely rewriting the workflow based on long-term reflection.
Comparison between traditional template-based evolution (a) and the proposed bi-dimensional co-evolution framework (b).

This closed-loop system utilizes real-time feedback from validation tests to iteratively self-correct and evolve both the "skeleton" and the "muscles" of the algorithm.

Experimental Evaluation

The CAE framework was rigorously tested against state-of-the-art baselines in two challenging domains:

Traveling Salesman Problem (TSP)

Evaluated on benchmarks from the TSPLIB library and varying problem sizes (TSP20 to TSP100), CAE consistently outperformed existing LLM-based methods. For instance, on the ts225 instance, CAE achieved an optimality gap of 4.6%, compared to 7.7% for GHPP and 6.6% for ReEvo. Notably, CAE maintained superior scalability in large-scale TSP100 tasks, where traditional Genetic Algorithms and other LLM variants struggled.

Large-scale Quadratic Optimization

In a case study focusing on the LISR-k method for ill-conditioned quadratic optimization, CAE demonstrated remarkable numerical intuition. The system autonomously identified that standard matrix inversion was a source of instability in high dimensions. It replaced these calls with more stable linear solvers and introduced sophisticated Frobenius norm-based selection strategies, achieving optimal convergence where traditional methods like IQN and SLIQN failed.

Key Insights and Future Directions

The success of CAE highlights that structural innovation—rethinking how modules connect—often yields more significant performance gains than functional optimization alone. By discarding fixed templates, LLMs can discover non-intuitive design paradigms that human experts might overlook.

However, challenges remain regarding computational overhead due to the extensive LLM queries required for bi-dimensional evolution. Future research will focus on integrating lightweight LLM variants to reduce costs and enhancing the explainability of the generated "non-intuitive" architectures to ensure their reliability in industrial applications.

Summary updated

BibTeX
@misc{zhao2025from,
  author = {Zhe Zhao and Haibin Wen and Pengkun Wang and Ye Wei and Zaixi Zhang and Xi Lin and Fei Liu and Bo An and Hui Xiong and Yang Wang and Qingfu Zhang},
  title = {{From Understanding to Excelling: Template-Free Algorithm Design through Structural-Functional Co-Evolution}},
  year = {2025},
  eprint = {2503.10721},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.10721},
}
Figure