Metraipolis › archive › dc_d97a5c7051a7
Reproducible AI Requires Reproducible Randomness — arXiv:2609.26461
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2609.26461
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-08T13:45:47.521Z
- SHA-256 of the archived text
96042a5472e086f426d88ae0f95f28e9a8400af8afc8a002aa939f0d981bea9c- Stable URL of this page
https://metraipolis.com/documento/dc_d97a5c7051a7
How to cite
Reproducible AI Requires Reproducible Randomness — arXiv:2609.26461 — arXiv (en), https://arxiv.org/abs/2609.26461 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_d97a5c7051a7 (Metraipolis archive dc_d97a5c7051a7, sha256 96042a5472e086f426d88ae0f95f28e9a8400af8afc8a002aa939f0d981bea9c)
BibTeX
@misc{dcd97a5c7051a7,
title = {Reproducible AI Requires Reproducible Randomness — arXiv:2609.26461},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2609.26461},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_d97a5c7051a7; sha256 96042a5472e086f426d88ae0f95f28e9a8400af8afc8a002aa939f0d981bea9c},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.26461. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Pseudorandom number generators (PRNGs) constitute indispensable computational tools across multiple scientific domains, including Monte Carlo simulations, stochastic computing, and artificial intelligence (AI). The reproducibility of such applications critically depends on the ability of PRNG implementations to generate identical sequences across software environments when initialized from the same internal state. These algorithms enable the simulation of stochastic processes while providing deterministic and repeatable behaviour, thereby facilitating reproducible experiments. Modern PRNG implementations may be initialized through either a seed or, more accurately, an initial state that exceeds the capacity of a conventional integer seed. However, reliance on a simple seed alone frequently proves insufficient to ensure consistent program execution traces across different implementations. A natural assumption is that transferring the complete internal state of a generator should guarantee identical outputs regardless of the software library used. This study examines the validity of this assumption by investigating whether complete initial states can ensure cross-library fidelity and portability of PRNG streams. We focus on two widely deployed generators, Mersenne Twister and Philox, and evaluate their implementations across four major Python ecosystems-Random, NumPy, PyTorch, and TensorFlow. We compare the sequences produced by these implementations against those generated by the original reference algorithms under identical initialization conditions. Our results demonstrate that reproducibility cannot be assumed from PRNG state transfer alone, even when implementations claim to follow the same underlying algorithm. While fidelity was successfully achieved for several implementations, significant discrepancies were observed in others. Most notably, the Philox implementation in PyTorch exhibits fundamental incompatibilities with the reference algorithm, preventing exact reproduction of generator outputs across environments. These findings challenge the common expectation that access to a full internal state of a PRNG is sufficient to ensure reproducibility across software stacks. They further highlight that implementation-specific design choices can introduce hidden barriers to experimental replication, particularly in AI workflows that rely on multiple frameworks. This work shows that implementation fidelity of a PRNG is a necessary condition for scientific reproducibility and makes two primary contributions. First, it identifies practical guidelines for achieving reliable PRNG usage and reproducibility within the Python scientific and AI ecosystem. Second, it evaluates the extent to which cross-library portability and fidelity can be recovered through user-level techniques, without requiring modifications to library source code. Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-09-23 in cs.AI). Categorie arXiv: Artificial Intelligence (cs.AI). Pagina del lavoro: https://arxiv.org/abs/2609.26461 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-10-08T13:18:38.171Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-09-23?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).