Submitted:
23 November 2026
Posted:
24 November 2026
You are already at the latest version
Abstract
Many systems produce bits in pairs of streams that should behave like two independent fair coins, such as dual-channel random number generators and the random event generators of experimental research. A departure may be a bias, a coupling, a memory or a drift, may last for the whole record or a short episode, and records differ in length. We present PAIRS, a rank-calibrated test that turns a pair of binary streams into a single p-value. It measures six structural features in overlapping windows of 1,000 bits and combines a burden, which counts unusual windows, with a peak, which records the most extreme one. Each feature tests the balance of a few parities and is, to second order, a classical information statistic, so its blind spots can be stated precisely. Monte Carlo rank calibration controls the false-positive rate in finite samples for 3,600 to 720,000 bits per stream, as preregistered checks confirm from 12,000 bits upwards. Detection follows three regimes set by the episode length. Multiscale scans of signed indicators are more efficient against the departures they are built for (16 against 25–125 nats of accumulated divergence); for departures that cancel in signed sums, PAIRS needs 3 to 10 times less. PAIRS is open and fully reproducible.
Keywords:
randomness testing
; paired binary sequences
; independence
; random number generators
; Monte Carlo p-value
; scan statistics
; calibration
; statistical power
; Kullback–Leibler divergence
; mutual information
; transfer entropy
; reproducibility
1. Introduction
Random bits are used in many fields. Cryptographic keys, secure communication and multiplexing in sensor networks, Monte Carlo simulations, randomized trials and lotteries all rely on sources whose bits are balanced, independent of one another and unpredictable [1]. For this reason physical generators are monitored in operation, and pseudorandom generators are checked with large batteries of statistical tests [2,3,4,5]. These tools answer a question about a single stream: does this sequence look like a series of fair coin flips?
In a number of situations, however, two streams are produced side by side, and each is expected to be random and independent of the other. Many physical and quantum generators derive their output from two detectors or two raw channels [5,6], and a defect that couples the channels matters as much as a defect in either of them. Parallel simulations need pseudorandom streams that are independent of each other, not merely individually random [7]; further examples, from neuroscience and cryptanalysis, are given in Section 2. Random event generators (REGs) are hardware noise sources whose output has been studied in relation to human intention and collective events. Research with them has mostly analysed the output of single devices [8,9,10]; in the network of the Global Consciousness Project (GCP), the reported effect appears as small correlations between pairs of separate devices [11]. Devices and methods that analyse two time series of random numbers jointly, in order to identify ranges in which they are synchronous, have also been proposed [12]; the present work originated in this setting. In all these cases the hypothesis of interest concerns the pair: two fair coins, tossed independently.
Testing a pair is harder than testing a single stream, for three reasons. The first is that a pair can fail in many ways. A departure can be a bias in one stream, an excess or a deficit of coincidences between the streams, a short memory within a stream, a delayed coupling from one stream to the other, a drift, or a memory over longer distances, and no single statistic is sensitive to all of them. The second is that the same departure may occur at very different scales: it may extend over the whole record or be confined to a short episode. A statistic tuned to whole-record effects dilutes a short episode, while one tuned to short episodes wastes the information carried by a long, weak effect. The third is that records vary in length. A 20-minute event recorded at 10 bits per second gives 12,000 bits per stream, and a one-hour event at 200 bits per second gives 720,000. A usable test must be calibrated at every length, not only at a few reference lengths.
Applying a battery of separate tests to each stream and to their combination does not solve these problems. It produces dozens of dependent verdicts whose joint false-positive rate is unknown, and it does not provide one quantity that can be compared across records or pooled over a set of them. Generality has a price, however: a test designed for one known departure is always more powerful against that departure than a test that must watch for all of them. We quantify this price explicitly (Section 9).
In this paper we present pairs (Paired-stream Anomaly Index with Rank-calibrated Scores), a rank-calibrated test that summarizes a pair of binary streams of any length within a practical range as a single p-value. It measures six structural features (balance, agreement, persistence, lagged coupling, drift and longer memory) in overlapping windows, compares every window value with a fixed set of simulated random pairs, and summarizes the outcome in two complementary ways: a burden, which counts how many windows look unusual, and a peak, which records the most extreme window. Both summaries are calibrated by ranking them among the same summaries computed on independent random pairs. The resulting p-value controls the false-positive rate in finite samples without any distributional approximation, under the single condition that the record and the calibration pairs are exchangeable under the null hypothesis.
After a review of the methods and concepts that frame the analysis of such data (Section 2), the paper makes four groups of contributions:
- Construction of the method: a precise statement of the paired-stream null hypothesis and of the requirements that a practical test should meet (Section 3), and the pairs test itself, with its six structural features measured in windows, its two endpoints and their combination into one p-value (Section 4).
- Statistical and informational foundation: an exact decomposition of a record’s divergence from the null into marginal, memory and coupling parts; a reading of the features as tests of parity balance, each equivalent to second order to a classical information quantity, which states precisely what the test can and cannot see (Section 3.2 and Section 4.8); and a rank calibration whose single campaign covers all lengths from 3,600 to 720,000 bits per stream, with a scaling law for the null spread of the burden and a local equivalence between the power of each feature and the information it captures (Section 5).
- Evaluation: preregistered validations under the null hypothesis with fresh simulated pairs, including three cohorts produced with different generators and implementations (Section 7); a sensitivity study of six perturbation mechanisms, which identifies three detection regimes and gives a rule for choosing the window length (Section 8); and a comparison with reference detectors on identical records, which measures in nats of accumulated divergence what the generality of pairs costs and what it buys (Section 9).
- Reproducibility: an open Python implementation with a deterministic, published generator, so that every result in this paper can be regenerated and validated (Section 6).
pairs was developed within DeepREG, a research programme that studies paired REG recordings made during preselected events. That application motivated several design choices, but the test makes no assumption about the origin of the bits, and its use on real REG recordings will be reported separately. Section 10 discusses scope and limitations, and Section 11 summarizes the main findings for readers who do not need the mathematical detail.
2. Background and Related Work
2.1. Test Batteries for Single Streams
The standard tools for empirical randomness testing are batteries of tests. The Special Publication (SP) 800-22 of the National Institute of Standards and Technology (NIST) contains fifteen tests (frequency, runs, spectral, approximate entropy, linear complexity and others), each of which returns one or more p-values for a sequence [2]. TestU01 [3], Diehard [13] and Dieharder [14] offer larger collections, aimed mainly at pseudorandom generators. Some of these tests have an information-theoretic basis, such as approximate entropy [15]. Simpler single-stream statistics are still being proposed: for example, the distribution of gaps between consecutive ones, summarized by a burstiness factor, reveals departures from independent and identically distributed bits that the frequency (monobit) test misses [1]. Batteries are designed to expose any weakness in a generator from very long sequences, and they leave the interpretation of many separate outcomes, including control of the overall error rate, to the user. They do not provide one calibrated number per record and they treat one stream at a time. For a single, known departure, however, the corresponding test of a battery is more powerful than any general-purpose test; Section 9 quantifies this trade-off.
2.2. Online Health Tests for Physical Sources
Physical and quantum random number generators are monitored with lightweight health tests. NIST SP 800-90B specifies a repetition count test and an adaptive proportion test for entropy sources [4], and reviews of quantum random number generators discuss online testing and (semi-)self-testing certification [5,6]. These tests are tuned to catastrophic failures, such as a stuck bit or a strong bias, with a very low false-alarm rate. They are not intended to detect subtle, structured departures, and they too concern only single streams.
2.3. Dependence Between Two Streams
Dependence between two binary sequences can be measured by cross-correlation at chosen lags, by mutual information [16] or by transfer entropy, which quantifies directed dependence [17]. Neuroscience has developed coincidence-based tests with carefully constructed null models, such as the unitary-event method for spike trains [18], and in cryptanalysis a correlation between a keystream and a candidate sequence is the classical sign of a weak cipher [19]. Requirements for parallel pseudorandom streams emphasize independence between streams [7], and the certification of randomness through Bell tests is built on correlations between paired outcomes [20]. Each of these approaches targets one kind of dependence. None of them combines balance, internal memory, simultaneous and delayed coupling, and nonstationarity in a single calibrated statistic.
2.4. Localized Departures and Multiple Scales
When a departure may occupy an unknown part of a record, the natural tools are scan statistics, which take the maximum of a local statistic over all windows [21,22], and sequential change-detection methods such as the cumulative sum (CUSUM) procedure [23]. Walther and Perry showed that asymptotic optimality results are too coarse to assess the practical performance of scan statistics, and proposed finite-sample criteria and scale-dependent calibrations [24]. Overlapping windows make the local statistics strongly dependent, and the usual corrections for testing many windows [25,26,27,28] either ignore this dependence or require resampling. pairs uses the scan idea for its peak endpoint and adds a burden endpoint that accumulates evidence across windows.
2.5. Monte Carlo and Rank-Based Calibration
When the null distribution of a complicated statistic is unknown but the null hypothesis can be simulated, Monte Carlo tests give valid finite-sample p-values: the observed statistic is ranked among the values of the same statistic computed on independent null realizations [29,30,31,32]. The same exchangeability argument underlies conformal prediction and conformal outlier detection [33]. pairs uses this principle twice: to locate every window value within a fixed null reference, and to convert the final summaries into p-values. Robust standardization by the median and the median absolute deviation (MAD) [34,35] is used only to put the components on a common scale; the validity of the p-value never depends on it.
2.6. Random Event Generator Research
REGs are hardware random sources used in experiments that ask whether their output deviates from chance in association with human intention or with collective events. Laboratory programmes analysed the output of single devices during intention trials [8], and the Global Consciousness Project has analysed a worldwide network of devices during major events, where the reported deviation appears as small correlations between pairs of devices [11]. Meta-analyses report small and contested effects [9], and a Bayesian analysis of new data found evidence against them [10]. Whatever one’s view of these claims, the methodological need is clear: such studies require statistics whose false-positive rate is controlled and documented, whose design is fixed before the data are seen, and whose sensitivity to plausible departures is documented. Most REG analyses have relied on a single statistic chosen for a single hypothesized effect, typically a cumulative deviation of the mean or the average correlation between devices. The DeepREG research programme records the output of REGs as pairs of streams (Section 1), and pairs was developed within it as a transparent, rank-calibrated test for such paired recordings.
3. Problem Statement
3.1. The Paired-Stream Null
Let and be two binary streams of common length N. The reference model, denoted throughout, is
That is, the two streams behave like two fair coins, each tossed independently of its own past and of the other coin. Here N always denotes the number of bits per stream; a record of 720,000 bits contains 720,000 bit pairs.
Among all processes on pairs of bits, is the one whose blocks have maximal entropy: a block of n consecutive bit pairs carries bits of entropy under and less under any other law. For a record generated by a law P, the natural measure of how far it lies from is therefore the Kullback–Leibler divergence of P from over the N bit pairs of the record [16], which equals the entropy deficit of the record because is uniform. This deficit splits exactly into five parts. Writing for the total correlation (multi-information) of a stream [36], the sum of the single-bit entropies minus the joint entropy, we have, in bits,
The identity follows from the definitions of mutual information and total correlation (Appendix A). Every term is non-negative and every term vanishes under , so a departure from is a deficit in at least one of the three parts, and departures of different kinds differ in where the deficit appears. Two refinements locate the remaining kinds. The coupling term splits exactly into the information flowing from the past of X to Y, the information flowing from the past of Y to X, and an instantaneous exchange between and given both pasts [37,38]; transfer entropy [17] is the stationary, finite-memory form of the two lagged parts. A drift is a marginal deficit that varies along the record: if J is a position drawn at random in a stretch of the record and H indicates which half of the stretch contains it, then is the Jensen–Shannon divergence between the bit laws of the two halves [39]. The asymptotic entropy rate is not the right quantity for localized departures: a departure confined to a finite episode leaves the rate unchanged, but its deficit in the record is finite and can be detected.
3.2. Parities and the Walsh–Fourier View
A second exact description says which part of the deficit a statistic can see. Write the bits as signs, and , so that the exclusive or of bits (⊕) becomes a product of signs. For a set S of bit positions the parity is the product of the signs in S, and its bias under P is . For a block of n bits the parities form an orthonormal basis of the functions of the block under the uniform law U, and Parseval’s identity for Boolean functions [40] gives
where (Appendix A). A law is uniform if and only if every parity is unbiased, and near uniformity its divergence is half the sum of the squared parity biases. The approximation holds when , that is, for weak departures on short blocks; in general [41]. Each feature of pairs (Section 4.2) is built from normalized sums of a few parities of order one or two: in a window, D1 uses and ; D2 uses ; D3 and D6 use and ; D4 uses and ; and D5 contrasts and between the two halves of the window. In total the test measures 4 order-one contrasts and 13 order-two parities (Table 1). The mean of every component depends only on the bias of its own parity, so departures carried by parities of order three or more, or by order-two parities at other lags, cannot change the mean of any component; they can change its variance and its correlation with other components, through products of parities, but only as second-order effects (Equation (14) gives an example). A dependence can therefore be strong and still invisible to the first- and second-order parities that pairs examines: Section 10.3 gives an exact example, in which one stream is a deterministic function of the other.
3.3. What Departures Look like
We group departures from Equation (1) into six classes according to the part of the joint structure of the pair that they affect. The classes are examples rather than a complete list: the space of alternatives to Equation (1) is infinite-dimensional, and no statistic built from a finite number of quantities can be uniformly powerful against all of it. Our aim is a test that responds to a broad and explicitly documented set of structural departures, and whose response to each of them can be measured. Table 1 lists the classes, the feature of pairs that targets each, the part of Equation (2) in which the corresponding deficit appears, and the parities that the feature measures. To first order, the information available to detect a weak departure is this deficit accumulated over the affected bits (Section 5.4).
3.4. Requirements
A practical test for paired streams should meet six requirements.
- R1
- One calibrated number. The output is a single p-value whose false-positive rate under is controlled in finite samples, without asymptotic approximations.
- R2
- Structural diversity. The test responds to all the classes of Figure 1, and reports which feature drove a detection.
- R3
- Multiple scales. It detects both weak departures that span the whole record and stronger departures confined to a short episode.
- R4
- Any length. It is calibrated for every record length in a practical range, so that records of different durations and bit rates can be scored and pooled.
- R5
- Reproducibility. Its calibration can be regenerated from a public specification, and independent implementations agree exactly.
- R6
- Documented power. Its sensitivity to specified departures is measured, so that users know what it can and cannot detect.
3.5. Terminology
Table 2 defines the terms used in the rest of the paper. The preregistration files and the code in the repository use shorter internal labels; Appendix D lists the correspondence.
4. The PAIRS Test
pairs combines two complementary summaries of local structure. The burden endpoint measures how often the windows of a record fall in unusual regions of their null distributions; the peak endpoint measures the most extreme feature value observed anywhere in the record. The two are designed for different patterns: a weak departure that affects many windows, and a strong departure confined to a few. Each endpoint is calibrated against simulated null records, and the two endpoint p-values are combined into a single record-level p-value. The rest of this section formalizes these steps. Figure 2 summarizes the construction, and Table 3 lists the four sets of null realizations that it uses, each with its own role. Every step is fixed in advance, and the final result is calibrated as a whole.
4.1. Windows
A record of length N is divided into windows of consecutive bit pairs starting at positions with stride . Only complete windows are used, so the number of windows is
The bits after the last complete window (fewer than 200) are discarded. The test depends on N only through w, and this is what allows a single calibration campaign to cover all supported lengths (Section 4.7).
4.2. Six Structural Features
Within a window, write and (values ), and for the window means, for the means of its first and second halves, and define the normalized lagged product sum
Under , has mean zero and variance one for every lag (and for when ). The six features are
Each feature is a non-negative magnitude of order one under that grows with the corresponding departure in either direction: a bias towards ones or towards zeros, an excess or a deficit of coincidences, a positive or a negative correlation. Table 4 states what each feature measures and what it cannot see. The lagged features use uncentred products, so a strong bias also raises D3, D4 and D6. The feature that dominates a detection therefore suggests the class of departure, but does not diagnose its cause.
The lags were chosen to probe memory at a few well-separated distances rather than to cover all of them. D3 looks at the nearest neighbour (lag 1). D6 extends this to lags 2 and 4, the next powers of two, where short-range artefacts of physical sources (for example, patterns introduced when bits are assembled into words, or a slow recovery of the detector after each event) would be expected to appear first. The third lag of D6 is defined relative to the window, : it probes structure at an intermediate scale, long enough to respond to slow oscillations or regime changes within a window and short enough that each window still contains products. D4 uses lags 1 and 4 for the same reasons, applied to the coupling between streams. Under the products at different lags are uncorrelated, so each squared feature built from m lagged terms is approximately a variable, whichever lags are used. The choice of lags therefore affects only which departures are detected, not the validity of the p-value, which is guaranteed by the calibration of Section 5. Departures at other lags are a documented blind spot (Table 4); their effect on the test can be measured with the sensitivity study of Section 8, which includes a lag-125 family.
The window length, the stride, the lags and the thresholds below were set during an exploratory stage of the work (Appendix C) and frozen before any of the validations reported here. They are design parameters, not quantities estimated from data. Section 8.4 discusses how the window length should be chosen for a new application.
4.3. Placement Within a Null Reference
The features have different null distributions, which are not Gaussian and are dependent on one another. Instead of modelling them, we locate each window value within a fixed reference support: the same feature, in the same window position, computed on independent null realizations. If reference values lie strictly below the observed value and are equal to it, the placement is
Under , q is approximately uniformly distributed. A value of q near one means that the window is unusual for that feature; a value near zero means that it is unusually regular.
4.4. Burden Endpoint
For each feature d, threshold and direction (upper or lower tail), the burden is the fraction of windows whose placement falls in that tail:
This gives a burden vector of components . Under their means are close to 0.25 (for ) and 0.10 (for ); a departure that persists over many windows shifts them.
The 24 components have different null means and spreads, so before they are compared they are brought to a common scale. For this purpose the burden vector is computed on a second, independent set of 110 null realizations, with the same window count w as the record being scored. For each component k this gives 110 null values , from which we take two robust summaries [34,35]: the median, , as the centre, and the median absolute deviation, , as the spread. For normally distributed data the MAD equals standard deviations, so the scale
is an estimate of the standard deviation () that, unlike the sample standard deviation, is hardly affected by a few extreme values. The standardized component then expresses how many null standard deviations the record lies above the typical null value, and the burden statistic is the largest of the 24:
The constants and depend on w and are stored for every window count. Taking the maximum avoids cancellation between components and indicates which component drove the detection. The maximum over dependent components has no simple null distribution, and this is why it is calibrated by simulation (Section 4.6). The standardization only puts the components on a common footing; an imprecise or costs some power but does not affect the validity of the p-value.
4.5. Peak Endpoint
The burden is designed for departures that affect many windows. A short, strong episode changes only a few windows and is diluted. The peak endpoint records, for each feature, the largest value over all windows, , standardizes it in the same way with the median and the scale of the same quantity in the 110 standardization realizations, and takes
This is a scan statistic in the sense of [21], applied to six features at once.
4.6. Reference Calibration and the PAIRS p-Value
A further set of null realizations, independent of those above, is scored in exactly the same way. The p-value of an observed statistic T is its inclusive upper-tail rank among the reference values,
computed separately for (giving ) and (giving ) [29,32]. The pairs p-value combines the two endpoints with a Bonferroni bound,
Under the two endpoints are only weakly dependent. Their Spearman correlation was 0.02 at in campaign C2; an exploratory check with 400 null pairs per length gave 0.19 at 3,600 bits and 0.11 at 36,000 bits, so the dependence fades as the record grows. The Bonferroni bound guarantees whatever this dependence, and it is conservative: if the two endpoint p-values were independent and uniform, the rate would be , that is 4.94% at , and the discreteness of lowers it further. The realized rate in validation was 4.76% on average (Section 7.3). Consequently is not uniformly distributed under , even if the ties of Equation (12) were broken at random; making it uniform would require calibrating the combined statistic itself.
pairs reports , both endpoint p-values, and the feature and the component that achieved each maximum. The last two are descriptive: they indicate where the evidence came from, but they are not separately calibrated.
4.7. A Single Calibration Campaign for All Supported Lengths
The null realizations are generated as long masters of 720,000 bits per stream, and a null record of length N is simply the first N bits of a master. Window j then contains the same bits in every length that includes it, so the placements do not depend on N. The burden for every window count is obtained from cumulative counts, and the peak from cumulative maxima, in one pass over each master. A single campaign of null realizations therefore calibrates every length up to 720,000 bits at once, and a record of any length is scored with the references of its own window count, without interpolation. Lengths below 3,600 bits () cannot be calibrated with this robust standardization, because the MAD of some burden components over 110 null realizations is zero there. This is a limitation of the standardization, not of rank calibration as such: a larger standardization set or a different scale estimator would extend the range.
4.8. The Features as Information Statistics
The construction above is purely operational. This subsection explains what the features measure in terms of information; it is not needed to compute the test, but it states precisely what the test can and cannot see.
Every component of a feature is a normalized sum of one parity (Section 3.2) over the window: if are the values of the parity, the component is . The D1 components are and ; D2 is ; the D5 components are and , with in the first half of the window and in the second; and D3, D4 and D6 are made of the lagged sums of Equation (5). Under each component has mean zero and variance one, and the components of one feature are uncorrelated (Appendix A), so are approximately variables with 2, 1, 2, 4, 2 and 6 degrees of freedom.
Three exact identities connect the components with information quantities (Appendix A). First, is Pearson’s statistic for the hypothesis that the parity is balanced. Second, the likelihood-ratio statistic of the same hypothesis is , where is the fraction of terms equal to , and , which is under . Third, when the empirical margins of two bits are exactly balanced in a window, their plug-in mutual information equals with their rate of agreement; more generally, the G statistic of a contingency table with n observations is times its plug-in mutual information. Each squared feature is therefore, to second order, twice the number of terms in the window times a plug-in information quantity (Table 5). As a check, the plug-in mutual information of a table has a null bias of about nats [42], so that , in agreement with .
The features are therefore classical. Per stream, , which is the statistic of the approximate-entropy test of SP 800-22 with block length one, because [2,44]. What pairs adds is not the features but their joint rank calibration, indexed by the window count, and the design of the endpoints. Two caveats follow from the dictionary. The lagged features use uncentred products, so under a bias the mutual-information readings no longer hold, although the features still measure the biases of their parities (Section 4.2). And D4 measures pairwise, not conditional, dependence. If X and Y are independent but each has autocorrelations and , then but
the classical source of spurious correlation between independent autocorrelated series [46]. For two binary Markov chains with , and the excess variance is , which is at . This does not affect validity, since such streams already depart from , but a detection driven by D4 can then come from memory in both streams and not from coupling. Transfer entropy, which conditions on the past of the target, does not have this problem. In the sensitivity study of Section 8 only one stream is perturbed, so the situation does not arise there.
5. Calibration Theory
Two calibration questions must be kept apart. The first concerns the procedure, averaged over the random construction of the reference: exchangeability gives it a finite-sample guarantee. The second concerns the particular reference that is generated once and kept for practical use: its conditional false-positive rate can differ slightly from the nominal level. pairs answers the first question by rank calibration (Section 5.1) and measures the second with fresh null records (Section 5.2 and Section 7).
5.1. Validity of the Rank p-Value
The p-value of Equation (12) is a Monte Carlo test in the classical sense [29,32]. Its validity rests on a simple counting argument, which we state here because the rest of the paper depends on it.
Proposition
(Rank calibration). Let be the values of a statistic on C null realizations and T its value on the record being scored. If the values are exchangeable and almost surely distinct, then for every level , with the largest integer not exceeding x,
with p given by Equation (12).
Proof.
Sort the values from largest to smallest. Exchangeability means that the record is equally likely to occupy any of the positions, so its position has probability of being each of . If the record is in position r, exactly reference values are larger, and Equation (12) gives . Hence exactly when , that is, for the highest positions, and the probability of this event is . □
The proposition states that the false-positive rate is known and does not depend on the distribution of T, which in our case is unknown. With and the rate is ; with it would be . Three properties must be kept apart, however.
- (i)
- Marginal validity. The probability in Equation (15) is taken over the record and the reference: it describes the procedure of drawing a fresh reference for every record. It is a finite-sample guarantee that requires no approximation.
- (ii)
- Conditional rate. In practice one reference is drawn once and frozen. For that reference the false-positive rate is a random quantity whose distribution is given in Section 5.2; its mean is the value of Equation (15), but a particular reference can lie slightly above or below it.
- (iii)
- Exact level. Equality with the nominal level holds only for continuous T, a single endpoint and an integer. Ties (below) and the Bonferroni combination of the two endpoints (Equation (13)) both make pairs conservative.
What pairs guarantees is therefore control of the type I error in finite samples, , marginally over the reference, together with a measured conditional rate for the references actually frozen (Section 7).
The condition of the proposition holds by construction. Under the record and the reference realizations are independent draws from the same model, scored by the same fixed procedure: the window features, the reference support and the standardization constants are set in advance and shared by all of them. The values are therefore exchangeable, whatever the distribution of T. When T can take tied values, as happens because the burden components are discrete, Equation (12) counts the ties against the record and p becomes conservative, ; randomizing the ties would restore equality for a single endpoint, but not for the combined p-value. With the attainable p-values are multiples of .
5.2. Why the Reference Must Be Large
The proposition concerns an average over all possible reference sets. In practice a single reference set is generated and then kept fixed, and for that particular set the realized false-positive rate is not exactly . For continuous T it follows a beta distribution,
whose standard deviation at is 0.020 for , 0.0069 for and 0.0022 for . A small reference can therefore be valid on average and still, for the particular set that was kept, have a false-positive rate well above the nominal one.
This affects how a reference is accepted. In this work every fixed reference had to pass an admission check before it was used: a preregistered number n of fresh null pairs, not used to build the reference, is scored, and the number of pairs with must be small enough to show that the conditional rate of this reference is below a tolerance (7% for and 4% for ; Section 7 gives the exact rule). A passed check is evidence that ; it does not show that equals . Given the reference, the number of alerts is binomial with parameter , so over references it follows the beta-binomial law obtained from Equation (16); this gives the probability that a correctly built reference passes a check (Table 6; the script is in the repository). With and several lengths checked at once, a correct reference fails at least one check with appreciable probability. With and 19,000 validation pairs it passes with probability essentially one, while the tolerances remain strict. This is why pairs uses .
5.3. A Window-Count Scaling Law
Each burden component is an average of window indicators, . Window j uses bits to , so windows five or more strides apart share no bits. We condition on the frozen reference support. Given the support, each indicator is a function of the bits of window j only, so under the indicator sequence is 4-dependent. It is not stationary, because the support, and with it the exceedance probability and the covariances , varies from one window position to the next. Because the support itself is built from null realizations, these position-dependent quantities form a stationary, finitely dependent sequence along the record, so their averages over j converge as w grows. With the average of over the window positions,
where the first expression is exact given the support and the second states the leading behaviour; the size of the correction depends on how fast the position averages converge and is measured below rather than derived. A central limit theorem for m-dependent sequences [47], in a version that allows non-identically distributed terms with bounded moments, then makes asymptotically normal, jointly for the 24 components. We present the law as a heuristic result, supported by this dependence argument and verified by simulation, rather than as a theorem with explicit error bounds. The ratio is the variance inflation caused by overlap; is the effective number of independent windows, and .
An exploratory study with 4,000 further null masters measured all 24 components at 90 window counts between 14 and 3,596 (Figure 3). Fitted exponents of on lie between and (mean ; bootstrap standard error about 0.004, obtained by resampling whole masters, so that the dependence between the lengths derived from one master is preserved). The one-constant law reproduces the empirical standard deviations with a median relative error of 0.7% for . The overlap inflation factors range from 1.09 (drift, lower tail) to 2.61 (lag-1 coupling, upper tail) (Table 7).
The law has three consequences.
- The burden statistic has a limit that does not depend on N. With law-based scales, the standardized burden vector converges to a correlated Gaussian vector, and to the maximum of 24 correlated standard normals. Its 0.95 quantile decreases smoothly from about 3.45 at to about 2.9 for , approaching 2.82, the 0.95 quantile of the maximum of 24 Gaussian variables with the null correlation matrix of the burden components, estimated from the 4,000 masters and evaluated by simulation of that Gaussian vector (Figure 4). With the 110-member robust scales actually used, the quantile fluctuates between 3.05 and 3.57; most of the apparent dependence of the reference on N is due to estimation noise in the robust scales. This noise costs some power but does not affect validity, which is guaranteed by the rank calibration.
- Sensitivity grows with length for persistent departures. A departure that shifts a component’s per-window exceedance probability by over the whole record moves the standardized component by about .
- Sensitivity is diluted for short episodes. If only windows are affected, the shift is about , which decreases as N grows. Section 8 confirms both predictions.
5.4. Information and Power
The identities of Section 4.8 have a counterpart under the alternative. If the m terms of a component share a parity bias c, the component has mean exactly, while the parity carries nats of divergence from in the window. The squared mean of the component, its noncentrality, is therefore twice the information that its parity carries, to leading order.
Proposition
(Local information equivalence). Let feature f have components , , where the are the values in a window of a parity of order one or two, and let be its average bias. As , assume that (A1) and ; (A2) the bits of the window are r-dependent for a fixed r, or are obtained from independent bits by sequential copying at a fixed lag g ( with probability , ), as in the persistence and long-memory mechanisms; (A3) the covariance matrix of tends to the identity. Then converges in distribution to a noncentral variable with degrees of freedom and noncentrality , and
with equality when does not depend on k. Here is the divergence from carried in the window by the parities of f.
The proof (Appendix A) combines a central limit theorem for m-dependent triangular arrays [48] with a coupling that makes sequential copying finitely dependent, and bounds the information by Jensen’s inequality. The inequality also shows why a signed sum loses a structure such as the alternating regime, whose average bias vanishes while its divergence does not. Under the conditions hold with , and the proposition reduces to the approximation of Section 4.8. Condition (A3) holds exactly under (Appendix A); under the mechanisms of the atlas we checked it by simulation: with windows (, ), the off-diagonal covariances of the components of D3 under persistence, D4 under lagged coupling and D6 under long memory were at most 0.021 in absolute value, and the variances within 0.023 of their limits, both within Monte Carlo error. For the mechanism that targets f, is, up to boundary terms, the divergence of the window given by the chain rule (Section 9.3): for example, for bias and D1, and for persistence and D3. Because is fixed in pairs, the limit serves as a local approximation. The proposition concerns the window features. The endpoints transform them further, by placement, thresholds and maxima, so the information that an endpoint needs is not given by Equation (18); it is measured in Section 8 and Section 9. What the proposition does explain is why the per-window signal of a weak departure is quadratic in its size.
A bias in a window shifts by , so that is twice the nats that the window carries, and the exceedance probability of D1 changes by for small s. Combining this with the scaling law, we find that the burden statistic responds to an episode of bits as
The divergence of Bernoulli from Bernoulli is nats per bit [16]. Equation (19) therefore states that the burden endpoint detects a departure when the divergence accumulated over the episode, nats, exceeds a multiple of . A test that knew the location, the length and the form of the departure would use the signed sum of the targeted indicator over the episode. Its noncentrality is , again twice the accumulated divergence, so it reaches 80% power at the two-sided level 0.05 when
whatever the length of the record. The factor is the cost of this particular design, which turns each window into a magnitude and then counts exceedances; it is not a lower bound for every method that searches all positions and classes. Other designs, such as scans over several window lengths with scale-dependent calibration [24], behave differently, and Section 9 measures the divergence that pairs and such alternatives need on identical records (Table 16). Section 8 measures the constant: 50% power is reached at –.
6. Implementation and Reproducibility
6.1. Deterministic Null Generator
All null realizations are produced by a published generator specification based on the SHAKE256 extendable-output function of the Federal Information Processing Standard (FIPS) 202 [49]. For a 32-byte root, a campaign identifier and an ordinal, one SHAKE256 call over the byte string
yields 180,000 bytes, whose two halves are the X and Y masters of 720,000 bits each (most significant bit first). Every calibration campaign fixes its root as the SHA-256 of a public phrase written in a preregistration, so that anyone can regenerate every null realization. Separate campaign identifiers give independent families for the reference support, the robust standardization, the reference calibration and validation. Determinism makes the results reproducible; it does not by itself make the generated bits behave like independent fair coins. The calibration rests on the assumption that SHAKE256 output, used in this way, is indistinguishable from for the statistics computed here. This is a standard assumption for an extendable-output function from the SHA-3 family, and Section 7 checks it against an unrelated generator.
6.2. Software
pairs is a Python package with NumPy as its only dependency. Every window quantity is an integer sum over a bit range and is computed exactly from 64-bit prefix sums in operations per lag; there is no loop over windows. Records are independent once the references are fixed, so campaigns run on a pool of processes and their results are aggregated deterministically. The package contains the scoring kernel, the generator, the calibration campaigns, the sensitivity atlas and the statistical tools used for admission (exact binomial bounds [50] and the Miettinen–Nurminen interval [51]). For users who do not want to program, it also provides a local web interface for scoring single pairs or batches of pairs from files, and a command-line batch mode; both export the results, with a description of the source, in a documented format that can be pooled across contributors.
6.3. Agreement Between Implementations
The burden endpoint was first prototyped in the Wolfram Language during the exploratory stage of DeepREG. The open Python implementation reproduces that prototype exactly: the two give identical floating-point values for every quantity compared (window features, burden vectors, standardization constants and calibration ranks), on Linux and on Windows. The comparison of generators (Section 7) was made with this prototype of the burden endpoint; for the combined p-value, independence from the generator rests on the agreement of the two SHAKE256 campaigns and is not separately tested. A second, independently written implementation agrees with both on 1,900 null pairs. Appendix C lists the comparisons and the few numerical details that exact agreement requires.
6.4. Performance
Table 8 summarizes the computing costs. Because every window quantity is obtained from prefix sums, scoring is fast enough that a full calibration campaign runs in minutes on a workstation and the whole sensitivity study in less than two hours on a two-core cloud machine.
7. Null Validation
Main finding. The frozen references passed all 24 confirmatory admission checks, at lengths from 12,000 to 720,000 bits, with realized false-positive rates of 4.30–5.14% at the 5% level; cohorts produced with two generators and scored by two independent implementations gave equivalent rates. The design of the checks and the detailed results follow.
Every validation below was specified in a preregistration whose SHA-256 hash was recorded before execution [52]; the full hashes and the preregistration files are listed in Appendix D and archived with the code (Data Availability Statement). A preregistration fixes the generator roots, the numbers of realizations, the lengths, the thresholds and the admission rule. The admission checks introduced in Section 5 are one-sided exact binomial tests. With n validation pairs and a tolerance (7% for , 4% for ), a check passes if the number of alerts does not exceed the largest k such that , where is 0.05 divided by the number of checks made at the same time. In other words, a reference is admitted only if its alert count is significantly lower than would be expected at a rate equal to the tolerance, that is, if the data show that its conditional rate is below . A passed check therefore bounds the rate from above; it does not show that the rate equals the nominal level. The nominal level itself is guaranteed marginally by the rank argument of Section 5, and the realized rates are reported in the tables below.
7.1. Does the Calibration Depend on the Generator?
A calibration built by simulation should depend on the null model, not on the particular pseudorandom generator used to simulate it. We checked this with the exploratory prototype of the burden endpoint, whose reference () had been built with Mersenne-Twister null realizations [53]. Three cohorts of 1,900 null pairs each were scored at against this unchanged reference: one generated with the Mersenne Twister and two with the SHAKE256 generator, the latter scored by two independently written implementations (Table 9). All three passed admission. The SHAKE256 cohorts were equivalent to the Mersenne-Twister cohort by a two one-sided tests (TOST) procedure based on the Miettinen–Nurminen interval [51], and an exploratory homogeneity test found no significant difference among the three (, at ; , at ).
7.2. Campaign C1: Burden Endpoint at Every Length
Campaign C1 regenerated all references with SHAKE256: 110 masters for the reference support, 110 for the robust standardization, 9,999 for the reference calibration and 19,000 fresh masters for validation. Window counts could not be calibrated (Section 4.7). The preregistered confirmatory admission concerned the burden p-value at the nested lengths 36k, 72k, 144k, 288k and 576k, with ten simultaneous checks (maxima 1,239 and 690 alerts). All ten passed (Table 10), and every 99.5% upper bound lies well below its tolerance.
7.3. Campaign C2: The Combined PAIRS p-Value
Campaign C2 added the peak endpoint. It reused the admitted C1 references unchanged, regenerated the C1 standardization and calibration masters from their public root (each checked against its recorded hash), built the peak standardization and calibration references, and validated the combined p-value of Equation (13) on 19,000 new masters. The admission covered seven lengths from 12k to 720k with fourteen simultaneous checks (maxima 1,235 and 687). All fourteen passed (Table 11). Over the two campaigns, the 24 confirmatory checks are therefore ten for the burden endpoint (C1) and fourteen for the combined pairs p-value (C2). The confirmatory admission covered the listed lengths from 12,000 to 720,000 bits; the calibration itself covers every length from 3,600 bits, and the rates between and below the admitted lengths are descriptive. Over a descriptive grid of 106 window counts from 14 to 3,596, the combined alert rate averaged 4.76% (range 4.0–5.3%) at and 2.38% at (Figure 5).
Below about 18,000 bits the burden endpoint alone is conservative, because its components take few distinct values and ties are counted against the record. The combined p-value does not show this effect, because the peak endpoint is nearly continuous.
7.4. Reproducibility
An independent rerun of C1 on another operating system regenerated the reference support (identical SHA-256), the standardization models for all 3,596 window counts, the calibration quantiles and the first 500 validation records, all bit-identical. C2 checked each of its 10,109 regenerated C1 masters against the recorded hash before use.
8. Sensitivity Atlas
A calibrated test is useful only if one knows what it can detect. We therefore measured the power of pairs against a structured set of departures from in a preregistered, purely descriptive study, which we call the sensitivity atlas.
Main finding. Detection follows three regimes, set by the length of the episode relative to the window and to the record: short episodes need above a constant, intermediate ones a fixed intensity per window, and long ones above a constant. For a departure covering the whole record, 80% power is reached at – when . Appendix B gives the detailed results.
8.1. Design
Alternatives. The study uses six generative mechanisms, one aimed at each structural class (Table 12). Inside an episode of L consecutive bits each mechanism raises its target quantity, for example for agreement, to (the targets are defined in Equation (21)); outside the episode the record follows . The alternating regime sets the bias of Y to and on alternate half-periods of 500 bits, so that its average bias over a period is zero while each window sees a change of regime. The mechanisms are not independent directions in a common parameter space: each changes its target at order but can also change other quantities, so the atlas measures the response of the whole test to each mechanism. In practice the cross-effects are small: the component that attains belongs to the targeted feature in 98–100% of detections, and the peak points to it in 60–87% (Table 17). This attribution is informative about the structural class that is present, but it is not a test of which mechanism produced the data. Combinations of mechanisms were not studied (Section 10). Figure 6 shows the geometry of a perturbed record.
Construction. Each perturbation acts on the Y stream only. Inside the episode, each bit of Y is replaced, with probability , by a value that creates the targeted structure (Table 12). The randomness of the perturbation comes from a separate SHAKE256 stream, so the whole study can be regenerated. In the atlas the episode is centred in the record; the comparison of Section 9 places it at random.
Grid. The study covered the record lengths , the episode lengths with , and ten values of from 0.005 to 0.5, with 100 replicates per cell and common random numbers across cells, for a total of 282,500 scored records. At the empirical false-positive rate was between 1% and 7% (100 replicates per length), consistent with the nominal 5%. With 100 replicates a power of 80% is estimated with a 95% Wilson interval of about 71–87%; the effect sizes for 80% power reported below are interpolated log-linearly between neighbouring grid values of , and the coarseness of the grid, rather than the replicate count, dominates their uncertainty (Table 13).
8.2. Three Detection Regimes
Figure 7 shows the power map at ; the effect size needed for 80% power at every length is shown in Figure 11 (Appendix B). All six families show the same three regimes (Figure 6b). They can be understood in terms of the signal that the episode produces in one window, , that is, the shift of a window feature in units of its null standard deviation.
- Sub-window episodes (). The episode fills only part of one window, the window signal is proportional to , and detection requires constant (slope in Figure 11). The peak endpoint detects these: 80% power needs – at and – at . The same law had been observed empirically with the exploratory precursor of pairs (Appendix C); this regime applies to any detector based on the most extreme window.
- Saturated windows (–30k). Once a window is completely inside the episode, adding further affected windows helps the maximum only slowly, and the required is nearly constant, about 0.045–0.07. The peak endpoint still dominates.
- Burden regime (long episodes). When many windows are affected, the burden endpoint becomes dominant and the frontier follows constant (slope ), as predicted by Equation (19). For a departure covering the whole record, 80% power is reached at – for , – for and – for , depending on the mechanism (Table 13).
The two endpoints divide the work. The burden endpoint alone is blind to episodes shorter than about 5–10% of the record, whatever their intensity, because it measures how many windows are unusual rather than how unusual they are; the peak endpoint alone is weak against long, faint departures. The combined p-value follows the lower envelope of the two, and the Bonferroni combination costs very little (Figure 12, Appendix B).
8.3. Sets of Records
In many applications the question concerns a set of records rather than one. A natural summary is the number K of records with . Its null distribution needs care, because all records of a given length are scored with the same frozen reference. Given the reference, independent records of equal length give , where is the conditional false-positive rate of that reference (Section 5.2), not exactly 0.05. Over references, K is beta-binomial, and the records are no longer independent, because they share . Marginal validity of each p-value therefore does not by itself justify an exact binomial test of K against 5% [33]. With the spread of is small (standard deviation 0.0022 for one endpoint at level 0.05), and its effect on a one-sided binomial test at level 0.05 is negligible for the set sizes of interest: the realized size changes from 0.0444 to 0.0460 for . It grows with n, however, to 0.046 instead of 0.038 for and 0.082 instead of 0.044 for (beta-binomial calculation with the law of Equation (16)). For large sets the count should therefore be referred to the beta-binomial law, or the set statistic calibrated by simulation. Records of different lengths use references of different window counts, built from the same calibration masters, so their conditional rates differ and are dependent; a set of mixed lengths should be calibrated by simulation as a whole.
The comparison that matters in practice is usually between two sets scored with the same references, such as records taken during events and records taken during matched control periods with the same device and durations. Conditionally on the references, events and controls of the same length then share the same under , and a two-sample comparison of their alert counts, or of any other statistic of their p-values, is exactly valid conditionally on the references, without any assumption about . Such paired designs are preferable to a comparison with the nominal 5%.
Under the binomial approximation, which is accurate for , 80% power for a one-sample test of the count requires a per-record power of 26% for , 15% for , 12% for and 10% for . Reading the atlas at 15% instead of 80% roughly halves the detectable effect size (Figure 8): with 50 records, whole-record departures of – become detectable. A comparison of events with controls has less power than this one-sample calculation, because the control rate must be estimated as well; for equal numbers of events and controls the required per-record power is roughly that of a one-sample test with half as many records.
Set-level analyses should rely on such counts of alerts rather than on tests of the uniformity of the p-values: the pairs p-value is calibrated in its lower tail, but for short records it takes few distinct values (23 for the burden endpoint in 400 null pairs of 3,600 bits), so a uniformity test would reject even for ideal sources.
8.4. Choosing the Window Length
The window length W sets the scale at which pairs looks at the data. The per-window signal leads to a simple rule, illustrated with an idealized model in Figure 13 (Appendix B).
- Short episodes (peak endpoint). The peak endpoint acts as a matched filter. The signal s is largest when , so the window should be about as long as the expected episode, measured in bits; in the idealized model the best choice lies between and L.
- Long weak departures (burden endpoint). The burden needs many windows, each with a modest signal. Because the effect on each window grows with the square of s when s is small, windows should be long enough that –2, that is , but no longer than the episode.
A fixed window length in bits corresponds to different time scales for sources with different bit rates. Whether a higher bit rate helps depends on the physics of the departure. If the per-bit probability shift does not depend on the rate, s grows as the square root of the rate, and faster sources are better. If the departure is a fixed number of anomalous bits per second, falls as the inverse of the rate, s falls as its inverse square root, and slower sources are better. Recording the same events with sources of different rates therefore offers an empirical way to distinguish the two models. The present calibration fixes ; calibrating other window lengths only requires running the same campaigns with another W.
Planned applications. The studies that motivated pairs will not rely on single records. They will compare sets of records, for example records taken during a series of events with records taken during matched control periods of the same duration and with the same devices. In such designs the relevant power is that of the set, and it depends on the number of events and controls as described in Section 8.3: with tens of events, effects about half as large as the per-record values become detectable (Figure 8). Table 14 gives the per-record starting point for the bit rates and durations planned in DeepREG. A window of 1,000 bits lasts 100 s at 10 bits/s but only 5 s at 200 bits/s, so the two kinds of device are examined at very different physical time scales. If the departures sought have a characteristic duration in seconds, the window should be set in seconds for each device, which only requires a new calibration campaign.
9. The Cost of Generality: Comparison with Reference Detectors
Main finding. On identical records, detectors aimed at a known structure are more powerful than pairs against the departures they target: a multiscale scan of signed indicators needs about 16 nats of accumulated divergence, where pairs needs 25–125. Against departures that cancel in signed sums, such as an alternating regime, the order is reversed and pairs needs 3 to 10 times less than the scan. The design and the detailed results follow.
pairs looks for many kinds of departure at every position and scale. A test that knows the kind of departure, or that it covers the whole record, can concentrate its power, and the question is how much pairs gives up in exchange for its generality. To measure this we scored identical records with pairs and with four reference detectors. The study was exploratory and not preregistered; its code and outputs are part of the repository.
9.1. Design
Records. All records had bits per stream. Null pairs came from the SHAKE256 generator of Section 6 with a campaign identifier of their own, and were perturbed with five of the mechanisms of Table 12 (bias, agreement, persistence, alternating regime and long memory) in an episode of bits placed at a random position. Fifteen effect sizes from to 0.256 on a grid with successive ratios 1.5 and 4/3 (), finer than that of the atlas, were used with 200 replicates per cell and common random numbers across cells: every detector saw exactly the same records.
Detectors. Each detector works on indicator sequences that are Bernoulli(1/2) under . We used nine: , , , , , , , and . They are the signed counterparts of features D1–D4 and D6.
- Oracle z test. Two-sided z test of the indicator that the mechanism targets, over the whole record. It knows the kind of departure and assumes that it covers the record.
- Global battery. The nine whole-record z tests with a Bonferroni correction ( each). It does not know the kind of departure but assumes that it covers the record, like a conventional battery.
- Oracle scan. The largest of the targeted indicator over the whole record and over windows of bits () starting every quarter of their length. It knows the kind of departure but not its position or length.
- Scan battery. The same multiscale scan applied to all nine indicators, with a single maximum. Like pairs, it knows neither the kind, the position nor the length of the departure.
The z tests use normal critical values. The thresholds of the two scans are the 0.95 quantiles of their null distributions, estimated from 4,000 further null records. Their size, checked on the half of these records not used to set the threshold, was 4.2% (oracle scans) and 4.6% (scan battery); the size of the oracle z tests was 5.1–5.6%, of the global battery 4.6%, and of pairs 5.5% on the 200 null records of the study.
9.2. Results
Four results stand out.
- Against a known, whole-record departure,pairsis far from optimal. For bias, agreement, persistence and long memory over the whole record, the oracle z test reaches 80% power at , where exact 80% power corresponds to (the observed values, 2.92–2.94, are slightly higher because of interpolation on the grid and Monte Carlo error; Section 9.3), while pairs needs 0.010–0.015, between 3.6 and 5.4 times more. Not knowing the kind of departure costs little in this setting: the global battery needs 0.0035.
- Global tests fail for localized departures. For an episode of 2,000 bits neither z test reaches 80% power on the grid, and for 16,000 bits they need about 0.05–0.06. Any detector meant for episodes of unknown position and length must search over positions and scales.
- A multiscale scan of signed indicators is more powerful thanpairsagainst the departures it targets. The scan battery, which, like pairs, knows neither the kind nor the position nor the length of the departure, needs smaller effects than pairs for all four mechanisms whose target is one of its indicators: by a factor of about 1.3–1.4 for episodes of 2,000 bits and about 1.8–2.7 for longer ones. It needs only about 10% more than the oracle scan, so not knowing the kind of departure is cheap for a scan too.
- pairsis more powerful against departures that cancel in signed sums. The alternating regime raises and lowers the bias on alternate half-periods of 500 bits, so its signed effect averages out over any window that spans whole periods. Here pairs, through its drift feature, needs about half the effect size of the scan battery or less at every episode length (0.32–0.54 times; 0.017 instead of 0.055 for the whole record), and the oracle tests are not even defined.
9.3. The Comparison in Units of Information
The effect sizes of Table 15 can be put on a common scale. Every mechanism of the comparison replaces each bit of Y in the episode, with probability , by a value that depends only on X, on the earlier bits of Y and, for the alternating regime, on the position. In the persistence and long-memory mechanisms the copied bit is the already perturbed one (sequential copying). Given everything that precedes it, each such bit therefore equals its target value with probability , and by the chain rule for divergence the episode carries exactly nats of divergence from , whatever the mechanism. The divergence is taken given the position of the episode; with a random position, the law of the record is a mixture, whose divergence is smaller by convexity. For the alternating regime the bias changes sign between half-periods, but the divergence of each bit does not, because . Converting the effect sizes with this formula puts all detectors and mechanisms on one axis (Table 16 and Figure 10). Because the conversion squares , the relative uncertainty of each entry is about twice that of the corresponding effect size.
Table 16.
Divergence from accumulated over the episode, in nats, at the effect size that gives 80% power (from the unrounded values behind Table 15). The ideal test of Equation (20) needs 3.9 nats. “—”: not reached on the grid or detector not defined. Persistence gives values within 15% of those for bias and is omitted.
Table 16.
Divergence from accumulated over the episode, in nats, at the effect size that gives 80% power (from the unrounded values behind Table 15). The ideal test of Equation (20) needs 3.9 nats. “—”: not reached on the grid or detector not defined. Persistence gives values within 15% of those for bias and is omitted.
| Mechanism | L | oracle z | global battery | oracle scan | scan battery | pairs |
|---|---|---|---|---|---|---|
| bias | 2k | — | — | 14 | 16 | 26 |
| 16k | 75 | 123 | 14 | 16 | 70 | |
| 64k | 19 | 31 | 13 | 16 | 83 | |
| N | 4.3 | 7.0 | 15 | 16 | 73 | |
| agreement | 2k | — | — | 13 | 16 | 26 |
| 16k | 79 | 124 | 14 | 17 | 62 | |
| 64k | 20 | 32 | 14 | 17 | 55 | |
| N | 4.3 | 7.1 | 14 | 16 | 56 | |
| long memory | 2k | — | — | 13 | 16 | 33 |
| 16k | 75 | 122 | 14 | 17 | 117 | |
| 64k | 19 | 30 | 14 | 16 | 116 | |
| N | 4.3 | 7.0 | 14 | 17 | 123 | |
| alternating regime | 2k | — | — | — | 122 | 35 |
| 16k | — | 1,015 | — | 409 | 120 | |
| 64k | — | 994 | — | 924 | 201 | |
| N | — | 1,059 | — | 1,725 | 171 |
Three results follow.
- A test that knows everything needs about 4 nats. For whole-record departures the oracle z test is the ideal test of Equation (20), which needs 3.92 nats; the table gives 4.3, and this difference, like the 5–14% excess of the oracle z test at the shorter lengths (exact values ), indicates the accuracy of the table: its entries are interpolated on a grid of whose steps multiply the divergence by about two, from 200 replicates per cell. The global battery, which does not know the kind, needs 7.
- Searching costs about ten nats, at every scale. The oracle scans need 13–15 nats and the scan battery 15–17, whatever the length of the episode. A simple argument predicts these values. If a scan examines n windows and detects through the one that best matches the episode, 80% power needs about nats, with the Bonferroni threshold . The design of Section 9 has windows, including the whole record, for an oracle scan and for the battery; this gives and , and predicts 12.9 and 15.4 nats. With the empirical thresholds of the scans (4.17 and 4.68), which are lower than the Bonferroni values because the windows overlap, the prediction becomes 12.4–12.6 and 15.2 nats; the observed values exceed it by 1–15%, which is the cost of imperfect alignment between the episode and the windows. Since for large n, the cost of not knowing where the departure is, and of which kind, grows only logarithmically with the number of hypotheses examined.
- pairsneeds 25–125 nats for the signed mechanisms, between 1.6 and 7.4 times as much as the scan battery. The ratio is smallest for short episodes, where the peak endpoint acts like a scan at a single scale, and largest for long memory. For the alternating regime the order is reversed: pairs needs 35–200 nats and the scan battery 120–1,700, between 3.4 and 10 times as much, because signed indicators average the alternating bias away while the divergence of every half-period remains.
9.4. Where the Cost Comes From
The comparison locates the cost of the present design. Three of its choices give up power against simple departures. First, the features are magnitudes, insensitive to the sign of an effect; this is what lets them respond to departures of either sign and to structures that cancel, but it makes the per-window signal of a weak effect quadratic in (Section 5.4), whereas a signed sum responds linearly. Second, the burden turns each window into exceedance indicators at fixed thresholds, which discards part of the information in the window values. Third, the window length is fixed at 1,000 bits, so the peak endpoint is matched to episodes of about that length, and the burden accumulates evidence only through overlapping windows of that length; the scans, by contrast, examine nine dyadic scales. The law of Equation (19) is a consequence of these choices, not a limit for every detector that searches all positions.
What pairs obtains in exchange is a single calibrated p-value per record that responds to a broad set of structures, including departures that signed statistics miss, and that indicates which structural class drove a detection (Table 17). For the departures that the indicators target directly, however, users who need the highest sensitivity should complement pairs with a multiscale scan of those indicators, and a future version of the test should include such a scan as a further endpoint (Section 10).
10. Discussion
10.1. What Is Established
Three statements are supported by preregistered evidence. First, the pairs p-value controls the false-positive rate under the paired null: the rank argument guarantees marginally at every calibrated length (3,600–720,000 bits per stream); for the references actually frozen, all 24 confirmatory admission checks (10 for the burden endpoint, 14 for the combined p-value, at lengths from 12,000 to 720,000 bits) showed rates below the tolerances, the realized rates were close to nominal (4.30–5.14% at the 5% level), and the descriptive curves stay within binomial noise of the nominal rate down to 3,600 bits. Second, for the burden endpoint the calibration depends on the null model, not on the generator or on the implementation: cohorts produced with two different generators and scored by independent implementations agree. Third, the sensitivity of the test to six perturbation mechanisms has been mapped over two orders of magnitude in record length and three in episode length. The map shows three regimes, each with a simple scaling law that follows from the geometry of the windows. A fourth, exploratory result qualifies the third: on identical records, simpler detectors aimed at the same structures are more powerful than pairs against the departures they target (Section 9).
10.2. Why Two Endpoints
The burden and the peak answer different questions: how many windows are unusual? and how unusual is the most unusual window? Neither is better in general. The burden accumulates evidence and wins for long, faint departures, while the peak wins for short, intense ones. Because the two are only weakly dependent under the null, combining them with a Bonferroni bound costs little. Other combinations, such as a rank-based minimum or a weighted sum, could be calibrated in the same way, but the gain would be small.
10.3. Limitations
- Selected alternatives. The six features are a deliberately chosen family, not a complete description of all departures. Departures at lags other than those listed, periodic structures not aligned with the window, and dependence carried by parities of order three or more may go undetected. The atlas covers only single centred episodes, perturbations of one stream by one mechanism at a time (no combinations), lags equal to those the features examine, an alternating regime whose half-period (500 bits) is matched to the window, and no departures towards excessive regularity, which would act on the lower tails that account for half of the burden components. Episodes at random positions were examined only in the comparison of Section 9; episodes at the edges of the record, several episodes, effects of opposite signs and unexamined lags remain to be studied. The power estimates rest on 100 replicates per cell and on interpolation between coarse grid values of ; the finer grid of Section 9 gives smaller effect sizes for whole-record departures (for example 0.011 instead of 0.015 for bias at ), so the values of Table 13 should mostly be read as upper bounds (agreement is the exception: 0.0099 on the finer grid against 0.009 in the table).
- A blind spot, stated exactly. The features measure parities of order one and two (Section 3.2), so a dependence carried only by higher-order parities does not shift any of them. The simplest example is with X satisfying , a fault that resembles an error of differential encoding in hardware. Then Y is a deterministic function of X, and bits, one bit short of the maximum. Yet every parity stream that the features use is a sequence of independent fair bits, so every component has exactly its null distribution, and D2, which uses a single stream, is exactly null (Appendix A). The whole dependence sits in the order-three parity , which is 0 for every i. Features that combine two components are not exactly null, because their components become dependent although they remain uncorrelated, but the effect is small: in 200,000 simulated windows of 1,000 bits, D1 and D3–D6 exceeded their null 0.90 and 0.99 quantiles with frequencies 0.098–0.100 and 0.0094–0.0101. pairs is therefore not designed to detect this departure; its rejection rate against the frozen references remains to be measured.
- Fixed design parameters. The window length, stride, lags and thresholds were set in the exploratory stage of the work and then frozen; they were not optimized. Section 8.4 indicates how the window length should be chosen for new applications.
- Range of lengths. Calibration covers 3,600 to 720,000 bits. Longer records require longer null masters, which is a computational rather than a methodological change.
- Robust scales. The 110-member robust scales add noise of about to the standardized components. This costs some power but not validity. Standardization based on the scaling law would provide a smooth alternative.
- Null model and interpretation.pairs tests a joint null: balanced marginals, independence in time and independence between the streams. A small p-value shows that this joint model fails; it does not by itself show that the streams are coupled, and it does not identify the origin of the departure. A p-value is not a measure of the size of a departure, and a large one does not certify randomness, let alone cryptographic security [2]. Real devices are not ideal, so in applied studies the comparison should be made between conditions recorded with the same devices, for example events and matched control periods, and not between a device and the ideal null.
- Choice of length. That any length can be scored does not license choosing, after seeing the data, the length or the segment that gives the smallest p-value. Lengths and windows of analysis must be fixed in advance, or the search must be included in the calibration.
- Set-level use. The p-value is calibrated in its lower tail, but for short records it is coarse and not uniform above the tail. Analyses of sets of records should count alerts at fixed levels rather than test the uniformity of the p-values, and they must take into account that records scored with the same reference share its conditional false-positive rate (Section 8.3).
- Internal verification. The verifications reported here were carried out within the development programme. Independent review of the code and of the calibration files is welcome, and the public generator makes it straightforward.
10.4. Outlook
Several extensions suggest themselves. A version with windows defined in seconds, or with a small family of window lengths combined in the same way as the two endpoints, would match the test to the time scale of the departures sought. Standardization based on the scaling law would remove the noise of the robust scales. Calibrating the combined statistic directly would make the p-value uniform under the null, which would allow tests of uniformity on sets of short records: if every member of the pooled set formed by the record and the references is ranked within that set, the minimum of its endpoint p-values is exchangeable across members, and the rank of the record’s minimum is an exact Monte Carlo p-value, uniform on its grid when ties are broken at random (Appendix A). The comparison of Section 9 points to the most promising change: adding a signed multiscale scan of the targeted indicators as a further endpoint, combined with the other two in this exact way. It would recover most of the power that the present design gives up (a search cost of about ten nats instead of 25–125; Section 9.3), while the magnitude-based features would keep their sensitivity to departures that cancel in signed sums. The comparison itself should be extended with information-theoretic baselines, namely a windowed plug-in mutual-information test and the transfer-entropy likelihood-ratio test [45] at the lags of the atlas, calibrated by the same ranks, and with a standard battery applied to X, Y and . The atlas should include two independent persistent streams, to measure how often D4 attributes memory to coupling (Equation (14)), and the departure as a documented negative result. A version of D4 that conditions on the past of the target, as transfer entropy does, would remove the attribution problem. Finally, because pairs reports which feature drives each result, scoring many sources (pseudorandom generators, physical noise sources, quantum generators, deliberately structured signals) would build a reference collection of structural signatures that relates types of source to their typical departures. The package already exports results in a common format for this purpose, and we invite other groups to contribute pairs from their own generators.
11. Conclusions
pairs turns the problem of testing two streams of bits that should behave like independent fair coins into a single calibrated p-value per record. Its six structural features are classical information statistics: each tests whether a few parities of the bits are balanced, and its square is, to second order, twice the number of terms in a window times an entropy deficit, a mutual information or a Jensen–Shannon divergence. These quantities are terms of an exact decomposition of a record’s divergence from the null, which also states precisely what the test cannot see. Rank calibration controls the false-alarm rate in finite samples: one calibration campaign covers all lengths from 3,600 to 720,000 bits per stream, preregistered checks with fresh null pairs confirmed it from 12,000 bits upwards, and cohorts produced with different generators and implementations gave equivalent rates.
What pairs can detect follows simple laws. Short episodes are detected when their intensity times their length exceeds a threshold, long weak departures when their accumulated information deficit exceeds a threshold that grows as the square root of the record length, and in between a fixed intensity per window is needed. Generality has a price, which can be stated in nats: a test aimed at a single known departure needs about 4 nats of accumulated divergence and a multiscale scan of signed counts about 16, whereas pairs needs 25–125. For departures that cancel in signed counts the order is reversed, and the scan needs 3 to 10 times more information than pairs.
pairs is therefore preferable when the kind of departure is not known in advance, when departures may cancel in signed counts, and when a single calibrated number per record is needed; otherwise it should be complemented by targeted tests. In applications, the window should be about as long as the episodes one expects, the record should not be much longer than the period in which a departure is plausible, and sets of records should be compared with matched controls scored with the same references. pairs is open, fast and fully reproducible. It is intended both as a tool for applied studies, including the analysis of random event generators that motivated it, and as a reference against which other tests for paired binary data can be compared.
Author Contributions
Conceptualization, J.F.U., V.B., W.J., V.A.J. and R.D.N.; methodology, J.F.U.; software, J.F.U.; validation, J.F.U., E.M. and A.G.; formal analysis, J.F.U. and V.B.; investigation, J.F.U.; data curation, J.F.U.; writing—original draft preparation, J.F.U.; writing—review and editing, all authors; visualization, J.F.U.; supervision, R.D.N.; project administration, J.F.U. V.B. contributed the information-theoretic foundation (Section 3.2, Section 4.8, Section 5.4, Section 9.3 and Appendix A). W.J. proposed the use of paired REGs and the emphasis on fully automated analysis. All authors have read and agreed to the published version of the manuscript.
Funding
This work was supported by the Metta Hospice Foundation, with additional support from the researchers involved and from individuals, notably a donation from Dr Edi Bilimoria.
Data Availability Statement
The pairs source code at the version evaluated here (0.2.3), the generator specification, the preregistrations with their full SHA-256 hashes (Appendix F), the frozen references, the per-replicate outputs of the calibration campaigns, the sensitivity atlas and the comparison of Section 9, and the scripts that produce every table and figure are archived in Zenodo, https://doi.org/10.5281/zenodo.24141349; until publication they are available to reviewers through a private link. All null realizations can be regenerated from the public roots listed in Appendix F.
Acknowledgments
The authors wish to honour the memory of Brenda Dunne and Peter Fenwick, members and mentors of our research team and founding advisers of the Galileo Commission, and their enduring scientific legacy.
Conflicts of Interest
W.J. is the inventor named in the patent application on identifying synchronicity ranges of two time series of random numbers cited in Section 2 [12], which was filed by Wyrd Experience Ltd. He holds a minority shareholding, received in connection with this patent, in Wyrd Technology, a company majority-owned by Wyrd Experience Ltd, and he works as an independent contractor for Wyrd Research, a non-profit association. These organizations had no role in the design of the study, in the analyses, in the writing of the manuscript or in the decision to publish the results. The other authors declare no conflicts of interest.
Use of Artificial Intelligence
During the preparation of this work the authors used Claude (Anthropic) to draft and edit text and derivations, to write and check code, and to run the verification simulations and exact enumerations reported here. The authors have reviewed and edited the output and take full responsibility for the content of this publication.
Abbreviations
The following abbreviations are used in this manuscript:
| ApEn | approximate entropy |
| CUSUM | cumulative sum (procedure) |
| FIPS | Federal Information Processing Standard |
| GCP | Global Consciousness Project |
| JS | Jensen–Shannon (divergence) |
| KL | Kullback–Leibler (divergence) |
| MAD | median absolute deviation |
| MI | mutual information |
| NIST | National Institute of Standards and Technology |
| PAIRS | Paired-stream Anomaly Index with Rank-calibrated Scores |
| REG | random event generator |
| SHAKE256 | extendable-output function of the SHA-3 standard |
| SP | Special Publication (NIST) |
| TC | total correlation |
| TE | transfer entropy |
| TOST | two one-sided tests (equivalence procedure) |
| VIF | variance inflation factor |
A. Information-Theoretic Derivations
This appendix proves the statements of Section 3.2, Section 4.8, Section 5.4 and Section 10.3. Logarithms are natural (nats) unless bits are stated; . Signs are and ; the paper’s and satisfy and . Products of two signs are the same in both notations, and every feature is a magnitude, so the sign convention never matters. Exclusive or becomes multiplication: .
A.1. The Partition
By definition , so . By definition , so , and likewise for Y; this gives Equation (2). The left side is the divergence from the uniform law on bits, . Each term on the right is non-negative: a bit has entropy at most one bit, by subadditivity of entropy, and . Under every bit is fair and all bits are independent, so all terms vanish. By the chain rule, , and because adding variables cannot decrease mutual information; this is the bound quoted for D6 in Table 5. For the drift reading, let J be uniform on the positions of a window, the half containing J, and the bit laws of the halves. Then , the Jensen–Shannon divergence with equal weights [39].
A.2. Parities and Parseval’s Identity
Lemma 1.
If are independent fair signs and , then and .
Proof.
For , independence gives . Since , , whose mean is 1 exactly when the symmetric difference is empty. □
Under the uniform law U on the parities are therefore orthonormal, and the of them form a basis. For a law P, the function has coefficients , with , and Parseval’s identity gives . Hence , and if and only if every with vanishes. For the divergence, write , so that and , and for some between 0 and g. With , and , so differs from by at most , which is Equation (3). By the Cauchy–Schwarz inequality the total-variation distance also satisfies , so a law whose parities are all nearly unbiased is close to uniform.
A.3. One-Parity Statistics
Let m values of a parity contain k values , with and . (i) , which is Pearson’s statistic with expected counts . (ii) The log-likelihood ratio of against is , so . (iii) With , ; since , , which is under , where . In terms of the bias , a parity carries nats per term.
For two bits whose empirical margins in the window are both exactly , the margins force and , where is the agreement rate. Then and . For any contingency table with n observations, observed counts and expected counts , the G statistic is . Applied to the table (half of the window) × (bit), with , this gives the D5 entry of Table 5; the squared D5 component equals , which is the two-sample Pearson statistic multiplied by , where is the proportion of ones in the window. Finally, the approximate entropy of order one is , and up to boundary terms of order ; the corresponding statistic of SP 800-22 [2] is asymptotically [44].
A.4. The Components Under the Null
Each term of a lagged sum with , or with and , is a product of distinct fair signs, so by Lemma 1 it has mean zero, and because a term is non-zero only when the two index sets coincide, that is . The same argument shows that the components within one feature are uncorrelated: and would need and , hence ; two lags would need , which is impossible; and the D1 and D5 components of one stream have covariance .
A.5. Information and Power
Proof of Proposition 2. Means. by (A1).
Finitely dependent bits. Fix and write , where collects the centred terms whose newest bit is i. Each term involves bits at most 125 positions apart, so is an -dependent triangular array, with and . By (A3), . Since , the Lindeberg condition holds, and Orey’s theorem for m-dependent triangular arrays [48] gives .
Sequential copying. Write , with independent replacement indicators and independent fair original bits . Define unless , in which case . Then is a function of at positions i, and only, so is -dependent, and . Let be computed with . Each involves at most two bits of Y, so with , and by the Cauchy–Schwarz inequality
Hence in ; the means and variances of and have the same limits, the previous step applies to , and .
Limit law. By the Cramér–Wold device, converges to a normal vector with mean h and identity covariance, and by continuous mapping converges to a noncentral variable with noncentrality .
Information. The function is convex. By Jensen’s inequality over k, , with equality when the bias is constant in k. Summing over j gives . □
The ideal test. With over L bits, has mean and variance . Neglecting the opposite tail, the power of the two-sided test at level 0.05 is , which equals 0.8 when , that is nats (Equation (20)).
Variance of a cross-lag sum. If , and the streams are stationary with autocorrelations and , then . With there are m ordered pairs with and with , which gives Equation (14). For a stationary chain with , , so , and for two such streams the excess variance tends to .
A.6. The Blind Spot
Lemma 2.
Let be independent fair signs and , with strictly increasing in k. Then are independent fair signs.
Proof.
Write , where is the product over . Every index in and in is smaller than , so is independent of them and . □
Let X satisfy , with the bit before the record, and , so that . Substituting and using , the parity streams used by the features are (up to sign): and (D1, D5); (D2); and (D3); and for , and for (D4); and (D6). In each stream the newest index increases by one from term to term, so by Lemma 2 each is a sequence of independent fair signs, and every component, a function of one such stream, has exactly its null distribution at every window length. The departure sits in the order-three parity: for every i. By Lemma 2 applied to , Y alone consists of N fair bits, so ; given only is uncertain, so and bits. An exhaustive enumeration of all sequences confirms that every stream above at lags 1, 2 and 4 takes each of its possible values equally often.
Features that combine two components are not exactly null. For D3, with , the two components are and . The are independent fair signs, and exactly when , so at , whereas the same moment is zero under . This third moment does not, however, affect the law of D3: contains only even powers of each component, and, being bounded, its law is determined by its moments, none of which involves an odd power. What does change is the mixed fourth moment. Counting index sets in the same way (beyond the null term, only the terms with and contribute), , against 1 under . Since each component has exactly its null law, exceeds its null value by , about 0.2%: an effect of order . Both moment formulas were confirmed by exhaustive enumeration for , 8, 10 and 12. The effect on the features is small (Section 10.3): we simulated independent windows of bits under and under this departure, computed D1–D6 by Equation (6), and found exceedance frequencies of the null 0.90 and 0.99 quantiles of 0.098–0.100 and 0.0094–0.0101 for D1 and D3–D6.
A.7. An Exact Combination of Endpoints
Pool the record with the reference realizations , exchangeable under . For each member r and endpoint e, let , computed within the pooled set, and . Each depends only on and on the unordered pooled set, so permuting the members permutes the in the same way, and exchangeability of the implies exchangeability of the . Proposition 1 applied to shows that satisfies , and with ties broken at random is uniform on . Each reference member must be ranked within the full pooled set, including the record; ranking against a fixed set that excludes the record breaks the argument.
B. Sensitivity Atlas: Detailed Results
This appendix collects the detailed results of the sensitivity atlas summarized in Section 8.
Target quantities. For bit position i the mechanisms of Table 12 raise the following quantities, each of which is zero under :
The alternating-regime mechanism has no single target of this kind. The bias mechanism also raises the uncentred lagged products used by D3, D4 and D6 at order , and the alternating regime is a local bias of order within each half-period.
Which feature drives a detection. For single mechanisms at the effect sizes that matter in practice, the cross-effects are small: the component that attains belongs to the targeted feature in 98–100% of detections, and the peak points to it in 60–87% (Table 17). The attribution is therefore informative about which structural class is present, but it describes the test’s response; it is not a test of which mechanism produced the data, and combined or unexamined mechanisms could share the same signature.
Table 17.
Which feature drives a detection. Departure over the whole record, , at the 80%-power value of Table 13, 400 records per mechanism (exploratory). Share of the detected records () in which each feature owns the component that attains (burden) or (peak); shares below 0.03 are omitted.
Table 17.
Which feature drives a detection. Departure over the whole record, , at the 80%-power value of Table 13, 400 records per mechanism (exploratory). Share of the detected records () in which each feature owns the component that attains (burden) or (peak); shares below 0.03 are omitted.
| Mechanism | power | dominant feature: burden / peak | |
|---|---|---|---|
| bias | 0.023 | 0.93 | D1 1.00 / D1 0.74, D4 0.08, D2, D3, D5, D6 0.05 each |
| agreement | 0.017 | 0.83 | D2 0.99 / D2 0.72, D4 0.09, D5 0.07, D6 0.06, D1 0.03 |
| persistence | 0.019 | 0.82 | D3 0.99 / D3 0.60, D4 0.12, D5 0.10, D2 0.07, D6 0.06, D1 0.05 |
| lagged coupling | 0.022 | 0.91 | D4 1.00 / D4 0.81, D2 0.06, D5 0.05, D6 0.04 |
| alternating regime | 0.033 | 0.91 | D5 0.98 / D5 0.87, D4 0.07 |
| long memory | 0.027 | 0.84 | D6 0.99 / D6 0.65, D4 0.10, D5 0.10, D1 0.06, D3 0.05, D2 0.04 |
Figure 11.
Effect size needed for 80% power (level 0.05) as a function of episode length, for five record lengths. Dashed guides: slope ( constant) and slope ( constant). Dotted line: window length W. Values are interpolated between grid points of and inherit its resolution.
Figure 11.
Effect size needed for 80% power (level 0.05) as a function of episode length, for five record lengths. Dashed guides: slope ( constant) and slope ( constant). Dotted line: window length W. Values are interpolated between grid points of and inherit its resolution.

