Command Palette
Search for a command to run...
AVO: Agentic Variation Operators for Autonomous Evolutionary Search
AVO: Agentic Variation Operators for Autonomous Evolutionary Search
Abstract
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.
One-sentence Summary
NVIDIA researchers propose Agentic Variation Operators (AVO), autonomous coding agents that replace fixed evolutionary operators by self-directing variation through a loop consulting lineage, a knowledge base, and execution feedback to propose, repair, critique, and verify implementation edits, and over 7 days of continuous evolution on multi-head attention discover kernels on Blackwell B200 GPUs outperforming cuDNN by up to 3.5% and FlashAttention-4 by up to 10.5%, with rapid transfer to grouped-query attention requiring only 30 minutes of adaptation to yield up to 7.0% and 9.3% gains respectively.
Key Contributions
- Agentic Variation Operators (AVO) replace fixed evolutionary variation heuristics with autonomous coding agents that subsume sampling, generation, and evaluation into a single self-directed loop.
- Applied to multi-head attention on NVIDIA Blackwell GPUs, AVO discovers kernels that outperform cuDNN by up to 3.5% and FlashAttention-4 by up to 10.5% after seven days of continuous evolution.
- The discovered optimizations transfer to grouped-query attention with 30 minutes of additional adaptation, yielding improvements of up to 7.0% over cuDNN and 9.3% over FlashAttention-4.
Introduction
The authors address the challenge of using large language models in evolutionary code optimization, where prior systems confine the LLM to a single-turn candidate generator within a fixed pipeline. This limits the ability to perform the iterative, multi-step engineering required to surpass highly tuned implementations like attention kernels on GPUs, which demand studying hardware documentation, profiling, testing, and revising. To overcome this, they introduce Agentic Variation Operators (AVO), which replace the entire variation step with a self-directed coding agent that autonomously consults knowledge, evaluates candidates, and refines its approach over extended time horizons. Applied to multi-head attention on NVIDIA Blackwell B200 GPUs, AVO discovers micro-architectural optimizations that outperform cuDNN by up to 3.5% and FlashAttention-4 by up to 10.5%, with the learned techniques transferring to grouped-query attention in just 30 minutes of additional autonomous adaptation.
Method
The authors begin by detailing the complexity of attention computation on modern GPUs. Given query, key, and value matrices Q,K,V, attention computes O=softmax(QK⊤/d)V. While FlashAttention avoids materializing the full score matrix by processing key blocks sequentially, state-of-the-art kernels like FA4 on NVIDIA's Blackwell architecture employ warp specialization. Different warp groups handle matrix multiplications, online softmax, output rescaling, and data movement concurrently. Optimizing such highly tuned kernels requires deep hardware expertise and extensive profiling.
To automate this optimization, the authors propose Agentic Variation Operators (AVO). Traditional evolutionary search decomposes the variation operator into separate sampling and generation steps, confining the LLM to a fixed pipeline. AVO replaces this decomposition with a single autonomous agent run:
Vary(Pt)=Agent(Pt,K,f)where Pt is the full lineage of solutions and their scores, K is a domain-specific knowledge base, and f is the scoring function.
The input to the AVO system consists of three main components. The population Pt contains the lineage of prior CUDA kernel implementations and their scores. The knowledge base K includes CUDA and PTX documentation, Blackwell architecture specifications, and reference GPU kernel codebases. The scoring function f evaluates candidates on numerical correctness and throughput in TFLOPS; any candidate failing correctness checks receives a zero score regardless of throughput.
The core of the method is the AVO Main Agent Loop, which produces a new solution xt+1 from the current lineage Pt. This autonomous loop involves several interconnected phases. During Planning, the agent proposes edits using the knowledge base and prior implementations. In Implementation, it applies code modifications. The Evaluation phase uses the scoring function f to measure performance. If issues arise, the Bug-Fixing phase allows the agent to diagnose, repair, and adapt its plan. The agent frequently examines multiple prior implementations to identify bottlenecks and consults documentation to understand hardware constraints before implementing optimizations. This edit-evaluate-diagnose cycle repeats until a satisfactory xt+1 is committed. A new version is persisted only when it passes correctness checks and matches or improves the benchmark score relative to the best committed version.
To ensure forward progress during long-running autonomous optimization, the authors incorporate an AVO Supervisor Agent. This supervisor monitors the main agent for stagnation, such as exhausting a line of exploration or entering unproductive edit cycles. When triggered, the supervisor reviews the overall evolutionary trajectory and provides conditional intervention to steer the search toward new candidate optimization directions.
The system operates as a continuous evolution loop. Each committed version is persisted as a git commit with its score, maintaining full state continuity across the entire process. In their evaluation, a 7-day run produced a final multi-head attention kernel spanning 40 successive versions, with the main agent autonomously deciding when to attempt new optimizations or shift strategies, while the supervisor intervened during periods of stagnation.
Experiment
The evaluation uses an agentic variation operator (AVO) to evolve CUDA attention kernels on NVIDIA B200 GPUs, benchmarking against cuDNN and FlashAttention-4 across multi-head and grouped-query attention configurations. AVO autonomously discovers optimizations that yield consistent throughput gains over both baselines, with the largest improvements coming from architectural changes like branchless rescaling, pipeline overlap, and register rebalancing, while later versions provide fine-grained tuning. The agent successfully adapts its evolved MHA kernel to GQA in under an hour, demonstrating that the discovered optimizations generalize beyond the original search space. Overall, the experiments show that agent-driven evolution can produce expert-level kernel optimizations by jointly reasoning about multiple hardware subsystems through iterative profiling and code modification.
Three agent-discovered kernel optimizations each improved throughput, with gains varying by attention type. Branchless accumulator rescaling delivered a large 8.1% improvement on non-causal attention but only 1.6% on causal, because the branchless path applies only to unmasked key blocks. Pipeline overlap and register rebalancing added further gains, primarily for non-causal scenarios where the correction warp is on the critical path. Branchless accumulator rescaling provides a substantial 8.1% geomean throughput gain on non-causal attention, but only 1.6% on causal attention, as the optimization is limited to fully unmasked key-block iterations. Register rebalancing across warp groups yields a 2.1% improvement on non-causal attention and negligible impact on causal, because the correction warp runs concurrently with the second GEMM only in the non-causal pipeline.
Agent-discovered kernel optimizations improved throughput, with gains concentrated in non-causal attention. The branchless accumulator rescaling was highly effective for non-causal scenarios but offered limited benefit on causal attention because it only applies to unmasked key blocks. Additional pipeline overlap and register rebalancing further boosted non-causal performance, where the correction warp lies on the critical path, while causal attention saw minimal improvement.