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

Benjamin A. Antunes
7/2/2025
cs.OHcs.CRcs.LG

No confident code implementation found for this paper.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{antunes2025statistical,
  title  = {Statistical Quality and Reproducibility of Pseudorandom Number Generators in Machine Learning technologies},
  author = {Benjamin A. Antunes},
  year   = {2025},
  eprint = {2507.03007},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.03007v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.03007.svg)](https://codeofpaper.com/paper/2507.03007)

Discussion