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

IEEE Access

Testing Randomness Using Artificial Neural Network

Yulong Feng, Lingyi Hao

Published Jan 1, 2020• 32 citations
Publisher

Abstract

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.

DOI
10.1109/access.2020.3022098

Related papers

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

Hrithwika Srihari

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.

•Sep 14, 2026•0 citations

Machine Learning Cryptanalysis of a Quantum Random Number Generator

Nhan Duy Truong, Jing Yan Haw, Syed M. Assad +2 more

Random number generators (RNGs) that are crucial for cryptographic applications have been the subject of adversarial attacks. These attacks exploit environmental information to predict generated random numbers that are supposed to be truly random and unpredictable. Though quantum random number generators (QRNGs) are based on the intrinsic indeterministic nature of quantum properties, the presence of classical noise in the measurement process compromises the integrity of a QRNG. In this paper, we develop a predictive machine learning (ML) analysis to investigate the impact of deterministic classical noise in different stages of an optical continuous variable QRNG. Our ML model successfully detects inherent correlations when the deterministic noise sources are prominent. After appropriate filtering and randomness extraction processes are introduced, our QRNG system, in turn, demonstrates its robustness against ML. We further demonstrate the robustness of our ML approach by applying it to uniformly distributed random numbers from the QRNG and a congruential RNG. Hence, our result shows that ML has potentials in benchmarking the quality of RNG devices.

arXiv:1905.02342•IEEE Transactions on Information Forensics and Security•Jun 26, 2018•66 citations

Theory, Methods and Tools for Statistical Testing of Pseudo and Quantum Random Number Generators

Krister Sune Jakobsson

Statistical random number testing is a well studied field focusing on pseudo-random number generators, that is to say algorithms that produce random-looking sequences of numbers. These generators tend to have certain kinds of flaws, which have been exploited through rigorous testing. Such testing has led to advancements, and today pseudo random number generators are both very high-speed and produce seemingly random numbers. Recent advancements in quantum physics have opened up new doors, where products called quantum random number generators that produce acclaimed true randomness have emerged. Of course, scientists want to test such randomness, and turn to the old tests used for pseudo random number generators to do this. The main question this thesis seeks to answer is if publicly available such tests are good enough to evaluate a quantum random number generator. We also seek to compare sequences from such generators with those produced by state of the art pseudo random number generators, in an attempt to compare their quality. Another potential problem with quantum random number generators is the possibility of them breaking without the user knowing. Such a breakdown could have dire consequences. For example, if such a generator were to control the output of a slot machine, an malfunction could cause the machine to generate double earnings for a player compared to what was planned. Thus, we look at the possibilities to implement live tests to quantum random number generators, and propose such tests. Our study has covered six commonly available tools for random number testing, and we show that in particular one of these stands out in that it has a series of tests that fail our quantum random number generator as not random enough, despite passing an pseudo random number generator. This implies that the quantum random number generator behave differently from the pseudo random number ones, and that we need to think carefully about how we test, what we expect from an random sequence and what we want to use it for.

•Jan 1, 2014•8 citations

Advanced Statistical Testing of Quantum Random Number Generators

Aldo C. Martinez-Becerril, Aldo Solís, Rafael Díaz Hernández Rojas +3 more

Pseudo-random number generators are widely used in many branches of science, mainly in applications related to Monte Carlo methods, although they are deterministic in design and, therefore, unsuitable for tackling fundamental problems in security and cryptography. The natural laws of the microscopic realm provide a fairly simple method to generate non-deterministic sequences of random numbers, based on measurements of quantum states. In practice, however, the experimental devices on which quantum random number generators are based are often unable to pass some tests of randomness. In this review, we briefly discuss two such tests, point out the challenges that we have encountered in experimental implementations and finally present a fairly simple method that successfully generates non-deterministic maximally random sequences.

Entropy•Nov 17, 2018•17 citations

Testing Randomness in Quantum Mechanics

Aldo C. Martinez-Becerril, Aldo Solís, Rafael Díaz Hernández Rojas +3 more

