# Statistical Quality and Reproducibility of Pseudorandom Number Generators in Machine Learning technologies

arXiv: https://arxiv.org/abs/2507.03007 · HTML: https://mlsanity.com/paper/2507.03007/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 14 of its 31 references that are in the map.
- First posted on arXiv 2 Jul 2025.

## Builds on (most cited first, 14 of 14)

- [Exploration in Deep Reinforcement Learning: A Survey](https://mlsanity.com/paper/2205.00824/) (2022)
- [Depth Uncertainty in Neural Networks](https://mlsanity.com/paper/2006.08437/) (2020)
- [Sources of Irreproducibility in Machine Learning: A Review](https://mlsanity.com/paper/2204.07610/) (2022)
- [From Local Pseudorandom Generators to Hardness of Learning](https://mlsanity.com/paper/2101.08303/) (2021)
- [Bayesian Learning for Neural Networks: an algorithmic survey](https://mlsanity.com/paper/2211.11865/) (2022)
- [Bootstrapping the Out-of-sample Predictions for Efficient and Accurate Cross-Validation](https://mlsanity.com/paper/1708.07180/) (2017)
- [Scrambled Linear Pseudorandom Number Generators](https://mlsanity.com/paper/1805.01407/) (2018)
- [Generalizability of Machine Learning Models: Quantitative Evaluation of Three Methodological Pitfalls](https://mlsanity.com/paper/2202.01337/) (2022)
- [Transformer-based Generative Adversarial Networks in Computer Vision: A Comprehensive Survey](https://mlsanity.com/paper/2302.08641/) (2023)
- [Reproducibility, Replicability, and Repeatability: A survey of reproducible research with a focus on high performance computing](https://mlsanity.com/paper/2402.07530/) (2024)
- [Noise Optimization for Artificial Neural Networks](https://mlsanity.com/paper/2102.04450/) (2021)
- [Machine Learning needs Better Randomness Standards: Randomised Smoothing and PRNG-based attacks](https://mlsanity.com/paper/2306.14043/) (2023)
- [Analyzing drop coalescence in microfluidic device with a deep learning generative model](https://mlsanity.com/paper/2305.00261/) (2023)
- [Identifying Quality Mersenne Twister Streams For Parallel Stochastic Simulations](https://mlsanity.com/paper/2401.17115/) (2024)

## Built on by (most cited first, 1 of 1)

- [Reproducible AI Requires Reproducible Randomness](https://mlsanity.com/paper/2609.26461/) (2026)

## Abstract (arXiv)

Machine learning (ML) frameworks rely heavily on pseudorandom number generators (PRNGs) for tasks such as data shuffling, weight initialization, dropout, and optimization. Yet, the statistical quality and reproducibility of these generators-particularly when integrated into frameworks like PyTorch, TensorFlow, and NumPy-are underexplored. In this paper, we compare the statistical quality of PRNGs used in ML frameworks (Mersenne Twister, PCG, and Philox) against their original C implementations. Using the rigorous TestU01 BigCrush test suite, we evaluate 896 independent random streams for each generator. Our findings challenge claims of statistical robustness, revealing that even generators labeled ''crush-resistant'' (e.g., PCG, Philox) may fail certain statistical tests. Surprisingly, we can observe some differences in failure profiles between the native and framework-integrated versions of the same algorithm, highlighting some implementation differences that may exist.
