Source-linked AI summary

AVO: Agentic Variation Operators for Autonomous Evolutionary Search

Terry Chen, Zhifan Ye, Bing Xu, Zihao Ye, Timmy Liu, Ali Hassani, Tianqi Chen, Andrew Kerr, Haicheng Wu, Yang Xu, Yu-Jung Chen, Hanfeng Chen, Aditya Kane, Ronny Krashinsky, Ming-Yu Liu, Vinod Grover, Luis Ceze, Roger Bringmann, John Tran, Wei Liu, Fung Xie, Michael Lightstone, Humphrey Shi

arXiv:2603.24517v1cs.LG

TL;DR

Existing LLM-augmented evolutionary search confines language models to fixed candidate-generation pipelines, limiting their role in iterative engineering workflows. AVO instead makes a planning, tool-using coding agent the variation operator itself, and on Blackwell attention kernels it surpasses cuDNN and FlashAttention-4 while transferring to GQA. For scope, the study evaluates a single-lineage continuous instantiation, leaving population-level branching and archive management for future extensions.

  • Problem

    Existing evolutionary systems confine LLMs to candidate generation within prescribed pipelines, limiting proactive consultation, testing, and revision during complex kernel optimization.

  • Method

    AVO replaces mutation and crossover with a self-directed coding-agent loop that consults prior solutions and domain knowledge, edits implementations, and evaluates results autonomously.

  • Results

    AVO kernels outperform cuDNN by up to 3.5% and FlashAttention-4 by up to 10.5% on MHA, while GQA adaptation takes 30 minutes and reaches gains of up to 7.0% and 9.3%.

  • Takeaways & Limitations

    Agentic variation operators can discover performance-critical micro-architectural optimizations that surpass expert-engineered attention implementations.

  • Takeaways & Limitations

    The study evaluates a single-lineage continuous instantiation, leaving population-level branching and archive management to future extensions.

Abstract

from arXiv · show

Agentic Variation Operators (AVO) are a new family of evolutionary variation operators that replace the fixed mutation, crossover, and hand-designed heuristics of classical evolutionary search with autonomous coding agents. Rather than confining a language model to candidate generation within a prescribed pipeline, AVO instantiates variation as a self-directed agent loop that can consult the current lineage, a domain-specific knowledge base, and execution feedback to propose, repair, critique, and verify implementation edits. We evaluate AVO on attention, among the most aggressively optimized kernel targets in AI, on NVIDIA Blackwell (B200) GPUs. Over 7 days of continuous autonomous evolution on multi-head attention, AVO discovers kernels that outperform cuDNN by up to 3.5% and FlashAttention-4 by up to 10.5% across the evaluated configurations. The discovered optimizations transfer readily to grouped-query attention, requiring only 30 minutes of additional autonomous adaptation and yielding gains of up to 7.0% over cuDNN and 9.3% over FlashAttention-4. Together, these results show that agentic variation operators move beyond prior LLM-in-the-loop evolutionary pipelines by elevating the agent from candidate generator to variation operator, and can discover performance-critical micro-architectural optimizations that produce kernels surpassing state-of-the-art expert-engineered attention implementations on today's most advanced GPU hardware.

1 Introduction

Prior LLM-augmented evolutionary systems confine models to candidate generation within fixed workflows, whereas AVO makes a self-directed coding agent the variation operator. Applied to Blackwell attention kernels, AVO achieves reported gains over expert-optimized baselines and transfers to GQA.

  • Motivation: Prior systems confine LLMs to candidate generation while surrounding frameworks control parent sampling, evaluation, and population management.This fixed decomposition limits proactive consultation, testing, debugging, and iterative revision.
  • Motivation: Surpassing Blackwell attention implementations requires sustained interaction with documentation, profiling, testing, correctness diagnosis, and accumulated experience.The setting targets attention kernels that have already received extensive expert optimization.
  • Approach: AVO replaces fixed mutation and crossover workflows with an autonomous agent that consults prior solutions, domain knowledge, and evaluation utilities.The agent decides what to consult, edit, and evaluate during extended improvement loops.
  • Results: 3.5% over cuDNN and 10.5% over FlashAttention-4 are the maximum reported MHA gains achieved by AVO on NVIDIA B200 GPUs.The evolved kernels reach up to 1668 TFLOPS at BF16 precision over 7 days of continuous evolution.
  • Results: 7.0% over cuDNN and 9.3% over FlashAttention-4 are the maximum reported GQA gains after 30 minutes of autonomous adaptation.The discovered optimizations transfer from MHA to grouped-query attention.
  • Contribution: AVO’s analysis identifies micro-architectural optimizations spanning multiple hardware levels rather than superficial code transformations.The contribution specifically analyzes the agent’s hardware-level optimization behavior.

