REVIEW 3 major objections 5 minor 16 references
Independent Randomness Tests based on the Orthogonalized Non-overlapping Template Matching Test
T0 review · 3 major / 5 minor · reviewed 2026-08-14 · deepseek-v4-flash
Pith's one-line read This paper claims that a linear transformation of the standardized template counts, $C'_j = (LQ)^{-1}C_j$, renders the Non-overlapping Template Matching Test items independent under the null hypothesis.
desk verdict Useful analytic dependence structure for NIST template tests with a sound whitening idea, but the paper overstates exact independence and needs a few corrections before I'd fully trust it. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The machinery is the orthogonalization of the multivariate normal vector $C_j$. After computing the $R\times R$ covariance matrix $\Sigma$ from the pairwise correlation formula (Eq. (31)), the paper chooses an orthogonal matrix $L$ and a diagonal scaling $Q$ so that $Q^\top L^\top \Sigma^{-1} LQ = I$, and transforms $C_j$ to $C'_j = (LQ)^{-1}C_j$; the proof is that the density of $C'_j$ becomes a product of standard normals. The distributional identity underlying the two-test-item dependency analysis is Eq. (35), the joint CDF $F_{N,\rho}(X_N,Y_N)$, an infinite series in $\rho^{2r}$ involving incomplete gamma functions, obtained by inverting the characteristic function of the correlated chi-square pair.
What would settle it
Generate a large null sample with block length $M$ no larger than, say, $2^m$ for $m=9$, apply the orthogonalizing transform (Eq. (40)), and test the empirical covariance of the transformed per-block vectors or the joint distribution of the transformed p-values against the i.i.d. uniform prediction; any systematic off-diagonal correlation or nonuniformity at that $M$ would show that the infinite-$M$ normality and remainder-neglect assumptions are doing real work.
Extended reading notes
Core claim
The central discovery is that the dependency among Non-overlapping Template Matching Test items can be removed by a linear change of variables. For large block length $M$, the standardized per-block count vectors $C_j$ are treated as jointly normal with a covariance matrix $\Sigma$ whose off-diagonal entries are the pairwise correlations $\rho(T^{(k)}, T^{(\ell)})$ given by Eq. (31). Writing $\Sigma^{-1} = L\Lambda L^\top$ and rescaling by $Q$, the map $C'_j = (LQ)^{-1}C_j$ has identity covariance, so the components of $C'_j$ are standard normal and independent; hence the chi-square statistics built from each component are independent test items. The paper also derives the explicit joint cumulative distribution of two chi-square statistics (Eq. (35)) and of the two p-values, verified by comparing experimental and theoretical two-dimensional p-value distributions. Removing templates that create zero eigenvalues, the author reports that the number of test items rejecting a sequence follows the independent-items expectation for 145 templates.
Load-bearing premise
The whole construction rests on treating the per-block template counts, after standardizing them, as jointly normal already at the block sizes used in practice, and on ignoring the finite-block-size remainder in the correlation formula.
Editorial extensions
If this is right
- Under the independence claim, the number of the 145 template-based items that reject a sequence at level $\alpha$ is binomially distributed, so a suite-wide pass/fail rule can be set with known Type I error.
- The explicit two-p-value joint CDF (Eq. (35)) lets a user assess or correct for dependence between any pair of templates without running the full orthogonalization.
- A single combined p-value for the Non-overlapping Template Matching Test family can be obtained, e.g., by Fisher's method, since the transformed items are independent under the null.
- The construction explains which templates must be excluded (e.g., 100000000 and 000000001) to avoid singular covariance, turning a numerical necessity into a principled test-set reduction.
Reading between the lines
- At finite block length $M$ the neglected remainder $O(m^2/(2^m M))$ in Eq. (31) means the orthogonalized items are only asymptotically independent; a practical guide would need to state how large $M$ must be for the approximation to hold.
- The same recipe might extend to other parametric NIST tests whose block statistics are approximately normal, potentially turning the whole SP800-22 suite into independent items, but the paper does not demonstrate this.
- Independence under the null does not by itself say how the transformed items behave under a biased generator; power against alternatives is a separate question the paper does not address.
- The derived joint CDF (35) could be used as a standalone copula to calibrate pairs of dependent p-values, which may be useful when only a small subset of templates is relevant.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper studies the Non-overlapping Template Matching Test of NIST SP800-22 and addresses the fact that the 148 test items based on different 9-bit templates are not independent. It derives the joint distribution of two p-values under the null by modeling each block's standardized count as a bivariate normal variable, and it obtains an explicit joint cumulative distribution function in Eq. (35). The paper then proposes an orthogonalization transformation C'_j = (LQ)^{-1} C_j in Eq. (40), where L and Q diagonalize the covariance matrix built from the pairwise correlation coefficients in Eq. (31), and claims that the transformed test items are independent. The claim is supported by experiments using the Mersenne twister and AES-128.
Significance. The problem is practically important: using multiple template-matching tests with a joint significance level requires understanding and removing the dependence among test items. The paper's main contributions are a closed-form pairwise correlation coefficient, a detailed derivation of the joint CDF of two p-values, and a whitening procedure for the 148 test items. A notable strength is that the correlation coefficients are computed from the analytic formula rather than fitted, and the experimental validation uses two independent generators. If the asymptotic gaps are closed, the orthogonalization method could be useful for defining an explicit overall criterion in NIST SP800-22. However, the central claim that the transformed test items are 'independent of each other' is stronger than what is actually established, because the underlying multivariate normality and the covariance matrix are only asymptotic approximations.
major comments (3)
- [Eqs. (19), (28), and (31)] The count of ordered pairs (k,l) in {1,...,M-m+1}^2 with |k-l| >= m is (M-2m+1)(M-2m+2), not (M-m+1)(M-3m+2) as written in Eqs. (19) and (28). The difference is m(m-1), which after division by 2^{2m} is O(m^2/2^{2m}) and therefore does not change the leading-order correlation coefficient. However, the remainder statement in Eq. (31) is not correct as stated. If one retains the exact factor M-m+1 in the near-diagonal sum, the finite-M correction to rho is of order 1/M with a coefficient depending on the template overlap indicators; if one instead replaces every M-m+1 by M before forming the ratio, the residual is O(m/M). In either case the bound O(m^2/(2^m M)) given in Eq. (31) is too small. The paper should replace this with a correct bound and explicitly state that the rho values used to build the covariance matrix are asymptotic quantities.
- [Section 3.1 and Section 4.1] The multidimensional extension of Theorem 2.1 is asserted without proof, and exact multivariate normality is impossible for the bounded, discrete block counts. Consequently, Eq. (43) and the statement that the components of C'_j 'follow the standard normal distribution independent of each other' hold only asymptotically. The paper should either supply a rigorous multivariate CLT argument, for example via Cramér-Wold applied to the m-dependent sequence of indicators, or cite an appropriate theorem. It should also state consistently that the independence after the transformation is asymptotic. In addition, Section 4.2 should report a direct residual-dependence check, such as the maximum absolute empirical correlation among the transformed test items over the 10^6 sequences, rather than relying solely on the rejection-count histogram in Figure 3.
- [Section 4.1, template removal] The procedure for removing templates to make the covariance matrix nonsingular is incomplete. The text gives examples of dependent template groups (100000000 and 000000001; 011111111 and 111111110; and the four templates 001010101, 010101011, 101010100, 110101010) but does not prove that removing one element from each of these groups actually leaves a nonsingular 145x145 covariance matrix, nor does it explain how the complete list of dependent templates was obtained. Since the transformation in Eq. (40) requires det(Sigma) != 0, the paper should report the eigenvalues of Sigma before and after the removals, or otherwise verify that the remaining 145-template covariance matrix is invertible.
minor comments (5)
- [Eq. (4)] The symbol sigma is defined by Eq. (4) as M(1/2^m - (2m-1)/2^{2m}), which is the variance, not the standard deviation, of c_j. The standardization in Eq. (2) then incorrectly divides by the variance instead of the standard deviation. This notational inconsistency should be fixed, for example by writing sigma^2 in Eq. (4).
- [Section 3.2] The agreement between the experimental and theoretical joint distributions in Figures 1 and 2 is assessed only visually. A quantitative discrepancy measure or a formal goodness-of-fit statistic for the two-dimensional histograms would make the validation more convincing.
- [Section 4.2 and Figure 3] Figure 3 shows the rejection-count histogram before and after transformation but does not provide confidence bands or a goodness-of-fit test against the expected binomial distribution. Adding these would strengthen the claim that the transformed test items are independent.
- [Section 4.1] The text says 'we need to remove either 100000000 or 000000001, and 011111111 or 111111110. Finally, we need to remove 001010101 or 010101011 or 101010100 or 110101010,' but the experiment removes 100000000, 111111110, and 001010101. The relation between the general removal rule and the specific templates excluded in the experiment should be stated explicitly.
- [References and typography] Reference [4] contains 'at el.' which should be 'et al.'; the equation display after Eq. (53) in the appendix has a typographical artifact 'd¯Xd¯Y' that should be cleaned up; and the caption of Figure 3 lacks axis labels.
Circularity Check
No circularity: the orthogonalizing transformation is a mathematical consequence of the derived covariance model, not a renamed input or fitted prediction.
full rationale
The paper's central derivation is self-contained and non-circular. The correlation coefficient rho(T^(1),T^(2)) is obtained analytically from the joint expectation of block counts (Eqs. 21-31), not fitted to data. The joint cumulative distribution FN,rho in Eq. (35) is derived from first principles in the appendix using characteristic functions and Jordan's lemma. The proposed transformation C'_j = (LQ)^{-1} C_j in Eq. (40) is a standard whitening operation: given the assumed multivariate normal model with covariance Sigma whose off-diagonal entries are the analytically derived rho values, the change of variables in Eqs. (41)-(43) shows that the transformed components are standard normal and independent. This is a derivation, not a prediction that reduces to a fitted parameter; the 'independence' is a mathematical consequence of the model assumptions stated. The experimental section validates the model using independent generators (Mersenne twister and AES-128) and compares rejection counts against the expected binomial-type behavior, so it is an external check rather than a restatement of inputs. The paper does contain a self-citation (reference [13], by the same author) in the literature review of prior dependency studies, but this citation is not load-bearing for the new derivation. The unproved multidimensional extension of Theorem 2.1 and the ignored O(m/M) remainder in Eq. (31) are legitimate mathematical/asymptotic concerns about the strength of the assumptions, but they are not circularity: the paper does not assume the conclusion it claims to establish. Overall, no step in the derivation chain reduces by construction to its own inputs.
Assumptions & free parameters
assumptions (5)
- standard math Central limit theorem for stationary m-dependent sequences (Hoeffding's theorem)
- domain assumption Multivariate extension of the CLT for m-dependent sequences
- domain assumption Block length M is large enough that O(m/M) boundary corrections in the correlation coefficients can be ignored
- domain assumption The number of blocks N is even, as in the NIST default N=8
- domain assumption The set of 148 NIST templates and the three removals produce a non-singular covariance matrix for the remaining 145 items
Cite this review
Pith. "Pith review of Independent Randomness Tests based on the Orthogonalized Non-overlapping Template Matching Test." pith.science (2026). https://pith.science/paper/VA3LW3QP
@misc{pith2026190807145,
author = {Pith},
title = {Pith review of: Independent Randomness Tests based on the Orthogonalized Non-overlapping Template Matching Test},
year = {2026},
howpublished = {\url{https://pith.science/paper/VA3LW3QP}},
note = {Machine review of arXiv:1908.07145}
}
read the original abstract
In general, randomness tests included in a test suite are not independent of each other. This renders it difficult to fix a rational criterion through the whole test suite with an explicit significance level. In this paper, we focus on the Non-overlapping Template Matching Test, which is a randomness test included in the NIST statistical test suite. The test uses a parameter called "template" and we can consider a test item for each template. We investigate dependency between two test items by deriving the joint probability density function of the two p-values and propose a transformation to make multi test items independent of each other.
Figures
Figures from the paper (1 more)
Reference graph
Works this paper leans on
-
[1]
Quantum Random Numbers generated by the Cloud Superconducting Quantum Computer
K. Tamura and Y. Shikano, “Quantum Random Numbers generated by the Cloud Super- conducting Quantum Computer,” arXiv:1906.04410 (2019)
work page Pith review arXiv 2019
-
[2]
DIEHARD: a battery of tests of randomness,
G. Marsaglia, “DIEHARD: a battery of tests of randomness,” http://stat. fsu. edu/geo (1996)
work page 1996
-
[3]
TestU01: AC library for empirical testing of random number generators,
P. L’Ecuyer and R. Simard, “TestU01: AC library for empirical testing of random number generators,” ACM Trans. on Mathematical Software 33.4 (2007): 22
work page 2007
-
[4]
A. Rukhin, at el., “ A Statistical Test Suite for Random and Pseudorandom Number Gen- erators for Cryptographic Applications,” National Institute of Standards and Technology Special Publication 800-22 revision 1a (2010)
work page 2010
-
[5]
Orthogonal test series for pseudorandomness test,
H. Sugita, “Orthogonal test series for pseudorandomness test,” RIMS Kˆ okyˆ uroku 1127 (2000): 80-87 (in Japanese)
work page 2000
-
[6]
Empirical evidence concerning AES,
P. Hellekalek and S. Wegenkittl, “Empirical evidence concerning AES,” ACM Trans. on Modeling and Computer Simulation 13.4 (2003): 322-333
work page 2003
-
[7]
On independence and sensitivity of statis- tical randomness tests,
M. S. Turan, A. Do ˇGanaksoy and S. Bozta., “On independence and sensitivity of statis- tical randomness tests,” International Conference on Sequences and Their Applications. Springer, Berlin, Heidelberg, 2008
work page 2008
-
[8]
Extended results for independence and sensitivity of NIST randomness tests,
A. Do ˇGanaksoy, B. Ege and K. Mus, “Extended results for independence and sensitivity of NIST randomness tests,” Information Security and Cryptography Conference, ISC Turkey, 2008
work page 2008
Show all 16 references
-
[9]
A General Method to Evaluate the Correlation of Randomness Tests,
L. Fan, H. Chen and S. Gao, “A General Method to Evaluate the Correlation of Randomness Tests,” in: Information Security Applications, WISA 2013, Lecture Notes in Computer Science, vol 8267. Springer, Cham (2014)
2014
-
[10]
Analysis of NIST Randomness test for correlative sequences generated by chaotic true orbit,
A. Yamaguchi and A. Saito, “Analysis of NIST Randomness test for correlative sequences generated by chaotic true orbit,” proceeding of JSIAM 2016, 2016 (in Japanese)
2016
-
[11]
On the independence of statistical randomness tests included in the NIST test suite,
F. Sulak, et al,. “On the independence of statistical randomness tests included in the NIST test suite,” Turkish Journal of Electrical Engineering & Computer Sciences 25.5 (2017): 3673-3683
2017
-
[12]
Mutual correlation of NIST statistical randomness tests and com- parison of their sensitivities on transformed sequences,
A. Do ˇGanaksoy, et al., “Mutual correlation of NIST statistical randomness tests and com- parison of their sensitivities on transformed sequences,” Turkish Journal of Electrical En- gineering & Computer Sciences 25.2 (2017): 655-665. 10
2017
-
[13]
Analysis of NIST SP800-22 focusing on randomness of each sequence,
A. Iwasaki, “Analysis of NIST SP800-22 focusing on randomness of each sequence,” JSIAM Letters 10 (2018): 1-4
2018
-
[14]
The central limit theorem for dependent random variables,
W. Hoeffding and R. Herbert, “The central limit theorem for dependent random variables,” Duke Mathematical Journal 15.3 (1948): 773-780
1948
-
[15]
Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator,
M. Matsumoto and T. Nishimura, “Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator,” ACM Trans. on Modeling and Computer Sim- ulation 8.1 (1998): 3-30
1998
-
[16]
Advanced encryption standard,
V. Rijmen and J. Daemen, “Advanced encryption standard,” Proceedings of Federal Infor- mation Processing Standards Publications, National Institute of Standards and Technology (2001): 19-22. Appendix Derivation of (35) We present the derivation of (35). Assume that random vari...
2001
Reviewed August 14, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.