ML in Production · 4 min read

CertiK and Columbia Find 38 Bugs in AI GPU Kernels via Lean Proofs

CertiK and Columbia's TensorLean formally verified 149 compiled GPU kernel instances, proved 83 correct, and found 38 computational bugs, including 23 in FlashAttention and two in DeepSeek's DeepGEMM.

By Tom Whitfield806 words

Key takeaways

  1. TensorLean found 38 computational bugs across six AI libraries and proved 83 of 149 compiled GPU kernel instances correct.
  2. FlashAttention carried 23 of the bugs; DeepSeek's DeepGEMM carried two.
  3. CertiK's hypothetical: repeating 1% of a USD 100 million training workload costs USD 1 million.
  4. Proofs are written in Lean and check machine-verifiable PTX code, covering lower-precision arithmetic and overlapped execution.
  5. CertiK reports more than 5,500 clients across over 150 countries and regions.
CertiK and Columbia Find 38 Bugs in AI GPU Kernels via Lean Proofs
AI-generated

Formal verification has found 38 computational bugs across six AI software libraries, in what researchers call the world's first formal verification of production AI kernels. The work comes from CertiK and Columbia University, and the tool behind it, TensorLean, proved that 83 of 149 compiled GPU kernel instances (graphics processing unit kernels, the low-level programs that run model math) satisfy their specified requirements.

The defect count concentrates in two libraries. FlashAttention, the attention-optimization library used widely in transformer training, accounts for 23 of the 38 bugs. DeepSeek's DeepGEMM library, the matrix-multiplication code behind its training stack, contributes another two. The remainder sit across the other four libraries examined.

Why does this matter to a data team?

These are not crashes. The bugs affect AI training and inference without producing obvious signs of software failure. Conventional tests — unit tests, integration tests, fuzzing — compare outputs against expectations, but they sample behavior rather than prove it.

TensorLean works at the PTX level, the assembly-like intermediate code that compilers emit for NVIDIA GPUs before hardware execution. The framework checks whether the generated instructions satisfy predefined mathematical specifications, while accounting for numerical tolerances and the optimizations developers layer into performance-critical code: lower-precision arithmetic, and the simultaneous execution of data transfers alongside computation (instruction-level overlap that leaves little room for naive verification).

The proofs themselves live in Lean, a theorem prover whose machine-checkable proofs (formal arguments a program verifies independently, with no human reviewer required) cannot be silently wrong once the checker accepts them. A practical property follows: because developers can reuse mathematical specifications across kernel versions that perform the same calculation, teams can re-verify computational accuracy each time they ship a performance improvement, rather than treat verification as a one-off audit.

Ronghui Gu, CertiK co-founder and Columbia computer science professor, framed the limits of bug-finding itself. Identifying software defects represents only part of the verification process, he said: developers must also demonstrate that repaired programs satisfy their intended requirements under defined conditions. The 38 findings are a snapshot, not a clean bill of health.

What are the financial stakes?

CertiK offered a concrete hypothetical: an AI model with a USD 100 million training budget that must repeat just 1% of its computational workload because of an error incurs USD 1 million in additional expense. The company was explicit that this figure illustrates potential costs, not an actual loss.

Two incidents frame the risk, though neither involved TensorLean's findings. An August 2025 Claude outage followed changes intended to accelerate processing on TPUs (tensor processing units, Google's AI accelerator chips); the defect produced unexpected behavior, including Thai characters appearing in responses to English-language questions. Separately, Google DeepMind researchers reported in October 2026 a numerical calculation defect in a basic operation that supports AI model training.

The exposure grows as AI systems take on sensitive workloads. Autonomous blockchain-based AI agents can manage digital assets, and decentralized physical infrastructure networks (DePIN, distributed computing-resource marketplaces) depend on correct underlying calculations; errors there translate into direct financial and operational risk.

What should data teams actually do?

  • Treat GPU kernel updates as verification targets, not just performance wins. Speedups from lower-precision arithmetic and overlapped transfers can mask calculation errors.
  • Distinguish proved correctness from tested correctness. The 83 verified kernels carry mathematical guarantees; the rest of the ecosystem does not.
  • Watch for specification reuse. If kernel libraries publish machine-checkable specifications, re-running verification per release becomes cheap.
  • Budget for silent-error costs. The USD 1 million per repeated 1% of a USD 100 million run is a planning number, but it prices a failure mode that monitoring will not catch.

Where did this capability come from?

CertiK is not new to formal methods. Before TensorLean, the company applied the same techniques to TON's Masterchain contracts and to components of HyperEnclave, a trusted execution environment (isolated hardware-software compartment for sensitive computation) developed by Ant Group. The AI extension moves those methods from blockchain infrastructure to the GPU computations underneath modern models, and the researchers suggest it could shift practice toward continuous verification inside the development cycle rather than dependence on periodic security audits.

The commercial context: CertiK provides blockchain infrastructure assessments, smart contract audits, penetration testing, custody architecture reviews, system performance evaluations, and regulatory compliance support. The company reports more than 5,500 clients across over 150 countries and regions, and it has contributed to digital asset regulatory frameworks in multiple jurisdictions.

The bottom line for practitioners: 38 defects in six libraries, proved to exist, in code that passed conventional testing. The 83 verified instances show the method scales to production kernels. What remains unsaid is how quickly library maintainers patch the findings, and whether the unverified remainder — 66 of 149 instances — holds more of the same.

Analytics Insight (Source)

Price tags

Share this article:

More from Tom Whitfield

Tom Whitfield

Show full bio

Staff writer covering regulation, policy and their impact on Analytics Digest is a professional daily at Analytics Digest.

66 articles

Read also

« Previous articleNext article »