Research map / Multi-agent systems and games / LLM agents
EGG: An Expert-Guided Agent Framework for Kernel Generation
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes EGG, an expert-guided multi-agent framework that generates Triton GPU kernels via two-stage optimization (algorithmic structure design, then hardware-specific tuning) with stage-aware context management, reaching 2.13x mean speedup over PyTorch Eager on KernelBench.
Problem
LLM-generated GPU kernels often fail to be both correct and high-performing because they lack domain-specific optimization guidance over a vast hardware-dependent design space; RL-trained and agent-based approaches both struggle.
Approach
Decompose Triton kernel generation into expert-style stages (multi-seed algorithmic design and refinement, then parallel mapping, tensor tiling, memory optimization), and coordinate code, profile, and debug agents with stage-aware context propagation that keeps only finalized decisions across stages.
Key results
- Achieves 100% success on KernelBench Levels 1-3 and 2.13x average speedup over PyTorch Eager (Fast_1 87.6% in ablation).
- Level 2 speedup 2.73x with 100% Fast_1, versus CudaForge 2.00x and Torch Compile 1.38x.
- Real-world TritonBench operators: 1.24x on Flash Attention, 1.63x on RoPE, 1.08x on INT8 dequant matmul versus hand-written Triton.
Surprising findings
- Hand-written production Triton kernels from TritonBench were beaten by generated kernels on several operators.
- Ablation: algorithmic refinement alone yields 1.52x speedup but only 60.8% Fast_1, while hardware tuning alone gives more stable Fast_1 (72%).
Limitations
- Evaluated only on Triton; CUDA not explored due to larger optimization space.
- Reliance on a closed-source frontier LLM (GPT-5.1) as primary backbone.
- Speedup computed relative to PyTorch Eager, with comparisons to baselines re-run by the authors.
Experimental setup
Datasets: KernelBench TritonBench
Benchmarks: KernelBench TritonBench
Metrics: success rate fast_1 rate speedup over PyTorch Eager
Baselines: PyTorch Eager Torch Compile ChatGPT-5.1 DeepSeek-V3.2 AutoTriton CudaForge TVM Relax
Builds on: KernelBench TritonBench Triton FlashAttention
Closest papers by meaning
- STARK: Strategic Team of Agents for Refining Kernels (ICLR 2026 · similarity 0.95)
- StitchCUDA: An Automated Multi-Agents End-to-End GPU Programing Framework with Rubric-based Agentic Reinforcement Learning (ICML 2026 · similarity 0.87)
- KernelBench: Can LLMs Write Efficient GPU Kernels? (ICML 2025 · similarity 0.87)
- The Automated LLM Speedrunning Benchmark: Reproducing NanoGPT Improvements (NeurIPS 2025 · similarity 0.86)
- CUDABench: Benchmarking LLMs for Text-to-CUDA Generation (NeurIPS 2026 · similarity 0.85)
- AgentTTS: Large Language Model Agent for Test-time Compute-optimal Scaling Strategy in Complex Tasks (NeurIPS 2025 · similarity 0.85)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