2 Background

Evolutionary search maintains a scored population and produces new candidates through a variation operator. Prior LLM-based methods keep sampling or other workflow components fixed, while AVO replaces the full variation process with a self-directed agent loop; this study focuses on single-lineage evolution for attention kernels.

  • Evolutionary Search: Evolutionary search maintains a population of candidate-score pairs and iteratively adds new solutions.The population may be pruned to retain a bounded archive.
  • Variation Operators: The variation operator produces a new candidate from the current population, with prior formulations separating parent sampling from candidate generation.Sampling selects parent solutions, while generation conditions a new candidate on them.
  • Prior Methods: Prior LLM-augmented methods use fixed sampling procedures even when an LLM implements generation or learns an improved generation policy.Examples include heuristic archive selection, Boltzmann selection, and PUCT-based state expansion.
  • AVO: AVO subsumes sampling, generation, and evaluation within one self-directed agent loop.The agent chooses when to consult past solutions and references, run diagnostics, and revise its strategy.
  • Scope: AVO is compatible in principle with archive-based, island-based, or single-lineage population structures, but this paper isolates the operator in a single-lineage setting.Population-level branching and archive management remain outside the present study.
  • Attention Kernels: FlashAttention avoids materializing the full N × N score matrix by processing key blocks sequentially with a running softmax and incremental output accumulation.This shifts the bottleneck from memory bandwidth toward compute throughput on modern GPUs.

3 Agentic Variation Operators

AVO replaces the fixed evolutionary variation pipeline with a self-directed agent that uses lineage context, domain knowledge, and evaluation feedback to iteratively optimize kernels. The study instantiates this approach as continuous single-lineage evolution with mechanisms for diagnosing failures and sustaining progress.

  • Formulation: AVO replaces separate sampling, generation, and evaluation stages with one autonomous agent run over the lineage.The agent decides which prior solutions and references to consult, which diagnostics to run, and how to revise its strategy.
  • Formulation: AVO scores CUDA kernels for numerical correctness and throughput across test configurations, assigning zero score to candidates that fail correctness.Its knowledge base includes CUDA and PTX documentation, Blackwell specifications, and existing attention-kernel implementations.
  • Anatomy of a Variation Step: Each variation step produces a new kernel through an autonomous loop with planning, tool use, and persistent memory.The agent can compare prior implementations, inspect profiling characteristics, consult hardware documentation, implement edits, and test results.
  • Continuous Evolution: Only correct candidates that match or improve the best committed benchmark score enter the persistent lineage; unsuccessful attempts remain internal to the agent’s search.Committed versions are recorded with their scores, maintaining state continuity across the run.
  • Continuous Evolution: The present evaluation uses a single-lineage continuous instantiation, leaving population-level branching and archive management for future extensions.This scope boundary distinguishes the evaluated system from the broader AVO operator definition.
  • Continuous Evolution: A self-supervision mechanism detects stagnation and unproductive edit cycles, reviews the trajectory, and redirects exploration toward candidate optimization directions.In the 7-day multi-head attention run, the agent produced 40 successive versions while the supervisor intervened during stagnation.

4 Experiments

