# A rounding error in a popular AI tool quietly hurt training

**TL;DR:** On one AI model, the speed tool FlashAttention-3 quietly spoiled training, while the team's fix, GProj, matched the final quality of slower, more precise math. GProj adds 4.7% to training time, a cheap guard against a silent failure, though the team tested only one model size.

## Words to know

- **BF16**: A short number format that keeps fewer digits, so computers do math faster but round more.
- **attention**: The step where an AI model weighs earlier words to decide how to handle the current one.
- **gradient**: The signal that tells an AI model how to change its internal settings as it learns.
- **keys**: Stored summaries of earlier words that attention compares against when handling each new word.
- **full precision**: Doing math with longer numbers that keep more digits, which is slower but more exact.

## The problem
AI labs speed up training with short numbers, a format called BF16. FlashAttention-3 is a trusted tool that runs attention, the step where a model weighs earlier words, in BF16. The gradient is the signal that tells a model how to change. In the team's run, its size grew a thousandfold halfway through training, with no crash. A known fix stopped that growth, yet part of the gradient stayed wrong by more than its own size.

## The idea
For each word, the gradient's correction numbers inside attention add up to zero. That zero hides where the keys, summaries of earlier words, sit as a group. Picture finding how far apart hikers stand, using their altitudes. Correction numbers summing to zero cancel the mountain's height. Rounded ones leave a leftover multiplied by the whole mountain. Late in training, the keys sit very high. GProj makes the rounded correction numbers add up to zero again. The team tested it against FlashAttention-3, the known fix, and full precision, slower math with more digits. By the authors' math, this stops a leak that grows as the keys sit higher.

## What they showed
- **Query and key gradients as accurate as full precision.** On snapshots from the failing run, GProj cut the median error in the most affected gradient to 0.34% of its true size. With only the known fix, that error was 219%. Full precision scored about the same as GProj.
- **Same final quality.** In matched runs from scratch that changed only attention, GProj ended with the same prediction error as full precision. FlashAttention-3 ended 0.2 units worse on the authors' error scale, where lower is better.
- **Small cost.** GProj added 4.7% to the time of each full training step. The faster of the team's full-precision versions added 33.4%.

## Why it matters
Teams training AI models with fast BF16 attention tools have reason to care. GProj keeps the short numbers and adds little time, though no public code is listed. If it holds at larger sizes, those teams could avoid a hidden failure without full precision. A wrong gradient gives no warning. A worse model can then easily get blamed on settings or data.

## The catch
The known fix alone also trained stably and ended only slightly worse than full precision. GProj's main gain over it is accurate gradients, which kept some layers from drifting to extreme values. The tested model also had a common safeguard against runaway attention scores turned off. In a smaller standard model, the error stayed small. All tests used one model size and one chip type, with timing on one text length.

## Who wrote it
Junlin Chen, of Rutgers University and Carnegie Mellon University, is the first of 12 authors. The team comes from Rutgers University, Carnegie Mellon University, MBZUAI and two others. Team member Hongyi Wang co-authored "LLM360: Towards Fully Transparent Open-Source LLMs" (2023).

## Links
- [Paper page](https://arxiv.org/abs/2609.34272v1)
- [PDF](https://arxiv.org/pdf/2609.34272v1)

---

Checked Paper · 2026-09-30 · No. 009 · https://one-paper-a-day.pages.dev/2026-09-30-a-rounding-slip-in-fast-attention/

How it was checked: Before the post went out, an AI fact-check, separate from the writing step, read the paper and checked the post claim by claim. A very long paper is cut to fit a length limit, the appendix first. Code then confirmed that every quote the check gave appears in the paper, or in the details the check was given about it: its arXiv listing, any code or model links, and the authors' earlier papers from Semantic Scholar. Of 45 claims checked, 43 are supported and 2 are right in substance but loose on a detail. The evidence, claim by claim: https://one-paper-a-day.pages.dev/evidence/2026-09-30.json
