ResearchNov 24, 2026, 2:58 AM EST
PyTorch Benchmark Finds Errors When Comparing Similar Distributions
In an arXiv preprint, Zhen Yang and colleagues report that PyTorch calculations of Kullback–Leibler (KL) divergence can return inaccurate values and gradients when two probability distributions are close. The authors benchmarked 8.5 million inputs against certified references across 18 closed-form families and PyTorch’s general KL function on CPUs and GPUs. The authors’ revised calculations removed more than 97% of significant errors at the working precision. The preprint links to the benchmark code and data.
Sources
- PrimaryarXiv · Machine LearningSource date ·
Written by AIToolMaps from the source above and checked against it sentence by sentence.