The KL Divergence Is Never Negative, Except in PyTorch
Comments on “The KL Divergence Is Never Negative, Except in PyTorch”
Claim-checked. Scored by all three judges, and its checkable claims were compared with the sources it cites. How far stories are checked
Researchers at Oxford, Cambridge and other universities report that PyTorch's two KL divergence functions lose accuracy when distributions are close, because the formulas subtract nearly equal terms. On 8.5 million certified inputs, over 85% of FP32 values near KL 1e-7 had at least 1% error, and about 30% turned negative at smaller values. Higher precision alone left 7–51% wrong. Rewritten formulas removed over 97% of significant errors, and the errors distorted distillation and GPT-2 circuit scores. The figures come from the authors' own evaluation.
Why it ranked
No. 4 of 128 with a score of 0.76. The panel rated it highest on technical depth (0.96) and substantiated (0.92), lowest on audience breadth (0.65).
- AI judgeJudge 2claude-haiku-5-5
- Rigorous, well-evidenced study of systematic numerical errors in PyTorch KL divergence affecting ML training and evaluation; highly relevant to builders, with reproducible repairs, though niche in scope and long-form academic.
- AI judgeJudge 3gpt-5.6-luna
- A deeply technical, methodologically detailed study identifies widespread PyTorch KL inaccuracies, provides certified measurements and repairs, and demonstrates downstream effects in training, Bayesian decisions, quantization, and circuit analysis.
Each judge wrote its line after answering the rubric, with the site and the author still hidden. Every answer behind this is in the table under Score.
Score
0.76total under rubric v2.3
- Significance0.71
- Reader interest0.83
- Audience breadth0.65
- Practical relevance0.84
- Substantiated0.92
- Technical depth0.96
- New information0.90
- Counts against: Promotional0.03
- Counts against: Overclaim0.24
Each judge’s answer per question (0–1), their mean and spread, and what the question adds to the score (weight × mean).
| Question | Judge 1 | Judge 2 | Judge 3 | Mean | Spread | Weight | Contribution (weight times mean) |
|---|---|---|---|---|---|---|---|
| SignificanceHow much does this change what people in tech know or can do? | 0.75 | 0.55 | 0.82 | 0.71 | 0.27 | +0.24 | +0.170 |
| Reader interestWould a well-informed senior engineer or tech founder want to read this today, and likely pass it on? | 0.75 | 0.80 | 0.94 | 0.83 | 0.19 | +0.26 | +0.216 |
| Audience breadthHow many people who build technology does it concern? | 0.67 | 0.60 | 0.68 | 0.65 | 0.08 | +0.13 | +0.085 |
| Practical relevanceHow useful is it to someone who builds software or tech products? | 0.87 | 0.80 | 0.86 | 0.84 | 0.07 | +0.22 | +0.186 |
| SubstantiatedHow well is it backed? Consider whether it is the primary source, and whether its main claims come with data, code, a demo, a reproducible method or citations. | 1.00 | 0.85 | 0.92 | 0.92 | 0.15 | +0.05 | +0.046 |
| Technical depthHow technically substantive is it? | 0.99 | 0.90 | 0.99 | 0.96 | 0.10 | +0.05 | +0.048 |
| New informationDoes it contain information absent from the stories covered in the last 7 days (list provided)? | 0.85 | 0.90 | 0.96 | 0.90 | 0.11 | +0.05 | +0.045 |
| PromotionalIs it mainly marketing with little substance (a press release, ad or sponsored post with no real information)? A launch post that carries real news is not promotional. | 0.04 | 0.03 | 0.02 | 0.03 | 0.02 | −0.19 | −0.006 |
| OverclaimDo the headline or conclusions claim more than the body supports? | 0.43 | 0.20 | 0.08 | 0.24 | 0.35 | −0.11 | −0.026 |
| Sum of contributions | +0.764 | ||||||
| Claim-check penalty | 0.000 | ||||||
| Total, as published | 0.764 | ||||||
Spread is the highest minus the lowest judge answer. marks a spread above 0.40: the judges disagree, and the story is marked contested.
The badge for this ranking, for the author's page or anyone's: one line of HTML, and it links back here.
<a href="https://rubric.hrih.si/editions/2026-11-25/4/"><img src="https://rubric.hrih.si/badge/2026-11-25/4.svg" alt="Ranked #4 on Rubric, 25 Nov 2026" width="238" height="28"></a>Claim check
Claim check: 8 no source given. Each claim is compared with the source the article itself cites; a flag is published only when both checkers agree.
No source givenNumber
Among scalar families in ordinary parameter ranges, over 85% of FP32 KL values have at least 1% relative error near KL 1e-7, and about 30% become negative at smaller divergences.
The article gives no link or citation for it.
The article says “over 85% of FP32 values have at least 1% relative error near KL $10^{-7}$ (FP16: $10^{-3}$ ), and about 30% become negative at smaller divergences”
The source says No source to compare with.
No source givenNumber
Evaluating the same formulas one precision higher still leaves 7–51% of FP32 values significantly wrong for 22 of 23 configurations.
The article gives no link or citation for it.
The article says “evaluated one precision higher, the same formulas still leave 7–51% of FP32 values significantly wrong for 22 of 23 configurations”
The source says No source to compare with.
No source givenNumber
The stable closed-form decompositions, compensated arithmetic and analytic gradients remove over 97% of significant errors in the working format.
The article gives no link or citation for it.
The article says “Stable closed-form decompositions, compensated arithmetic, and analytic gradients remove over 97% of significant errors in the working format”
The source says No source to compare with.
No source givenNumber
Strict repairs eliminate significant errors on 7.2 million scored closed-form samples and correctly round all 567 million scored F.kl_div components.
The article gives no link or citation for it.
The article says “Strict repairs eliminate significant errors on 7.2 million scored closed-form samples and correctly round all 567 million scored F.kl_div components”
The source says No source to compare with.
No source givenGeneralization
Since 2019, PyTorch users have repeatedly reported negative values from both KL functions, and the standard answer has been to clamp the result at zero.
The article gives no link or citation for it.
The article says “Since 2019, users of PyTorch (Paszke et al., 2019) have repeatedly reported negative values from both of its KL functions, and the answer has been the same each time”
The source says No source to compare with.
No source givenNumber
In identical-start distillation, official losses make the student move in all 2,160 runs, with top-1 disagreement reaching 97.4% in FP16 at the largest vocabulary, while the repaired logits path moves in none of 720 runs.
The article gives no link or citation for it.
The article says “With the official losses the student moves in all 2,160 runs. With ours it does not move in any of the 720 runs”
The source says No source to compare with.
No source givenNumber
In FP32 GPT-2 circuit discovery, the library's edge score is wrong for 19%, 46% and 59% of edges in the three GPT-2 settings, while the logits path is wrong for none.
The article gives no link or citation for it.
The article says “the library’s score is wrong for 19%, 46% and 59% of the edges in the three GPT-2 settings”
The source says No source to compare with.
No source givenNumber
For near-lossless 8-bit quantized models, official F.kl_div misreports mean KL by -19.0% and -4.4%, with 30.2% and 12.3% of tokens negative.
The article gives no link or citation for it.
The article says “the official F.kl_div misreports the mean KL by $-19.0\%$ and $-4.4\%$ , with 30.2% and 12.3% of the tokens negative”
The source says No source to compare with.
Also covered by
No other coverage was clustered with this story.
Elsewhere
Elsewhere: HN 91 pts, front page
Recorded for context only, checked 25 Nov 2026, 05:47 UTC. It played no part in the ranking.