AI summary · arXiv: 2503.16668v1 · cs.NE

Code Evolution Graphs: Understanding Large Language Model Driven Design of Algorithms

Niki van Stein, Anna V. Kononova, Lars Kotthoff, Thomas Bäck
Original paper · DOI 10.1145/3712256.3726328 Submitted to arXiv on 20 Mar. 2025 Published in Proceedings of the Genetic and Evolutionary Computation Conference (13 Jul. 2025) Accepted at GECCO 2025 License: CC BY 4.0

How to read this summary? Illustrated guide

The essentials

  • Large Language Models (LLMs) are used to generate code in evolutionary computation frameworks for algorithm optimization
  • Challenges arise when generated algorithms are not competitive or optimization stalls due to a lack of understanding of the generation process
  • A novel approach has been proposed to analyze the generated code during the evolutionary process using Abstract Syntax Trees (ASTs)
  • Metrics and features extracted from ASTs include structural properties, graph centrality metrics, clustering coefficients, assortativity, entropy measures, and code complexity features
  • These features provide insights into algorithmic structures, diversity, scalability, maintainability, computational efficiency, and trade-offs between algorithmic sophistication and runtime performance
  • LLMs tend to generate more complex code with repeated prompting but excessive complexity can hinder algorithmic performance in certain cases
  • Different LLMs exhibit distinct coding styles which suggests using multiple LLMs within code evolution frameworks may lead to higher-performing algorithms compared to relying on a single LLM

Key points written by AI: they may contain errors, check them against the paper.

AI-generated keywords: Large Language Models

Read further

  • Comprehensive Summary
  • Layman's Summary
  • Blog article
  • Original abstract
, , , , Large Language Models (LLMs) have shown promise in generating code within evolutionary computation frameworks to optimize algorithms. However, challenges arise when the generated algorithms are not competitive or optimization stalls due to a lack of understanding of the generation process and resulting code. To address this issue, a novel approach has been proposed to enable users to analyze the generated code during the evolutionary process and observe how it evolves with repeated prompting of the LLM. The methodology for analyzing the evolution of generated code involves leveraging Abstract Syntax Trees (ASTs) as a foundational representation of the code. Various metrics and features are extracted from ASTs, including structural properties metrics such as node count and edge count, graph centrality metrics like eigenvector centrality, clustering coefficients, transitivity, assortativity, and entropy measures. These features provide insights into algorithmic structures and diversity, aiding in visualizing code evolution. Additionally, code complexity features are utilized to understand the scalability, maintainability, and computational efficiency of generated code. Metrics such as cyclomatic complexity, token count, parameter count, function-level aggregates for various complexity measures, and depth/nesting metrics are employed to assess trade-offs between algorithmic sophistication and runtime performance. The comprehensive set of metrics derived from ASTs and code complexity analysis allows for a comparative analysis of algorithmic structures and diversity. This approach sheds light on how LLMs tend to generate more complex code with repeated prompting but also highlights that excessive complexity can hinder algorithmic performance in certain cases. Furthermore, different LLMs exhibit distinct coding styles, suggesting that using multiple LLMs within code evolution frameworks may lead to higher-performing algorithms compared to relying on a single LLM. Overall,<kgd> this refined methodology provides valuable insights into the properties of generated algorithms that impact performance.

Was this synthesis useful?

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

Figures and plots

Ask about a figure by number or use its question button to request visual analysis. Up to two figures and four image panels per question. Values read from plots are approximate; check the original data.

AI assistant instructions?

Tools for this paper

Explain it differently 1 free rewrite left today
Save to a collection Group papers in collections to compare them, chat with them and export them. Continue with Google Create a free account Log in

Advanced tools Premium

For researchers who follow a field closely: citation alerts, journal-club slides, version comparison and Zotero export. Discover Premium

Zotero Zotero guide
Citation alerts 21 papers already cite it: be emailed each new one. Citation alerts guide
Who works on it?

Among the 28 papers around this one, the name that comes back most: Niki van Stein (3 papers)

2 more people sign several of them. The full map adds their institutions and approaches, from the papers of the last years.

Continue with Google Create a free account: your first map is free
Weekly letter The latest letter of its field, "Computing beyond AI this week" of 23 November 2026: Computing beyond AI this week: The hidden limits of shared machines · Receive one by email for free

