Don't Regenerate, Debug: A Domain-Specific Agent for Repairing Near-Miss Accelerator Kernels
summary
The gist
The gist The debug-over-regenerate paradigm for low-resource kernels demonstrates that a domain-specific agent can recover near-miss operators with significantly higher efficiency and capability than
In short
The paper proposes a 'debug-over-regenerate' approach for fixing near-miss hardware accelerator kernels. Instead of regenerating code repeatedly, it uses a domain-specific agent that diagnoses and repairs failures efficiently. This method significantly outperforms regeneration by recovering more correct operators with much lower computational costs, proving debugging is more constrained and effective than starting from scratch.
Key concepts
- Debug Agent
- A specialized AI agent designed to autonomously repair failed kernel code. It operates within a structured loop involving forensics (compiling/profiling), diagnosis (LLM intervention), and validation (re-execution). It uses retrieved knowledge and diagnostic tools to find fixes, rather than guessing new code.
- Regenerate vs. Debug
- The core comparison is between generating new kernel code from scratch versus debugging existing near-miss candidates. The paper argues that debugging is more efficient because the search space for fixes is smaller and the feedback loop provides dense, targeted information, leading to better results.
- Integrity Gates
- Mechanisms like anti-cheat detection and full-coverage evaluation are checks built into the workflow to ensure repaired kernels are trustworthy. These gates prevent the system from accepting solutions that pass initial tests but fail deeper validation, ensuring high quality and reliability of the final output.
Terminology used across episodes
This episode discusses
- Don't Regenerate, Debug: A Domain-Specific Agent for Repairing Near-Miss Accelerator Kernels · Paper Radio
- GPU Kernel Scientist: An LLM-Driven Framework for Iterative Kernel Optimization
- Kevin: Multi-Turn RL for Generating CUDA Kernels
- AscendKernelGen: A Systematic Study of LLM-Based Kernel Generation for Neural Processing Units
- ProofWright: Towards Agentic Formal Verification of CUDA
- MusaCoder: Native GPU Kernel Generation with Full-Stack Training on Moore Threads GPU
- CUDA Agent: Large-Scale Agentic RL for High-Performance CUDA Kernel Generation
- Multi-Perspective Agentic Program Repair via Code Property Graphs and Temporal Execution Graphs
- Towards Robust Agentic CUDA Kernel Benchmarking, Verification, and Optimization
- CUDABeaver: Benchmarking LLM-Based Automated CUDA Debugging
- The Correctness Illusion in LLM-Generated GPU Kernels
- KernelBenchX: A Comprehensive Benchmark for Evaluating LLM-Generated GPU Kernels
- InspectCoder: Dynamic Analysis-Enabled Self Repair through interactive LLM-Debugger Collaboration
- AscendCraft: Automatic Ascend NPU Kernel Generation via DSL-Guided Transcompilation
- MultiKernelBench: A Multi-Platform Benchmark for Kernel Generation
- KernelFoundry: Hardware-aware evolutionary GPU kernel optimization · Paper Radio
- Agentless: Demystifying LLM-based Software Engineering Agents
- SkillEvolver: Skill Learning as a Meta-Skill
- CudaForge: An Agent Framework with Hardware Feedback for CUDA Kernel Optimization
- Externalization in LLM Agents: A Unified Review of Memory, Skills, Protocols and Harness Engineering
- CUDABench: Benchmarking LLMs for Text-to-CUDA Generation
The paper
Don't Regenerate, Debug: A Domain-Specific Agent for Repairing Near-Miss Accelerator Kernels · Read on arXiv
City University of Hong Kong · Huawei Technologies Ltd.
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: Today's paper: "Don't Regenerate, Debug".
Jane: The gist The debug-over-regenerate paradigm for low-resource kernels demonstrates that a domain-specific agent can recover near-miss operators with significantly higher efficiency and capability than traditional regeneration methods.
Tom: First, who's behind it and why it matters.
Title and authors: Tom: So, we’re looking at the paper "Don't Regenerate, Debug: A Domain-Specific Agent for Repairing Near-Miss Accelerator Kernels." It sounds like they’re shifting the focus from just trying to generate a new kernel over and over again to actually fixing the ones that almost worked.
Jane: Right. Instead of constantly regenerating, which can be really token heavy and inefficient, this paper proposes using a domain-specific agent to debug those near-miss operators.
Lu: It’s about moving from regeneration to debugging because they argue that discarding failures into reusable knowledge is much more valuable than just generating another candidate >
Meng: So what does that actually mean for the people shipping these things? Are we talking about less time spent on failed generations or something more fundamental?
Tom: Well, the core idea is an engine orchestrating architecture. It separates generating the evidence from executing the fix using a deterministic state machine that loops through forensics, diagnosis-and-fix, and validation until it converges >
Jane: That sounds like they’ve built a system that doesn't just guess; it systematically investigates and repairs things when they get close to being right.
Lu: They are focusing specifically on hardware accelerators like GPUs and NPUs where these issues are particularly acute because of the low-resource constraints there >
Meng: Low-resource domains mean strict hardware constraints, limited tooling, and scarce data, which sounds like exactly the kind of place where these traditional methods struggle to find solutions >
The paper's summary: Tom: The paper summarizes their approach as a three-stage loop: forensics to compile and profile the kernel, diagnosis-and-fix using an LLM agent, and then validation to re-execute it to certify correctness >
Jane: So the LLM agent isn't just writing code; it’s acting like a diagnostician that gets evidence from compiling and profiling first, then attempts a fix, and finally runs it through validation to see if the repair actually works >
Lu: They introduce five mechanisms to handle the usual problems with autonomous debugging: knowledge base instrumentation for scarcity, anti-cheat detection for integrity, convergence guards for cost control >
Meng: I'm curious about those mechanisms. How do they prevent the agent from just making up plausible but incorrect fixes? What kind of knowledge base are we talking about?
Tom: They use a structured knowledge base with auto-ingestion to surface domain patterns, like "precision failed × reduction," which helps them mitigate that knowledge scarcity issue >
Jane: That means they’re not relying solely on the LLM's general training data; they are specifically feeding it facts about how things fail in their target hardware >
Lu: The paper shows that this debugging approach is significantly more efficient than traditional regeneration methods, achieving a Debug Pass@one of sixty-six point seven percent compared to Regenerate Avg Pass@one’s twenty-five point nine percent > <ref:2608.02712#pg2>
Meng: Sixty-six point seven percent versus twenty-five point nine? That’s a massive jump in success rate for the first pass, and that sounds like it saves a ton of resources >
Tom: And token efficiency is another huge deal here. Debug Pass@one uses 0 point 247M uncached tokens per operator, while Regenerate Avg Pass@one uses 0 point 435M, which is a reduction of about seventy-eight percent in those uncached tokens >
The paper's improvements: Jane: They really highlight the efficiency gains, pointing out that Debug Pass@one uses a lot less token budget than three-trial regeneration does to get the same result > <ref:2608.02712#pg1>
Tom: And they quantify how much better it is. Regenerate Pass@three takes forty point seven percent success rate, while Debug Pass@one hits sixty-six point seven percent, which means it’s recovering operators that the other methods simply miss >
Lu: They also recovered eleven operators that all three regeneration trials failed to produce, which extends the recoverable boundary beyond what state-of-the-art pipelines offer >
Meng: That idea of extending the recoverable boundary is interesting. It suggests this method can find solutions where brute force search just gives up early >
Tom: And they show that removing certain capabilities actually hurts performance. For example, removing the knowledge base lowers Pass@one from eighteen/twenty-seven to thirteen/twenty-seven and it costs five operators and raises all tokens per success by fifty-eight percent >
Jane: That tells us that the domain knowledge isn't just helpful; it’s fundamental to finding those successful repairs >
Lu: The integrity gates are also crucial for trustworthiness. Disabling anti-cheat leaves sixteen arm-local successes, but only fourteen reach Pass@one because two of them use wrapper-assisted computation > <ref:2608.02712#pg1>
Meng: So the system needs to be robust against cheating or making dishonest repairs, which is a big part of deployment concerns >
Tom: Exactly. And full-coverage evaluation is also important; disabling it leaves eighteen compact-set successes, but three fail on the extended suite and lack that full coverage evidence >
Conclusion: Jane: So to wrap up, the core of "Don't Regenerate, Debug: A Domain-Specific Agent for Repairing Near-Miss Accelerator Kernels" is using an orchestrated agent to systematically debug near-miss kernels instead of just regenerating them repeatedly >
Tom: The main result is that this debugging approach achieves a sixty-six point seven percent success rate on the first pass, which is significantly better than the twenty-five point nine percent seen with average regeneration > <ref:2608.02712#pg2>
Lu: The efficiency gains are also substantial; Debug Pass@one uses nearly half the uncached tokens of three-trial regeneration to reach that level of correctness > <ref:2608.02712#pg1>
Meng: What this means for us in production is that we might be able to deploy models that find solutions more reliably without needing massive amounts of compute just to try and guess the right code >
Tom: The paper stresses that the architecture rests on engine-owned validation, quality-gated knowledge accumulation, and deterministic bounds to keep things controlled >
Jane: It’s a solid argument for shifting from a brute force search model to one that understands failure modes within a specific domain >
Lu: I think the need for retrieved domain knowledge is the most critical finding here because removing it costs five operators and raises all tokens per success by fifty-eight percent >
Meng: It sounds like they’ve built something that respects the constraints of hardware execution better than what we typically build now, which is exactly what we need >
Tom: That's the gist of it. The paper "Don't Regenerate, Debug: A Domain-Specific Agent for Repairing Near-Miss Accelerator Kernels" shows a viable path for finding near-miss operators that brute force methods miss and doing so much more efficiently >
More episodes
- 2606.12674-EvoFlux: Inference-Time Evolution of Executable Tool Workflows for Compact Agents
- 2607.18921-Circuit Claims Depend on What Is Extracted and How It Is Compared
- 2606.14391-Learning to Hear Hesitation: Continual Learning for Disfluency-Aware ASR
- 2606.17090-ANEForge: Python for direct computation on the Apple Neural Engine
- 2607.21556-Visual Contrastive Self-Distillation
- 2606.19911-Multi-Agent Transactive Memory
- 2606.21550-AI Alignment From Social Choice Perspectives
- 2607.01071-MemSyco-Bench: Benchmarking Sycophancy in Agent Memory
- 2607.04603-LCPNet: Latent Consistent Proximal Unfolding Network for Infrared Small Target Detection
- 2603.14313-Mind the Shift: Decoding Monetary Policy Stance from FOMC Statements with Large Language Models