Pseudo-random number generators are widely used in many branches of science, mainly in applications related to Monte Carlo methods, although they are deterministic in design and, therefore, unsuitable for tackling fundamental problems in security and cryptography. The natural laws of the microscopic realm provide a fairly simple method to generate non-deterministic sequences of random numbers, based on measurements of quantum states. In practice, however, the experimental devices on which quantum random number generators are based are often unable to pass some tests of randomness. In this review, we briefly discuss two such tests, point out the challenges that we have encountered and finally present a fairly simple method that successfully generates non-deterministic maximally random sequences.

arXiv:1810.08718•Oct 20, 2018•3 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
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.
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.
Random number generators (RNGs) that are crucial for cryptographic applications have been the subject of adversarial attacks. These attacks exploit environmental information to predict generated random numbers that are supposed to be truly random and unpredictable. Though quantum random number generators (QRNGs) are based on the intrinsic indeterministic nature of quantum properties, the presence of classical noise in the measurement process compromises the integrity of a QRNG. In this paper, we develop a predictive machine learning (ML) analysis to investigate the impact of deterministic classical noise in different stages of an optical continuous variable QRNG. Our ML model successfully detects inherent correlations when the deterministic noise sources are prominent. After appropriate filtering and randomness extraction processes are introduced, our QRNG system, in turn, demonstrates its robustness against ML. We further demonstrate the robustness of our ML approach by applying it to uniformly distributed random numbers from the QRNG and a congruential RNG. Hence, our result shows that ML has potentials in benchmarking the quality of RNG devices.
Statistical random number testing is a well studied field focusing on pseudo-random number generators, that is to say algorithms that produce random-looking sequences of numbers. These generators tend to have certain kinds of flaws, which have been exploited through rigorous testing. Such testing has led to advancements, and today pseudo random number generators are both very high-speed and produce seemingly random numbers. Recent advancements in quantum physics have opened up new doors, where products called quantum random number generators that produce acclaimed true randomness have emerged. Of course, scientists want to test such randomness, and turn to the old tests used for pseudo random number generators to do this. The main question this thesis seeks to answer is if publicly available such tests are good enough to evaluate a quantum random number generator. We also seek to compare sequences from such generators with those produced by state of the art pseudo random number generators, in an attempt to compare their quality. Another potential problem with quantum random number generators is the possibility of them breaking without the user knowing. Such a breakdown could have dire consequences. For example, if such a generator were to control the output of a slot machine, an malfunction could cause the machine to generate double earnings for a player compared to what was planned. Thus, we look at the possibilities to implement live tests to quantum random number generators, and propose such tests. Our study has covered six commonly available tools for random number testing, and we show that in particular one of these stands out in that it has a series of tests that fail our quantum random number generator as not random enough, despite passing an pseudo random number generator. This implies that the quantum random number generator behave differently from the pseudo random number ones, and that we need to think carefully about how we test, what we expect from an random sequence and what we want to use it for.
Pseudo-random number generators are widely used in many branches of science, mainly in applications related to Monte Carlo methods, although they are deterministic in design and, therefore, unsuitable for tackling fundamental problems in security and cryptography. The natural laws of the microscopic realm provide a fairly simple method to generate non-deterministic sequences of random numbers, based on measurements of quantum states. In practice, however, the experimental devices on which quantum random number generators are based are often unable to pass some tests of randomness. In this review, we briefly discuss two such tests, point out the challenges that we have encountered in experimental implementations and finally present a fairly simple method that successfully generates non-deterministic maximally random sequences.
Pseudo-random number generators are widely used in many branches of science, mainly in applications related to Monte Carlo methods, although they are deterministic in design and, therefore, unsuitable for tackling fundamental problems in security and cryptography. The natural laws of the microscopic realm provide a fairly simple method to generate non-deterministic sequences of random numbers, based on measurements of quantum states. In practice, however, the experimental devices on which quantum random number generators are based are often unable to pass some tests of randomness. In this review, we briefly discuss two such tests, point out the challenges that we have encountered and finally present a fairly simple method that successfully generates non-deterministic maximally random sequences.
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.