Skip to main content
QUICK REVIEW

[Paper Review] Algorithm Evolution Using Large Language Model

Fei Liu, Xialiang Tong|arXiv (Cornell University)|Nov 26, 2023
Topic ModelingComputer Science15 citations
TL;DR

The paper introduces Algorithm Evolution using Large Language Model (AEL), an evolutionary framework that uses LLMs to automatically design optimization algorithms, demonstrated on the TSP constructive heuristic. AEL outperforms hand-crafted greedy methods and domain-trained models, with better generalization across problem sizes.

ABSTRACT

Optimization can be found in many real-life applications. Designing an effective algorithm for a specific optimization problem typically requires a tedious amount of effort from human experts with domain knowledge and algorithm design skills. In this paper, we propose a novel approach called Algorithm Evolution using Large Language Model (AEL). It utilizes a large language model (LLM) to automatically generate optimization algorithms via an evolutionary framework. AEL does algorithm-level evolution without model training. Human effort and requirements for domain knowledge can be significantly reduced. We take constructive methods for the salesman traveling problem as a test example, we show that the constructive algorithm obtained by AEL outperforms simple hand-crafted and LLM-generated heuristics. Compared with other domain deep learning model-based algorithms, these methods exhibit excellent scalability across different problem sizes. AEL is also very different from previous attempts that utilize LLMs as search operators in algorithms.

Motivation & Objective

  • Reduce manual expert effort in algorithm design by integrating LLMs into an evolutionary framework for automatic algorithm design.
  • Demonstrate AEL on a constructive TSP heuristic to create competitive, scalable algorithms.
  • Compare AEL against human-designed, domain-trained, and direct LLM-generated algorithms to assess performance and generalization.

Proposed method

  • Represent each algorithm as an evolving individual consisting of a natural-language description, a predefined code block, and a fitness value.
  • Use an evolutionary loop with initialization, selection, crossover (via LLM prompting), mutation (via LLM prompting), and population management to evolve algorithms.
  • Prompt-engineer LLMs to generate new algorithms or modify existing ones, with constraints to promote diversity and problem-specific formatting.
  • Evaluate each candidate algorithm on a batch of problem instances to compute fitness (average gap to a solver) across instances, not a single instance.
  • Compare against baseline human-designed greedy, domain-model (neural solver), and directly instructed LLM-generated algorithms.

Experimental results

Research questions

  • RQ1Can an evolutionary framework leveraging LLMs automatically design competitive optimization algorithms for combinatorial problems like TSP?
  • RQ2How does AEL compare to human-crafted heuristics, domain-model solvers, and direct LLM prompts in terms of solution quality and generalization across problem sizes?
  • RQ3What is the impact of using advanced LLMs (e.g., GPT-4) on the quality and robustness of evolved algorithms?

Key findings

  • AEL consistently outperforms the hand-designed Greedy heuristic across all tested sizes.
  • AEL shows better generalization than a domain-trained model, especially on larger instances.
  • Directly prompting LLMs to design algorithms is worse than AEL, with GPT-4 sometimes introducing excessive randomness.
  • The best AEL-derived algorithm integrates multi-factor scoring (distance, mean distance, and dispersion) with a threshold to avoid poor choices, yielding substantially shorter routes.
  • GPT-4-based AEL generally outperforms GPT-3.5-turbo within the AEL framework.
  • Across TSP sizes from 20 to 1000, AEL with GPT-4 achieves the smallest average gaps compared to other approaches.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.