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

Auteurs : Niki van Stein, Anna V. Kononova, Lars Kotthoff, Thomas Bäck

Soumis à arXiv le 20 Mar. 2025
Licence : CC BY 4.0
Résumé scientifique

Large Language Models (LLMs) have demonstrated great promise in generating code, especially when used inside an evolutionary computation framework to iteratively optimize the generated algorithms. However, in some cases they fail to generate competitive algorithms or the code optimization stalls, and we are left with no recourse because of a lack of understanding of the generation process and generated codes. We present a novel approach to mitigate this problem by enabling users to analyze the generated codes inside the evolutionary process and how they evolve over repeated prompting of the LLM. We show results for three benchmark problem classes and demonstrate novel insights. In particular, LLMs tend to generate more complex code with repeated prompting, but additional complexity can hurt algorithmic performance in some cases. Different LLMs have different coding ``styles'' and generated code tends to be dissimilar to other LLMs. These two findings suggest that using different LLMs inside the code evolution frameworks might produce higher performing code than using only one LLM.

Les articles autour de lui, par date et par proximité

Plus haut, c’est plus proche de cet article ; à gauche, c’est plus ancien. Les traits relient les articles proches entre eux : les groupes de traits sont des sous-thèmes. Sélectionnez un point pour voir pourquoi il est là. Retour au résumé de cet article

Comment lire cette carte ? Guide illustré

Les articles les plus proches Les travaux antérieurs sur lesquels il s’appuie Les articles qui le citent

Les articles autour de celui-ci

Classés selon la proximité de leur titre et de leur résumé avec ceux de cet article. Sélectionnez-en pour les lire ensemble.

Les articles les plus proches

  1. Très proche
    Evolving code with a large language model
    Erik Hemberg, Stephen Moskal, U. O'Reilly · 2024 · Genetic Programming and Evolvable Machines · cité 84 fois · Pas encore résumé
    Résumé scientifique

    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. Très proche
    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 · cité 105 fois · Pas encore résumé
    Résumé scientifique

    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. Très proche
    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 · cité 8 fois · Pas encore résumé
    Résumé scientifique

    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. Très proche
    Large Language Models for Code Generation: A Comprehensive Survey of Challenges, Techniques, Evaluation, and Applications
    Nam Huynh, Beiyu Lin · 2025 · arXiv.org · preprint, non relu par les pairs · cité 62 fois · Pas encore résumé
    Résumé scientifique

    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. Très proche
    Comparing Large Language Models and Grammatical Evolution for Code Generation
    L. Custode, Chiara Camilla Migliore Rambaldi, Marco Roveri et al. · 2024 · GECCO Companion · cité 8 fois · Pas encore résumé
    Résumé scientifique

    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. Très proche
    Evolutionary thoughts: integration of large language models and evolutionary algorithms
    A. Yepes, Pieter Barnard · 2025 · arXiv.org · preprint, non relu par les pairs · cité 3 fois · Pas encore résumé
    Résumé scientifique

    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. Très proche
    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, non relu par les pairs · cité 3 fois · Pas encore résumé
    Résumé scientifique

    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. Très proche
    Holistic Evaluation of State-of-the-Art LLMs for Code Generation
    Le Zhang, S. Kothari · 2025 · arXiv.org · preprint, non relu par les pairs · cité 1 fois · Pas encore résumé
    Résumé scientifique

    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…

Les travaux antérieurs sur lesquels il s’appuie

  1. Proche
    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 · cité 53 fois · Pas encore résumé
    Résumé scientifique

    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. Apparenté*
    Programming by optimization
    H. Hoos · 2012 · Communications of the ACM · cité 231 fois · Pas encore résumé
  3. Apparenté*
    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 · cité 162 fois · Pas encore résumé
  4. Apparenté
    Search trajectory networks: A tool for analysing and visualising the behaviour of metaheuristics
    Gabriela Ochoa, K. Malan, C. Blum · 2021 · Applied Soft Computing · cité 95 fois · Pas encore résumé
    Résumé scientifique

    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. Apparenté*
    Cyclomatic Complexity
    C. Ebert, J. Cain, G. Antoniol et al. · 2016 · IEEE Software · cité 151 fois · Pas encore résumé

Les articles qui le citent

  1. Très proche
    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 · cité 19 fois · Pas encore résumé
    Résumé scientifique

    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. Très proche
    Fitness Landscape of Large Language Model-Assisted Automated Algorithm Search
    Fei Liu, Qing-Fu Zhang, Jia-Long Shi et al. · 2025 · arXiv.org · preprint, non relu par les pairs · cité 13 fois · Pas encore résumé
    Résumé scientifique

    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. Proche
    A Systematic Survey on Large Language Models for Algorithm Design
    Fei Liu, Yi-Ming Yao, Ping Guo et al. · 2024 · ACM Computing Surveys · cité 138 fois · Pas encore résumé
    Résumé scientifique

    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. Très proche
    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 · Pas encore résumé
    Résumé scientifique

    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. Proche
    Mutation Without Variation: Convergence Dynamics in LLM-Driven Program Evolution
    Can Gurkan, F. Stonedahl, Uri Wilensky · 2026 · GECCO Companion · cité 5 fois · Pas encore résumé
    Résumé scientifique

    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 …

Comment ces articles sont-ils trouvés ?

Nous comparons le titre et le résumé de cet article avec ceux de tous les articles résumés sur ce site, et avec les articles que Semantic Scholar recommande, ceux qu’il cite et ceux qui le citent (pour un article très cité, ses citations les plus récentes et, depuis OpenAlex, les plus citées). Parmi les travaux antérieurs et les suites, les articles qui s’utilisent en profondeur, une méthode qu’il utilise et les suites très citées remontent un peu. Les niveaux (très proche, proche, apparenté) viennent de la similarité des textes, pas d’un jugement de qualité ; * signale un article sans résumé, comparé par son titre. La phrase sous un article est écrite par une IA à partir des deux résumés : vérifiez-la dans les articles. Un article jugé hors sujet par trois lecteurs quitte la liste.

Mis à jour le 1 novembre 2026.

Le guide illustré des articles autour d’un article