TensorLean proposes formal verification of GPU kernels performing core computations in modern AI systems. Submitted to arXiv on December 3, the paper checks compiled PTX against specifications of intended tensor operations. Its aim is to establish correctness for stated admissible inputs and executions rather than relying solely on a collection of example tests.

The authors report evaluating 2,078 concrete instances covering 143 kernels from FlashAttention, DeepGEMM and Liger Kernel. They report proving 1,180 instances correct and identifying 66 distinct previously unknown bugs in 888 other instances. These are the authors' results: SIExpo has not rerun the verification and does not describe every remaining case as demonstrably faulty.

What does proved mean?

The official repository publishes Lean 4 PTX semantics, specifications and exported proofs. The stated guarantee is relative to a specification, not every possible human intention. If the specified mathematical operation or assumptions are inappropriate for an application, a proof will not independently discover what the end user intended.

This differs from an ordinary test. A test executes selected cases and compares results. Formal verification seeks to cover a class of permitted cases through a mathematical model. Its value depends on that model's accuracy and the boundary within which it represents the actual system.

The paper considers data-race freedom, termination and computational correctness, including bounds on floating-point error. Those are different properties. A kernel may finish without hanging yet return an incorrect value; it may also produce a mathematically close result outside the task's permitted numerical tolerance.

Explicit limitations

The work targets deterministic single-GPU kernels. The paper excludes multi-GPU communication kernels and randomized operations. It also has restrictions concerning certain data-dependent control flow and barriers. Conservative bounds or an unsuccessful automatic proof step can prevent verification without independently demonstrating an actual bug.

The authors describe trusted assumptions too: the specification, compiler and hardware implementation of PTX, and satisfaction of preconditions by the calling code. A proof about one kernel consequently does not prove the correctness of an entire application, model or training environment.

Our analysis: a contribution to reliable AI infrastructure

An optimized kernel can be a small component with substantial influence. The same operation may be repeated many times, with its outputs feeding subsequent computations. This makes checking core operations valuable, while requiring a clear connection between the verified variant and the one actually deployed.

A useful process would retain the precise commit, compilation conditions, specification and proven properties. After a code or configuration change, establish whether the old proof still applies to the new artifact. A library name alone does not provide that connection.

Reported correctness bugs should also remain distinct from vulnerabilities with demonstrated exploitation. The authors say the findings were reported to developers. That does not automatically mean every bug has a CVE, is fixed in every release or constitutes a practical attack against every user. Individual status needs separate verification.

TensorLean is a substantial research direction for more dependable computational components. It supplements tests with a stronger argument under particular assumptions rather than eliminating whole-system validation. The practical next step is traceability between specification, proof, version and the code actually executed.