AVO was evaluated on NVIDIA B200 attention kernels against cuDNN and FlashAttention-4, using seven days of autonomous evolution for MHA and a short adaptation to GQA. Performance gains varied by masking, sequence length, and task, while the evolution trajectory showed discrete improvements and diminishing returns.

  • 4.1 Setup: AVO was evaluated on NVIDIA B200 GPUs using CUDA 13.1 and PyTorch 2.10.0, with cuDNN 9.19.1 and FA4 as baselines.The benchmark used forward-prefilling throughput with head dimension 128, BF16 precision, and controlled total tokens.
  • 4.2 Multi-Head Attention: +0.4% to +3.5% over cuDNN and +5.0% to +10.5% over FA4 were achieved by AVO on causal MHA across all tested configurations.On non-causal MHA, gains over cuDNN were +1.8% to +2.4% only at sequence lengths above 16384, while shorter-sequence results were within measurement noise.
  • 4.3 Grouped-Query Attention: Up to +7.0% over cuDNN and +9.3% over FA4 were achieved on causal GQA after approximately 30 minutes of autonomous adaptation.Non-causal GQA gains reached +6.0% over cuDNN and +4.5% over FA4 across two group sizes and both masking modes.
  • 4.4 Evolution Trajectory: Over 500 optimization directions produced 40 committed kernel versions during seven days of evolution.The committed trajectory represented successful outcomes from a larger internal search including failed, regressing, and abandoned attempts.
  • 4.4 Evolution Trajectory: The largest gains appeared as discrete architectural jumps, while later versions produced smaller compounding improvements through cycle-level scheduling and resource refinement.The five largest gains involved QK-PV interleaving, softmax restructuring, branchless rescaling, pipeline overlap, and register rebalancing.

5 Analysis of Agent-Discovered Optimizations

The analysis attributes AVO’s gains to coordinated hardware-level changes spanning synchronization, pipeline scheduling, and register allocation. Ablations show that these changes produced measurable throughput improvements, especially on non-causal attention.

  • 5.1 Branchless Accumulator Rescaling: +8.1% geomean throughput on non-causal attention and +1.6% on causal attention resulted from branchless rescaling with a lighter fence.The larger non-causal gain reflects application of the branchless path to fully unmasked key-block iterations.
  • 5.2 Pipeline Overlap: +1.1% geomean throughput on non-causal attention and +0.4% on causal attention resulted from overlapping correction with the second PV GEMM.The restructuring reduced correction-warp idle time by converting a sequential dependency into pipelined execution.
  • 5.3 Register Rebalancing: +2.1% geomean throughput on non-causal attention and approximately 0% on causal attention resulted from register rebalancing.The agent changed the allocation from 192/80/48 to 184/88/56 registers across the warp groups, reducing correction-group spilling.
  • Overview: AVO’s discovered optimizations jointly reasoned about synchronization and memory ordering, pipeline scheduling, and register allocation.The analysis examines each change through its bottleneck, implementation, and measured ablation impact.

6 Conclusion

AVO elevates an autonomous coding agent from candidate generator to evolutionary variation operator. On Blackwell attention kernels, it surpassed expert-engineered baselines and transferred its optimizations to GQA after brief autonomous adaptation.

  • 6 Conclusion: AVO produced attention kernels surpassing cuDNN by up to 3.5% and FlashAttention-4 by up to 10.5% after seven days of continuous autonomous evolution.The discovered optimizations also transferred to grouped-query attention with only 30 minutes of additional autonomous adaptation.
  • 6 Conclusion: The results demonstrate that AVO can discover performance-critical micro-architectural optimizations beyond the evaluated attention configurations.The conclusion frames AVO as a broader path for autonomous optimization across performance-critical software and other domains requiring extended exploration.

A Comparison Using FA4-Reported Baseline Performance

A separate comparison uses cuDNN and FA4 baseline numbers reported in the FA4 paper rather than only measurements collected on the authors’ hardware. AVO remains ahead across the reported configurations, with larger causal-attention gains at shorter sequences.

  • Comparison Setup: The comparison combines AVO measurements from the authors’ hardware with cuDNN and FA4 baseline numbers reported in the FA4 paper.This addresses possible absolute-throughput differences from drivers, thermal conditions, and clock frequencies.
  • Non-Causal Attention: +1.4% to +3.4% over cuDNN and +2.3% to +3.9% over FA4 were achieved on non-causal attention across all configurations.These comparisons use the FA4-reported baselines shown alongside AVO in Figure 7.
  • Causal Attention: +3.6% to +7.5% over cuDNN and +3.7% to +8.8% over FA4 were achieved on causal attention, with the largest gains at bs=8 and seq=4096.The reported results are broadly consistent with the comparisons using baselines measured on the authors’ hardware.
Loading 2603.24517v1…