Figure 12.
Effect size for 80% power at for the burden endpoint alone (blue), the peak endpoint alone (orange) and the combined pairs p-value (dashed).
Figure 12.
Effect size for 80% power at for the burden endpoint alone (blue), the peak endpoint alone (orange) and the combined pairs p-value (dashed).

Figure 13.
Idealized illustration of the window prescription (non-overlapping windows, Gaussian window statistics, , bias in an episode of L bits). (a) The peak statistic is most powerful when W is close to L (dotted lines). (b) The burden statistic prefers windows with a modest per-window signal and loses power when W approaches L, except for whole-record departures.
Figure 13.
Idealized illustration of the window prescription (non-overlapping windows, Gaussian window statistics, , bias in an episode of L bits). (a) The peak statistic is most powerful when W is close to L (dotted lines). (b) The burden statistic prefers windows with a modest per-window signal and loses power when W approaches L, except for whole-record departures.

C. Development History and Cross-Implementation Checks
pairs was developed within the DeepREG programme in several exploratory steps, all written in the Wolfram Language before the open implementation described here.
A first scorer computed three proportions per window (the ones in each stream and the rate of agreement), combined them into a local Mahalanobis-type distance, and applied false-discovery control [25] with rules on runs of flagged windows. Its sensitivity was studied by inserting one altered episode of 100–2,000 bits into a 200,000-bit record, and those studies found that the effect size needed for detection fell roughly as the inverse of the episode length. This is the sub-window regime of Section 8.2. An exploratory rerun of the same scenarios with pairs gave comparable power through the peak endpoint (83% at and , level 0.05), whereas the burden endpoint alone had no power there, since the episodes covered less than 2.5% of the record.
A second prototype introduced the six structural features, the placement within a null support, the 24-component burden, the robust standardization and the rank calibration of the maximum, that is, the burden endpoint of pairs. It was calibrated for a few lengths with Mersenne-Twister null realizations, and its reference () is the one used for the cohorts of Table 9. An earlier attempt with a final reference of only failed one admission check out of four; according to Table 6, this happens with probability of order 0.1 even for a correctly built reference of that size, and it led to the use of larger references.
The open implementation reproduces the burden computation of the second prototype exactly (Table 18). Exact agreement required three numerical details: integer sums are computed exactly before any division; the squares in D4 and D6 are accumulated with compensated (Neumaier) summation [54], as in the reference calculation (and as in the built-in summation of CPython since version 3.12), because naive accumulation differs in the last unit for about a tenth of the D4 values; and D3 and D5 use the hypot function. The open implementation then recalibrated every length with and added the peak endpoint.
Table 18.
Cross-implementation checks. “Identical” means equal IEEE-754 binary64 bit patterns for every compared value.
Table 18.
Cross-implementation checks. “Identical” means equal IEEE-754 binary64 bit patterns for every compared value.
| Comparison | Result |
|---|---|
| D1–D6 window profiles of prototype null masters (three masters, ten lengths 72k–720k) | identical |
| Burden vectors of prototype members (two members, ten lengths) | identical |
| Prototype robust-standardization constants (twenty sets), recomputed | identical |
| 1,900 null pairs of an independent second implementation, rescored | 1,900/1,900 identical burdens, and ranks |
| SHAKE256 generator against the second implementation | identical bytes |
| All of the above on Linux (CPython 3.13) and Windows (CPython 3.12) | identical |
D. Correspondence of Names
Table 19.
Names used in this paper and the labels used in the preregistrations and code of the repository.
Table 19.
Names used in this paper and the labels used in the preregistrations and code of the repository.
| This paper | Internal label |
|---|---|
| paired null | H0H0 |
| reference support, placement q | RQ (reference quantile), RQ110 |
| burden vector | K24 |
| robust standardization | RS (RS110) |
| burden statistic | SC2, T |
| reference calibration | RC (RC110, RC999, RC9999) |
| peak endpoint | Core V0.2 peak layer (RSP, RCP) |
| burden endpoint | Core V0.1 |
| pairs p-value | Core V0.2 combined p |
| campaign C1 | CAL-SL-001 |
| campaign C2 | CAL-SL-002 |
| sensitivity atlas | SENS-SL-001 |
| cohorts 1–3 (Table 9) | H0-1900; H0-1900-PRNG; H0-1900-PRNG-SL-001 |
E. Parameter Register
Table 20.
Frozen parameters of pairs.
| Parameter | Value |
|---|---|
| window length, stride | , bits |
| features | D1–D6, Equation (6); lags 1 (D3), 1 and 4 (D4), 2, 4 and 125 (D6) |
| reference support | masters; mid-tie placement, Equation (7) |
| burden thresholds | 0.75 and 0.90, upper and lower tails (24 components) |
| robust standardization | median and MAD over 110 masters, per window count |
| reference calibration | masters per window count; inclusive add-one rank p-value |
| combination | |
| calibrated lengths | bits () |
| generator | SHAKE256 specification H0H0_PY_SHAKE256_V1, 720,000-bit masters |
F. Preregistrations
Table 21 lists the preregistered studies with the full SHA-256 hashes of their preregistration files. A hash proves that a file has not changed since the hash was computed; it does not by itself prove when that happened. The files and their hashes will therefore be deposited with a time-stamped, citable archive (Data Availability Statement). The comparison of Section 9 was exploratory and was not preregistered. Disclosures recorded in the preregistrations: engineering dry runs with test identities preceded C1 and C2; the first launch of the atlas aborted while parsing its input, before any record was scored, and was relaunched under a revised preregistration with unchanged design.
Table 21.
Preregistered studies. Roots are the SHA-256 of the public phrases.
| Study | Root phrase and preregistration SHA-256 |
|---|---|
| Cohort 3 | DeepREG H0-1900-PRNG | standalone scorer line | campaign 001 | root frozen before execution |
| 7602537cfebc29bb8448224ed2b3f56874e7b7ff7b709c5e9c96c2d46867b32f | |
| C1 | DeepREG standalone calibration CAL-SL-001 | SHAKE256 RQ110 RS110 RC9999 VAL19000 | root frozen before execution |
| 286757710c76acb580db37d6225bcd156476d48d1dfd2999bd28947c17c3f244 | |
| C2 | DeepREG standalone calibration CAL-SL-002 | Core V0.2 peak layer | VAL19000 | root frozen before execution |
| 3ac00d6df269ec5b5dca042a6d67d51044f371e3c76a8c40cd6eee93eeec1d4a | |
| Atlas | DeepREG sensitivity atlas SENS-SL-001 | H0H1 SHAKE256 | root frozen before execution |
| bf71d37448adbec0b733485a3cf17f00206b340a78f5882929ab4b9bfcb8214a |
References
- Lange, C.; Ahrens, A.; Krishnakumar, Y.K.; Engert, D.; Yin, M. Quantifying Randomness in Stochastic Bit Sequences. Sensors 2026, 26, 4825. [Google Scholar] [CrossRef]
- Rukhin, A.; et al. 2010. A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications. Technical Report NIST SP 800-22 Rev. 1a. National Institute of Standards and Technology. [Google Scholar] [CrossRef]
- L’Ecuyer, P.; Simard, R. TestU01: A C Library for Empirical Testing of Random Number Generators. ACM Trans. Math. Softw. 2007, 33, 22. [Google Scholar] [CrossRef]
- Turan, M.S.; Barker, E.; Kelsey, J.; McKay, K.A.; Baish, M.L.; Boyle, M. Recommendation for the Entropy Sources Used for Random Bit Generation. Technical Report SP 800-90B; National Institute of Standards and Technology, 2018. [CrossRef]
- Herrero-Collantes, M.; Garcia-Escartin, J.C. Quantum Random Number Generators. Rev. Mod. Phys. 2017, 89, 015004. [Google Scholar] [CrossRef]
- Ma, X.; Yuan, X.; Cao, Z.; Qi, B.; Zhang, Z. Quantum Random Number Generation. npj Quantum Inf. 2016, 2, 16021. [Google Scholar] [CrossRef]
- L’Ecuyer, P.; Munger, D.; Oreshkin, B.; Simard, R. Random Numbers for Parallel Computers: Requirements and Methods, with Emphasis on GPUs. Math. Comput. Simul. 2017, 135, 3–17. [Google Scholar] [CrossRef]
- Jahn, R.G.; Dunne, B.J.; Nelson, R.D.; Dobyns, Y.H.; Bradish, G.J. Correlations of Random Binary Sequences with Pre-Stated Operator Intention: A Review of a 12-Year Program. J. Sci. Explor. 1997, 11, 345–367. [Google Scholar]
- Bösch, H.; Steinkamp, F.; Boller, E. Examining Psychokinesis: The Interaction of Human Intention with Random Number Generators—A Meta-Analysis. Psychol. Bull. 2006, 132, 497–523. [Google Scholar] [CrossRef]
- Maier, M.A.; Dechamps, M.C.; Pflitsch, M. Intentional Observer Effects on Quantum Randomness: A Bayesian Analysis Reveals Evidence Against Micro-Psychokinesis. Front. Psychol. 2018, 9, 379. [Google Scholar] [CrossRef]
- Nelson, R.D.; Bancel, P.A. Effects of Mass Consciousness: Changes in Random Data during Global Events. Explore 2011, 7, 373–383. [Google Scholar] [CrossRef]
- Janu, W. Device and Method for Identifying a Synchronicity Range of Two Time Series of Random Numbers, and Use; applicant Wyrd Experience Ltd.; US Patent Application Publication US 2025/0147729 A1, filed 13 November 2022, published 8 May 2025, 2025. [Google Scholar]
- Marsaglia, G. The Marsaglia Random Number CDROM including the Diehard Battery of Tests of Randomness; Florida State University, 1995. [Google Scholar]
- Brown, R.G.; Eddelbuettel, D.; Bauer, D. Dieharder: A Random Number Test Suite software; Duke University Physics Department, 2004–2020. [Google Scholar]
- Pincus, S.M. Approximate Entropy as a Measure of System Complexity. Proc. Natl. Acad. Sci. USA 1991, 88, 2297–2301. [Google Scholar] [CrossRef]
- Cover, T.M.; Thomas, J.A. Elements of Information Theory, 2nd ed.; Wiley: Hoboken, NJ, 2006. [Google Scholar] [CrossRef]
- Schreiber, T. Measuring Information Transfer. Phys. Rev. Lett. 2000, 85, 461–464. [Google Scholar] [CrossRef]
- Grün, S.; Diesmann, M.; Aertsen, A. Unitary Events in Multiple Single-Neuron Spiking Activity: I. Detection and Significance. Neural Comput. 2002, 14, 43–80. [Google Scholar] [CrossRef]
- Siegenthaler, T. Decrypting a Class of Stream Ciphers Using Ciphertext Only. IEEE Trans. Comput. 1985, C-34, 81–85. [Google Scholar] [CrossRef]
- Pironio, S.; et al. Random Numbers Certified by Bell’s Theorem. Nature 2010, 464, 1021–1024. [Google Scholar] [CrossRef]
- Glaz, J.; Naus, J.; Wallenstein, S. Scan Statistics; Springer: New York, 2001. [Google Scholar] [CrossRef]
- Kulldorff, M. A Spatial Scan Statistic. Commun. Stat. – Theory Methods 1997, 26, 1481–1496. [Google Scholar] [CrossRef]
- Page, E.S. Continuous Inspection Schemes. Biometrika 1954, 41, 100–115. [Google Scholar] [CrossRef]
- Walther, G.; Perry, A. Calibrating the Scan Statistic: Finite Sample Performance Versus Asymptotics. J. R. Stat. Soc. Ser. B 2022, 84, 1608–1639. [Google Scholar] [CrossRef]
- Benjamini, Y.; Hochberg, Y. Controlling the False Discovery Rate: A Practical and Powerful Approach to Multiple Testing. J. R. Stat. Soc. Ser. B 1995, 57, 289–300. [Google Scholar] [CrossRef]
- Holm, S. A Simple Sequentially Rejective Multiple Test Procedure. Scand. J. Stat. 1979, 6, 65–70. [Google Scholar]
- Westfall, P.H.; Young, S.S. Resampling-Based Multiple Testing: Examples and Methods for P-value Adjustment; Wiley, 1993. [Google Scholar]
- Romano, J.P.; Wolf, M. Stepwise Multiple Testing as Formalized Data Snooping. Econometrica 2005, 73, 1237–1282. [Google Scholar] [CrossRef]
- Besag, J.; Clifford, P. Generalized Monte Carlo Significance Tests. Biometrika 1989, 76, 633–642. [Google Scholar] [CrossRef]
- Besag, J.; Clifford, P. Sequential Monte Carlo p-values. Biometrika 1991, 78, 301–304. [Google Scholar] [CrossRef]
- Dufour, J.M. Monte Carlo tests with nuisance parameters: A general approach to finite-sample inference and nonstandard asymptotics. J. Econom. 2006, 133, 443–477. [Google Scholar] [CrossRef]
- Phipson, B.; Smyth, G.K. Permutation P-values Should Never Be Zero: Calculating Exact P-values When Permutations Are Randomly Drawn. Stat. Appl. Genet. Mol. Biol. 2010, 9, 39. [Google Scholar] [CrossRef]
- Bates, S.; Candès, E.; Lei, L.; Romano, Y.; Sesia, M. Testing for Outliers with Conformal P-values. Ann. Stat. 2023, 51, 149–178. [Google Scholar] [CrossRef]
- Huber, P.J.; Ronchetti, E.M. Robust Statistics, 2nd ed.; Wiley, 2009. [Google Scholar]
- Rousseeuw, P.J.; Croux, C. Alternatives to the Median Absolute Deviation. J. Am. Stat. Assoc. 1993, 88, 1273–1283. [Google Scholar] [CrossRef]
- Watanabe, S. Information Theoretical Analysis of Multivariate Correlation. IBM J. Res. Dev. 1960, 4, 66–82. [Google Scholar] [CrossRef]
- Massey, J.L.; Massey, P.C. Conservation of Mutual and Directed Information. In Proceedings of the Proceedings of the IEEE International Symposium on Information Theory (ISIT), Adelaide, Australia, 2005; pp. 157–158. [Google Scholar] [CrossRef]
- Amblard, P.O.; Michel, O.J.J. The Relation between Granger Causality and Directed Information Theory: A Review. Entropy 2013, 15, 113–143. [Google Scholar] [CrossRef]
- Lin, J. Divergence Measures Based on the Shannon Entropy. IEEE Trans. Inf. Theory 1991, 37, 145–151. [Google Scholar] [CrossRef]
- O’Donnell, R. Analysis of Boolean Functions; Cambridge University Press: Cambridge, 2014. [Google Scholar] [CrossRef]
- Gibbs, A.L.; Su, F.E. On Choosing and Bounding Probability Metrics. Int. Stat. Rev. 2002, 70, 419–435. [Google Scholar] [CrossRef]
- Paninski, L. Estimation of Entropy and Mutual Information. Neural Comput. 2003, 15, 1191–1253. [Google Scholar] [CrossRef]
- Billingsley, P. Statistical Methods in Markov Chains. Ann. Math. Stat. 1961, 32, 12–40. [Google Scholar] [CrossRef]
- Rukhin, A.L. Approximate Entropy for Testing Randomness. J. Appl. Probab. 2000, 37, 88–100. [Google Scholar] [CrossRef]
- Barnett, L.; Bossomaier, T. Transfer Entropy as a Log-Likelihood Ratio. Phys. Rev. Lett. 2012, 109, 138105. [Google Scholar] [CrossRef]
- Granger, C.W.J.; Newbold, P. Spurious Regressions in Econometrics. J. Econom. 1974, 2, 111–120. [Google Scholar] [CrossRef]
- Hoeffding, W.; Robbins, H. The Central Limit Theorem for Dependent Random Variables. Duke Math. J. 1948, 15, 773–780. [Google Scholar] [CrossRef]
- Orey, S. A Central Limit Theorem for m-Dependent Random Variables. Duke Math. J. 1958, 25, 543–546. [Google Scholar] [CrossRef]
- National Institute of Standards and Technology. SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions. U.S. Department of Commerce, 2015. [Google Scholar] [CrossRef]
- Clopper, C.J.; Pearson, E.S. The Use of Confidence or Fiducial Limits Illustrated in the Case of the Binomial. Biometrika 1934, 26, 404–413. [Google Scholar] [CrossRef]
- Miettinen, O.; Nurminen, M. Comparative analysis of two rates. Stat. Med. 1985, 4, 213–226. [Google Scholar] [CrossRef]
- Nosek, B.A.; Ebersole, C.R.; DeHaven, A.C.; Mellor, D.T. The Preregistration Revolution. Proc. Natl. Acad. Sci. USA 2018, 115, 2600–2606. [Google Scholar] [CrossRef]
- Matsumoto, M.; Nishimura, T. Mersenne Twister: A 623-Dimensionally Equidistributed Uniform Pseudo-Random Number Generator. ACM Trans. Model. Comput. Simul. 1998, 8, 3–30. [Google Scholar] [CrossRef]
- Neumaier, A. Rundungsfehleranalyse einiger Verfahren zur Summation endlicher Summen. ZAMM – Z. Für Angew. Math. Und Mech. 1974, 54, 39–51. [Google Scholar] [CrossRef]
Figure 1.
The six classes of Table 1, illustrated with ten bits of each stream. The strings are pedagogical, not data.
Figure 1.
The six classes of Table 1, illustrated with ten bits of each stream. The strings are pedagogical, not data.

