AIMay 27

Learning When to Optimize: Verified Optimization Skills from Expert GPU-Kernel Lineages

arXiv:2605.2821390.2
Predicted impact top 33% in AI · last 90 daysOriginality Incremental advance
AI Analysis

For LLM-based GPU kernel generation, this work addresses the problem of knowing when optimizations are sound, offering a method that improves both quality and efficiency over existing baselines.

KLineage learns when GPU kernel optimizations are valid by walking expert implementations backward through validation-gated simplifications, producing reusable skills. On five expert workloads across two NVIDIA architectures, it outperforms recent memory-based LLM-kernel baselines in final kernel quality and optimization efficiency under a fixed budget.

LLM-based agents are increasingly used to generate GPU kernels, but they often know what optimizations to try without knowing when those optimizations are sound. We introduce KLineage, which learns this missing "when" knowledge from expert kernels: instead of relying on forward rollouts, KLineage walks expert implementations backward through validation-gated simplifications and reverses each accepted step into a reusable optimization skill. Each skill records not only the optimization intent, but also where it applies in code, what conditions made it valid, what effect it had, and what failures its assumptions avoid. A downstream LLM materializes these skills on new code surfaces under the same compile/correctness/profile gate. On five expert workloads across two NVIDIA architectures, these lineage-derived skills serve as an effective optimization curriculum, exceeding recent memory-based LLM-kernel baselines in both final kernel quality and optimization efficiency under the same fixed budget. We additionally use a separate 22-instance held-out check as a sanity test against source-case memorization.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes