Command Palette
Search for a command to run...
AVO : Opérateurs de variation agentiques pour la recherche évolutionnaire autonome
AVO : Opérateurs de variation agentiques pour la recherche évolutionnaire autonome
Résumé
Les opérateurs de variation agentiques (AVO) constituent une nouvelle famille d'opérateurs de variation évolutionnaires qui remplacent les mutations, croisements et heuristiques conçus manuellement de la recherche évolutionnaire classique par des agents de codage autonomes. Plutôt que de confiner un modèle de langage à la génération de candidats au sein d'un pipeline prescrit, AVO instancie la variation sous la forme d'une boucle agentique auto-dirigée capable de consulter la lignée courante, une base de connaissances spécifique au domaine et le retour d'exécution pour proposer, réparer, critiquer et vérifier des modifications d'implémentation. Nous évaluons AVO sur l'attention, l'une des cibles de noyaux les plus agressivement optimisées en IA, sur des GPU NVIDIA Blackwell (B200). Au cours de 7 jours d'évolution autonome continue sur l'attention multi-têtes, AVO découvre des noyaux qui surpassent cuDNN jusqu'à 3,5 % et FlashAttention-4 jusqu'à 10,5 % sur les configurations évaluées. Les optimisations découvertes se transfèrent aisément à l'attention par requêtes groupées, ne nécessitant que 30 minutes d'adaptation autonome supplémentaire et produisant des gains allant jusqu'à 7,0 % par rapport à cuDNN et 9,3 % par rapport à FlashAttention-4. Ensemble, ces résultats montrent que les opérateurs de variation agentiques dépassent les pipelines évolutionnaires antérieurs intégrant des LLM en élevant l'agent du statut de générateur de candidats à celui d'opérateur de variation, et peuvent découvrir des optimisations micro-architecturales critiques pour la performance qui produisent des noyaux surpassant les implémentations d'attention de pointe conçues par des experts sur le matériel GPU le plus avancé actuel.
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.