Figure 2.
The pairs pipeline. Solid arrows: computation on the record being scored. Dotted arrows: fixed null references, generated once from a public seed.
Figure 2.
The pairs pipeline. Solid arrows: computation on the record being scored. Dotted arrows: fixed null references, generated once from a public seed.

Figure 3.
Window-count scaling law (exploratory, 4,000 null masters). (a) Null standard deviation of the 24 burden components (dots) and the law (lines). (b) Ratio of the empirical SD to the law (blue). For one component, the orange curve is the ratio of the 110-member robust scale actually used to the true SD; it fluctuates by about .
Figure 3.
Window-count scaling law (exploratory, 4,000 null masters). (a) Null standard deviation of the 24 burden components (dots) and the law (lines). (b) Ratio of the empirical SD to the law (blue). For one component, the orange curve is the ratio of the 110-member robust scale actually used to the true SD; it fluctuates by about .

Figure 4.
Upper quantiles of the burden statistic as a function of N under three standardizations (exploratory, 4,000 null masters). Law-based and oracle scales converge towards the Gaussian-maximum limit; the frozen 110-member robust scales add noise of order .
Figure 4.
Upper quantiles of the burden statistic as a function of N under three standardizations (exploratory, 4,000 null masters). Law-based and oracle scales converge towards the Gaussian-maximum limit; the frozen 110-member robust scales add noise of order .