Papers around this one

See them on a map

Ranked by how close their title and abstract are to this paper’s. Select some to read them together.

Closest papers

  1. Very close
    Evolving code with a large language model
    Erik Hemberg, Stephen Moskal, U. O'Reilly · 2024 · Genetic Programming and Evolvable Machines · cited 84 times · Not summarized yet
    Abstract

    Algorithms that use Large Language Models (LLMs) to evolve code arrived on the Genetic Programming (GP) scene very recently. We present LLM_GP, a general LLM-based evolutionary algorithm designed to evolve code. Like GP, it uses evolutionary operators, but its designs and implementations of those operators significantly differ from GP’s because they enlist an LLM, using prompting and the LLM’s pre-trained pattern matching and sequence completion capability. We also present a demonstration-level variant of LLM_GP and share its code. By presentations that range from formal to hands-on, we cover design and LLM-usage considerations as well as the scientific challenges that arise when using an LL…

  2. Very close
    What is wrong with your code generated by large language models? An extensive study
    Shi-Han Dou, Haoxiang Jia, Shen-Xi Wu et al. · 2024 · Science China Information Sciences · cited 105 times · Not summarized yet
    Abstract

    The increasing development of large language models (LLMs) in code generation has drawn significant attention among researchers. To enhance LLM-based code generation ability, current efforts are predominantly directed towards collecting high-quality datasets and leveraging diverse training technologies. However, there is a notable lack of comprehensive studies examining the limitations and boundaries of existing methods. To bridge this gap, we conducted an extensive empirical study evaluating the performance of three leading closed-source LLMs and six popular open-source LLMs on three commonly used benchmarks. Our investigation, which evaluated the length, cyclomatic complexity and API numbe…

  3. Very close
    Automated Prompt Engineering for Cost-Effective Code Generation Using Evolutionary Algorithms
    Hamed Taherkhani, Melika Sepidband, H. Pham et al. · 2024 · ACM Transactions on Software Engineering and Methodology · cited 8 times · Not summarized yet
    Abstract

    Large Language Models (LLMs) have seen increasing use in various software development tasks, especially in code generation. The most advanced recent methods attempt to incorporate feedback from code execution into prompts to help guide LLMs in generating correct code in an iterative process. While effective, these methods could be costly due to numerous interactions with the LLM and extensive token usage. To address this issue, we propose an alternative approach named Evolutionary Prompt Engineering for Code (EPiC), which leverages a lightweight evolutionary algorithm to refine the original prompts into improved versions that generate high-quality code, with minimal interactions with the LLM…

  4. Very close
    Large Language Models for Code Generation: A Comprehensive Survey of Challenges, Techniques, Evaluation, and Applications
    Nam Huynh, Beiyu Lin · 2025 · arXiv.org · preprint, not peer reviewed · cited 62 times · Not summarized yet
    Abstract

    Large Language Models (LLMs) have demonstrated their remarkable capabilities in numerous fields. This survey focuses on how LLMs empower users, regardless of their technical background, to use human languages to automatically generate executable code. We begin with understanding LLMs' limitations and challenges in automated code generation. Subsequently, we review various fine-tuning techniques designed to enhance both the performance and adaptability of LLMs in code generation tasks. We then review the existing metrics and benchmarks for evaluations to assess model performance based on fine-tuning techniques. Finally, we explore the applications of LLMs (e.g. CodeLlama, GitHub Copilot, Tool…

  5. Very close
    Comparing Large Language Models and Grammatical Evolution for Code Generation
    L. Custode, Chiara Camilla Migliore Rambaldi, Marco Roveri et al. · 2024 · GECCO Companion · cited 8 times · Not summarized yet
    Abstract

    Code generation is one of the most valuable applications of AI, as it allows for automated programming and "self-building" programs. Both Large Language Models (LLMs) and evolutionary methods, such as Genetic Programming (GP) and Grammatical Evolution (GE), are known to be capable of performing code generation with reasonable performance. However, to the best of our knowledge, little work has been done so far on a systematic comparison between the two approaches. Most importantly, the only studies that conducted such comparisons used benchmarks from the GP community, which, in our opinion, may have provided possibly GP-biased results. In this work, we perform a comparison of LLMs and evoluti…

  6. Very close
    Evolutionary thoughts: integration of large language models and evolutionary algorithms
    A. Yepes, Pieter Barnard · 2025 · arXiv.org · preprint, not peer reviewed · cited 3 times · Not summarized yet
    Abstract

    Large Language Models (LLMs) have unveiled remarkable capabilities in understanding and generating both natural language and code, but LLM reasoning is prone to hallucination and struggle with complex, novel scenarios, often getting stuck on partial or incorrect solutions. However, the inherent ability of Evolutionary Algorithms (EAs) to explore extensive and complex search spaces makes them particularly effective in scenarios where traditional optimization methodologies may falter. However, EAs explore a vast search space when applied to complex problems. To address the computational bottleneck of evaluating large populations, particularly crucial for complex evolutionary tasks, we introduc…

  7. Very close
    From Understanding to Excelling: Template-Free Algorithm Design through Structural-Functional Co-Evolution
    Zhe Zhao, Haibin Wen, Peng-Kun Wang et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 3 times · Not summarized yet
    Abstract

    Large language models (LLMs) have greatly accelerated the automation of algorithm generation and optimization. However, current methods such as EoH and FunSearch mainly rely on predefined templates and expert-specified functions that focus solely on the local evolution of key functionalities. Consequently, they fail to fully leverage the synergistic benefits of the overall architecture and the potential of global optimization. In this paper, we introduce an end-to-end algorithm generation and optimization framework based on LLMs. Our approach utilizes the deep semantic understanding of LLMs to convert natural language requirements or human-authored papers into code solutions, and employs a t…

  8. Very close
    Holistic Evaluation of State-of-the-Art LLMs for Code Generation
    Le Zhang, S. Kothari · 2025 · arXiv.org · preprint, not peer reviewed · cited 1 time · Not summarized yet
    Abstract

    This study presents a comprehensive empirical evaluation of six state-of-the-art large language models (LLMs) for code generation, including both general-purpose and code-specialized models. Using a dataset of 944 real-world LeetCode problems across five programming languages, we assess model performance using rigorous metrics: compile-time errors, runtime errors, functional failures, and algorithmic suboptimalities. The results reveal significant performance variations, with DeepSeek-R1 and GPT-4.1 consistently outperform others in terms of correctness, efficiency, and robustness. Through detailed case studies, we identify common failure scenarios such as syntax errors, logical flaws, and s…

