# CertiK and Columbia Report 25 Bugs in DeepSeek and FlashAttention Code

> The researchers used mathematical proofs to check more than 100 GPU programs, aiming to catch errors before they waste expensive AI computing time.

By Eric Spivak · November 20, 2026

Canonical: https://blockster.com/certik-columbia-tensorlean-deepseek-flashattention-ai-kernels

A small software error can spoil an expensive AI training run without stopping it. Researchers at [CertiK](https://www.certik.com/) and Columbia University say they have found **25 bugs** in code used by DeepSeek and FlashAttention while developing a way to check it with mathematical proofs.

Their system, **TensorLean**, has been applied to more than 100 production GPU kernels—the small programs that carry out AI calculations on graphics processors. The team reported two bugs in DeepSeek kernels and 23 in FlashAttention in a November 20 announcement supplied to Blockster.

The researchers describe the work as the first formal verification of production AI kernels. The aim is to help developers make AI faster without introducing errors into the calculations underneath it.

## Fast code can hide costly mistakes

AI developers squeeze more work out of GPUs by overlapping data transfers and calculations, dividing tasks across many operations and using lower-precision numbers. Those changes can save time and money. They also make the code harder to check.

A program might work for common inputs but fail at an unusual size, or produce a numerical error larger than the application allows. If that happens deep inside a training run, the system can keep running while carrying the mistake forward.

Testing checks particular examples. Formal verification uses mathematical proofs to establish that code meets defined requirements across the cases covered by the proof.

## Checking the code after optimization

TensorLean examines compiled **PTX code**, a low-level instruction format used in NVIDIA’s GPU software, and creates machine-checkable proofs in Lean. [NVIDIA’s PTX documentation](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html) explains where it sits between higher-level software and the target GPU.

The team says its proofs account for the optimizations used in real production code, including overlapping operations and lower-precision arithmetic. Developers can then change the code, measure the speed improvement and rerun verification to check that the calculations still meet the requirements.

This is a check on specific computations under defined conditions. It does not prove that an entire AI model is bug-free or that its answers are factually correct.

> “For large-model developers, every performance improvement should be backed by reliable evidence of correctness.”
>
> — Ronghui Gu, CertiK co-founder and Columbia University computer science professor, in the TensorLean announcement

The financial stakes can be large. The researchers illustrate them with a hypothetical $100 million training run: repeating just 1% of its computation would cost another $1 million. That is an example of potential waste, not a measured saving from TensorLean.

## A growing effort to prove software works

In October, [Anthropic and Theorem used Claude to construct proofs for 123 open-source libraries](https://www.anthropic.com/research/formal-verification/). That project used AI to help verify software. TensorLean focuses on verifying the calculations that AI itself runs on.

[Post from @AnthropicAI on X](https://twitter.com/AnthropicAI/status/2113390212911083894)

Both projects reflect a practical need: as software becomes more complex, developers need better ways to check changes before they reach customers. It is another part of the efficiency race covered in Blockster’s reporting on [AI-assisted chip design at AMD](https://blockster.com/openai-amd-ai-chip-design-14-percent).

The TensorLean release does not include a full bug list, reproducible proof package or verification-time benchmark. Those details will help developers judge how much code the system covers and how easily it can fit into their daily work.