Figure 5.
Alert rates of 19,000 fresh null pairs as a function of record length. Blue: burden endpoint at every calibrated length (campaign C1). Orange: combined pairs p-value on a grid of 106 lengths (campaign C2). Solid line: nominal rate; dashed line: admission tolerance. Rates at different lengths share masters and are dependent.
Figure 5.
Alert rates of 19,000 fresh null pairs as a function of record length. Blue: burden endpoint at every calibrated length (campaign C1). Orange: combined pairs p-value on a grid of 106 lengths (campaign C2). Solid line: nominal rate; dashed line: admission tolerance. Rates at different lengths share masters and are dependent.

Figure 6.
Geometry of the sensitivity study (schematic, not to scale). (a) The target quantity of the mechanism is raised to inside a centred episode of L bits and zero elsewhere in a record of N bits. pairs examines overlapping windows of bits that start every bits; the windows touched by the episode are highlighted. (b) The three detection regimes of Section 8.2, according to the length of the episode relative to the window and to the record.
Figure 6.
Geometry of the sensitivity study (schematic, not to scale). (a) The target quantity of the mechanism is raised to inside a centred episode of L bits and zero elsewhere in a record of N bits. pairs examines overlapping windows of bits that start every bits; the windows touched by the episode are highlighted. (b) The three detection regimes of Section 8.2, according to the length of the episode relative to the window and to the record.

Figure 7.
Power of the pairs p-value at level 0.05 for , by family, episode length L (rows; “N” is the whole record) and effect size (columns). 100 replicates per cell.
Figure 7.
Power of the pairs p-value at level 0.05 for , by family, episode length L (rows; “N” is the whole record) and effect size (columns). 100 replicates per cell.

Figure 8.
Single record (thin lines, 80% power per record) versus a set of 50 records (thick lines, 15% per record, which gives 80% power for the set), for the bias and agreement families. Values at are censored at the smallest grid value.
Figure 8.
Single record (thin lines, 80% power per record) versus a set of 50 records (thick lines, 15% per record, which gives 80% power for the set), for the bias and agreement families. Values at are censored at the smallest grid value.

Figure 9.
Effect size for 80% power at level 0.05 against episode length, for pairs and four reference detectors scored on identical records (, episode at a random position, 200 replicates per cell). Missing points: 80% power was not reached on the grid (); the oracle detectors are not defined for the alternating regime.
Figure 9.
Effect size for 80% power at level 0.05 against episode length, for pairs and four reference detectors scored on identical records (, episode at a random position, 200 replicates per cell). Missing points: 80% power was not reached on the grid (); the oracle detectors are not defined for the alternating regime.

Figure 10.
The data of Figure 9 in units of information: divergence from accumulated over the episode at the effect size that gives 80% power. Dotted line: the ideal test of Equation (20).

