Fuzzy PyTorch: Rapid Numerical Variability Evaluation for Deep Learning Models

2026-05-25Machine Learning

Machine Learning
AI summary

The authors created Fuzzy PyTorch, a tool that helps check how tiny number errors in computer math affect deep learning models. It works smoothly with PyTorch, a popular AI software, and uses smart rounding methods to mimic real-world number changes. Their tests show it runs much faster than similar tools and works well for both small and very large models. This helps researchers better understand and manage how rounding errors might impact AI results without slowing things down.

deep learningfloating-point arithmeticstochastic roundingnumerical variabilityPyTorchVerificarloProbabilistic Roundingmodel scalabilitynumerical analysisstochastic arithmetic
Authors
Inés Gonzalez-Pepe, Hiba Akhaddar, Tristan Glatard, Yohan Chatelain
Abstract
We introduce Fuzzy PyTorch, a framework for rapid evaluation of numerical variability in deep learning (DL) models. As DL is increasingly applied to diverse tasks, understanding variability from floating-point arithmetic is essential to ensure robust and reliable performance. Tools assessing such variability must be scalable, efficient, and integrate seamlessly with existing frameworks while minimizing code modifications. Fuzzy PyTorch enables this by integrating stochastic arithmetic into PyTorch through Probabilistic Rounding with Instruction Set Management, a novel library interfacing with Verificarlo, a numerical analysis compiler. The library offers stochastic rounding mode and a novel mode; up-down rounding. Comparative evaluations show Fuzzy PyTorch maintains model performance and achieves runtime reductions of 5x to 60x versus Verrou, a state-of-the-art tool. We further demonstrate scalability by running models from 1 to 341 million parameters, confirming applicability across small and large DL architectures. Overall, Fuzzy PyTorch provides an efficient, scalable, and practical solution for assessing numerical variability in deep learning, enabling researchers and practitioners to quantify and manage floating-point uncertainty without compromising performance or computational efficiency.