Automated Algorithm Design for Auto-Tuning Optimizers

TL;DR

Using LLMs to generate optimization algorithms, achieving an average 72.4% performance improvement.

cs.LG 🔴 Advanced 2025-10-19 6 views
Floris-Jan Willemsen Niki van Stein Ben van Werkhoven
auto-tuning optimization algorithms large language models performance improvement high-performance computing

Key Findings

Methodology

The paper introduces a novel framework using large language models (LLMs) to generate optimization algorithms tailored for auto-tuning problems. The framework guides LLMs with problem descriptions and search space characteristics to synthesize, test, and iteratively refine optimization algorithms. These generated algorithms are evaluated across four real-world applications and six hardware platforms, compared against state-of-the-art methods in two contemporary auto-tuning frameworks.

Key Results

  • Generated optimization algorithms show an average performance improvement of 30.7% and 14.6% when additional application and search space information is provided.
  • LLM-generated optimizers outperform existing human-designed algorithms in some cases, with the best achieving a 72.4% average improvement.
  • The algorithms excelled across four real-world auto-tuning applications on six hardware platforms.

Significance

This research demonstrates the potential of using LLMs to automatically generate optimization algorithms, significantly enhancing the efficiency and performance of auto-tuning. It reduces reliance on expert-crafted heuristics, enabling rapid design of problem-specific optimizers, addressing limitations of traditional methods in handling large, noisy, irregular search spaces.

Technical Contribution

The technical contribution lies in proposing a novel framework that combines LLMs with evolutionary algorithms to automatically generate optimization algorithms, significantly improving search efficiency and robustness. By integrating the best-performing algorithms into the Kernel Tuner framework, users can directly benefit from this technological advancement.

Novelty

This is the first systematic study of applying automated algorithm design in the context of auto-tuning. Unlike existing work, this paper does not rely on human-designed algorithm templates but allows LLMs to propose entirely new optimization strategies.

Limitations

  • Generated algorithms may perform poorly in complex search spaces, especially when search space characteristics are unclear.
  • LLM-generated code may contain errors or inefficient implementations, requiring evolutionary algorithm filtering.
  • In some cases, the generated algorithms may require significant computational resources.

Future Work

Future research directions include extending the framework to support more types of optimization problems, exploring applications of LLM-generated algorithms in other fields, and improving the efficiency and robustness of generated algorithms.

AI Executive Summary

Automatic performance tuning is crucial in high-performance computing for optimizing application performance. Traditional auto-tuners rely on evolutionary, annealing, or surrogate-based optimizers, but face challenges in handling large, noisy, irregular search spaces. This paper proposes a new paradigm: using large language models (LLMs) to automatically generate optimization algorithms tailored for auto-tuning problems. By providing additional application and search space information during the generation stage, the generated algorithms excel across four real-world applications and six hardware platforms, achieving an average 72.4% performance improvement.

The framework integrates the Kernel Tuner and LLaMEA framework, which combines LLMs with an evolutionary algorithm to automatically generate metaheuristic algorithms. The generated algorithms are evaluated across four real-world auto-tuning applications, demonstrating that LLM-generated optimizers can outperform existing human-designed algorithms in some cases. All code and data are available on GitHub.

While the method shows significant performance improvements, generated algorithms may perform poorly in complex search spaces, especially when search space characteristics are unclear. Future research directions include extending the framework to support more types of optimization problems and exploring applications of LLM-generated algorithms in other fields.

Deep Analysis

Background

Automatic performance tuning is a key technique in high-performance computing, enabling applications to deliver better performance and energy efficiency across diverse hardware architectures and input sizes. Traditional methods like evolutionary algorithms, simulated annealing, and particle swarm optimization require careful hyperparameter tuning and are not designed with the search space characteristics of auto-tuning in mind. Recent advances in large language models have demonstrated remarkable capabilities in code generation, algorithm synthesis, and problem-solving.

Core Problem

The core problem in auto-tuning is efficiently navigating large, noisy, irregular search spaces to find near-optimal configurations. Traditional methods are inefficient in handling these complex search spaces and require extensive expertise and tuning.

Innovation

This paper presents a novel framework using LLMs to automatically generate optimization algorithms. The framework guides LLMs with problem descriptions and search space characteristics to synthesize, test, and iteratively refine optimization algorithms. Unlike existing methods, this paper does not rely on human-designed algorithm templates but allows LLMs to propose entirely new optimization strategies.

Methodology

  • �� Use LLMs to generate initial optimization algorithm candidates.
  • �� Evaluate each candidate algorithm's performance in Kernel Tuner.
  • �� Use evolutionary algorithms to select high-performing algorithms for regeneration.
  • �� Generate new candidate algorithms through LLM-driven mutation operations.
  • �� Repeat the evaluation and selection process until a predetermined number of generations or evaluation budget is reached.

Experiments

Experiments were conducted across four real-world applications and six hardware platforms using the BAT benchmark suite of GPU kernels. Evaluation metrics included average performance improvement and comparison with state-of-the-art methods. The experimental design considered different benchmarks, hardware, and input data to ensure broad applicability of the results.

Results

Experimental results show that providing additional application and search space information leads to average performance improvements of 30.7% and 14.6%, respectively. The best-performing generated algorithms excelled across four real-world applications, achieving an average 72.4% improvement.

Applications

This method can be applied in high-performance computing for auto-tuning, particularly in scenarios requiring rapid design of problem-specific optimizers. It reduces reliance on expert-crafted heuristics, enhancing tuning efficiency and performance.

Limitations & Outlook

Generated algorithms may perform poorly in complex search spaces, especially when search space characteristics are unclear. Additionally, LLM-generated code may contain errors or inefficient implementations, requiring filtering through evolutionary algorithms.

Plain Language Accessible to non-experts

Imagine you're in a huge maze trying to find the exit. Traditional methods are like using an old map to find the best path. Large language models are like a smart guide who can design a new route based on the maze's features. This guide not only finds the exit quickly but also adjusts strategies based on different maze characteristics. This way, we can find the best path more efficiently without relying on the old map's experience.

ELI14 Explained like you're 14

Imagine you're playing a super complex maze game. Traditional methods are like using an old map to find the exit, but sometimes the map isn't accurate. Now, there's a super smart AI helper that can design a brand new route for you based on the maze's different features! This helper not only helps you find the exit quickly but also adjusts strategies based on different maze characteristics. Isn't that cool?

Glossary

Auto-Tuning

Auto-tuning is the process of optimizing application performance by systematically exploring different configurations.

Used in high-performance computing to optimize application performance.

Large Language Model (LLM)

A large language model is an AI model trained on vast amounts of data, capable of generating natural language text.

Used to generate optimization algorithms.

Evolutionary Algorithm

An optimization algorithm based on natural selection, finding optimal solutions through selection, crossover, and mutation.

Used to select and generate high-performing algorithms.

Kernel Tuner

A Python framework for optimizing computational kernels, supporting multiple programming backends.

Used to evaluate generated optimization algorithms.

Search Space

The set of all possible configurations, where optimization algorithms search for the optimal solution.

Configuration set explored in auto-tuning.

Open Questions Unanswered questions from this research

  • 1 How can LLM-generated optimization algorithms be applied in broader fields?
  • 2 How do generated algorithms perform in extremely complex search spaces?
  • 3 How can the efficiency and robustness of generated algorithms be further improved?

Applications

Immediate Applications

High-Performance Computing Optimization

Can be immediately used in high-performance computing for auto-tuning, improving application performance and energy efficiency.

AI Model Optimization

Can be used to optimize hyperparameters of AI models, improving model accuracy and efficiency.

Long-term Vision

Universal Optimizer Design

Could potentially be used to design universal optimizers for various complex problems in the future.

Abstract

Automatic performance tuning (auto-tuning) is essential for optimizing high-performance applications, where vast and irregular search spaces make manual exploration infeasible. While auto-tuners traditionally rely on classical approaches such as evolutionary, annealing, or surrogate-based optimizers, designing algorithms that efficiently find near-optimal configurations robustly across diverse tasks is challenging. We propose a new paradigm: using large language models (LLMs) to automatically generate optimization algorithms tailored to auto-tuning problems. We introduce a framework that prompts LLMs with problem descriptions and search space characteristics to synthesize, test, and iteratively refine specialized optimizers. These generated algorithms are evaluated on four real-world auto-tuning applications across six hardware platforms and compared against the state-of-the-art in two contemporary auto-tuning frameworks. The evaluation demonstrates that providing additional application- and search space-specific information in the generation stage results in an average performance improvement of 30.7% and 14.6%, respectively. In addition, our results show that LLM-generated optimizers can rival, and in various cases outperform, existing human-designed algorithms, with our best-performing generated optimization algorithms achieving an average 72.4% improvement over state-of-the-art optimizers for auto-tuning.

cs.LG cs.AI cs.NE