Table 1.
Departure classes, the feature of pairs that targets each, the part of the partition (2) in which the departure produces a deficit, the information quantity that the feature estimates within a window (Section 4.8), and the parities it measures. The mutual-information readings of D2, D3, D4 and D6 assume balanced marginals; without them the features still measure the biases of their parities, which is why two independent streams biased in the same direction also raise D2.
Table 1.
Departure classes, the feature of pairs that targets each, the part of the partition (2) in which the departure produces a deficit, the information quantity that the feature estimates within a window (Section 4.8), and the parities it measures. The mutual-information readings of D2, D3, D4 and D6 assume balanced marginals; without them the features still measure the biases of their parities, which is why two independent streams biased in the same direction also raise D2.
| Class | Feature | Part of (2) | Quantity estimated in a window | Parities (order) |
|---|---|---|---|---|
| Marginal bias | D1 balance | marginal | entropy deficit | , (1) |
| Coincidences | D2 agreement | coupling | (2) | |
| Short memory | D3 persistence | memory | , | , (2) |
| Delayed coupling | D4 coupling | coupling | , , | , (2) |
| Drift | D5 drift | marginal, varying in time | Jensen–Shannon divergence between window halves, | , contrasted (1) |
| Longer memory | D6 long memory | memory | , , | , (2) |
Table 2.
Glossary.
| Term | Meaning |
|---|---|
| record length N | number of bits per stream (a record holds N bit pairs) |
| window | a block of consecutive bit pairs; windows start every bits, so neighbouring windows overlap |
| window count w | number of complete windows in a record, (lower-case w, not to be confused with the window length W) |
| structural feature D1–D6 | a number computed in each window that grows when one class of departure is present |
| null realization | a pair of streams generated under by a published deterministic generator |
| master | a pair of 720,000-bit null streams; null records of every shorter length are taken from it as prefixes |
| fresh | (of null pairs) not used in building any reference |
| reference support | a frozen set of null realizations within which window values are located |
| placement q | the position of a window value within the reference support, between 0 and 1 (Equation (7)) |
| burden vector | 24 fractions of windows whose placement lies in an upper or lower tail (Equation (8)) |
| peak vector | the largest value of each feature over all windows |
| robust standardization | subtracting the median and dividing by MAD, both computed on a further 110 null realizations (Section 4.4) |
| burden / peak statistic | the largest standardized component, or |
| reference calibration | the conversion of or into a p-value by ranking it among the same statistic computed on further null realizations |
| endpoint | one of the two calibrated summaries, burden or peak |
| pairs p-value |
Table 3.
The four sets of null realizations. All are generated from the public generator of Section 6 with distinct campaign identifiers, and none is used for more than one purpose. The same names are used throughout the paper; the internal labels of the repository are listed in Appendix D.
Table 3.
The four sets of null realizations. All are generated from the public generator of Section 6 with distinct campaign identifiers, and none is used for more than one purpose. The same names are used throughout the paper; the internal labels of the repository are listed in Appendix D.
| Set | Size | Question it answers | Section |
|---|---|---|---|
| reference support | 110 null pairs | Where does a window value lie with respect to the null? | 4.3 |
| robust standardization | 110 null pairs | How are components with different null scales made comparable? | 4.4, 4.5 |
| reference calibration | 9,999 null pairs | Which p-value corresponds to the burden or peak statistic of a record? | 4.6 |
| validation | 19,000 fresh null pairs per campaign | Does the frozen reference behave as intended on new data? | 7 |
Table 4.
The six structural features in plain language.
| Feature | Question asked in each window | Known blind spot |
|---|---|---|
| D1 balance | Is either stream displaced from half ones and half zeros? | Balanced dependence |
| D2 agreement | Do the two streams agree in more, or fewer, than half of the bit positions of the window? | Direction of influence |
| D3 persistence | Does each bit tend to repeat, or alternate with, the previous bit? | Only lag 1 |
| D4 coupling | Does one stream echo the other one or four bits later? | Other lags |
| D5 drift | Do the first and second halves of the window have different proportions of ones? | Changes not aligned with the half-split |
| D6 long memory | Is there memory at lags 2, 4 or 125 () within a stream? | Other lags; not a spectral analysis |
Table 5.
The squared features as plug-in information quantities (nats; hats denote estimates within the window) and the classical tests they reproduce. “Balanced”: the mutual-information form requires both empirical margins equal to ; otherwise the feature measures the entropy deficit of its parity stream. J is a position drawn uniformly in the window and H the half that contains it.
Table 5.
The squared features as plug-in information quantities (nats; hats denote estimates within the window) and the classical tests they reproduce. “Balanced”: the mutual-information form requires both empirical margins equal to ; otherwise the feature measures the entropy deficit of its parity stream. J is a position drawn uniformly in the window and H the half that contains it.
| Feature | Squared feature ≈ | Classical counterpart |
|---|---|---|
| D1 | frequency (monobit) test [2] | |
| D2 | if balanced | G-test of independence of a table |
| D3 | if balanced | likelihood-ratio test of Markov order 0 against 1 [43]; with D1, approximate entropy of order 1 [15,44] |
| D4 | if balanced | lagged mutual information; the transfer-entropy likelihood-ratio test [45] when the target has no memory and the coupling acts at one lag |
| D5 | if balanced | two-sample test of proportions; Jensen–Shannon divergence between the halves [39] |
| D6 | if balanced | serial-correlation tests at fixed lags; each term is a lower bound on the term of the total correlation |
Table 6.
Probability that a correctly built reference of size C passes one admission check (thresholds / ; tolerances 7% / 4%), from the beta-binomial law implied by Equation (16) and the rule of Section 7. One check: , maxima 114 / 61 alerts. Ten checks: for each check (Bonferroni), maxima 104 / 54 for and 1,239 / 690 for ; the entry is the probability of passing one of the ten. Last column: probability that the conditional rate of the frozen reference exceeds the tolerance.
Table 6.
Probability that a correctly built reference of size C passes one admission check (thresholds / ; tolerances 7% / 4%), from the beta-binomial law implied by Equation (16) and the rule of Section 7. One check: , maxima 114 / 61 alerts. Ten checks: for each check (Bonferroni), maxima 104 / 54 for and 1,239 / 690 for ; the entry is the probability of passing one of the ten. Last column: probability that the conditional rate of the frozen reference exceeds the tolerance.
| C | , one check | , ten checks | , ten checks | |
|---|---|---|---|---|
| 110 | .794 / .870 | .725 / .823 | .851 / .912 | .11 / .063 |
| 999 | .883 / .883 | .731 / .741 | .979 / .979 | .0041 / .0040 |
| 9999 | .967 / .966 | .821 / .828 | / |
Table 7.
Law constants by feature (exploratory). Order in each cell: upper 0.75 / lower 0.25 / upper 0.90 / lower 0.10.
Table 7.
Law constants by feature (exploratory). Order in each cell: upper 0.75 / lower 0.25 / upper 0.90 / lower 0.10.
| Feature | VIF | fitted exponent | |
|---|---|---|---|
| D1 | .693 / .596 / .463 / .364 | 2.57 / 1.88 / 2.44 / 1.46 | / / / |
| D2 | .688 / .546 / .479 / .333 | 2.54 / 1.59 / 2.56 / 1.22 | / / / |
| D3 | .687 / .593 / .462 / .359 | 2.52 / 1.87 / 2.41 / 1.42 | / / / |
| D4 | .702 / .640 / .471 / .382 | 2.61 / 2.18 / 2.46 / 1.66 | / / / |
| D5 | .536 / .478 / .360 / .314 | 1.53 / 1.22 / 1.46 / 1.09 | / / / |
| D6 | .681 / .633 / .453 / .391 | 2.44 / 2.13 / 2.24 / 1.71 | / / / |
Table 8.
Measured computing costs. Workstation: 24 logical cores (Windows). Cloud: 2 virtual cores (Linux).
Table 8.
Measured computing costs. Workstation: 24 logical cores (Windows). Cloud: 2 virtual cores (Linux).
| Task | Workers | Wall time | Per pair |
|---|---|---|---|
| Scoring kernel, one pair at / | 1 | — | 30 / 71 ms |
| 1,900 null pairs at (generation, scoring, output) | 22 | 13.05 s | 6.9 ms |
| Calibration campaign C1: 29,219 masters, every length from 3,600 to 720k (workstation) | 22 | 525 s | — |
| Calibration campaign C2: peak references and 19,000 validation masters (cloud) | 2 | 1,131 s | — |
| Sensitivity atlas: 282,500 scored records (cloud) | 2 | 5,169 s | 37 ms |
Table 9.
Three null cohorts of 1,900 pairs at , scored with the same prototype reference (). Admission maxima: 111 and 59 alerts.
Table 9.
Three null cohorts of 1,900 pairs at , scored with the same prototype reference (). Admission maxima: 111 and 59 alerts.
| Cohort | Generator | Implementation | Equivalence to first | ||
|---|---|---|---|---|---|
| 1 | Mersenne Twister | prototype | 82 | 40 | — |
| 2 | SHAKE256 | independent implementation | 69 | 30 | pass |
| 3 | SHAKE256 | pairs (public root) | 81 | 32 | pass |
Table 10.
Campaign C1, burden endpoint: alerts among 19,000 fresh null pairs.
| N | w | rate | upper 99.5% | rate | ||
|---|---|---|---|---|---|---|
| 36,000 | 176 | 939 | 4.94% | 5.36% | 399 | 2.10% |
| 72,000 | 356 | 876 | 4.61% | 5.02% | 395 | 2.08% |
| 144,000 | 716 | 917 | 4.83% | 5.24% | 463 | 2.44% |
| 288,000 | 1436 | 972 | 5.12% | 5.54% | 479 | 2.52% |
| 576,000 | 2876 | 960 | 5.05% | 5.48% | 530 | 2.79% |
Table 11.
Campaign C2, combined pairs p-value: alerts among 19,000 fresh null pairs; the endpoint columns are descriptive.
Table 11.
Campaign C2, combined pairs p-value: alerts among 19,000 fresh null pairs; the endpoint columns are descriptive.
| N | w | rate | rate | burden only | peak only | ||
|---|---|---|---|---|---|---|---|
| 12,000 | 56 | 976 | 5.14% | 516 | 2.72% | 966 / 511 | 999 / 488 |
| 36,000 | 176 | 817 | 4.30% | 404 | 2.13% | 888 / 412 | 808 / 414 |
| 72,000 | 356 | 847 | 4.46% | 397 | 2.09% | 898 / 393 | 957 / 467 |
| 144,000 | 716 | 973 | 5.12% | 510 | 2.68% | 964 / 533 | 933 / 449 |
| 288,000 | 1436 | 909 | 4.78% | 435 | 2.29% | 1015 / 524 | 833 / 408 |
| 576,000 | 2876 | 948 | 4.99% | 472 | 2.48% | 984 / 520 | 891 / 449 |
| 720,000 | 3596 | 957 | 5.04% | 527 | 2.77% | 924 / 465 | 926 / 501 |
Table 12.
Perturbation mechanisms. Inside the episode, each bit of Y is replaced with probability as indicated, which raises the target quantity to .
Table 12.
Perturbation mechanisms. Inside the episode, each bit of Y is replaced with probability as indicated, which raises the target quantity to .
| Family | Target | Replacement and resulting law |
|---|---|---|
| bias | D1 | ; |
| agreement | D2 | ; |
| persistence | D3 | (sequentially); |
| lagged coupling | D4 | ; |
| alternating regime | D5 | or 0 on alternating half-periods of 500 bits; |
| long memory | D6 | (sequentially); |
Table 13.
Effect size for 80% power at level 0.05, departure covering the whole record (100 replicates per cell). In brackets: the same quantity read from the lower and upper 95% Wilson limits of the power curve, which reflects sampling error only; interpolation between the grid values adds a larger uncertainty, mostly upward: with the finer grid of Section 9, bias, agreement and long memory at give 0.011, 0.010 and 0.015.
Table 13.
Effect size for 80% power at level 0.05, departure covering the whole record (100 replicates per cell). In brackets: the same quantity read from the lower and upper 95% Wilson limits of the power curve, which reflects sampling error only; interpolation between the grid values adds a larger uncertainty, mostly upward: with the finer grid of Section 9, bias, agreement and long memory at give 0.011, 0.010 and 0.015.
| Mechanism | k | 36k | 144k | 288k | 720k |
|---|---|---|---|---|---|
| bias (D1) | .029 [.028,.030] | .023 [.021,.025] | .017 [.016,.017] | .015 [.015,.017] | .009 [.009,.009] |
| agreement (D2) | .026 [.025,.027] | .017 [.017,.018] | .014 [.013,.016] | .009 [.009,.009] | .008 [.008,.009] |
| persistence (D3) | .028 [.027,.029] | .019 [.018,.022] | .017 [.016,.017] | .015 [.014,.016] | .009 [.008,.009] |
| lagged coupling (D4) | .027 [.026,.028] | .022 [.019,.024] | .017 [.017,.018] | .015 [.014,.016] | .009 [.009,.009] |
| alternating regime (D5) | .044 [.043,.045] | .033 [.029,.038] | .020 [.019,.022] | .017 [.017,.018] | .016 [.016,.017] |
| long memory (D6) | .043 [.043,.045] | .027 [.026,.028] | .018 [.017,.019] | .017 [.016,.017] | .015 [.014,.016] |
Table 14.
Effect size for 80% power per record at level 0.05, for the bit rates and durations planned in DeepREG: departure covering the whole record (bias and agreement families, from Table 13) and a 1,000-bit episode within the record. Studies with sets of records need smaller per-record power (Section 8.3).
Table 14.
Effect size for 80% power per record at level 0.05, for the bit rates and durations planned in DeepREG: departure covering the whole record (bias and agreement families, from Table 13) and a 1,000-bit episode within the record. Studies with sets of records need smaller per-record power (Section 8.3).
| Bit rate | Duration | N (bits) | whole record | 1,000-bit episode |
|---|---|---|---|---|
| 10 bits/s | 20 min | 12,000 | 0.026–0.029 | 0.07–0.08 |
| 10 bits/s | 60 min | 36,000 | 0.017–0.023 | 0.09 |
| 16 bits/s | 60 min | 57,600 | ≈0.017–0.02 | ≈0.09 |
| 200 bits/s | 20 min | 240,000 | ≈0.009–0.015 | 0.09–0.10 |
| 200 bits/s | 60 min | 720,000 | 0.008–0.009 | 0.10 |
Table 15.
Effect size for 80% power at level 0.05 (), on identical records. “—”: 80% power not reached for or detector not defined. Persistence gives values within 7% of those for bias and is omitted.
Table 15.
Effect size for 80% power at level 0.05 (), on identical records. “—”: 80% power not reached for or detector not defined. Persistence gives values within 7% of those for bias and is omitted.
| Mechanism | L | oracle z | global battery | oracle scan | scan battery | pairs |
|---|---|---|---|---|---|---|
| bias | 2k | — | — | 0.058 | 0.063 | 0.081 |
| 16k | 0.048 | 0.062 | 0.021 | 0.022 | 0.047 | |
| 64k | 0.012 | 0.016 | 0.010 | 0.011 | 0.025 | |
| N | 0.0027 | 0.0035 | 0.0050 | 0.0053 | 0.011 | |
| agreement | 2k | — | — | 0.058 | 0.062 | 0.081 |
| 16k | 0.050 | 0.062 | 0.021 | 0.023 | 0.044 | |
| 64k | 0.013 | 0.016 | 0.010 | 0.011 | 0.021 | |
| N | 0.0027 | 0.0035 | 0.0049 | 0.0053 | 0.0099 | |
| long memory | 2k | — | — | 0.057 | 0.063 | 0.091 |
| 16k | 0.048 | 0.062 | 0.021 | 0.023 | 0.060 | |
| 64k | 0.012 | 0.015 | 0.010 | 0.011 | 0.030 | |
| N | 0.0027 | 0.0035 | 0.0049 | 0.0054 | 0.015 | |
| alternating regime | 2k | — | — | — | 0.17 | 0.093 |
| 16k | — | 0.18 | — | 0.11 | 0.061 | |
| 64k | — | 0.088 | — | 0.085 | 0.040 | |
| N | — | 0.043 | — | 0.055 | 0.017 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.