Conceptio › Archive › arXiv CS
arXiv CS open access

Equivalence testing and run-count design for stochastic machine-learning experiments

Dmytro Knopov et al. · arxiv_cs
arXiv CS · Papers
Open Source ↗Direct PDF ↓
deep-learningmachine-learningneural-networks
Claims that two training methods perform equally well often rest on a non-significant difference between two or three runs per method. We develop a protocol, with its power theory, for certifying practical equivalence in per-run metrics such as the AUROC (area under the receiver operating characteri
Conceptio Open Archive

Analyze & explore related research in Conceptio

Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.

Equivalence testing and run-count design for stochastic machine-learning experiments Dmytro Knopov1* and Nadiya Shvai1,2

arXiv:2610.23700v1 [cs.LG] 16 Oct 2026

1*

Faculty of Computer Sciences, Department of Mathematics, National University of Kyiv-Mohyla Academy, Kyiv, Ukraine. 2 Cyclope.ai, Paris, France.

*Corresponding author(s). E-mail(s): d.knopov@ukma.edu.ua; Contributing authors: n.shvay@ukma.edu.ua; Abstract Claims that two training methods perform equally well often rest on a nonsignificant difference between two or three runs per method. We develop a protocol, with its power theory, for certifying practical equivalence in per-run metrics such as the AUROC (area under the receiver operating characteristic curve). It rests on a two-level (seed × item) variance model separating betweenrun dispersion from item-level noise. Equivalence within a pre-specified margin is tested by two one-sided tests (TOST), equivalently by a confidence interval inside the margin; a two-level bootstrap covers composite statistics. A closedform formula converts a margin and a target power into runs per method; its shifted-t refinement is calibrated against the realised two-level process. Simulations on a 270-cell grid and under non-Gaussian seed laws confirm the formula within its design-relevant range, from five runs per method. For four published runs of a joint energy-based model, the failure to certify equivalence was largely decided by design: with the variance calibrated to those runs, two per method certify with probability near three per cent, whereas certifying 0.01 AUROC at 80 per cent power needs twelve even under exact equality. A second case study on a thousand-seed CIFAR-10 zoo and the MultiBERTs checks the formula against real seed laws (within 0.05 in that range) and resolves comparisons that two or three runs leave undecided. In a two-stage design (pilot, then formula), our experiments suggest that an upper confidence bound on the pilot variance substantially reduces the undersizing seen with its point estimate. Keywords: machine learning, statistical hypothesis testing, equivalence testing, experimental design, statistical power, hierarchical bootstrap

1

1 Introduction A recurring conclusion of empirical machine-learning research is that a new training method performs “on par” with an established baseline. Classical significance testing cannot support this conclusion: failure to reject the hypothesis of no difference is not evidence of no difference, least of all when the comparison rests on two or three training runs (Colas, Sigaud, & Oudeyer, 2018). At the same time, the variance of benchmark results, from data sampling and from arbitrary training choices such as initialisation and data order, is a first-order effect in modern benchmarks, often of the same order as the improvements being reported (Bouthillier et al., 2021), and the part induced by the training seed alone has been measured across domains (Dodge et al., 2020; Picard, 2021). Small-n comparisons that end in a null outcome are therefore routine, and routinely over-interpreted. Equivalence testing inverts the burden of proof. One fixes, before the experiment, a margin δ below which a difference is declared practically irrelevant; the null hypothesis states that the methods differ by at least δ , and rejecting it certifies equivalence at a controlled error level (Lakens, 2017; Schuirmann, 1987). The question that then decides the fate of the experiment is one of design: how many training runs does the certification require? The concrete motivation for this work is our experimental study (Knopov, 2026) of joint energy-based models (Grathwohl et al., 2020), which compared two training methods and found their macro-averaged areas under the receiver operating characteristic (ROC) curve (AUROC) within 0.006 of each other, yet two one-sided tests (TOST) at margin δ = 0.01 returned p = 0.33 from n = 2 runs per method. As Section 6 shows, a variance calibrated retrospectively to its own runs leaves that negative outcome very little room to be otherwise: at n = 2 the rejection region of the deterministic power approximation is empty, and the realised probability of certification, in a simulation calibrated to the observed variance, is roughly three per cent. Turning this experience into theory yields a protocol that answers, before the certification experiment is run and given a pilot or an external estimate of the run-level dispersion, whether an equivalence claim is within reach. The contributions of this work are methodological rather than the introduction of a new equivalence test. We develop a framework for applying equivalence testing to stochastic machine-learning experiments, treating independently trained runs as the experimental units and distinguishing explicitly between the setting with an independent test draw for every run and the shared-benchmark setting used in practice. First, we formalise these two settings with a two-level (seed × item) variance model for per-run AUROC: an exact variance decomposition under independent test draws (Proposition 1) and its conditional counterpart for a shared test set (Proposition 2). The model separates the seed-level dispersion, which only additional runs can reduce, from the item-level noise, which a larger test set shrinks. Second, we define a seed-level Welch-TOST protocol with confidence-interval duality (Proposition 3) and size control inherited from the intersection–union principle up to the Welch approximation. Third, we specify a two-level bootstrap for composite per-run statistics and map its finite-sample validity by simulation, over run counts and variance regimes, rather than

2

asserting it (Remark 2). Fourth, we derive an approximate power function (Proposition 4) with the design formula (10) for the required number of runs, validate it on a 270-cell simulation grid and benchmark it against the exact pooled-model power of Shieh (2016). Fifth, we revisit the data of Knopov (2026) in a case study that reproduces the published numbers exactly. It answers the design question: certifying ±0.01 at 80% power requires about 12 runs per method even for truly identical methods, not 2. Sixth, in a second case study on two public collections of independently trained models with up to a thousand runs (Section 7), we check the design formula against real, non-Gaussian seed laws, exhibit the shared-test-set regime in which the binomial item-level variance exceeds the observed per-run variance, and show the protocol resolving comparisons that two or three runs leave undecided. The same case study takes the two-stage pilot design end to end and compares two ways of entering the pilot variance into the formula. Sections 3–4 develop the theory, Section 5 reports the simulations, and Sections 6 and 7 the case studies.

2 Related work Equivalence testing originated in pharmacokinetics, where approving a generic drug requires demonstrating that its bioavailability lies within a pre-specified window of the reference formulation. Schuirmann’s two one-sided tests (Schuirmann, 1987) remain the standard instrument; their size properties follow from the intersection–union principle (Berger & Hsu, 1996), and Lakens (2017) gives a modern primer for experimental scientists. Exact power and sample-size calculations for TOST are derived by Shieh (2016) for the pooled test and by Jan and Shieh (2017) for its heteroscedastic Welch version; Section 4 benchmarks our design formula against the former. For ROC analysis specifically, Liu, Ma, Wu, and Tai (2006) constructed TOST-type equivalence and non-inferiority tests for the paired AUROCs of two diagnostic procedures evaluated on the same subjects. Their setting is a single fixed pair of scoring rules, so the only uncertainty is at the item level; in machine-learning comparisons the scoring rule itself is random, since retraining changes it, and the analysis of Liu et al. (2006) corresponds to the inner level of our model with the seed level absent. A recent tutorial extends this line with simulation-based power analyses for equivalence testing of ROC curves (Riesthuis, Otgaar, & Bücken, 2025), still within a single sampling level. A structurally close hierarchy has long existed in radiology: multi-reader multi-case (MRMC) ROC analysis treats readers and cases as random effects, through a reader × case decomposition of jackknife pseudovalues (Dorfman, Berbaum, & Metz, 1992) or an analysis of variance with case-induced correlated errors (Obuchowski & Rockette, 1995), and provides the corresponding power and sample-size methodology (Hillis, Obuchowski, & Berbaum, 2011). Chen, Petrick, and Sahiner (2012) extended this framework to non-inferiority and equivalence hypotheses, with the corresponding power calculation and study sizing, so the MRMC line already combines a two-level ROC hierarchy, an equivalence layer and sample-size methodology. Our seed level plays the role of the reader level; what the MRMC line does not contain is the reinterpretation of the outer level as the retraining randomness of a single learning method. The present work adapts the design problem to that setting, makes the conditional estimand of a 3

shared benchmark explicit, and validates the finite-sample behaviour of the protocol in regimes calibrated to machine-learning practice, at two to five runs per method. A separate line of work quantifies the statistical fragility of machine-learning benchmarking. Dietterich (1998) initiated the systematic study of hypothesis tests for comparing learning algorithms, Nadeau and Bengio (2003) analysed the variance of generalisation-error estimates across resampled training sets and the inference such estimates permit, and Demšar (2006) recommended the now-standard non-parametric tests for comparing classifiers over several datasets. Colas et al. (2018) give power analyses for detecting performance differences in deep reinforcement learning, answering “how many seeds” for difference testing, and Card et al. (2020) bring power analysis to evaluation in natural language processing, sizing test sets and human-rating studies rather than training runs, and find many common experimental settings to be underpowered. The magnitude of seed-induced variation is by now documented across domains: Bouthillier et al. (2021) decompose benchmark variance into its sources and study how that variance corrupts the detection of improvements; Dodge et al. (2020) and Picard (2021) measure the spread induced by the training seed alone, together over thousands of runs; Madaan et al. (2024) quantify seed-induced variance in contemporary language-model benchmarks. Agarwal, Schwarzer, Castro, Courville, and Bellemare (2021) advocate interval estimates from a stratified bootstrap over runs for reinforcement-learning benchmarks with few runs, Miller (2024) brings clustered standard errors, paired analyses and power calculations to language-model evaluations, and Longjohn, Gopalan, and Casleton (2025) treat uncertainty quantification for aggregate benchmark metrics. Closest in structure to the resampling scheme of Section 3.3 are the MultiBERTs of Sellam et al. (2022): 25 pretraining replicas of BERT together with a Multi-Bootstrap that resamples pretraining seeds and evaluation examples jointly to place confidence intervals on differences between models; their per-example predictions are one of the two data sources of Section 7, the other being the Model Zoos of Schürholt, Taskiran, Knyazev, Giró-i-Nieto, and Borth (2022b), populations of up to a thousand independently trained networks released as checkpoints. All of these target the detection of differences or the honest reporting of uncertainty. The Bayesian line of Benavoli, Corani, Demšar, and Zaffalon (2017) comes closest to the certification question: the region of practical equivalence (ROPE) they adopt answers it through posterior mass rather than through a size-controlled test, and without a run-count design formula. Where TOST itself appears in the machine-learning literature, it is applied at the annotation or item level without a run-level hierarchy, for instance to test whether a large language model is interchangeable with human annotators (He, Leng, McKay, Spina, & Trippas, 2025). We are not aware of prior work that places frequentist equivalence certification on the run-level hierarchy of stochastic training. The closest combination of ingredients is the MRMC equivalence methodology (Chen et al., 2012), built for human readers and fixed diagnostic modalities; the remaining precedents supply single ingredients: the equivalence layer without a run-level hierarchy, at the item level (Liu et al., 2006; Riesthuis et al., 2025) or at the level of cross-validation folds and datasets (Benavoli et al., 2017), the power analysis for difference testing over runs (Colas et al., 2018) or over test items (Card et al., 2020), or the joint resampling of pretraining seeds and

4

evaluation examples without an equivalence layer or a design formula (Sellam et al., 2022). The formal ingredients themselves are deliberately elementary consequences of classical results; the contribution we claim is not the first combination of hierarchy, equivalence and sizing but their transfer to training runs as the experimental unit, with the conditional benchmark estimand made explicit, a transparent Welch-TOST on per-run AUROCs, and a finite-sample validation aimed at the very small run counts of machine-learning experiments.

3 Statistical model and equivalence testing procedure 3.1 Two-level model Two training methods g ∈ {A, B} are compared on a common detection task. Each method is trained ng times under identical settings except for the random seed, so the runs s = 1, . . . , ng are independent replicates of the same training procedure. Every run assigns real-valued scores to a test collection of m0 in-distribution (ID) and m1 out-of-distribution (OOD) items (images, in the case study), and the quality of the run is summarised by the AUROC. Let X1 , . . . , Xm0 denote the ID scores and Y1 , . . . , Ym1 the OOD scores produced by run (g, s). The test items are drawn i.i.d. from their respective populations, the ID and OOD samples independent of each other and of the trained runs, so that conditionally on the run the scores are i.i.d. within each sample. The empirical AUROC is the normalised Mann–Whitney statistic (Bamber, 1975; Mann & Whitney, 1947)

θ̂g,s =

m1 m0 X  1 X 1{Xi < Yj } + 21 1{Xi = Yj } , m0 m1 i=1 j=1

(1)

an unbiased estimator of the population AUROC of that run, θg,s = Pr(X < Y ) + 1 2 Pr(X = Y ). Retraining with a new seed changes the learned scoring function, so θg,s itself varies across runs. We adopt the two-level (seed × item) model

ag,s i.i.d. (0, σg2 ),

θg,s = µg + ag,s ,

(2)

where µg is the expected AUROC of method g and σg2 , the variance of the zero-mean seed effects ag,s , is its between-run (seed-level) variance. The law of the seed effects is left unspecified beyond these two moments, which is all that the variance results of this section use; the Welch-TOST and the power approximation additionally lean on approximate normality of the run means (Sections 4 and 8); since θg,s is a probability, the law is understood to be supported within [−µg , 1 − µg ]. Conditionally on the run, that is, on the learned scoring function, which determines more than the value of θg,s  alone, θ̂g,s fluctuates around θg,s with the image-level variance vg,s = Var θ̂g,s | Fg,s , where Fg,s denotes the trained run; it is estimated nonparametrically from placement values (the normalised ranks of each item within the opposite sample) by the method 5

of DeLong, DeLong, and Clarke-Pearson (1988), in the rank-based implementation of Sun and Xu (2014). Write v̄g = E vg,s . ˆ The estimand P is the method difference ∆ = µA − µB , estimated by ∆ = θ̄A − θ̄B −1 with θ̄g = ng s θ̂g,s . Proposition 1 (variance decomposition) Under model (2) and the sampling assumptions above, with every run evaluated on its own test sample drawn independently across runs, X σg2 + v̄g ˆ = Var θ̂g,s = σg2 + v̄g , Var ∆ . (3) ng g∈{A,B}

Proof Since (1) is unbiased given the   run, E[θ̂g,s | Fg,s ] = θg,s , and the law of total variance yields Var θ̂g,s = E Var(θ̂g,s | Fg,s ) + Var E[θ̂g,s | Fg,s ] = v̄g + σg2 . Runs are independent within and between methods, whence the second identity. □

Proposition 1 has two design consequences. First, with ng ≥ 2 runs per method, P the seed-level sample variance s2g = (ng − 1)−1 s (θ̂g,s − θ̄g )2 estimates the whole per-run variance σg2 + v̄g without bias, so inference that treats per-run AUROCs as i.i.d. observations automatically carries the image-level uncertainty and requires no explicit decomposition. Second, enlarging the test sample shrinks only v̄g , which is of −1 2 order m−1 0 + m1 (Hanley & McNeil, 1982): the seed-level floor σg remains, and once ˆ is governed by the number of training runs alone. v̄g ≪ σg2 the precision of ∆ In practice all runs are usually scored on the same test sample rather than on independent draws, so the seed and image factors are crossed rather than nested. The design result for this case needs nothing beyond the sampling model of the runs itself, because conditioning on the sample removes the image-sampling level altogether. Proposition 2 (shared test set, conditional estimand) Let all runs be scored on one common test sample T , drawn independently of the runs, and let the runs be, as in Section 3.1, independent within and between methods and identically distributed within each method.  Write ˆ | T for the τg2 (T ) = Var θ̂g,s | T for the conditional per-run variance and ∆(T ) = E ∆ conditional estimand. Then  X τg2 (T )   ˆ |T = , E s2g | T = τg2 (T ), (4) Var ∆ n g g and the seed-level procedures of this section apply verbatim to ∆(T ), with s2g an unbiased plug-in for the whole conditional per-run variance.

Proof Given T , the runs of method g are independent replicates of one experiment (train, then score the fixed sample), so the θ̂g,s are i.i.d. with mean E[θ̂g,s | T ] and variance τg2 (T ); both identities are the standard i.i.d. facts applied conditionally. □ Remark 1 (the two estimands) The conditional estimand ∆(T ), the method difference on this test collection, is usually the question actually asked in benchmark comparisons, and it is the

6

reading we adopt for the case study; note that seed effects and residual image effects are then not separated, since s2g captures their conditional total. The unconditional ∆ of model (2) is a different target. Under the additive decomposition θ̂g,s = θg,s + c(T ) + εg,s , with a sample effect c(T ) shared by all runs of both methods and run-specific residuals satisfying both E[εg,s | Fg,s ] = 0 (no residual run effect) and E[εg,s | T ] = 0 (no residual sample ˆ and the residual means vanish given T , so ∆(T ) = ∆ effect), the shift c(T ) cancels in ∆ and the two readings coincide. If instead a method–sample interaction dg (T ) is present, ∆(T ) = ∆ + dA (T ) − dB (T ): the interaction does not decrease in the number of runs and is invisible to s2g , so a single shared sample identifies ∆(T ) but cannot separate ∆ from it. What recovering ∆ then requires depends on which “unconditional” is meant, and two levels must be kept apart. When the items of T are themselves an i.i.d. sample from a fixed population P , the ∆ of model (2) is the difference over P , the realised interaction is item-sampling noise ˆ is recoverable that averages out over redraws of T , and its contribution to the uncertainty of ∆ from the one sample at hand: by item resampling, by the DeLong estimator, or, by design, by drawing a fresh sample from P for every run (the regime of Proposition 1). The choice of the benchmark itself, of P with its idiosyncrasies relative to the intended domain, is a level that neither resampling nor fresh draws from the same P reach: only several benchmarks, or an explicit model of how benchmarks arise, speak to it. The between-run correlation of peritem scores in the case-study data (0.79–0.92, Section 6) indicates substantial shared image structure, though it does not by itself identify the AUROC-level components.

3.2 Seed-level equivalence test A claim of practical equivalence must invert the usual testing logic: the null hypothesis is a relevant difference,

H0 : |∆| ≥ δ

against H1 : |∆| < δ,

(5)

where the margin δ is fixed before the experiment. Schuirmann’s two one-sided tests (Lakens, 2017; Schuirmann, 1987) reject H0 at level α when both one-sided nulls ∆ ≤ −δ and ∆ ≥ δ are rejected at level α. With per-run AUROCs as observations the natural statistics are those of Welch (1947)

T− =

ˆ +δ ∆ , c SE

T+ =

ˆ −δ ∆ , c SE

(6)

2

c = s2 /nA + s2 /nB , referred to the t distribution with the Welch– with SE A B Satterthwaite degrees of freedom (Satterthwaite, 1946) 2 s2A /nA + s2B /nB ν̂ = . s4A s4B + n2A (nA − 1) n2B (nB − 1)

(7)

The lower null ∆ ≤ −δ is rejected for large T− (p− = 1 − Fν̂ (T− )) and the upper null ∆ ≥ δ for small T+ (p+ = Fν̂ (T+ )), where Fν̂ is the central t distribution function; the TOST p-value is p = max(p− , p+ ). As an intersection–union test, TOST needs no 7

multiplicity correction and controls the size at α whenever each one-sided component holds its level (Berger & Hsu, 1996); the Welch components do so only approximately, since the Behrens–Fisher problem admits no exact solution of the standard t form, and the realised size is therefore verified by simulation in Section 5. Proposition 3 (confidence-interval duality) TOST rejects H0 : |∆| ≥ δ at level α if and only ˆ ± t1−α,ν̂ SE c lies inside (−δ, δ). if the two-sided (1 − 2α) confidence interval ∆

ˆ − t1−α,ν̂ SE c > −δ, and p+ < α ⇐⇒ T+ < Proof p− < α ⇐⇒ T− > t1−α,ν̂ ⇐⇒ ∆ ˆ c −t1−α,ν̂ ⇐⇒ ∆ + t1−α,ν̂ SE < δ. Their conjunction is exactly the stated inclusion. □

Reporting the (1 − 2α) interval together with the margin is the form we recommend: it communicates the decision, its sensitivity to the choice of δ , and the direction of any residual difference at once. The duality is verified numerically, over randomised designs, in the test suite of our implementation.

3.3 Two-level bootstrap A macro-average over several OOD test sets is still a per-run scalar, so the seed-level test above applies to it directly and remains the operative instrument of certification. Bootstrap resampling enters in a supporting role: it is the de facto practice for reporting the uncertainty of composite statistics (the source study of Section 6 reports exactly such an interval), and it propagates the item-level uncertainty of composite per-run statistics, such as macro-averages over several test sets, without a variance formula. We analyse the two-level, crossed resampling scheme that mirrors the design of the experiment. At the outer level, runs (seeds) are resampled with replacement within each method; at the inner level, one resample of ID item indices and one per OOD set are drawn per bootstrap iteration and shared by all selected runs of both methods, replaying the paired evaluation on a common test sample. The percentile interval of the ˆ is reported (Davison & Hinkley, 1997). We use resulting bootstrap distribution of ∆ it for uncertainty reporting rather than for the equivalence decision itself; a bootstrap TOST would require the percentile interval at level 1 − 2α (Proposition 3), and the coverage caveats below apply to it with full force. The two instruments also address different readings of the estimand: the seed-level test is conditional on the realised test collection T (Remark 1), whereas the item resample makes the bootstrap interval speak to the difference unconditional over item sampling, the recoverable level of Remark 1, and the coverage study of Section 5 evaluates it against that target. Remark 2 (domain of validity) Resampling hierarchical data is delicate: the consistency of a scheme depends on the model assumed for the clustered data (Field & Welsh, 2007), and which levels to resample is a design decision (Davison & Hinkley, 1997, Section 3.8). We therefore do not claim general consistency of the scheme above; its finite-sample coverage is mapped by simulation in Section 5. Three regimes emerge. When the test set is shared and the seed-level variance is comparable to the residual image-level one, coverage is close to nominal. When the run-specific image-level residual dominates, the scheme is conservative:

8

independent resampling of two crossed factors counts that residual more than once, through each factor and through their product, so that for a linear statistic the corresponding interaction variance enters about three times in the limit (McCullagh, 2000; A.B. Owen, 2007; A.B. Owen & Eckles, 2012); for the AUROC we take this as indicating the direction of the bias and measure its size by simulation. Conversely, with very few runs and a dominant seed level the outer resample is anti-conservative, since the bootstrap of a mean of n values understates its variance by the factor (n − 1)/n, which is severe at n = 2–3. In the limit of a negligible item level the 95% percentile interval at n = 2 reduces to the interval from the smallest to the largest difference between a run of A and a run of B; it covers a true difference of zero exactly when the two within-method ranges overlap, an event of probability 2/3 for the ideal percentile interval under a common continuous run-level law. Both deviations are quantified in Section 5.

4 Power analysis and the required number of runs With the test fixed, its fate is decided by the number of runs it is given, which is the design question of the introduction. Write τg2 = σg2 + v̄g for the per-run variance of method g (Proposition 1; under a shared test set τg2 is read as the conditional per-run variance of Proposition 2, which s2g estimates directly). We consider the equalallocation design nA = nB = n with a common τ 2 = τA2 = τB2 , the case of practical interest; then s r  2 σ 2 + v̄ 2τ 2 SE(n) = = . (8) n n  ˆ ∼ N ∆, SE2 (n) with SE(n) treated Proposition 4 (approximate power of TOST) Let ∆ as known. Then the probability that TOST at level α with margin δ declares equivalence is     δ+∆ δ−∆ − z1−α + Φ SE(n) − z1−α − 1, (9) π(∆) = Φ SE(n) truncated below at zero, where Φ is the standard normal distribution function and z1−α its quantile.

Proof By Proposition 3, with z1−α in place of the t quantile, equivalence is declared if and ˆ < δ − z1−α SE(n). Since ∆ ˆ ∼ N (∆, SE2 (n)), this probability only if −δ + z1−α SE(n) < ∆  δ+∆ δ−∆ equals Φ SE(n) − z1−α − Φ − SE(n) + z1−α , which is (9); the rejection region, hence the power, is empty when δ ≤ z1−α SE(n). □ Corollary 5 (design formula) For true difference ∆ = 0, target power π ∗ and margin δ, the smallest sufficient number of runs per method satisfies 2  2 σ 2 + v̄ z1−α + z(1+π∗ )/2 n ≥ . (10) δ2

 Proof At ∆ = 0 formula (9) reads π(0) = 2Φ δ/SE(n) − z1−α − 1; setting π(0) ≥ π ∗ and solving for n through (8) gives (10). □

9

For the small n typical of machine-learning experiments we sharpen the normal approximation by a shifted-t heuristic: the quantile and distribution function in (9) are replaced by their central-t counterparts,

  δ−∆ δ+∆ πt (∆) = Fν SE(n) − t1−α,ν + Fν SE(n) − t1−α,ν − 1,

(11)

truncated below at zero, with ν = 2(n − 1); the design formula (10) is then solved by iterating over n, with ν updated at each step. This is a heuristic, not an exact t-theory result: under the alternative the TOST statistics follow noncentral-t laws with a shared random denominator rather than a shifted central t, and ν = 2(n − 1) is a design surrogate for the Welch–Satterthwaite value (7) realised in the analysis. Exact power for the pooled, equal-variance normal model follows from the bivariate noncentral t with a common denominator (D.B. Owen, 1965; Phillips, 1990); Shieh (2016) computes it as a one-dimensional integral over the pooled variance, and Jan and Shieh (2017) give nearly exact power and sample-size algorithms for the heteroscedastic WelchTOST. We implemented the pooled integral of Shieh (2016) next to the heuristic and evaluated both at every cell of the simulation grid of Section 5 and at every run count printed in Tables 2–4 and Section 7.3; the comparison is released with the code. Within the equivalence region and at its boundary (|∆| ≤ δ ) the heuristic never exceeds the exact power; outside the region both lie far below α and the heuristic exceeds the exact value by at most 0.003. In the design-relevant range of Remark 3 the heuristic falls short of the exact power by at most 0.045 at n = 5, 0.018 at n = 8, 0.014 at n = 12 and 0.006 at n = 20; in low-power cells (exact power below 0.3) the shortfall grows to 0.08, and at n = 2 and n = 3 the heuristic reports zero where the exact power reaches 0.31 and 0.21. Inverted for the run count, the two calculations agree in every printed cell except five, where the exact count is one run lower: n∗ (90%) at δ = 0.015 in Table 2, RTE and MNLI in Table 3, and the SST-2 and RTE learning-rate rows of Table 4. The exact calculation refers to the pooled test, whereas the analysis uses the Welch test, whose random degrees of freedom never exceed 2(n − 1): on normal run means with a common variance the Welch-TOST realises less power than the pooled one, by up to 0.027 at n = 5, 0.007 at n = 8, 0.004 at n = 12 and 0.003 at n = 20 in the same range, and by up to 0.21 and 0.09 at n = 2 and n = 3 (Monte Carlo with 2 · 105 replications per cell, released with the comparison). In the design-relevant range the heuristic lies between −0.028 and +0.012 of that Welch power; in low-power cells its shortfall again reaches 0.08. We therefore keep the heuristic as the design formula: it is explicit at a given n and transparent, conservative with respect to the exact pooled power, and in the design-relevant range its remaining error is of the size of the pooledto-Welch gap; the implementation reports all three values, and Section 5 validates the heuristic against the realised two-level process. For a non-zero anticipated difference the same inversion applies to (11); as power falls when |∆| approaches δ , sizing at ∆ = 0 yields the smallest n. The equal-variance assumption is also easy to relax: with anticipated per-run variances τA2 ̸= τB2 and equal allocation, SE2 (n) = (τA2 + τB2 )/n, so (10) applies with 2(σ 2 + v̄ ) read as τA2 + τB2 , while the degrees of freedom drop from 2(n − 1) to the anticipated Welch–Satterthwaite value (n − 1)(τA2 + τB2 )2 /(τA4 + τB4 ), 10

runs per method for power 0.8

30000 10000

case study: 95% band for n* σseed = 0.002

3000

σseed = 0.005 σseed = 0.01

1000

case study: s = 0.0080 below five runs: formula not relied on

300 100 50

δ = 0.01: n* = 12, band [4, 3542] (shifted-t power at n = 2: ≈ 0)

20 10 5 2 0.005

0.010

0.015 0.020 equivalence margin δ

0.025

0.030

Figure 1 Runs per method required for 80% TOST power at α = 0.05 and true ∆ = 0, as a function of the equivalence margin δ (logarithmic vertical axis). The three thin curves with open markers show the design formula (10) (shifted-t version) for three seed-level dispersions with the image-level term of the simulation study at θ = 0.75 (m0 = m1 = 104 ): solid line with circles for σseed = 0.002, dashed line with squares for σseed = 0.005, dotted line with triangles for σseed = 0.01; the thick solid curve is the case study of Section 6 (s = 0.0080, image-level term absorbed into s2 ). The star marks δ = 0.01, where n∗ = 12. The hatched band marks the region below five runs per method, in which we do not rely on the formula; values falling there are raised to five (Remark 3). The shaded band is the approximate 95% interval for the case-study curve induced by the scaled-χ2 (Satterthwaite) uncertainty of the plug-in s2 (ν̂ ≈ 1.2, Section 6); at δ = 0.01 it spans 4 to 3542 runs per method

which lowers the power slightly through the t quantile. Section 6 quantifies the effect on the case-study estimates. c is random, while Proposition 4 treats Remark 3 (domain of validity) In the actual test SE it as known. In the design-relevant range, approximate power at least 0.2 and n ≥ 5, the approximation is nevertheless accurate: in the simulations of Section 5 its absolute error does not exceed 0.025 (median 0.006 over the grid), and it nowhere overstates power by more than 0.02, within Monte-Carlo resolution; under the real seed law of Section 7 the overstatement reaches 0.03 (Section 7.2). Outside it the approximation degrades where the deterministic power is small, that is, when δ is close to z1−α SE(n) and rejections come mainly c and it errs on the conservative side, by up to 0.07 from realisations that underestimate SE, in near-zero-power cells at n ≥ 5. The comparison above separates these empirical errors into three parts: the shortfall of the heuristic against the exact pooled-model power, which is conservative at every cell with |∆| ≤ δ; the lower power of the Welch test against the pooled one on normal run means, up to 0.027 at n = 5 in the design-relevant range; and the departure of the realised two-level AUROC process from normal run means under the Welch test, which stays within Monte-Carlo resolution at all 108 cells inside the margin (at most 0.020 and median 0.0045 in the design-relevant range; a two-proportion test of each realised rate against its Welch-normal value gives |z| ≤ 2.6 over the 108 cells). At n = 2 (ν = 2) it

11

predicts ≈ 0 where the realised rate at ∆ = 0 reaches 0.18. At n = 3 the error runs in both directions, from −0.17 to +0.05 across the grid, so below n = 5 we do not rely on the formula at all. The realised size at both boundaries ∆ = ±δ stays at or near α, consistent with the intersection–union argument. The largest value over the 108 boundary cells is 0.063 (MonteCarlo standard error 0.005), an excursion of the size expected for the maximum over that many cells and no evidence of systematic inflation. Both patterns persist when the Gaussian seed effects are replaced by skewed or heavy-tailed laws (Section 5). Design guidance based on (10) thus errs on the safe side where it is imprecise; recommendations that land below five runs should be raised to five.

Fig. 1 turns Corollary 5 into design curves: the number of runs required for 80% power against margin δ , for representative seed-level dispersions. The steepness of n∗ (δ ) ∝ δ −2 near small margins is the central practical message: certifying a tight equivalence margin is expensive in training runs, and once the image-level term is subordinate to the seed-level one, no test-set enlargement can remove the seed-level floor (Proposition 1).

5 Simulation study Both theoretical claims, the power approximation of Proposition 4 and the coverage behaviour of the two-level bootstrap (Remark 2), are checked against full simulations of the two-level model. Scores are generated from the binormal model:√ within run (g, s), ID scores are N (0, 1) and OOD scores N (mg,s , 1), where mg,s = 2 Φ−1 (θg,s ) links the location shift to the run-level AUROC, and θg,s follows model (2) with Gaussian seed effects. The true difference is assigned to method A (µA = θ + ∆, µB = θ); on a shared test √sample each score mixes a common item effect and run √ noise with weights ρ and 1 − ρ, which fixes the cross-run correlation of same-item scores at ρ without changing the marginal laws; the root seeds of all grids are fixed in the simulation scripts. Uncertainties quoted as ± in the text are single Monte-Carlo standard errors; the figures show ±3 standard errors. The image-level variances implied by this generator are well approximated by the classical formula of Hanley and McNeil (1982), which rests on an exponential score model: it agrees with the binormal value to within about 2% at θ ≤ 0.75 but exceeds it by 13% at θ = 0.90; at m0 = m1 = 104 the binormal values are v̄ = 1.65 · 10−5 , 1.16 · 10−5 and 4.5 · 10−6 for θ = 0.55, 0.75 and 0.90. Draws of θg,s outside the domain of the link are rejected and redrawn, which keeps the generator within the support constraint of model (2); under the Gaussian seed effects and the grid parameters below the rejection probability is under 10−15 per draw, no rejection occurred in the realised grids, and the results therefore coincide with unrestricted sampling. Power validation. The grid crosses σ ∈ {0.002, 0.005, 0.01}, n ∈ {2, 3, 5, 8, 12, 20}, θ ∈ {0.55, 0.75, 0.90} and true ∆ ∈ {−0.01, 0, 0.005, 0.01, 0.02} at margin δ = 0.01 and α = 0.05, so that the values ∆ = ±δ sit on the two boundaries of the composite null, with 2000 replications per cell and an independent test draw per run (the regime of Proposition 1). Fig. 2 compares the empirical rejection rate with the shifted-t approximation; the agreement pattern (accurate in the design-relevant range, conservative in the near-zero-power regime and at n = 2, erring in both directions at n = 3, size 12

at the boundaries consistent with α) is quantified in Remark 3. The validation is run under independent test draws; under a shared test set the per-run variance changes as in Proposition 2, a change that the plug-in s2 of Section 6 absorbs, while the shape of the conditional law lies outside the scope of that proposition and is not validated separately here. Robustness to the seed-effect law. A companion grid replaces the Gaussian seed effects by a centred exponential law (skewness 2) and by a scaled t3 law (heavy tails), crossing the three laws, a Gaussian anchor included, with σ ∈ {0.005, 0.01}, n ∈ {2, 3, 5, 12} and ∆ ∈ {−0.01, 0, 0.005, 0.01} at θ = 0.75 (96 cells, 2000 replications each). Since the exponential and t3 laws are unbounded, draws of θg,s are clipped to (0.505, 0.999), so σ denotes the pre-clipping scale. The clip probability peaks at 3 · 10−5 per draw (t3 at σ = 0.01), yet because a sizeable part of the variance of t3 resides in its far tails, clipping lowers that variance by 3.4% at σ = 0.01 and by 1.7% at σ = 0.005; the exponential law is unaffected at the reported precision. This is a shift of under 2% in the standard deviation and of under 0.03 in the predicted power in the affected cells, small against the deviations reported below, and it acts in the conservative direction for the formula, which uses the nominal σ . The conclusions transfer: the realised size at the boundaries ∆ = ±δ never exceeds 0.053 under any law, and in the design-relevant range the formula overstates power nowhere beyond Monte-Carlo resolution, its errors growing only in the conservative direction, with understatements of up to 0.05 under skewness and up to 0.125 under heavy tails. On the exponential and t3 grids, design guidance based on the formula therefore errs further on the safe side; the real seed law of Section 7.2 shows that this need not hold for every non-Gaussian law. Interval coverage. All runs share one test sample; the baseline configuration has between-run score correlation ρ = 0.8, calibrated to the case-study data (0.79–0.92 across test sets), true difference zero, θ = 0.6, m0 = m1 = 2000, B = 400 bootstrap iterations, 1000 replications per cell. The comparison baseline is the naive per-image bootstrap that resamples items only, with all runs fixed: the common practice when a single run per method is available, and a valid interval for the different question of comparing two fixed trained models rather than the training methods behind them. The grid maps the (n, σ ) plane at n ∈ {2, 3, 5, 8, 12} and σ ∈ {0.002, 0.005, 0.01} and probes three further axes (ρ ∈ {0.5, 0.95}, a non-zero true difference ∆ = 0.005, and θ = 0.75), for 31 cells in total. Fig. 3 shows the (n, σ ) map. The naive interval collapses whenever the seed level matters and never recovers: at σ = 0.01 its coverage stays near 0.53 for every n, its width does not react to σ at all, and averaging more runs only makes it narrower. The two-level interval reproduces the three regimes of Remark 2: conservative under a dominant residual image level (0.98–1.00 at σ = 0.002, growing with n), close to nominal or mildly conservative when the two variance levels are balanced (0.96–0.99 at σ = 0.005), and anti-conservative with few runs and a dominant seed level (0.835 ± 0.012 at σ = 0.01, n = 2), recovering to 0.94–0.95 by n = 5–8. The probe axes confirm that the governing quantity is the share of the run-specific residual: raising the score correlation to ρ = 0.95 deepens the small-n deficit (0.725 ± 0.014 at n = 2, σ = 0.01, and still 0.897 ± 0.010 at n = 5), lowering it to ρ = 0.5 attenuates it (0.912 ± 0.009 in the same cell), while a non-zero true difference or θ = 0.75 shifts coverage at n = 2 by at most about 0.04 and leaves n = 5 essentially unchanged.

13

(a) true Δ = 0

(b) true Δ = 0.005

1.0 0.8

probability of declaring equivalence

0.6 0.4 0.2 0.0 2

3 5 8 12 runs per method n

(c) σseed = 0.002

20

2

3

(d) σseed = 0.005

5 8 12 runs per method n

20

(e) σseed = 0.01

0.10 α = 0.05

0.05 0.00 2 3

5

8 12 20

σseed = 0.002

2 3 5 8 12 20 runs per method n σseed = 0.005

2 3

5

8 12 20

σseed = 0.01

Figure 2 Empirical probability that TOST declares equivalence (markers, ±3 Monte-Carlo standard errors, 2000 replications per point) against the shifted-t approximation (11) (lines), at θ = 0.75 and margin δ = 0.01. Panels (a) and (b) show the power at true differences ∆ = 0 and ∆ = 0.005; panels (c)–(e) show the realised size at the boundary ∆ = δ for the three seed-level dispersions σseed = 0.002, 0.005 and 0.01, one panel each, on an enlarged vertical scale (0 to 0.1). Line style and marker encode σseed as in Fig. 1. The horizontal axes are logarithmic, and in panels (a) and (b) the markers of the three series are offset slightly so that their error bars stay apart. The approximation is accurate where the power is practically useful, conservative in the near-zero-power regime, most visibly at n = 2, and misses in both directions at n = 3 (Remark 3). The dash-dotted lines mark α = 0.05

6 Case study: comparing two training methods for joint energy-based models The protocol is now applied to the data of our experimental study of joint energybased models (Knopov, 2026), which compared two training methods on CIFAR-10: the standard stochastic gradient Langevin dynamics (SGLD) sampler and a fixednoise adaptation of the predictor–corrector (PC) sampler. In the notation of Section 3, A = PC and B = SGLD, so ∆ = µPC − µSGLD . Each method was trained twice with different random seeds (n = 2). Every run was evaluated at the checkpoint prescribed by the selection rule of the source study, about ten epochs before that run’s own divergence point; the run unit therefore comprises training, this checkpoint rule and evaluation, and the design counts below refer to runs evaluated under that rule. 14

(a) two-level (seed × image)

(b) naive per-image 1.0 coverage of true Δ

coverage of true Δ

1.00 0.95 0.90 0.85

range of (a)

nominal 0.95

0.9 0.8 0.7 0.6 0.5

0.80 2

3 5 8 runs per method n

12

σseed = 0.002

σseed = 0.005

2

3 5 8 runs per method n

12

σseed = 0.01

Figure 3 Coverage of the true difference ∆ = 0 by nominal 95% intervals on a shared test set (θ = 0.6, m0 = m1 = 2000, ρ = 0.8, B = 400, 1000 replications per point, ±3 Monte-Carlo standard errors) as a function of the number of runs: (a) the two-level bootstrap of Section 3.3 against (b) the naive per-image bootstrap that ignores the seed level; panel (a) enlarges the band shaded in panel (b), the dashed horizontal line marks the nominal level 0.95, the horizontal axis is logarithmic, and the markers are offset slightly so that their error bars stay apart. Line style and marker encode σseed as in Fig. 1. The naive interval is far below nominal whenever the seed level matters and does not improve with more runs; the two-level interval departs from nominal only in the regimes of Remark 2

Every run was scored on the shared CIFAR-10 test sample (m0 = 10 000 ID items) against five OOD test sets: SVHN (m1 = 26 032), CIFAR-100 (10 000), DTD (1 880), LSUN-R (10 000) and iSUN (8 925). The per-run summary is the macro-average of the five AUROCs, and the equivalence margin adopted there is δ = 0.01. The margin is a domain choice (Section 8), and here it prices the decision at stake: the adapted sampler adds implementation and tuning complexity over SGLD, and a quality gain below one hundredth of AUROC was judged too small to justify adopting it; this is a judgement about practical consequences, not about detectability, since with enough runs far smaller differences become estimable. The window is symmetric because the claim under test is interchangeability, in the expected macro-average of the five AUROCs under the evaluation protocol of the source study, rather than a one-directional switch: an advantage beyond the margin would justify the extra complexity, while a deficit beyond it would disqualify the sampler as a drop-in replacement. The case study is retrospective, since in Knopov (2026) the margin was adopted at analysis time rather than pre-registered, so we read it as an illustration of the protocol, whose prospective form fixes δ before data collection. Table 1 lists the per-run values; all numbers below are recomputed from the raw per-item scores with our implementation and reproduce the published ones exactly. Table 2 shows how the certification cost responds to tightening or relaxing the margin. The per-item scores of all four runs are archived on Zenodo with the source study (Knopov, 2026), https://doi.org/10.5281/zenodo.21872469. Estimates. The method means are 0.7022 (SGLD) and 0.7079 (PC); the seed-level dispersions are sSGLD = 0.0035 and sPC = 0.0107 (one degree of freedom each), 15

Table 1 Per-run AUROCs of the case study: two training methods, two seeds each, evaluated at the checkpoints prescribed by the source study, five OOD test sets and their macro-average. Recomputed from the raw per-item scores of Knopov (2026) Run SGLD, seed 42 SGLD, seed 123 PC, seed 42 PC, seed 123

SVHN 0.5676 0.6056 0.6045 0.6237

CIFAR-100 0.6396 0.6244 0.6418 0.6391

DTD 0.7250 0.7349 0.7374 0.7549

LSUN-R 0.7805 0.7688 0.7511 0.7737

iSUN 0.7863 0.7899 0.7668 0.7859

macro-5 0.6998 0.7047 0.7003 0.7155

pooling to s2 = 6.34 · 10−5 , i.e. s = 0.0080. The image-level (DeLong) variance of the macro-average, per-set components plus the cross-set covariance induced by the shared ID sample, is v̄ = 8.6 · 10−6 per run, essentially identical across the four runs and only 14% of s2 on the plug-in estimates: this suggests a seed-dominated comparison even before any cancellation, though the ratio inherits the uncertainty of s2 itself. The between-run correlation of per-item scores (0.79–0.92) indicates that much of that image structure is in fact shared, though it does not by itself identify the AUROClevel split (Remark 1). The split is immaterial for the test: by Proposition 2 the pooled s2 estimates the whole conditional per-run variance on this benchmark, whatever the share of residual image noise inside it, and it is used below as the plug-in. The two methods reuse the seed values 42 and 123; the source study analysed the runs as unpaired, and we reproduce that working analysis here (the seeds were not designed as matched blocks, which by itself does not establish independence), with the paired TOST as a sensitivity check: it gives p = 0.28 and the same conclusion (incidentally, the between-method score correlation is the same for same-seed pairs, 0.878, as for different-seed ones, 0.876). The collections of Section 7.3, by contrast, are matched by seed by construction and are analysed there with the paired TOST as the primary test. ˆ = +0.0056 (PC minus Equivalence test. The seed-level Welch-TOST gives ∆ c SGLD), SE = 0.0080, ν̂ = 1.21 and p = 0.334: equivalence within ±0.01 cannot be declared. The 90% interval of Proposition 3 is [−0.032, +0.043], whose width is almost four times the full margin window. The two-level bootstrap interval (95%, B = 3000) is [−0.005, +0.016]; at n = 2 we treat it as illustrative, the Welch interval being the operative one (Section 8). By the coverage study (Fig. 3), an interval obtained in the σ = 0.01, n = 2 regime is materially too narrow: its coverage in the simulated configurations is 0.84 at ρ = 0.8 and 0.73 at ρ = 0.95, and the correlation in these data lies between the two. A corrected, wider interval would still contain zero and still cross the margin, so the descriptive reading of the data is unchanged: they are compatible both with equivalence and with practically relevant differences in either direction, and certify neither. Retrospective power. Was the null outcome bad luck or design? Corollary 5 answers clearly, though conditionally on the plug-in s2 : at n = 2 the rejection region of the deterministic approximation is empty, since δ = 0.01 < t0.95, 2 SE(2) = 0.023, and the shifted-t power at ∆ = 0 is zero. The exact pooled-model power of Section 4 is small ˆ because a pair of runs with but positive at n = 2, 0.054 at ∆ = 0 and 0.044 at ∆ = ∆, 2 an unusually small s can still certify. A simulation of the two-level model calibrated to the estimates above (θ = 0.705, ρ = 0.89, σ = 0.0079, 2000 replications; a single 16

Table 2 Runs per method n∗ at α = 0.05 and true ∆ = 0 with the case-study plug-in s = 0.0080, from the shifted-t design formula of Corollary 5 (formula) and from the exact pooled-model power of Shieh (2016) inverted for n (exact). Entries below n = 5 lie outside the simulation-validated range of the formula (Remark 3) and should be read as “at least five” n∗ (80%) δ 0.005 0.0075 0.01 0.015 0.02

formula 45 21 12 6 4

n∗ (90%) exact 45 21 12 6 4

formula 56 26 15 8 5

exact 56 26 15 7 5

binormal AUROC stands in for the five-set macro-average) realises a rejection rate of 0.026±0.004, the conservative regime of Remark 3. This rate is itself a plug-in quantity: the variance calibration behind it rests on ν̂ ≈ 1.2 effective degrees of freedom, so the number is a model-based estimate rather than a property of the design alone. The deterministic emptiness is conditional on the plug-in as well, but far more stable: at n = 2 the region is empty whenever s2 > (δ/t0.95, 2 )2 = 1.2 · 10−5 , which holds across the entire χ2 interval for the variance reported below. Under that calibration, whatever the true difference, the certification probability at n = 2 stays in the low per cents, with ∆ = 0 the most favourable case, so the failure of the TOST to declare equivalence was determined largely by the design rather than by the data. The design answer. For 80% power at δ = 0.01 the design formula requires n∗ = 12 runs per method (15 for 90%), marked by the star in Fig. 1; at n = 12 the calibrated simulation realises a power of 0.811 ± 0.009 against the predicted 0.812 (both the formula and this simulation assume a common per-run variance). Knopov (2026) quotes these counts in its limitations section as order-of-magnitude guidance; their derivation, simulation check and sensitivities are the subject of the present section. Both numbers also assume exact equality, the most favourable case for the test: if the true ˆ = 0.0056, the power of the n = 12 design difference instead equals the observed ∆ drops to 0.36, and 80% power at the same margin needs about 42 runs per method. A second sensitivity concerns the dispersions, which the two methods appear to violate (s2PC /s2SGLD ≈ 9.5): if that ratio persisted, the anticipated Welch degrees of freedom of Section 4 at n = 12 would be 13.3 rather than 22, the realised power 0.79 rather than 0.81, and n∗ would move from 12 to 13, within the order-of-magnitude reading of these numbers. The ratio itself, however, rests on one degree of freedom per method and is far too uncertain to distinguish equal from unequal true dispersions (a two-sided F (1, 1) test gives p ≈ 0.4). Table 2 tabulates n∗ over margins at ∆ = 0: relaxing the margin to 0.02 brings the cost down to the floor of five runs per method (raw formula values 4–5), while certifying 0.005 would take 45. The exact pooled-model calculation of Section 4 returns the same counts in every cell except n∗ (90%) = 7 rather than 8 at δ = 0.015. One caveat is essential for honest use of these numbers. With two runs per method the pooled s2 itself rests on ν̂ ≈ 1.2 effective degrees of freedom: the approximate χ2 -based 95% interval for the true per-run variance, with the pooled s2 treated as a Satterthwaite scaled-χ2 , stretches from 1.4 · 10−5 to 2.1 · 10−2 , and the corresponding 17

n∗ (80%) ranges from 4 into the thousands (the shaded band of Fig. 1). We have not verified the coverage of that Satterthwaite approximation; under normal run means with a common variance the exact two-degree-of-freedom interval is narrower, 1.7 · 10−5 to 2.5 · 10−3 , and still spans n∗ from 4 to about 430. The plug-in n∗ = 12 is an order-ofmagnitude statement, not a certified sample size. The practical recommendation for a certification experiment is therefore two-stage: a small pilot (4–6 runs per method) to sharpen the estimate of s and to bound the plausible true difference, then Corollary 5 with the updated values. The pilot sizes the remaining uncertainty itself: at 5 runs per method the pooled s2 carries 8 degrees of freedom under a normal, commonvariance working model, and the multiplicative 95% uncertainty of n∗ shrinks from ×0.2–×330 to ×0.5–×3.7. The simplest confirmatory implementation uses the pilot for design only and excludes its runs from the final test; reusing them would make the run count depend on the observed data, an internal-pilot design whose size control must be established separately. Section 7.3 carries this procedure through on a real seed law; there, on one collection and two margins, entering the pilot variance as an upper confidence bound rather than as a point estimate, following Browne (1995), brought the achieved power close to the target, at the price of more runs.

7 Second case study: real seed laws in two public collections The case study of Section 6 has the run count that motivated this work and no more; it cannot show how the protocol behaves when runs are plentiful, nor whether real seed effects resemble the laws simulated in Section 5. Two public collections of independently trained models allow both questions to be asked on real data at no training cost. The first is the CIFAR-10 seed zoo of Schürholt et al. (2022b): one small convolutional network in one training configuration, trained from 1000 random seeds, with a checkpoint saved after every epoch (Schürholt, Taskiran, Knyazev, Giró-i-Nieto, & Borth, 2022a); the companion fixed-seed hyperparameter zoo covers 128 configurations with 10 seeds each. The second is the MultiBERTs release of Sellam et al. (2022): 25 independently pretrained BERT-base models, fine-tuned with several learning rates and fine-tuning seeds, together with their per-example predictions on the development sets of eight tasks of the General Language Understanding Evaluation benchmark (GLUE), class probabilities for the seven classification tasks, released alongside the checkpoints rather than described in the paper. We use three of them, chosen to span test-set sizes from a few hundred to ten thousand items: RTE (Recognizing Textual Entailment, m = 277 examples), SST-2 (Stanford Sentiment Treebank, 872) and MNLI (Multi-Genre Natural Language Inference, matched development set, 9 815). Both collections record classification outputs, so the metric is accuracy rather than AUROC. The seed-level layer of Section 3 applies unchanged; at the item level the accuracy of a run is a mean of per-item correctness indicators, its variance conditional on the run is p(1 − p)/m, and the between-run correlation of correctness plays the role of ρ. For the zoo we recomputed the per-image predictions of the final checkpoint of every run on the CIFAR-10 test set; the resulting accuracies match the values shipped in the release exactly for 999 of the 1000 runs and differ by one image in the remaining 18

one. A run of the zoo is one seed; a run of MultiBERTs is one pretraining seed with one fixed fine-tuning seed, so that the 25 runs of a configuration are independent and free of the clustering that the 125-run collection with five fine-tuning seeds per pretraining seed would introduce. Fixing the fine-tuning seed is empirically benign for the per-run variance at this precision: the per-run variance at the fixed seed lies within 20% of the total variance of the 125-run collection on all three tasks (Section 7.4). All numbers below are produced by the scripts released with this article.

7.1 Two-level structure Table 3 summarises the four single-configuration collections. Its n∗ column uses the shifted-t formula; the exact pooled-model count of Section 4 is one lower for RTE (635) and MNLI (2) and identical for the other two. Three observations matter for design. First, real seed laws are neither Gaussian nor alike: the zoo’s accuracies are strongly left-skewed with heavy tails, with a minority of seeds at markedly worse solutions (the lowest decile lies 0.02 below the median and the minimum 0.08 below it), whereas the three GLUE tasks are at most moderately skewed without marked excess kurtosis; at 25 runs their shape statistics are compatible with a Gaussian law (Shapiro–Wilk p ≥ 0.13), in contrast with the zoo’s 1000 runs. Second, the seed-level dispersion spans more than an order of magnitude across tasks trained with the same recipe: 0.002 on MNLI, 0.005 on SST-2 and 0.061 on RTE, where fine-tuning is unstable (Dodge et al., 2020). For RTE this puts a margin of one accuracy point out of reach of any realistic budget (n∗ = 636 runs per method), and even a margin of five points needs 27 runs per method; on such a benchmark equivalence is certifiable only at margins comparable to its own seed dispersion. Third, the binomial item-level variance exceeds the observed per-run variance on SST-2 and MNLI (v̄/s2 = 3.6 and 2.9). This does not contradict Proposition 1; it is the shared-test-set case of Proposition 2. The quantity v̄ is the variance over redraws of the test items, which a fixed benchmark never realises, whereas s2 is the conditional per-run variance. When the runs agree on most items (82% of the SST-2 items are classified correctly by all 25 runs, ρ̂ = 0.70), their accuracies differ by less than binomial noise would suggest. The design consequence is concrete: sizing a shared-benchmark comparison with s2 + v̄ in place of s2 would ask for 20 runs per method on SST-2 instead of 5; the plug-in of Section 4 on a shared test set is s2 alone, and the sizing and the certification then refer to the conditional difference ∆(T ) on that benchmark (Proposition 2).

7.2 The design formula under a real seed law With 1000 runs of one configuration, the certification probability of the seed-level test at a true difference of zero can be measured directly: n runs are drawn without replacement for each of two disjoint arms, the TOST is applied, and the draw is repeated 5000 times for each n ∈ {2, 3, 5, 8, 12, 20, 50}. Adding ±δ to one arm produces the boundaries of the null exactly, so the realised size is measured the same way. Fig. 4 shows the outcome at the margin δ = 0.01 of Section 6, for which the formula with the plug-in s = 0.0136 asks for n∗ = 33 runs, and at δ = 0.0173, the margin at which it asks for n∗ = 12; the same check on the 25 SST-2 runs is added at δ = 0.01 19

Table 3 Two-level structure of four single-configuration collections: runs R, test items m, mean accuracy, seed-level standard deviation s, skewness and excess kurtosis of the per-run accuracies, ratio of the mean binomial item-level variance v̄ to s2 , between-run correlation of per-item correctness ρ̂, share of items classified correctly by every run (column always), and runs per method n∗ for 80% power at δ = 0.01 from the design formula with the plug-in s (shared test set); values of n∗ below 5 are to be read as “at least five” (Remark 3) Collection R m CIFAR-10 zoo 1000 10 000 MultiBERTs, RTE 25 277 MultiBERTs, SST-2 25 872 MultiBERTs, MNLI 25 9 815

mean 0.487 0.628 0.920 0.843

s skew kurt v̄/s2 0.0136 −1.80 5.40 0.14 0.0609 −0.83 0.24 0.22 0.0049 −0.43 0.14 3.59 0.0021 0.38 −0.33 2.94

ρ̂ 0.57 0.39 0.70 0.66

always n∗ 0.04 33 0.00 636 0.82 5 0.64 3

(n∗ = 5). Under the zoo’s heavy-tailed law the pattern of Remark 3 reappears with one qualification. Below eight runs the formula is conservative, at times substantially (0.12 predicted against 0.38 realised at n = 5, δ = 0.0173): small arms rarely contain a poorly converged seed, so the realised standard error is typically smaller than the pooled s implies. At the tighter margin δ = 0.01 the predicted power stays below 0.2 up to n = 12, and the conservative gap persists that far (0.07 predicted against 0.24 realised at n = 12). Within the design-relevant range of Remark 3, where the approximate power is at least 0.2, the error stays within ±0.05 and changes sign. At the design point n∗ = 12 for δ = 0.0173 the realised rate is 0.794 ± 0.006 against the predicted 0.826, the largest overstatement we observed, consistent with arms of that size catching an outlier often enough to inflate the Welch standard error. At n = 20 and 50 the formula and the data agree to within 0.03, and the SST-2 series, whose law is close to Gaussian, agrees from n = 3 upward (0.297 realised against 0.286 predicted at n = 3, 0.796 against 0.801 at n = 5). The realised size stays at or near α throughout: the largest of the 28 boundary cells of the zoo is 0.055 ± 0.003, an excursion of the size expected for a maximum over that many cells, so the size behaves under the real law as the intersection–union argument predicts, as it did in simulation.

7.3 Two-method comparisons Table 4 applies the full protocol to eight comparisons. All eight are matched by seed, the zoo arms through the seeds 1 to 10 and the MultiBERTs arms through the pretraining seed, so the two arms are not independent as model (2) assumes; the table therefore reports the paired seed-level TOST, the one-sample TOST on the withinseed differences with n − 1 degrees of freedom and its 90% interval, while the design count n∗ keeps the independent-arm design of a fresh experiment, the planning question of this paper. That column is a floor: it assumes ∆ = 0, and at the observed differences the same formula asks for 116 runs per method on SST-2 (learning rates) and 54 on MNLI (steps), while for the RTE contrasts and the SST-2 step contrast, whose estimates lie at or beyond the margin, no run count certifies equivalence at δ = 0.01. The two zoo pairs, Adam against SGD and GELU against tanh at otherwise identical settings, are certified equivalent within δ = 0.01 at 10 matched pairs (paired TOST p = 0.024 and 0.021; both 90% intervals lie inside ±0.009). These are the two 20

realised size at the boundary

probability of declaring equivalence

(a) true Δ = 0 1.0 0.8 0.6 0.4 0.2 0.0 2

3

5 8 12 20 runs per method n

zoo, δ = 0.01

0.10

(b) Δ = ±δ

α = 0.05

0.05

0.00

50

2

zoo, δ = 0.0173

3

5 8 12 20 runs per method n

50

SST-2, δ = 0.01

Figure 4 The design formula against a real seed law: (a) probability that the seed-level TOST declares equivalence at true ∆ = 0 and (b) realised size at the boundaries ∆ = ±δ when n runs per method are drawn without replacement from the 1000-seed CIFAR-10 zoo, at δ = 0.01 (n∗ = 33, solid line with diamonds) and δ = 0.0173 (n∗ = 12, dashed line with pentagons), and from the 25 SST-2 runs of MultiBERTs at δ = 0.01 (n∗ = 5, dotted line with inverted triangles). Markers are realised rates with ±3 Monte-Carlo standard errors (in panel (b) the mean of the two boundary rates), and lines in panel (a) show the shifted-t formula (11) with the plug-in s of each collection; the thin dashdotted lines mark the target power 0.8 in panel (a) and the level α = 0.05 in panel (b), the horizontal axis is logarithmic, and the markers are offset slightly so that their error bars stay apart

one-factor contrasts of the hyperparameter zoo, optimiser and activation, with the remaining factors at the seed-zoo settings apart from the zoo-wide learning rate of 10−3 ; the two pairs share the Adam-GELU arm, so they are not independent comparisons, and both, together with the margins 0.01 and 0.02 carried over from Section 6, were fixed in advance of the analysis. Run with the budgets of Section 6, the two zoo contrasts almost never certify equivalence: over all subsets of n = 2 matched pairs the paired TOST declares equivalence in 2 to 4% of them and for n = 3 in 3 to 7%, in line with the retrospective power of the case study; at n = 5 the shares are 7% and 9%. The subsets are enumerated exactly (there are only 45, 120 and 252 of them), so these shares describe the realised pool rather than fresh replications. For the independent-arm planning question, a pilot of five runs per method followed by the design formula returns n∗ = 14 and 10 at the median over pilots, with 95% pilot-to-pilot bands of [5, 25] and [5, 16], and 44 to 47% of the pilots return a value below the full-data one, so the point-estimate pilot rule of Section 6 recovers the right order of magnitude relative to the full-pool plug-in reference, while a single pilot can still undersize the experiment. Carried through end to end on the seed zoo, where ∆ = 0 by construction and 1000 runs leave room for fresh confirmatory arms, the procedure falls short of its nominal power. With a pilot of five runs per method, then the formula applied to the pooled pilot s (prescriptions below five raised to five, which happens for 12% of the pilots at the wider margin), then fresh runs of the prescribed size drawn without replacement 21

from the remaining runs, equivalence is certified in a share 0.662 ± 0.007 of 5000 replications at δ = 0.0173 (for which the full-pool s gives n∗ = 12, and fresh arms of that fixed size certify in 0.794) and in 0.598 ± 0.007 at δ = 0.01 (n∗ = 33, fixed-size rate 0.799). Two-thirds of the pilots undersize the experiment, with median prescriptions of 9 and 24 runs per method against 12 and 33; this share is not comparable with the 44 to 47% above, where the pilots were subsamples of the same ten runs that define the target. Two mechanisms act: the pilot variance rests on eight degrees of freedom and lies below its expectation more often than above, which alone undersizes 0.54 to 0.56 of the pilots under a Gaussian law with the same s, and ten pilot runs contain none of the lowest 5% of seeds 60% of the time, so the heavy left tail of this seed law is usually missed as well. Under the Gaussian law the shortfall persists at 0.718 and 0.692, so it is a property of sizing on a point estimate, sharpened by the tail. Sizing on the upper 80% confidence bound of the pooled pilot variance (χ2 on eight degrees of freedom) is the classical remedy for a variance taken from a pilot (Browne, 1995; Kieser & Wassmer, 1996); here it is a normal-model inflation rule, since on this seed law the bound covers the full-pool variance in 61% of the pilots rather than 80%. It raises the rate to 0.802 ± 0.006 at δ = 0.0173 and 0.779 ± 0.006 at δ = 0.01, close to the fixed-size reference at the wider margin and short of it at the tighter one, with median prescriptions of 14 and 39 runs per method (median totals 38 and 88) and mean total costs, pilot included, of 50 and 121 runs against 34 and 77 for the pointestimate rule and 24 and 66 for a fixed-size design that knows the full-pool s. Under the Gaussian law the same rule gives 0.894 and 0.884: the classical argument promises the intended power with probability at least 0.8 over pilots rather than on average, and it presumes a valid variance bound and a calibrated power function, neither of which has been established for this seed law. The MultiBERTs comparisons show the margin doing its work. Between the learning rates 2 · 10−5 and 5 · 10−5 , the two settings are certified equivalent on MNLI at ˆ = +0.0040, interval [+0.0028, +0.0052]); on SST-2 the difference is both margins (∆ distinguishable from zero and certified within 0.02, while at 0.01 the interval crosses ˆ = +0.0084, interthe margin and equivalence is neither established nor excluded (∆ val [+0.0067, +0.0101], a knife edge: the upper end exceeds the margin by 0.0001); on RTE the two differ by ten accuracy points. Between one and two million pretraining steps, at five runs per method, the second million buys about one point on SST-2 ˆ = −0.0101 and −0.0094, intervals of width 0.0072 and 0.0041), certiand MNLI (∆ fied within a margin of 0.02, while at 0.01 both intervals cross the margin, the SST-2 estimate just outside the margin and the MNLI estimate inside it, so equivalence at 0.01 is neither established nor excluded; on RTE the five-pair interval is eleven points wide and settles nothing. As a sensitivity check, the unpaired Welch-TOST returns p = 0.010 and 0.008 for the zoo pairs (paired 0.024 and 0.021; same-seed correlations −0.23 and −0.44), 0.125 for the learning-rate comparison on SST-2 (paired 0.059; correlation 0.48) and 0.53, 0.23 and 0.76 for the step comparisons on SST-2, MNLI and RTE (paired 0.52, 0.28 and 0.85; correlations −0.43, −0.51 and +0.80), with every verdict unchanged at both margins; ignoring a negative between-arm covariance understates the variance, and in the negatively correlated comparisons the unpaired intervals are indeed the narrower

22

Table 4 Eight two-method comparisons under the protocol, all matched by seed and analysed with the paired seed-level TOST on the within-seed differences: matched pairs n, estimated difference ˆ (first method minus second), paired 90% interval, TOST verdict at δ = 0.01 and δ = 0.02, runs ∆ per method n∗ for 80% power at δ = 0.01 in a fresh experiment with independent arms, from the pooled s of the two arms and computed under the counterfactual ∆ = 0 (the requirement grows without bound as the anticipated |∆| approaches δ, Section 4), and the share of the subsets of 2, 3 or 5 matched  pairs in which the paired TOST at δ = 0.01 declares equivalence (exact enumeration over all 10 or 25 subsets; a subset whose differences coincide counts as a non-certification; not n n computed for the five-pair comparisons); the MultiBERTs rows use learning rates 2 · 10−5 against 5 · 10−5 at two million pretraining steps (rows lr ) and one against two million pretraining steps at 2 · 10−5 (rows steps); values of n∗ below 5 are to be read as “at least five” (Remark 3)

Collection zoo zoo RTE SST-2 MNLI RTE SST-2 MNLI

Comparison Adam vs SGD GELU vs tanh lr lr lr steps steps steps

n 10 10 25 25 25 5 5 5

ˆ ∆ −0.0002 +0.0012 +0.0983 +0.0084 +0.0040 +0.0404 −0.0101 −0.0094

TOST verdict certification rate 90% interval 0.01 0.02 n∗ n = 2 n = 3 n = 5 [−0.0080, +0.0077] yes yes 14 0.04 0.03 0.07 [−0.0056, +0.0081] yes yes 10 0.02 0.07 0.09 [+0.0737, +0.1229] no no 397 0.00 0.00 0.00 [+0.0067, +0.0101] no yes 6 0.04 0.04 0.08 [+0.0028, +0.0052] yes yes 3 0.28 0.67 0.99 [−0.0134, +0.0943] no no 705 – – – [−0.0137, −0.0065] no yes 3 – – – [−0.0114, −0.0073] no yes 2 – – –

ones; on 10 pairs the zoo correlations are not distinguishable from zero, so the pairing there is the analysis the design calls for rather than a finding. A fresh experiment that trained matched pairs by design would size on the variance of the within-pair differences rather than on the independent-arm n∗ of the table; for the zoo contrasts this gives 18 and 14 pairs (36 and 28 runs) against 14 and 10 runs per method (28 and 20), so with the negative same-seed correlations observed here matching does not pay. The eight comparisons at two margins are illustrative and carry no familywise control; as noted in Section 8, multiplicity inflates the rate of false certifications, so a study that needed separate verdicts on several contrasts would have to adjust for the multiplicity (one contrast tested at nested margins needs no adjustment, since the rejection regions are nested, and a single claim that all contrasts are equivalent is itself an intersection–union test). Which of these verdicts is the useful one is a domain decision (Section 8); the protocol’s contribution is to make the dependence on δ visible.

7.4 Scope of this case study The zoo networks are deliberately tiny (accuracy 0.49 on CIFAR-10), a statistical testbed rather than models of practical interest, and the MultiBERTs configurations offer 25 runs, so that in the single-configuration check of Section 7.2 two disjoint arms of n = 12 use 24 of them and successive draws differ only in how nearly the same runs are split. More generally the subsampled rates condition on the observed run pool: the quoted Monte-Carlo standard errors measure the resampling error of that finite-pool rate, while the uncertainty about the seed law itself, which is estimated from only 25 runs, is not captured by them and may dominate. We therefore read the zoo for the shape of the seed law and the GLUE tasks for the regimes and the comparisons. A nested decomposition of the 125 MultiBERTs runs in which both seeds vary attributes more variance to the fine-tuning seed than to the pretraining seed on 23

all three tasks (intraclass correlation of the pretraining seed 0.38 on SST-2 and MNLI, and 0.13 on RTE, where it is only marginally distinguishable from zero: F = 1.73 on 24 and 100 degrees of freedom, p = 0.03); the per-run variance at the fixed fine-tuning seed nevertheless lies within 20% of the total variance of that collection on all three tasks, a check of the variance only, not of the method differences or of the tails. This is why the run unit must include every stochastic stage that the compared methods re-run; a comparison that reuses one pretrained checkpoint estimates a different and narrower quantity. Proposition 2 also asks the test collection to be independent of the runs; GLUE development sets are commonly used for checkpoint selection during fine-tuning, and the MultiBERTs release does not document whether this occurred, so that premise is plausible rather than guaranteed there. Accuracies are discrete, so at n = 2 the two runs of an arm occasionally have identical accuracies in both arms, or the two paired differences coincide; the standard error then vanishes and the TOST statistic is undefined, in up to one draw in a hundred in the single-configuration check of Section 7.2 and in up to six in a hundred of the subsets behind Table 4 (n = 2 on SST-2, where 18 of the 300 pairs of within-seed differences coincide). Such draws are counted as non-certifications.

8 Discussion and limitations ˆ as normal and SE c as Approximations in the power theory. Proposition 4 treats ∆ known. The joint effect of both approximations is mapped rather than assumed: the formula is accurate in the design-relevant range and errs predominantly on the conservative side outside it, the exception being moderate-power cells at n = 3, while the realised size at the boundaries stays at or near α with no evidence of systematic inflation, under Gaussian and non-Gaussian seed effects alike (Remark 3, Fig. 2). The real seed laws of Section 7 confirm the pattern with one qualification: under the heavy-tailed law of the zoo the error of the formula within the design-relevant range reached 0.05 in the conservative direction and 0.03 in the other, so the safety margin it offers is thinner than the Gaussian grid suggests, while the realised size stayed at or near α, its largest boundary value of 0.055 lying within Monte-Carlo resolution of the level. For design use we regard the conservative direction as a feature, with one rule attached: recommendations that land below five runs are raised to five (Remark 3). Bootstrap validity is regime-dependent. We claim no general consistency for the two-level scheme; its coverage is near-nominal only when the variance levels are balanced (Remark 2, Fig. 3). The map itself is finite: one binormal generator family, one test-sample size, B = 400 and equal method dispersions; the test-set-size and variance-ratio axes remain unexplored. The anti-conservative regime, very few runs with dominant seed noise, is precisely where small-n practice lives, so at n ≤ 3 we recommend the seed-level Welch interval and reserve the bootstrap for composite statistics at moderate n. The Welch interval is approximate, since the unequal-variance problem admits no exact interval of the standard t form, but it holds its level across the equal-variance designs simulated here. Dependence between test sets. The per-set AUROCs of one run share the ID sample, so they are correlated; the case study accounts for this in v̄ through the cross-set 24

covariance of placement values. Per-set TOSTs, however, remain dependent across OOD sets, and we make no multiplicity claim for testing several margins at once; the macro-average, treated as a single statistic, sidesteps the multiplicity by changing the estimand. It does not certify the sets separately: in Table 1 the mean per-set differences reach +0.028 (SVHN) and −0.012 (LSUN-R), opposite in sign and both beyond the margin, so per-set equivalence claims would need margins and a multiplicity-aware procedure of their own. Uncertainty of the plug-ins. At n = 2 the pooled s2 carries roughly one effective degree of freedom, and the design answer inherits that uncertainty (Section 6): n∗ is then an order-of-magnitude statement. The anticipated difference is a second, equally consequential plug-in: sizing at ∆ = 0 gives the smallest possible n, and the requirement grows quickly as the anticipated |∆| approaches the margin (Section 6). The two-stage remedy, a pilot of 4–6 runs followed by the formula, is cheap relative to the certification experiment itself. Carried through on the real seed law of Section 7 with the pilot s plugged in as a point estimate, however, it delivers 0.60 to 0.66 against a nominal 0.80, since most pilots undersize; sizing on the upper 80% confidence bound of the pilot variance (Browne, 1995; Kieser & Wassmer, 1996) raises it to 0.78 to 0.80 at about one and a half times the run count of the point-estimate rule, roughly twice that of a fixed-size design with the full-pool variance (Section 7.3); this rests on one collection, two margins and ∆ = 0, a planning sensitivity analysis rather than a general guarantee. The methods may also differ in dispersion, as they appear to in the case study; Welch statistics absorb this in testing, and the unequal-variance design formula of Section 4 prices it at one extra run on the case-study estimates (Section 6). Beyond AUROC. The seed-level layer, that is, model (2), the TOST and the power function, carries over to other per-run scalar metrics: accuracy, macro-F1 , calibration error. Section 7 exercises it with accuracy, whose item-level variance is binomial, and makes the shared-test-set regime visible in which that binomial variance exceeds the observed per-run variance and must not be added to it. The variance decomposition asks only for finite variances, but the Welch-TOST and the shifted-t heuristic additionally lean on approximate normality of the run means, so a metric with a strongly skewed or heavy-tailed per-run law at small n calls for a simulation check of its own before the design formula is trusted. Finite variances alone do not protect against a multimodal run law either: if a small fraction of runs fails outright, so that the run law is a mixture with a rare large shift, five runs per method will often contain no failure at all, and equivalence can then be certified far more often than α allows even when the true difference lies at or beyond the margin. The per-run values should be inspected for such failures, whose frequency is an estimand of its own, before the protocol is applied to their mean, bearing in mind that a short failure-free pilot cannot exclude a rare component. Only the inner-level estimator is AUROC-specific; for metrics that average per-item contributions, v̄ can be estimated from the empirical influence values, while metrics without such structure require a metric-specific inner estimator, with the outer layer unchanged. Choice of the margin. The margin δ must be fixed before the experiment (Lakens, 2017); we treat it as a domain decision rather than a statistical one, the smallest difference that would change the practical decision, and not as the resource-based fallback

25

of the smallest detectable difference that Lakens (2017) allows when no substantive bound is available. Reporting the (1 − 2α) interval next to δ (Proposition 3) keeps the conclusion transparent under any reader’s margin.

9 Conclusions Certifying that two training methods are practically equivalent is a design problem before it is a testing problem. The protocol proposed here (a margin fixed in advance, per-run AUROCs as the unit of analysis, a Welch-TOST with its dual confidence interval, and a two-level bootstrap for composite statistics) makes the certification claim precise, and the power theory prices it in training runs: n ≥ 2(σ 2 + v̄ )(z1−α + z(1+π∗ )/2 )2 /δ 2 . Once the test set is large enough for the image-level term to be subordinate to the seed-level term, the regime of the case study, the price is dominated by the seed-level dispersion, which no test-set enlargement can reduce. In the case study this reads: the published TOST of Knopov (2026) at n = 2, which failed to declare equivalence, had, under the variance calibrated to its own runs, a realised certification probability of roughly three per cent, and a certification of ±0.01 would take about 12 runs per method even under exact equality; that statement could have been made after a small pilot, before the confirmatory experiment. On two public collections with up to a thousand independently trained runs the same formula tracks the realised certification probability to within 0.05 wherever its design-relevant range applies, under a heavy-tailed real seed law, keeps the realised size at or near α, and resolves comparisons that two or three runs leave undecided. The two-stage experiment also shows that a pilot variance plugged in as a point estimate undersizes the experiment, and that a normal-model upper confidence bound on it raised the achieved rates from 0.60 and 0.66 to 0.78 and 0.80 at about half again the run count of the point-estimate rule. Natural continuations are multiplicity-aware equivalence over several test sets, sequential designs that spend runs adaptively, and inner-level estimators for metrics beyond AUROC.

26

Declarations Funding. The authors received no specific funding for this work. Competing interests. The authors declare no competing interests. Ethics approval. Not applicable. This study involves no human participants and no animals; it uses simulated data and publicly available benchmark datasets only. Consent to participate. Not applicable. No human participants were involved in this study. Consent to publish. Not applicable. The manuscript contains no data, images or videos relating to an identifiable individual person. Data availability. The per-item out-of-distribution scores of the four case-study runs are archived on Zenodo with the source study (Knopov, 2026), https://doi.org/ 10.5281/zenodo.21872469. Every simulation grid reported here is regenerated from the root seeds recorded in the result files shipped with the code repository below. The Model Zoos checkpoints of Section 7 are available from Zenodo under the CC BY 4.0 licence (Schürholt et al., 2022a), and the MultiBERTs per-example predictions from the authors’ public release (Sellam et al., 2022), https://storage.googleapis .com/multiberts/public/example-predictions/, whose data files carry no stated licence (the accompanying repository is under Apache-2.0); the per-run accuracies derived from both are included with the code. The third-party benchmark datasets involved (CIFAR-10, SVHN, CIFAR-100, DTD, LSUN-R, iSUN, GLUE) are publicly available. Materials availability. Not applicable. Code availability. The equivtest package, the simulation scripts, the scripts of both case studies and the figure builder are available at https://github.com/ DmytroKnopov/equivtest (release v0.2.0, archived at https://doi.org/10.5281/zenodo .23421510); the test suite includes regression tests against the published values of Knopov (2026). The package requires Python ≥ 3.10 with NumPy and SciPy; reproducing the checkpoint-based zoo analysis of Section 7 additionally requires PyTorch and torchvision, and the download steps of both collections use requests. Author contributions. Contributions follow the CRediT taxonomy. Dmytro Knopov: conceptualization, methodology, software, formal analysis, investigation, validation, data curation, visualization, writing (original draft). Nadiya Shvai: conceptualization, supervision, writing (review and editing). Both authors read and approved the final manuscript. Use of AI-assisted tools. During the preparation of this manuscript, the first author used large language models from Anthropic (Claude) and OpenAI (GPT) to assist with drafting, editing and reviewing the text, organising the related literature and developing and debugging the code for the simulations and the case studies. The research ideas, methodology, analyses, results and conclusions reported here are the authors’ own, and the authors take full responsibility for them. 27

References Agarwal, R., Schwarzer, M., Castro, P.S., Courville, A., Bellemare, M.G. (2021). Deep reinforcement learning at the edge of the statistical precipice. Advances in Neural Information Processing Systems 34 (NeurIPS 2021) (pp. 29304– 29320). Curran Associates. https://proceedings.neurips.cc/paper files/paper/2021/ file/f514cec81cb148559cf475e7426eed5e-Paper.pdf Bamber, D. (1975). The area above the ordinal dominance graph and the area below the receiver operating characteristic graph. Journal of Mathematical Psychology, 12 (4), 387–415, https://doi.org/10.1016/0022-2496(75)90001-2 Benavoli, A., Corani, G., Demšar, J., Zaffalon, M. (2017). Time for a change: a tutorial for comparing multiple classifiers through Bayesian analysis. Journal of Machine Learning Research, 18 (77), 1–36, http://jmlr.org/papers/v18/16-305.html Berger, R.L., & Hsu, J.C. (1996). Bioequivalence trials, intersection–union tests and equivalence confidence sets. Statistical Science, 11 (4), 283–302, https://doi.org/10.1214/ ss/1032280304 Bouthillier, X., Delaunay, P., Bronzi, M., Trofimov, A., Nichyporuk, B., Szeto, J., . . . Vincent, P. (2021). Accounting for variance in machine learning benchmarks. Proceedings of Machine Learning and Systems (Vol. 3, pp. 747–769). https://proceedings.mlsys.org/ paper files/paper/2021/hash/0184b0cd3cfb185989f858a1d9f5c1eb-Abstract.html Browne, R.H. (1995). On the use of a pilot sample for sample size determination. Statistics in Medicine, 14 (17), 1933–1940, https://doi.org/10.1002/sim.4780141709 Card, D., Henderson, P., Khandelwal, U., Jia, R., Mahowald, K., Jurafsky, D. (2020). With little power comes great responsibility. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP) (pp. 9263–9274). Association for Computational Linguistics. https://doi.org/10.18653/v1/2020.emnlp-main.745 Chen, W., Petrick, N.A., Sahiner, B. (2012). Hypothesis testing in noninferiority and equivalence MRMC ROC studies. Academic Radiology, 19 (9), 1158–1165, https://doi.org/ 10.1016/j.acra.2012.04.011 Colas, C., Sigaud, O., Oudeyer, P.-Y. (2018). How many random seeds? Statistical power analysis in deep reinforcement learning experiments. (arXiv preprint arXiv:1806.08295, https://doi.org/10.48550/arXiv.1806.08295) Davison, A.C., & Hinkley, D.V. (1997). Bootstrap methods and their application. Cambridge: Cambridge University Press. https://doi.org/10.1017/CBO9780511802843 DeLong, E.R., DeLong, D.M., Clarke-Pearson, D.L. (1988). Comparing the areas under two or more correlated receiver operating characteristic curves: a nonparametric approach. Biometrics, 44 (3), 837–845, https://doi.org/10.2307/2531595 Demšar, J. (2006). Statistical comparisons of classifiers over multiple data sets. Journal of Machine Learning Research, 7 , 1–30, http://jmlr.org/papers/v7/demsar06a.html Dietterich, T.G. (1998). Approximate statistical tests for comparing supervised classification learning algorithms. Neural Computation, 10 (7), 1895–1923, https://doi.org/10.1162/ 089976698300017197 Dodge, J., Ilharco, G., Schwartz, R., Farhadi, A., Hajishirzi, H., Smith, N.A. (2020). Fine-tuning pretrained language models: weight initializations, data orders, and early stopping. (arXiv preprint arXiv:2002.06305, https://doi.org/10.48550/arXiv.2002 .06305)

28

Dorfman, D.D., Berbaum, K.S., Metz, C.E. (1992). Receiver operating characteristic rating analysis: generalization to the population of readers and patients with the jackknife method. Investigative Radiology, 27 (9), 723–731, https://doi.org/10.1097/00004424 -199209000-00015 Field, C.A., & Welsh, A.H. (2007). Bootstrapping clustered data. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 69 (3), 369–390, https://doi.org/ 10.1111/j.1467-9868.2007.00593.x Grathwohl, W., Wang, K.-C., Jacobsen, J.-H., Duvenaud, D., Norouzi, M., Swersky, K. (2020). Your classifier is secretly an energy based model and you should treat it like one. International Conference on Learning Representations (ICLR). https:// openreview.net/forum?id=Hkxzx0NtDB Hanley, J.A., & McNeil, B.J. (1982). The meaning and use of the area under a receiver operating characteristic (ROC) curve. Radiology, 143 (1), 29–36, https://doi.org/ 10.1148/radiology.143.1.7063747 He, J., Leng, Z., McKay, D., Spina, D., Trippas, J.R. (2025). Can we hide machines in the crowd? Quantifying equivalence in LLM-in-the-loop annotation tasks. Proceedings of the 2025 Annual International ACM SIGIR Conference on Research and Development in Information Retrieval in the Asia Pacific Region (SIGIR-AP 2025) (pp. 426–436). ACM. https://doi.org/10.1145/3767695.3769508 Hillis, S.L., Obuchowski, N.A., Berbaum, K.S. (2011). Power estimation for multireader ROC methods: an updated and unified approach. Academic Radiology, 18 (2), 129–142, https://doi.org/10.1016/j.acra.2010.09.007 Jan, S.-L., & Shieh, G. (2017). Optimal sample size determinations for the heteroscedastic two one-sided tests of mean equivalence. Journal of Educational and Behavioral Statistics, 42 (2), 145–165, https://doi.org/10.3102/1076998616671974 Kieser, M., & Wassmer, G. (1996). On the use of the upper confidence limit for the variance from a pilot sample for sample size determination. Biometrical Journal , 38 (8), 941–949, https://doi.org/10.1002/bimj.4710380806 Knopov, D. (2026). Comparing SGLD and a fixed-noise predictor-corrector adaptation in canonical joint energy-based models on CIFAR-10. Discover Computing, 29 (1), 755, https://doi.org/10.1007/s10791-026-10679-9 Lakens, D. (2017). Equivalence tests: a practical primer for t tests, correlations, and metaanalyses. Social Psychological and Personality Science, 8 (4), 355–362, https://doi.org/ 10.1177/1948550617697177 Liu, J.-P., Ma, M.-C., Wu, C.-Y., Tai, J.-Y. (2006). Tests of equivalence and non-inferiority for diagnostic accuracy based on the paired areas under ROC curves. Statistics in Medicine, 25 (7), 1219–1238, https://doi.org/10.1002/sim.2358 Longjohn, R., Gopalan, G., Casleton, E. (2025). Statistical uncertainty quantification for aggregate performance metrics in machine learning benchmarks. (arXiv preprint arXiv:2501.04234, https://doi.org/10.48550/arXiv.2501.04234) Madaan, L., Singh, A.K., Schaeffer, R., Poulton, A., Koyejo, S., Stenetorp, P., . . . Hupkes, D. (2024). Quantifying variance in evaluation benchmarks. (arXiv preprint arXiv:2406.10229, https://doi.org/10.48550/arXiv.2406.10229) Mann, H.B., & Whitney, D.R. (1947). On a test of whether one of two random variables is stochastically larger than the other. The Annals of Mathematical Statistics, 18 (1), 50–60, https://doi.org/10.1214/aoms/1177730491

29

McCullagh, P. (2000). Resampling and exchangeable arrays. Bernoulli, 6 (2), 285–301, https://doi.org/10.2307/3318577 Miller, E. (2024). Adding error bars to evals: a statistical approach to language model evaluations. (arXiv preprint arXiv:2411.00640, https://doi.org/10.48550/arXiv.2411 .00640) Nadeau, C., & Bengio, Y. (2003). Inference for the generalization error. Machine Learning, 52 (3), 239–281, https://doi.org/10.1023/A:1024068626366 Obuchowski, N.A., & Rockette, H.E. (1995). Hypothesis testing of diagnostic accuracy for multiple readers and multiple tests: an ANOVA approach with dependent observations. Communications in Statistics – Simulation and Computation, 24 (2), 285–308, https:// doi.org/10.1080/03610919508813243 Owen, A.B. (2007). The pigeonhole bootstrap. The Annals of Applied Statistics, 1 (2), 386–411, https://doi.org/10.1214/07-AOAS122 Owen, A.B., & Eckles, D. (2012). Bootstrapping data arrays of arbitrary order. The Annals of Applied Statistics, 6 (3), 895–927, https://doi.org/10.1214/12-AOAS547 Owen, D.B. (1965). A special case of a bivariate non-central t-distribution. Biometrika, 52 (3–4), 437–446, https://doi.org/10.1093/biomet/52.3-4.437 Phillips, K.F. (1990). Power of the two one-sided tests procedure in bioequivalence. Journal of Pharmacokinetics and Biopharmaceutics, 18 (2), 137–144, https://doi.org/10.1007/ BF01063556 Picard, D. (2021). Torch.manual seed(3407) is all you need: on the influence of random seeds in deep learning architectures for computer vision. (arXiv preprint arXiv:2109.08203, https://doi.org/10.48550/arXiv.2109.08203) Riesthuis, P., Otgaar, H., Bücken, C. (2025). Ready to ROC? A tutorial on simulationbased power analyses for null hypothesis significance, minimum-effect, and equivalence testing for ROC curve analyses. Behavior Research Methods, 57 (4), 120, https:// doi.org/10.3758/s13428-025-02646-x Satterthwaite, F.E. (1946). An approximate distribution of estimates of variance components. Biometrics Bulletin, 2 (6), 110–114, https://doi.org/10.2307/3002019 Schuirmann, D.J. (1987). A comparison of the two one-sided tests procedure and the power approach for assessing the equivalence of average bioavailability. Journal of Pharmacokinetics and Biopharmaceutics, 15 (6), 657–680, https://doi.org/10.1007/ BF01068419 Schürholt, K., Taskiran, D., Knyazev, B., Giró-i-Nieto, X., Borth, D. (2022a). Model Zoo: a dataset of diverse populations of neural network models (CIFAR10). Data set, Zenodo, https://doi.org/10.5281/zenodo.6620868. Schürholt, K., Taskiran, D., Knyazev, B., Giró-i-Nieto, X., Borth, D. (2022b). Model zoos: a dataset of diverse populations of neural network models. Advances in Neural Information Processing Systems 35 (NeurIPS 2022), Datasets and Benchmarks Track. https://doi.org/10.48550/arXiv.2209.14764 Sellam, T., Yadlowsky, S., Tenney, I., Wei, J., Saphra, N., D’Amour, A., . . . Pavlick, E. (2022). The MultiBERTs: BERT reproductions for robustness analysis. International Conference on Learning Representations (ICLR). https://openreview.net/forum?id= K0E F0gFDgA Shieh, G. (2016). Exact power and sample size calculations for the two one-sided tests of equivalence. PLoS ONE , 11 (9), e0162093, https://doi.org/10.1371/journal.pone

30

.0162093 Sun, X., & Xu, W. (2014). Fast implementation of DeLong’s algorithm for comparing the areas under correlated receiver operating characteristic curves. IEEE Signal Processing Letters, 21 (11), 1389–1393, https://doi.org/10.1109/LSP.2014.2337313 Welch, B.L. (1947). The generalization of “Student’s” problem when several different population variances are involved. Biometrika, 34 (1–2), 28–35, https://doi.org/10.1093/ biomet/34.1-2.28

31

Related documents

Record · ID 1375033 · SHA-256 d1157426a527e150
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive