Verigrad: Verification-Driven Multi-Agent GPU Kernel Generation for High-Order MLIP Derivatives
Yao Liu ⋅ Yuanchang Zhou ⋅ Hongtao Xu ⋅ Mingzhen Li
Abstract
Generating GPU kernels for derivatives requires preserving dependencies across forward, backward, and higher-order automatic differentiation phases. Local tensor checks can miss errors in the assembled scientific outputs. We present \textsc{Verigrad}, a verification-driven multi-agent system for first- and second-order derivative workloads in machine learning interatomic potentials (MLIPs). A \texttt{DerivativeTask} specifies requested quantities, tensor bindings, and checks; a derivative-aware intermediate representation exposes saved tensors and reconstruction rules to synthesis agents. An execution-based verifier accepts the composed derivative artifact, and a hardware-refinement agent retains lower-latency candidates only when they pass the same task checks. On KernelBench L3 double-backward targets, generation success is $78\%$ for KernelAgent and $88\%$ for \textsc{Verigrad}. With semantic lifting, reported time and token use per successful MatRIS operator are $33\%$ and $34\%$ lower, respectively. Integrated MatRIS inference and training on RTX 3090 achieve $1.33$--$1.55\times$ speedup over eager PyTorch across twelve workloads.
Successful Page Load