Prior work it builds on

  1. Close
    In-the-loop Hyper-Parameter Optimization for LLM-Based Automated Design of Heuristics
    Niki van Stein, D. Vermetten, T. Bäck · 2024 · ACM Transactions on Evolutionary Learning and Optimization · cited 53 times · Not summarized yet
    Abstract

    Large Language Models (LLMs) have shown great potential in automatically generating and optimizing (meta)heuristics, making them valuable tools in heuristic optimization tasks. However, LLMs are generally inefficient when it comes to fine-tuning hyper-parameters of the generated algorithms, often requiring excessive queries that lead to high computational and financial costs. This paper presents a novel hybrid approach, LLaMEA-HPO, which integrates the open source LLaMEA (Large Language Model Evolutionary Algorithm) framework with a Hyper-Parameter Optimization (HPO) procedure in the loop. By offloading hyper-parameter tuning to an HPO procedure, the LLaMEA-HPO framework allows the LLM to fo…

  2. Related*
    Programming by optimization
    H. Hoos · 2012 · Communications of the ACM · cited 231 times · Not summarized yet
  3. Related*
    Source code metrics: A systematic mapping study
    Alberto Nunez-Varela, H. Pérez-González, F. Martínez-Pérez et al. · 2017 · Journal of Systems and Software · cited 162 times · Not summarized yet
  4. Related
    Search trajectory networks: A tool for analysing and visualising the behaviour of metaheuristics
    Gabriela Ochoa, K. Malan, C. Blum · 2021 · Applied Soft Computing · cited 95 times · Not summarized yet
    Abstract

    Abstract A large number of metaheuristics inspired by natural and social phenomena have been proposed in the last few decades, each trying to be more powerful and innovative than others. However, there is a lack of accessible tools to analyse, contrast and visualise the behaviour of metaheuristics when solving optimisation problems. When the metaphors are stripped away, are these algorithms different in their behaviour? To help to answer this question, we propose a data-driven, graph-based model, search trajectory networks (STNs) in order to analyse, visualise and directly contrast the behaviour of different types of metaheuristics. One strength of our approach is that it does not require an…

  5. Related*
    Cyclomatic Complexity
    C. Ebert, J. Cain, G. Antoniol et al. · 2016 · IEEE Software · cited 151 times · Not summarized yet

