Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

Can Machine Learning Distinguish Pseudorandom from Entropy-Backed Randomness? An Experimental Study

Hrithwika Srihari

Published Sep 14, 2026• 0 citations
Publisher

Abstract

Randomness is a scarce and precious resource: cryptography, scientific simulation, gambling regulation, and even foundational physics all depend on being able to produce numbers that no one — not even the generator itself — could have predicted in advance. Classical computers cannot create such numbers on their own, because they are deterministic machines; every pseudorandom number generator (PRNG) is, in principle, a fixed algorithm whose entire output is fixed the moment a seed is chosen. Quantum random number generators (QRNGs) promise something categorically different: unpredictability guaranteed by the indeterminism of quantum measurement itself. This paper examines whether “true” randomness is achievable at all, surveys the physical arguments (rooted in Bell's theorem) that quantum measurement outcomes are not merely unknown but undetermined, and then asks a narrower, more computational question: can a machine-learning model tell the difference between the output of a well-designed PRNG and genuine entropy? We built and tested a small experimental pipeline comparing a deliberately flawed linear-congruential generator, a mildly weak variant, two industry-standard PRNGs (Mersenne Twister and PCG64), and operating-system entropy (as an accessible proxy for physically-sourced randomness). Gradient-boosted and logistic-regression classifiers detected the flawed generator with 100% accuracy but could not beat chance (49–51%) against modern PRNGs, mirroring published results in the cryptographic and quantum-optics literature. We conclude that while true randomness is very plausibly achievable through quantum processes certified by Bell-inequality violation, no black-box statistical or machine-learning test — however sophisticated — can, on principle, certify the difference between a good PRNG and true randomness from output alone; the distinction is one of provenance and physical mechanism, not detectable pattern.

DOI
10.5281/zenodo.22745787

Related papers

Testing Randomness Using Artificial Neural Network

Yulong Feng, Lingyi Hao

The vital characteristic of randomness is unpredictability. Thus any regularity will compromise the application of random numbers. Quantum random number generators (QRNGs) can provide intrinsic unpredictable randomness based on the nature of quantum physics, while pseudo-random number generator can not due to the origination of deterministic algorithms or physical processes. However, commonly used traditional test suits are rigorously to test the statistical properties, and the unpredictability of random numbers is still difficult to test. To verify which sources of random numbers are truly unpredictable, in this paper, we propose a new randomness testing method with the artificial neural network (ANN). Random number sequences generated by four different kinds of sources are tested, which are the natural number λ, the linear congruence generator (LCG) pseudo-random algorithm, the Mersenne Twister (MT) pseudorandom algorithm and the QRNG based on vacuum noise, respectively. The testing results indicate that the random sequences from natural number λ and LCG fail to pass our randomness test, while the other two kinds of sequences pass the test successfully due to the relatively simple structure of our ANN. As the complexity of the ANN and the amount of computing power involved increasing, this test method has potential to predict the MT random numbers, and it is also expected that the quantum random numbers can not pass the test with unpredictability no matter how complex the ANN is.

IEEE Access•Jan 1, 2020•32 citations

Experimentally probing the algorithmic randomness and incomputability of quantum randomness

Alastair A. Abbott, Cristian S Calude, Michael J Dinneen +1 more

Abstract The advantages of quantum random number generators (QRNGs) over pseudo-random number generators (PRNGs) are normally attributed to the nature of quantum measurements. This is often seen as implying the superiority of the sequences of bits themselves generated by QRNGs, despite the absence of empirical tests supporting this. Nonetheless, one may expect sequences of bits generated by QRNGs to have properties that pseudo-random sequences do not; indeed, pseudo-random sequences are necessarily computable, a highly nontypical property of sequences. In this paper, we discuss the differences between QRNGs and PRNGs and the challenges involved in certifying the quality of QRNGs theoretically and testing their output experimentally. While QRNGs are often tested with standard suites of statistical tests, such tests are designed for PRNGs and only verify statistical properties of a QRNG, but are insensitive to many supposed advantages of QRNGs. We discuss the ability to test the incomputability and algorithmic complexity of QRNGs. While such properties cannot be directly verified with certainty, we show how one can construct indirect tests that may provide evidence for the incomputability of QRNGs. We use these tests to compare various PRNGs to a QRNG, based on superconducting transmon qutrits and certified by the Kochen–Specker theorem, to see whether such evidence can be found in practice. While our tests fail to observe a strong advantage of the quantum random sequences due to algorithmic properties, the results are nonetheless informative: some of the test results are ambiguous and require further study, while others highlight difficulties that can guide the development of future tests of algorithmic randomness and incomputability.

arXiv:1806.08762•Physica Scripta•Nov 23, 2018•28 citations

True randomness from realistic quantum devices

Daniela Frauchiger, Renato Renner, Matthias Troyer

Even if the output of a Random Number Generator (RNG) is perfectly uniformly distributed, it may be correlated to pre-existing information and therefore be predictable. Statistical tests are thus not sufficient to guarantee that an RNG is usable for applications, e.g., in cryptography or gambling, where unpredictability is important. To enable such applications a stronger notion of randomness, termed "true randomness", is required, which includes independence from prior information. Quantum systems are particularly suitable for true randomness generation, as their unpredictability can be proved based on physical principles. Practical implementations of Quantum RNGs (QRNGs) are however always subject to noise, i.e., influences which are not fully controlled. This reduces the quality of the raw randomness generated by the device, making it necessary to post-process it. Here we provide a framework to analyse realistic QRNGs and to determine the post-processing that is necessary to turn their raw output into true randomness.

arXiv:1311.4547•Nov 18, 2013•46 citations

Quantify Randomness of Quantum Random Number with Transformer Network

Zhenwei Li, Feng Bao, Liangjie Cui +4 more

The random number generator (RNG) plays an essential role in lots of applications such as cryptographic. Unlike classical random number generators, quantum random number generators (QRNG) can in principle generate true random numbers because it is based on the inherent uncertainty of the quantum property. However, the presence of the environmental noise or the imperfect characteristics of the device can compromise the integrity of QRNG. To judge the quality of QRNG, we propose to apply the transformer based machine learning (ML) model to quantify the randomness of quantum random numbers. Through proper training, our transformer based ML model is able to predict randomness of given quantum random number sequence very closely to the maximum guess probability of its theoretical limit. Moreover, we also do comparisons between our present transformer based model with other ML model, such as the long short term memory network (LSTM) based model. Simulation results show that our present model can not only present a higher prediction accuracy, but also cost much less time and exhibit excellent performance in work efficiency. Furthermore, we also compare our present transformer based machine learning model with the traditional randomness detection standard, NIST-test-suite, and show advantages of our method.

International Conference on Intelligent Power and Systems (ICIPS)•Oct 20, 2023•3 citations

Enhancing the operational efficiency of quantum random number generators

Botond L. Márton, Dóra Istenes, László Bacsárdi

Random numbers are of vital importance in today’s world and used for example in many cryptographical protocols to secure the communication over the internet. The generators producing these numbers are Pseudo Random Number Generators (PRNGs) or True Random Number Generators (TRNGs). A subclass of TRNGs are the Quantum based Random Number Generators (QRNGs) whose generation processes are based on quantum phenomena. However, the achievable quality of the numbers generated from a practical implementation can differ from the theoretically possible. To ease this negative effect post-processing can be used, which contains the use of extractors. They extract as much entropy as possible from the original source and produce a new output with better properties. The quality and the different properties of a given output can be measured with the help of statistical tests. In our work we examined the effect of different extractors on two QRNG outputs and found that witg the right extractor we can improve their quality.

Híradástechnika/Infocommunications journal•Jan 1, 2021•5 citations

Machine Learning Validation of a Physical Prime Random Number Generator

Maurício Jonas Ferreira, Nuno A. Silva, Armando N. Pinto +1 more

Random prime number generation is crucial for the implementation of several encryption and signature protocols in cryptographic applications. Recently, Quantum Random Number Generators (QRNGs) have emerged as a solution to obtain information-theoretically secure randomness, setting them apart from algorithmic generators. Nonetheless, their output is still prone to deterioration under a flawed implementation and thus requires continuous statistical validation. This process is uniquely challenging for prime number generators since they cannot be submitted to the traditional testing suites, which are primarily designed to test uniform pseudorandom sources. Here, we enable direct statistical testing of prime Random Number Generators (RNGs) by extending a validation framework based on an equiprobable binning of the prime distribution with a predictive machine learning model, which can independently learn correlations in the prime output. The validity of this framework is then verified through extensive cryptanalysis of a prime QRNG based on quadrature measurements of the vacuum state. The developed model successfully identifies flawed configurations of the prime QRNG for output lengths up to 128 bits. This assessment was additionally extended to a purely classical scheme derived from electronic noise measurements. Although no increase in the model’s predictive capacity is seen, our testing framework can nonetheless demonstrate that this classical source produces a conclusively biased prime distribution. In turn, the implemented QRNG remains resilient against this type of cryptanalysis.

IEEE Transactions on Information Forensics and Security•Jan 1, 2026•0 citations
Randomness is a scarce and precious resource: cryptography, scientific simulation, gambling regulation, and even foundational physics all depend on being able to produce numbers that no one — not even the generator itself — could have predicted in advance. Classical computers cannot create such numbers on their own, because they are deterministic machines; every pseudorandom number generator (PRNG) is, in principle, a fixed algorithm whose entire output is fixed the moment a seed is chosen. Quantum random number generators (QRNGs) promise something categorically different: unpredictability guaranteed by the indeterminism of quantum measurement itself. This paper examines whether “true” randomness is achievable at all, surveys the physical arguments (rooted in Bell's theorem) that quantum measurement outcomes are not merely unknown but undetermined, and then asks a narrower, more computational question: can a machine-learning model tell the difference between the output of a well-designed PRNG and genuine entropy? We built and tested a small experimental pipeline comparing a deliberately flawed linear-congruential generator, a mildly weak variant, two industry-standard PRNGs (Mersenne Twister and PCG64), and operating-system entropy (as an accessible proxy for physically-sourced randomness). Gradient-boosted and logistic-regression classifiers detected the flawed generator with 100% accuracy but could not beat chance (49–51%) against modern PRNGs, mirroring published results in the cryptographic and quantum-optics literature. We conclude that while true randomness is very plausibly achievable through quantum processes certified by Bell-inequality violation, no black-box statistical or machine-learning test — however sophisticated — can, on principle, certify the difference between a good PRNG and true randomness from output alone; the distinction is one of provenance and physical mechanism, not detectable pattern.
The vital characteristic of randomness is unpredictability. Thus any regularity will compromise the application of random numbers. Quantum random number generators (QRNGs) can provide intrinsic unpredictable randomness based on the nature of quantum physics, while pseudo-random number generator can not due to the origination of deterministic algorithms or physical processes. However, commonly used traditional test suits are rigorously to test the statistical properties, and the unpredictability of random numbers is still difficult to test. To verify which sources of random numbers are truly unpredictable, in this paper, we propose a new randomness testing method with the artificial neural network (ANN). Random number sequences generated by four different kinds of sources are tested, which are the natural number λ, the linear congruence generator (LCG) pseudo-random algorithm, the Mersenne Twister (MT) pseudorandom algorithm and the QRNG based on vacuum noise, respectively. The testing results indicate that the random sequences from natural number λ and LCG fail to pass our randomness test, while the other two kinds of sequences pass the test successfully due to the relatively simple structure of our ANN. As the complexity of the ANN and the amount of computing power involved increasing, this test method has potential to predict the MT random numbers, and it is also expected that the quantum random numbers can not pass the test with unpredictability no matter how complex the ANN is.
Abstract The advantages of quantum random number generators (QRNGs) over pseudo-random number generators (PRNGs) are normally attributed to the nature of quantum measurements. This is often seen as implying the superiority of the sequences of bits themselves generated by QRNGs, despite the absence of empirical tests supporting this. Nonetheless, one may expect sequences of bits generated by QRNGs to have properties that pseudo-random sequences do not; indeed, pseudo-random sequences are necessarily computable, a highly nontypical property of sequences. In this paper, we discuss the differences between QRNGs and PRNGs and the challenges involved in certifying the quality of QRNGs theoretically and testing their output experimentally. While QRNGs are often tested with standard suites of statistical tests, such tests are designed for PRNGs and only verify statistical properties of a QRNG, but are insensitive to many supposed advantages of QRNGs. We discuss the ability to test the incomputability and algorithmic complexity of QRNGs. While such properties cannot be directly verified with certainty, we show how one can construct indirect tests that may provide evidence for the incomputability of QRNGs. We use these tests to compare various PRNGs to a QRNG, based on superconducting transmon qutrits and certified by the Kochen–Specker theorem, to see whether such evidence can be found in practice. While our tests fail to observe a strong advantage of the quantum random sequences due to algorithmic properties, the results are nonetheless informative: some of the test results are ambiguous and require further study, while others highlight difficulties that can guide the development of future tests of algorithmic randomness and incomputability.
Even if the output of a Random Number Generator (RNG) is perfectly uniformly distributed, it may be correlated to pre-existing information and therefore be predictable. Statistical tests are thus not sufficient to guarantee that an RNG is usable for applications, e.g., in cryptography or gambling, where unpredictability is important. To enable such applications a stronger notion of randomness, termed "true randomness", is required, which includes independence from prior information. Quantum systems are particularly suitable for true randomness generation, as their unpredictability can be proved based on physical principles. Practical implementations of Quantum RNGs (QRNGs) are however always subject to noise, i.e., influences which are not fully controlled. This reduces the quality of the raw randomness generated by the device, making it necessary to post-process it. Here we provide a framework to analyse realistic QRNGs and to determine the post-processing that is necessary to turn their raw output into true randomness.
The random number generator (RNG) plays an essential role in lots of applications such as cryptographic. Unlike classical random number generators, quantum random number generators (QRNG) can in principle generate true random numbers because it is based on the inherent uncertainty of the quantum property. However, the presence of the environmental noise or the imperfect characteristics of the device can compromise the integrity of QRNG. To judge the quality of QRNG, we propose to apply the transformer based machine learning (ML) model to quantify the randomness of quantum random numbers. Through proper training, our transformer based ML model is able to predict randomness of given quantum random number sequence very closely to the maximum guess probability of its theoretical limit. Moreover, we also do comparisons between our present transformer based model with other ML model, such as the long short term memory network (LSTM) based model. Simulation results show that our present model can not only present a higher prediction accuracy, but also cost much less time and exhibit excellent performance in work efficiency. Furthermore, we also compare our present transformer based machine learning model with the traditional randomness detection standard, NIST-test-suite, and show advantages of our method.
Random numbers are of vital importance in today’s world and used for example in many cryptographical protocols to secure the communication over the internet. The generators producing these numbers are Pseudo Random Number Generators (PRNGs) or True Random Number Generators (TRNGs). A subclass of TRNGs are the Quantum based Random Number Generators (QRNGs) whose generation processes are based on quantum phenomena. However, the achievable quality of the numbers generated from a practical implementation can differ from the theoretically possible. To ease this negative effect post-processing can be used, which contains the use of extractors. They extract as much entropy as possible from the original source and produce a new output with better properties. The quality and the different properties of a given output can be measured with the help of statistical tests. In our work we examined the effect of different extractors on two QRNG outputs and found that witg the right extractor we can improve their quality.
Random prime number generation is crucial for the implementation of several encryption and signature protocols in cryptographic applications. Recently, Quantum Random Number Generators (QRNGs) have emerged as a solution to obtain information-theoretically secure randomness, setting them apart from algorithmic generators. Nonetheless, their output is still prone to deterioration under a flawed implementation and thus requires continuous statistical validation. This process is uniquely challenging for prime number generators since they cannot be submitted to the traditional testing suites, which are primarily designed to test uniform pseudorandom sources. Here, we enable direct statistical testing of prime Random Number Generators (RNGs) by extending a validation framework based on an equiprobable binning of the prime distribution with a predictive machine learning model, which can independently learn correlations in the prime output. The validity of this framework is then verified through extensive cryptanalysis of a prime QRNG based on quadrature measurements of the vacuum state. The developed model successfully identifies flawed configurations of the prime QRNG for output lengths up to 128 bits. This assessment was additionally extended to a purely classical scheme derived from electronic noise measurements. Although no increase in the model’s predictive capacity is seen, our testing framework can nonetheless demonstrate that this classical source produces a conclusively biased prime distribution. In turn, the implemented QRNG remains resilient against this type of cryptanalysis.