---
title: "TensorLean: Formal Verification of... | SI Paper Desk"
url: https://thesimind.si/papers/2612.05654/
description: "TensorLean is a framework that formally checks real GPU kernels at the PTX level. It proved 1,180 kernel instances correct and found 66 unique previously..."
---

Number 12 of 12 · December 6, 2026

# TensorLean: Formal Verification of Production GPU Kernels

TensorLean is a framework that formally checks real GPU kernels at the PTX level. It proved 1,180 kernel instances correct and found 66 unique previously unknown bugs.

Wei Qiang, Ganxiang Yang, Yi Rong and 1 more · Submitted December 3, 2026 · arXiv 2612.05654v1 · cs.PL

[Read the paper on arXiv](https://arxiv.org/abs/2612.05654) · [The PDF](https://arxiv.org/pdf/2612.05654) · [The day's 12](https://thesimind.si/papers/day/2026-12-06/)

## What they found

The authors present TensorLean, which they call the first framework to formally verify production GPU kernels. It works on the kernel's compiled PTX (low-level GPU code). It checks the code against tensor-level specifications that can be shared across many kernels. It builds a symbolic graph of the order of events to cover all valid inputs, launch settings and concurrent schedules in one run. It then checks for data races and termination, proves functional correctness over real numbers with SMT solvers (automatic proof tools), and extends the guarantee to floating-point code through round-off bound inference. The team tested 2,078 kernel instances covering all 143 kernels in FlashAttention-2, -3, and -4, DeepSeek DeepGEMM, and LinkedIn Liger Kernel. It proves 1,180 instances correct. It found 66 unique, previously unknown correctness bugs in 888 of the remaining instances, and all were reported to developers.

## Why it matters

GPU kernels do the core computing for training and running SI models. The authors note that one bug can silently corrupt frontier models and ML frameworks. Testing only checks some inputs and schedules, while formal verification aims to cover all of them. Showing this on widely used kernel libraries suggests the approach can move beyond small examples. The abstract does not say how long checking takes or what the remaining instances needed.

## How it changes the race

If the results hold, teams building frontier SI could catch silent kernel bugs before they harm training or inference runs. It could also make it safer to adopt new, heavily tuned kernels. This is a reliability gain, not a gain in model capability.

## Safety and control

The paper bears on the reliability and security of the software that SI systems run on. Hidden kernel bugs can silently corrupt models, so proving them correct supports trust in the infrastructure. It does not address model behavior or alignment.

### The abstract, by the authors

GPU kernels are the computational core of modern AI, yet a single correctness bug can silently corrupt frontier models and ML frameworks, putting training and inference at risk. Formal verification promises correctness across all inputs, launch configurations, and schedules, but it has never reached production GPU kernels. We present TensorLean, the first framework to formally verify production GPU kernels. To reduce manual effort, TensorLean verifies the kernel's compiled PTX against tensor-level specifications that can be shared across kernels and their thousands of instances. Given the kernel's PTX, TensorLean builds a symbolic happens-before graph over formalized PTX semantics to capture all valid inputs, launch configurations, and concurrent schedules in a single run. On this graph, it first verifies data-race freedom and termination, thereby reducing concurrent executions to finite, sequential ones. It then uses a push/pull model to compute PTX memory updates and proves their functional correctness against the specification over reals with SMT solvers. Finally, TensorLean extends the correctness guarantee to the kernel's actual floating-point PTX via inductive round-off bound inference. For scalability, TensorLean further automatically infers tile-loop invariants and decomposes proof goals via user-provided assertion hints. We mechanize the PTX semantics and soundness proofs in Lean 4 and evaluate TensorLean on 2,078 kernel instances covering all 143 kernels in FlashAttention-2, -3, and -4, DeepSeek DeepGEMM, and LinkedIn Liger Kernel. It proves 1,180 instances correct and uncovers 66 unique, previously unknown correctness bugs in 888 of the remaining instances, all reported to developers.

Quoted from arXiv:2612.05654. The research and its words belong to its authors.

Desk score **58** out of 100

Why it was picked

- Compute (in the title)
- Evals
- Studies frontier models (DeepSeek)
- Cross-listed in 3 fields

Topics

- [Security](https://thesimind.si/papers/?tag=security)
- [Code](https://thesimind.si/papers/?tag=code)
- [Compute](https://thesimind.si/papers/?tag=compute)
- [Efficiency](https://thesimind.si/papers/?tag=efficiency)
- [Theory](https://thesimind.si/papers/?tag=theory)
- [Training](https://thesimind.si/papers/?tag=training)

**arXiv ID:** 2612.05654v1
**Submitted:** December 3, 2026
**Fields:** cs.PL (Programming Languages), cs.DC (Distributed Computing), cs.LG (Machine Learning)
**Level:** Advanced
**Comments:** Wei Qiang and Ganxiang Yang contributed equally

Fingerprint, SHA-256

`26ac218c332e8a617004927996ba7fc8a26b7d8d9bc4a4775f49c62e01cf87ca`

On Solana: [Proof of Mind seal, WwUoHb...u9aj](https://solscan.io/tx/WwUoHbDQtfRDsh61SwW44YaymcP6BnEFPUGg743sdax5eZKAXM2stuwpwtNFgAX3UsfsTCXFozhXcXKBZX7u9aj)

### The exact text fingerprinted

{"arxiv":"2612.05654","version":1,"title":"TensorLean: Formal Verification of Production GPU Kernels","authors":["Wei Qiang","Ganxiang Yang","Yi Rong","Ronghui Gu"],"day":"2026-12-06","rank":12,"score":58,"status":"written","summary":{"takeaway":"TensorLean is a framework that formally checks real GPU kernels at the PTX level. It proved 1,180 kernel instances correct and found 66 unique previously unknown bugs.","found":"The authors present TensorLean, which they call the first framework to formally verify production GPU kernels. It works on the kernel's compiled PTX (low-level GPU code). It checks the code against tensor-level specifications that can be shared across many kernels. It builds a symbolic graph of the order of events to cover all valid inputs, launch settings and concurrent schedules in one run. It then checks for data races and termination, proves functional correctness over real numbers with SMT solvers (automatic proof tools), and extends the guarantee to floating-point code through round-off bound inference. The team tested 2,078 kernel instances covering all 143 kernels in FlashAttention-2, -3, and -4, DeepSeek DeepGEMM, and LinkedIn Liger Kernel. It proves 1,180 instances correct. It found 66 unique, previously unknown correctness bugs in 888 of the remaining instances, and all were reported to developers.","matters":"GPU kernels do the core computing for training and running SI models. The authors note that one bug can silently corrupt frontier models and ML frameworks. Testing only checks some inputs and schedules, while formal verification aims to cover all of them. Showing this on widely used kernel libraries suggests the approach can move beyond small examples. The abstract does not say how long checking takes or what the remaining instances needed.","race":"If the results hold, teams building frontier SI could catch silent kernel bugs before they harm training or inference runs. It could also make it safer to adopt new, heavily tuned kernels. This is a reliability gain, not a gain in model capability.","safety":"The paper bears on the reliability and security of the software that SI systems run on. Hidden kernel bugs can silently corrupt models, so proving them correct supports trust in the infrastructure. It does not address model behavior or alignment.","level":"advanced","tags":["security","code","compute","efficiency","theory","training"]}}

[Check it on Verify a thought](https://thesimind.si/proof-of-mind/)

## The authors

Wei Qiang, Ganxiang Yang, Yi Rong, Ronghui Gu

Credit for this research belongs to its authors. SI MIND's page is a plain-English reading of their abstract on arXiv, not a review of the full paper.

Related on the desk

## More papers on these topics

[Dec 5, 2026 · Number 5Cancellation Is Not Reclamation: Cleanup Ownership and Resource Accounting in Software-Agent EvaluationWhen a software-agent test run is cancelled at the wrong moment, its container can keep running unseen, so evaluations need clear records of who cleans up and what resources they use.EvalsAgentsCode](https://thesimind.si/papers/2612.04803/) · [Dec 5, 2026 · Number 12A Survey of Large Language Model Quantization: Representation, Optimization, System, Evaluation, Application and FrontierThis survey organizes SI model quantization, which means storing models at lower numerical precision, into three views: representation, optimization and system. It aims to help compare design choices.EfficiencyLanguage modelsCompute](https://thesimind.si/papers/2612.04985/) · [Dec 4, 2026 · Number 12Recurloop Transformer: Superposition Across Depth and TokensThe Recurloop Transformer reuses the same weights across depth and across tokens, and the authors report better results than standard and looped models at the same tokens and compute, from 113M to 1.3B parameters.EfficiencyLanguage modelsScaling](https://thesimind.si/papers/2612.03907/)

[Number 11](https://thesimind.si/papers/2612.05580/) · [All 12 for Dec 6, 2026](https://thesimind.si/papers/day/2026-12-06/)
