On 1 November 2026, Zixi Zhang and coauthors submitted LARK, a framework that uses large language model (LLM) agents and Lean 4 to formally verify GPU kernels against PyTorch reference implementations. The authors claim equivalence in functional and memory behavior under exact arithmetic, placing an explicit boundary around the correctness claim.[1]

According to the abstract, LARK formalizes a GPU machine model and operation semantics in Lean 4 once per target language, then derives incoming kernels’ semantics from those definitions. An agent divides a kernel into smaller segments, with Lean checking that segmentation. Agents then write mathematical proofs that each segment matches its PyTorch counterpart; the authors say these steps establish whole-program equivalence. Human review remains necessary for the operator-level Lean semantics before kernel generation.[1]

The authors report that, on KernelCraft tasks with a simple ReAct agent, LARK enabled GLM 5.3 to fully verify 10 of 12 Level-1 kernels and Opus 5.5 all five Level-2 kernels. They also report verifying nine of ten randomly sampled production kernels from popular open-source LLM serving frameworks and finding a new data race in the tenth. These are paper claims, not results independently reproduced for this article.[1]

[1]: LARK: Lean-Assisted Reasoning for LLM-Generated GPU Kernels. arXiv, submitted 1 November 2026. https://arxiv.org/abs/2611.02028

Lead photo: Zixi Zhang, Jiayi Nie, Haoran Wu, Yujie Yan, Yann Herklotz, Rika Antonova, Robert Mullins, Yiren Zhao, George A. Constantinides, Jianyi Cheng · CC BY 4.0.

Sources

  1. LARK: Lean-Assisted Reasoning for LLM-Generated GPU KernelsarXiv · 1 Nov 2026

Check or correct this page

Verification record

The digest below shows whether the text you are reading matches the published source. It does not show that the reporting is correct. The build computes it from this page's Markdown source and lists it in the site manifest.

7c17eb80fa2f950f5178d25ea4f6b4e3385adf5a39392ecc245b9c1bca074f0f