Papers that cite it

  1. Very close
    A Systematic Survey on Large Language Models for Evolutionary Optimization: From Modeling to Solving
    Yi-Song Zhang, Ran Cheng, Guo-Xing Yi et al. · 2025 · IEEE Computational Intelligence Magazine · cited 19 times · Not summarized yet
    Abstract

    Large language models (LLMs) are increasingly integrated with evolutionary computation to support optimization tasks. This survey primarily focuses on evolutionary optimization, i.e., optimization based on evolutionary computation. For brevity, we use the term optimization throughout to denote this scope. However, existing surveys typically examine isolated roles of LLMs and do not provide a unified view that connects optimization modeling with optimization solving. To address this gap, we systematically review recent developments through a workflow-oriented framework. First, we organize the literature into two primary stages: LLMs for optimization modeling and LLMs for optimization solving …

  2. Very close
    Fitness Landscape of Large Language Model-Assisted Automated Algorithm Search
    Fei Liu, Qing-Fu Zhang, Jia-Long Shi et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 13 times · Not summarized yet
    Abstract

    Using Large Language Models (LLMs) in an evolutionary or other iterative search framework have demonstrated significant potential in automated algorithm design. However, the underlying fitness landscape, which is critical for understanding its search behavior, remains underexplored. In this paper, we illustrate and analyze the fitness landscape of LLM-assisted Algorithm Search (LAS) using a graph-based approach, where nodes represent algorithms and edges denote transitions between them. We conduct extensive evaluations across six algorithm design tasks and six commonly-used LLMs. Our findings reveal that LAS landscapes are highly multimodal and rugged, particularly in combinatorial optimizat…

  3. Close
    A Systematic Survey on Large Language Models for Algorithm Design
    Fei Liu, Yi-Ming Yao, Ping Guo et al. · 2024 · ACM Computing Surveys · cited 138 times · Not summarized yet
    Abstract

    Algorithm design is crucial for effective problem-solving across various domains. The advent of Large Language Models (LLMs) has notably enhanced the automation and innovation within this field, offering new perspectives and promising solutions. In just a few years, this integration has yielded remarkable progress in areas ranging from combinatorial optimization to scientific discovery. Despite this rapid expansion, a holistic understanding of the field is hindered by the lack of a systematic review, as existing surveys either remain limited to narrow sub-fields or with different objectives. This article seeks to provide a systematic review of algorithm design with LLMs. We introduce a taxon…

  4. Very close
    Towards Variation via Foundation Model: An Empirical Study of a Problem-Agnostic No-Code LLM-Guided Evolutionary Algorithm
    Sarah Gerner, Gerhard Stenzel, Thomas Gabor · 2026 · GECCO Companion · Not summarized yet
    Abstract

    The natural-language-based genetic algorithm (NaLaGA) shows that a generic, problem-independent genetic algorithm (GA) can function by utilizing large language models (LLMs) for all interactions with the solution candidates without ever running any LLM-generated code. We analyze inherent biases in the function of a NaLaGA approach from prior work and propose some architectural changes to increase its generalizability.

  5. Close
    Mutation Without Variation: Convergence Dynamics in LLM-Driven Program Evolution
    Can Gurkan, F. Stonedahl, Uri Wilensky · 2026 · GECCO Companion · cited 5 times · Not summarized yet
    Abstract

    When an LLM repeatedly mutates a program, does it explore new forms or circle back to the same ones? We study this question by analyzing LLM-driven mutation chains in the absence of selection pressure within a domain-specific language, varying prompt design, model family, and stochastic replication. We find that LLM-based mutation consistently converges toward restricted attractor regions in program space. Convergence is especially severe at the structural level: in 87% of chains, over 93% of mutations revisit a previously seen structural form, with most variation confined to terminal substitutions within recurring templates. Cycle analysis reveals short cycles and self-loops dominating the …

How are these papers found?

We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.

Updated on 1 November 2026.

The illustrated guide to the papers around a paper

The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.