Introduction
Modern searches for physics beyond the Standard Model (SM) ask a broad question: is the observed data set compatible with the SM prediction at all? Statistically this is a goodness-of-fit test for a Reference model known only up to nuisance parameters that are constrained by noisy auxiliary measurements. A useful test for this task must meet two requirements: (i) it must be sensitive to departures whose location and shape are not specified in advance, which in practice means fitting a flexible model of the departure; and (ii) its false-positive rate must be controlled when the nuisance parameters are estimated.
The New Physics Learning Machine (NPLM) [1 , 2 , 3 ] meets the first requirement by fitting the departure with a neural network whose loss is the negative logarithm of the likelihood ratio, and the test statistic t t t is twice the maximized log-likelihood ratio, with the nuisances profiled against their auxiliary likelihoods. The second requirement is met through Wilks’ theorem: t t t is expected to follow a χ 2 \chi^2 χ 2 distribution whose number of degrees of freedom equals the number of network parameters. Our comparisons are with its implementation with nuisances, Ref. [3 ] .
This calibration has two weaknesses. The first is that the conditions of Wilks’ theorem are unlikely to hold for the neural network fit. The theorem describes the maximized likelihood ratio of a regular parametric family: the parameters must be identifiable, the true value must lie in the interior of the parameter space, the likelihood must be well approximated by a quadratic around its maximum, and the number of parameters must be small compared with the information in the data. A neural network violates each of these: for example, at the null hypothesis its hidden-layer parameters have no effect on the likelihood, the situation in which the likelihood ratio is known not to follow Wilks’ χ 2 \chi^2 χ 2 [4 , 5 ] , and weight clipping places parameters on the boundary of the allowed region [6 , 7 ] . Departures from the χ 2 \chi^2 χ 2 law were noted from the start: the original NPLM paper [1 ] reports them in a two-dimensional example, attributes one to “insufficient training”, and remarks that the agreement it does observe “is not a consistency check”. The χ 2 \chi^2 χ 2 law is enforced empirically: the weight-clipping bound is selected on Reference-only pseudo-experiments (toys) so that the distribution of t t t matches the target. This calibration is also fragile. In the multivariate benchmark of Ref. [3 ] , clipping values that differ from the selected one at the second digit give distributions of t t t appreciably different from the target. This leads to the second weakness: the regularization of the learner is also its calibration. The same knob (e.g., weight clipping) decides how well the network can describe a signal and whether the reported p p p -value is correct. This limits the freedom to choose a learner for the best power.
In this paper we address both issues by comparing predictions on held-out data. The departure is still fitted with a flexible learner (any fitting procedure, such as a penalized regression or a neural network), but it is fitted on one part of the data and evaluated on the other, so that the statistic measures how much better the fitted alternative predicts events it has not seen than the fitted null does. Overfitting then lowers the statistic instead of inflating it, and its null distribution no longer depends on the learner being in a χ 2 \chi^2 χ 2 regime. Such split-sample comparisons have been used before [8 , 9 ] , but used as they are they lose power in two ways. Our two main methodological contributions remove these losses.
Cross-fitting. A single split spends events on the fit that are then not evaluated. Ref. [10 ] argued that “the fit (i.e., the training) must be performed with the very same data used to test” and found that a 50/50 split costs NPLM as much power as discarding half the data. We cross-fit over K K K folds, so that every event is used for both fitting and evaluation and none is discarded.
Adaptive null centering. A held-out statistic compared with a fixed threshold, as in the split likelihood-ratio test of Ref. [8 ] , ignores that its null mean is negative for any fitted alternative, as Ref. [10 ] observed for NPLM evaluated on held-out data. We center it at its expectation under the fitted null, which adapts to the unknown null distribution, and studentize it.
The resulting statistic is calibrated analytically, with a normal limiting distribution under the null hypothesis: its centering and variance are computed from the fitted null, with explicit corrections for the estimation of the nuisance parameters, for the finite Reference sample, and for the randomness of the fits themselves.
The conditions behind this calibration are also weaker than those of Wilks’ theorem. The starting point is a central limit theorem for cross-validated statistics [11 , 12 , 13 ] , whose main requirement on the learner is stability: moving a single training event should change the fitted departure by a small amount [14 , 15 ] . This is a genuine condition on the learner, but one that is agnostic about how the learner is parametrized and how its optimization is carried out. Its parameters need not be identifiable or lie in the interior of a parameter space, its fit need not reach a maximum of the likelihood, and the number of parameters is not counted, so clipped, penalized and early-stopped fits are covered as they are. Regularization still matters for the calibration, but through stability, which it improves, rather than by restricting the learner to a narrow regime. The witness, our name for the fitted departure, can then be chosen for power, and we use two very different ones: a penalized dictionary of smooth functions and Gaussian bumps, and the same small neural networks as NPLM. Whether a given learner is stable enough depends on the learner and on the data. The precise conditions are stated in § 3.5 . In our experiments the stability condition did not hold under the null hypothesis: with no departure to learn, the learner fits noise alone, so the fitted witness varies from fit to fit by as much as its own size. To address this, we add an explicit first-order variance correction for the randomness of the fits, estimated from the fits themselves. Asymptotic theory for this regime is yet to be developed, and the validity of the corrected test is demonstrated in numerical experiments.
We test the method on the benchmarks of Ref. [3 ] : a one-dimensional exponential Reference with three signal types, and the five-dimensional dilepton final state with a Z ′ Z' Z ′ resonance and an effective-field-theory (EFT) deformation, both with normalization and scale nuisances. Two findings organize the results. First, the false-positive rate stays close to its nominal value across true nuisance values one standard deviation away from the central value, across the tuning of the learner (weight clipping, training length, penalty strength), and across the two kinds of witness. Second, the power depends on how well the witness captures the signal: in the dilepton benchmark our network is less sensitive than NPLM to the narrow Z ′ Z' Z ′ resonance and more sensitive to the broad EFT deformation.
The paper is organized as follows. Section 2 states the problem in NPLM’s notation. Section 3 describes the test and its calibration, and summarizes its guarantees and assumptions. Section 4 describes the two witnesses. Sections 5 and 6 present the benchmarks, and Section 7 discusses limitations and extensions. The appendices collect the calibration formulas, the statements of the limit theorems with proof sketches, implementation details, and additional results.
Statistical setup
We use the notation of Ref. [3 ] wherever possible; Table 1 lists the correspondence.
Table 1. Notation used here and in Ref. [3 ] .
Data. The data set D = { X 1 , … , X N } \mathcal{D} = \{X_1,\ldots,X_N\} D = { X 1 , … , X N } consists of events with features x x x in a sample space X \mathcal{X} X , modeled as a Poisson process with intensity n ( x ) n(x) n ( x ) : the number of events, N N N , is Poisson with mean ∫ n \int n ∫ n and, given N N N , the events are independent with density n / ∫ n n/\int n n / ∫ n . The Reference (Standard Model) hypothesis predicts the intensity n ( x ∣ R ν ) n(x \mid\mathcal{R}_\nu) n ( x ∣ R ν ) up to a vector of nuisance parameters ν \nu ν , with ν = 0 \nu= 0 ν = 0 the central value and N 0 = ∫ n ( ⋅ ∣ R 0 ) N_0 = \int n(\cdot\mid\mathcal{R}_0) N 0 = ∫ n ( ⋅ ∣ R 0 ) the expected number of events there. The construction applies to any finite set of nuisances; for concreteness we write it for the two that are most common, ν = ( ν n , ν s ) \nu= (\nu_n, \nu_s) ν = ( ν n , ν s ) : ν n \nu_n ν n , a log-normalization of the number of events produced, and ν s \nu_s ν s , a log-scale of the measured features.
Auxiliary measurements. The nuisances are constrained by an independent auxiliary measurement A A A , summarized by an estimator ν ^ A ∼ N ( ν ∗ , Σ A ) \hat{\nu}_A \sim N(\nu^*, \Sigma_A) ν ^ A ∼ N ( ν ∗ , Σ A ) centered at the true value ν ∗ \nu^* ν ∗ , with Σ A = diag ( σ n 2 , σ s 2 ) \Sigma_A = \operatorname{diag}(\sigma_n^2, \sigma_s^2) Σ A = diag ( σ n 2 , σ s 2 ) . Its log-likelihood is
ℓ A ( ν ) = − 1 2 ( ν − ν ^ A ) T Σ A − 1 ( ν − ν ^ A ) . (1) \ell_A(\nu) = -\frac{1}{2}(\nu- \hat{\nu}_A)^\mathsf{T}\Sigma_A^{-1}(\nu- \hat{\nu}_A). \tag*{(1)} ℓ A ( ν ) = − 2 1 ( ν − ν ^ A ) T Σ A − 1 ( ν − ν ^ A ) . (1)
The size of Σ A \Sigma_A Σ A sets how much the data themselves must be used to determine ν \nu ν : as Σ A → 0 \Sigma_A \to0 Σ A → 0 the Reference intensity is known exactly, and as Σ A → ∞ \Sigma_A \to\infty Σ A → ∞ the nuisances are determined by the data alone.
Access to the Reference model. We distinguish two ways in which the Reference model can be available, and the test is built to need only the weaker one.
Oracle access: the intensity n ( x ∣ R ν ) n(x \mid R_\nu) n ( x ∣ R ν ) is known in analytical form for every ν \nu ν , and every expectation under the null can be computed by numerical integration.
Sample access: the intensity is defined by a simulation chain and is available only through a Reference sample R \mathcal{R} R of M M M simulated events X e ′ X'_e X e ′ at ν = 0 \nu= 0 ν = 0 , each carrying weight r = N 0 / M r = N_0/M r = N 0 / M , so that R \mathcal{R} R reproduces the expected count N 0 N_0 N 0 . The scale nuisance acts on simulated events through a known transformation T ν s T_{\nu_s} T ν s (for example a rescaling of measured momenta), and the normalization multiplies the weights by e ν n e^{\nu_n} e ν n , so samples at any ν \nu ν are available.
Oracle access is the limit of sample access with an infinitely large Reference sample, and the construction below is written so that the same formulas cover both.
Hypotheses and validity. The null hypothesis is that the data follow the Reference model at some value of the nuisances,
H 0 : n ( ⋅ ) = n ( ⋅ ∣ R ν ∗ ) for some ν ∗ , (2) H_0:\quad n(\cdot) = n(\cdot\mid R_{\nu^*}) \text{ for some } \nu^*, \tag*{(2)} H 0 : n ( ⋅ ) = n ( ⋅ ∣ R ν ∗ ) for some ν ∗ , (2)
where ν ∗ \nu^* ν ∗ is also the value around which ν ^ A \hat{\nu}_A ν ^ A is distributed. The alternative is any other intensity; no form of the departure is assumed. A test at nominal level α ∈ ( 0 , 1 ) \alpha\in(0,1) α ∈ ( 0 , 1 ) is valid if its rejection rate under H 0 H_0 H 0 , over repetitions of the data, the Reference sample and the auxiliary measurement, is at most α \alpha α for every value of ν ∗ \nu^* ν ∗ .
The test
Cross-fitting and the fits on the training folds
The data events are assigned at random to K K K folds D 1 , … , D K \mathcal{D}_1,\ldots,\mathcal{D}_K D 1 , … , D K whose sizes differ by at most one, and with sample access the Reference sample is partitioned independently into folds R 1 , … , R K \mathcal{R}_1,\ldots,\mathcal{R}_K R 1 , … , R K . In our derivation we assume the fold sizes are equal for simplicity. For a function u u u of x x x and a nuisance value ν \nu ν we write
E ν [ u ] = ∫ n ( ⋅ ∣ R ν ) u , E k , ν [ u ] = 1 K E ν [ u ] , E k , ν t r [ u ] = K − 1 K E ν [ u ] \mathbb{E}_{\nu}[u] = \int n(\cdot\mid\mathcal{R}_{\nu})u,\qquad\mathbb{E}_{k,\nu}[u] = \frac{1}{K}\mathbb{E}_{\nu}[u],\qquad\mathbb{E}^{\mathrm{tr}}_{k,\nu}[u] = \frac{K-1}{K}\mathbb{E}_{\nu}[u] E ν [ u ] = ∫ n ( ⋅ ∣ R ν ) u , E k , ν [ u ] = K 1 E ν [ u ] , E k , ν tr [ u ] = K K − 1 E ν [ u ]
for the expected sum of u u u over all data events, over the held-out events of fold k k k and over its training events, when the nuisances take the value ν \nu ν . With oracle access they are computed by numerical integration; with sample access they are estimated by weighted sums over the Reference events transformed by T ν s T_{\nu_s} T ν s , over R k \mathcal{R}_k R k for E k , ν \mathbb{E}_{k,\nu} E k , ν and over R − k \mathcal{R}_{-k} R − k for E k , ν t r \mathbb{E}^{\mathrm{tr}}_{k,\nu} E k , ν tr (Appendix A.4).
For each fold k k k , two fits are made on the other K − 1 K-1 K − 1 folds, D − k \mathcal{D}_{-k} D − k and R − k \mathcal{R}_{-k} R − k , together with the auxiliary measurement: first the nuisances ν ^ ( − k ) \hat{\nu}^{(-k)} ν ^ ( − k ) , which determine the fitted null intensity n ^ k ( x ) = n ( x ∣ R ν ^ ( − k ) ) \hat{n}_k(x)=n(x\mid R_{\hat{\nu}^{(-k)}}) n ^ k ( x ) = n ( x ∣ R ν ^ ( − k ) ) , and then a departure from it, the witness. The witness for fold k k k is a log intensity ratio between a fitted alternative and the fitted null:
ϕ k ( x ) = log n k a l t ( x ) n ^ k ( x ) . (3) \phi_k(x)=\log\frac{n_k^{\mathrm{alt}}(x)}{\hat{n}_k(x)}. \tag*{(3)} ϕ k ( x ) = log n ^ k ( x ) n k alt ( x ) . (3)
The held-out fold is then used only to evaluate the witness (§ 3.2 ). Cross-fitting over all K K K folds uses every event both to fit and to evaluate, which matters when the signal is rare.
Witness fit. Any learner may produce ϕ k \phi_k ϕ k , and its form and tuning may be chosen from the training folds and the auxiliary measurement. The calibration of Section 3.3 conditions on the realized witness and uses it only as a fixed function, except through the fitting-randomness term V ^ f i t \hat{V}_{\mathrm{fit}} V ^ fit , which needs the learner’s first-order response to its training events. Section 4 details the training loss and the two learners we use.
Null fit. Let ψ \psi ψ be a vector of estimating functions, one component per nuisance. Our nuisance fits are estimating-equation (or M M M -) estimators: ν ^ ( − k ) \hat{\nu}^{(-k)} ν ^ ( − k ) solves the estimating equations
∑ i ∈ D − k ψ ( X i ) = E k , ν t r [ ψ ] + Σ A − 1 ( ν − ν ^ A ) , (4) \sum_{i\in\mathcal{D}_{-k}}\psi(X_i)=\mathbb{E}^{\mathrm{tr}}_{k,\nu}[\psi]+\Sigma_A^{-1}(\nu-\hat{\nu}_A), \tag*{(4)} i ∈ D − k ∑ ψ ( X i ) = E k , ν tr [ ψ ] + Σ A − 1 ( ν − ν ^ A ) , (4)
which set the training sum of ψ \psi ψ equal to its expected value under the null model at ν \nu ν , corrected by the auxiliary term. The fits differ only in the choice of ψ \psi ψ , and Appendix A treats them together through this form (Eq. (22) ).
Likelihood fit: ψ = s : = ∂ ν log n ( ⋅ ∣ R ν ) \psi=s:=\partial_\nu\log n(\cdot\mid R_\nu) ψ = s := ∂ ν log n ( ⋅ ∣ R ν ) . This choice of ψ \psi ψ gives the maximum-likelihood estimate (MLE) of the nuisances: (4) then sets to zero the derivative of the extended log-likelihood of the training events plus ℓ A \ell_A ℓ A . The exact MLE requires the score function s s s , which is available only with oracle access. With sample access the log-ratio h ( x ; ν ) = log [ n ( x ∣ R ν ) / n ( x ∣ R 0 ) ] h(x;\nu)=\log[n(x\mid R_\nu)/n(x\mid R_0)] h ( x ; ν ) = log [ n ( x ∣ R ν ) / n ( x ∣ R 0 )] , and hence the score s = ∂ ν h s=\partial_\nu h s = ∂ ν h , is not known in closed form. Ref. [3 ] approximates h h h by the local representation
h ( x ; ν ) ≃ ν n + ν s δ ^ 1 ( x ) + 1 2 ν s 2 δ ^ 2 ( x ) , (5) h(x;\nu)\simeq\nu_n+\nu_s\hat{\delta}_1(x)+\frac{1}{2}\nu_s^2\hat{\delta}_2(x), \tag*{(5)} h ( x ; ν ) ≃ ν n + ν s δ ^ 1 ( x ) + 2 1 ν s 2 δ ^ 2 ( x ) , (5)
whose coefficient functions δ ^ 1 , 2 \hat{\delta}_{1,2} δ ^ 1 , 2 are learned once, on a simulation sample disjoint from everything else, and then held fixed; we learn them in the same way. The resulting likelihood fit, the one used in Ref. [3 ] , inherits their errors. We therefore use the “pushforward” fit below.
Pushforward fit: ψ = ( 1 , δ ^ 1 ) \psi=(1,\hat{\delta}_1) ψ = ( 1 , δ ^ 1 ) , the learned score at ν = 0 \nu=0 ν = 0 . To keep the errors of the learned score out of the estimate, we use it as a fixed estimating function and compute its expectations by applying T ν s T_{\nu_s} T ν s to the Reference events, so the fit is a method-of-moments estimator. With the diagonal Σ A \Sigma_A Σ A of Section 2, (4) reads
N − k = E k , ν t r [ 1 ] + ν n − ν ^ A , n σ n 2 , ∑ i ∈ D − k δ ^ 1 ( X i ) = E k , ν t r [ δ ^ 1 ] + ν s − ν ^ A , s σ s 2 . (6) \begin{aligned}
N_{-k} &= \mathbb{E}^{\mathrm{tr}}_{k,\nu}[1]+\frac{\nu_n-\hat{\nu}_{A,n}}{\sigma_n^2},\\
\sum_{i\in\mathcal{D}_{-k}}\hat{\delta}_1(X_i) &= \mathbb{E}^{\mathrm{tr}}_{k,\nu}[\hat{\delta}_1]+\frac{\nu_s-\hat{\nu}_{A,s}}{\sigma_s^2}. \tag*{(6)}
\end{aligned} N − k i ∈ D − k ∑ δ ^ 1 ( X i ) = E k , ν tr [ 1 ] + σ n 2 ν n − ν ^ A , n , = E k , ν tr [ δ ^ 1 ] + σ s 2 ν s − ν ^ A , s . (6)
The left-hand sides are the training count and the training sum of δ ^ 1 \hat{\delta}_1 δ ^ 1 , and the right-hand sides their expected values under the null at ν \nu ν , corrected by the auxiliary term. The two sides have equal expectation at the true ν ∗ \nu^* ν ∗ for any fixed function δ ^ 1 \hat{\delta}_1 δ ^ 1 , so the estimate is consistent regardless of error in δ ^ 1 \hat{\delta}_1 δ ^ 1 , which affects only its variance.
The held-out statistic and its centering
The witness is evaluated on the held-out fold D k \mathcal{D}_k D k , which it has not seen. Each event falls in D k \mathcal{D}_k D k with probability 1 / K 1/K 1/ K , so an intensity n n n for the data is an intensity n / K n/K n / K for the fold, with extended log-likelihood ℓ k ( n ) = ∑ i ∈ D k log { n ( X i ) / K } − 1 K ∫ n \ell_k(n)=\sum_{i\in\mathcal{D}_k}\log\{n(X_i)/K\}-\frac{1}{K}\int n ℓ k ( n ) = ∑ i ∈ D k log { n ( X i ) / K } − K 1 ∫ n . The held-out statistic of fold k k k is the log-likelihood ratio of the fitted alternative to the fitted null,
T ^ k = ℓ k ( n k a l t ) − ℓ k ( n ^ k ) = [ ∑ i ∈ D k log n k a l t ( X i ) K − 1 K ∫ n k a l t ] − [ ∑ i ∈ D k log n ^ k ( X i ) K − 1 K ∫ n ^ k ] = ∑ i ∈ D k log n k a l t ( X i ) n ^ k ( X i ) − 1 K ∫ ( n k a l t − n ^ k ) = ∑ i ∈ D k ϕ k ( X i ) − E k , ν ^ ( − k ) [ e ϕ k − 1 ] . (7) \begin{aligned}
\hat{T}_k &= \ell_k(n_k^{\mathrm{alt}})-\ell_k(\hat{n}_k)\\
&=\left[\sum_{i\in\mathcal{D}_k}\log\frac{n_k^{\mathrm{alt}}(X_i)}{K}-\frac{1}{K}\int n_k^{\mathrm{alt}}\right]-\left[\sum_{i\in\mathcal{D}_k}\log\frac{\hat{n}_k(X_i)}{K}-\frac{1}{K}\int\hat{n}_k\right]\\
&=\sum_{i\in\mathcal{D}_k}\log\frac{n_k^{\mathrm{alt}}(X_i)}{\hat{n}_k(X_i)}-\frac{1}{K}\int\left(n_k^{\mathrm{alt}}-\hat{n}_k\right)\\
&=\sum_{i\in\mathcal{D}_k}\phi_k(X_i)-\mathbb{E}_{k,\hat{\nu}^{(-k)}}\left[e^{\phi_k}-1\right]. \tag*{(7)}
\end{aligned} T ^ k = ℓ k ( n k alt ) − ℓ k ( n ^ k ) = [ i ∈ D k ∑ log K n k alt ( X i ) − K 1 ∫ n k alt ] − [ i ∈ D k ∑ log K n ^ k ( X i ) − K 1 ∫ n ^ k ] = i ∈ D k ∑ log n ^ k ( X i ) n k alt ( X i ) − K 1 ∫ ( n k alt − n ^ k ) = i ∈ D k ∑ ϕ k ( X i ) − E k , ν ^ ( − k ) [ e ϕ k − 1 ] . (7)
Held-out likelihood ratios of this kind are the basis of existing sample-splitting tests, for example, the split likelihood-ratio test of universal inference [8 ] and the classifier-based tests for new-physics searches of Ref. [9 ] . Such methods often have sub-optimal power in practice, because they compare T ^ k \hat{T}_k T ^ k with a fixed threshold calibrated by a null centering at 0, ignoring that T ^ k \hat{T}_k T ^ k tends to be negative under the null. To see why, suppose the held-out events follow the fitted null; the expectation of T ^ k \hat{T}_k T ^ k given the training folds is then
m k = − E k , ν ^ ( − k ) [ e ϕ k − 1 − ϕ k ] ≤ 0 , (8) m_k=-\mathbb{E}_{k,\hat{\nu}^{(-k)}}\left[e^{\phi_k}-1-\phi_k\right]\leq0, \tag*{(8)} m k = − E k , ν ^ ( − k ) [ e ϕ k − 1 − ϕ k ] ≤ 0 , (8)
with equality only for ϕ k ≡ 0 \phi_k\equiv0 ϕ k ≡ 0 . A witness that has fitted noise in the training folds predicts the held-out fold worse than the null does, so overfitting lowers the held-out statistic instead of raising it. We instead center T ^ k \hat{T}_k T ^ k at its expectation under the true null given the training folds,
m k ∗ = E k , ν ∗ [ ϕ k ] − E k , ν ^ ( − k ) [ e ϕ k − 1 ] . m_k^*=\mathbb{E}_{k,\nu^*}[\phi_k]-\mathbb{E}_{k,\hat{\nu}^{(-k)}}[e^{\phi_k}-1]. m k ∗ = E k , ν ∗ [ ϕ k ] − E k , ν ^ ( − k ) [ e ϕ k − 1 ] .
This centering is not available, because ν ∗ \nu^* ν ∗ is unknown, but replacing ν ∗ \nu^* ν ∗ by its training-fold estimate ν ^ ( − k ) \hat{\nu}^{(-k)} ν ^ ( − k ) gives m k m_k m k , and fold k k k contributes
S k = T ^ k − m k = ∑ i ∈ D k ϕ k ( X i ) − E k , ν ^ ( − k ) [ ϕ k ] , (9) S_k=\hat{T}_k-m_k=\sum_{i\in\mathcal{D}_k}\phi_k(X_i)-\mathbb{E}_{k,\hat{\nu}^{(-k)}}[\phi_k], \tag*{(9)} S k = T ^ k − m k = i ∈ D k ∑ ϕ k ( X i ) − E k , ν ^ ( − k ) [ ϕ k ] , (9)
the held-out sum of the witness minus its expected value under the fitted null. The cross-fitted test statistic is
S = ∑ k = 1 K S k . S=\sum_{k=1}^{K}S_k. S = k = 1 ∑ K S k .
Centering at the fitted rather than the true null changes the variance of S S S through ν ^ ( − k ) \hat{\nu}^{(-k)} ν ^ ( − k ) ; § 3.3 propagates the nuisance estimate into the variance to first order.
Analytic calibration
Under H 0 H_0 H 0 , S S S has mean zero to the order relevant for the test, and the calibration supplies its variance. We report
Z = S V ^ , V ^ = ∑ k = 1 K ( V ^ k D + V ^ k R ) + V ^ A + V ^ f i t , (10) Z=\frac{S}{\sqrt{\hat{V}}},\qquad\hat{V}=\sum_{k=1}^{K}\left(\hat{V}^{D}_k+\hat{V}^{R}_k\right)+\hat{V}_A+\hat{V}_{\mathrm{fit}}, \tag*{(10)} Z = V ^ S , V ^ = k = 1 ∑ K ( V ^ k D + V ^ k R ) + V ^ A + V ^ fit , (10)
and reject at level α \alpha α when Z > z 1 − α Z>z_{1-\alpha} Z > z 1 − α , the one-sided Gaussian quantile. The four variance terms correspond to the four sources of randomness in S S S : the held-out events, the held-out Reference events, the auxiliary measurement, and the fits themselves. Their full expressions are collected in Appendix § 8 ; here we explain what each one accounts for.
Held-out events and the estimated nuisances. Given the training folds, the held-out sum in (9) is a sum over a Poisson process, with variance E k , ν ^ ( − k ) [ ϕ k 2 ] \mathbb{E}_{k,\hat{\nu}^{(-k)}}[\phi_k^2] E k , ν ^ ( − k ) [ ϕ k 2 ] . This alone would be the right variance if the null were known. It is not: ν ^ ( − k ) \hat{\nu}^{(-k)} ν ^ ( − k ) is estimated, and an error in it shifts the expected value subtracted in (9) by approximately g k T ( ν ^ ( − k ) − ν ∗ ) g_k^\mathsf{T}(\hat{\nu}^{(-k)}-\nu^*) g k T ( ν ^ ( − k ) − ν ∗ ) , where g k = ∂ ν E k , ν [ ϕ k ] ∣ ν = ν ^ ( − k ) g_k=\left.\partial_\nu\mathbb{E}_{k,\nu}[\phi_k]\right|_{\nu=\hat{\nu}^{(-k)}} g k = ∂ ν E k , ν [ ϕ k ] ∣ ν = ν ^ ( − k ) is the sensitivity of the witness’s null expectation to the nuisances. Because every event takes part in K − 1 K-1 K − 1 nuisance fits, these shifts accumulate across folds and are of the same order as S S S itself. We account for them in the variance by grouping each event’s shifts with its own held-out fold, leading to the orthogonalized witness (see Appendix § 8 .§ 2 for the derivation):
ϕ ~ k = ϕ k − ( K − 1 ) g k T J k − 1 ψ , (11) \widetilde{\phi}_k=\phi_k-(K-1)g_k^\mathsf{T}J_k^{-1}\psi, \tag*{(11)} ϕ k = ϕ k − ( K − 1 ) g k T J k − 1 ψ , (11)
where ψ \psi ψ is the estimating function of the nuisance estimate (the score s s s for the likelihood fit, ( 1 , δ ^ 1 ) (1,\hat{\delta}_1) ( 1 , δ ^ 1 ) for the pushforward fit) and J k J_k J k the Jacobian of the corresponding estimating equations, including the auxiliary term Σ A − 1 \Sigma_A^{-1} Σ A − 1 . Then V ^ k D \widehat{V}_k^D V k D is the Poisson variance of ϕ ~ k \widetilde{\phi}_k ϕ k :
V ^ k D = E k , ν ^ ( − k ) [ ϕ ~ k 2 ] . (12) \widehat{V}_k^D=\mathbb{E}_{k,\hat{\nu}^{(-k)}}[\widetilde{\phi}_k^2]. \tag*{(12)} V k D = E k , ν ^ ( − k ) [ ϕ k 2 ] . (12)
This is the device of Neyman’s C ( α ) C(\alpha) C ( α ) test [16 ] , applied here to the variance: only the part of the witness that the nuisances cannot imitate contributes to the null fluctuation. The auxiliary measurement itself fluctuates from experiment to experiment and moves every ν ^ ( − k ) \hat{\nu}^{(-k)} ν ^ ( − k ) coherently; its contribution is V ^ A = c T Σ A − 1 c \widehat{V}_A=c^\mathsf{T}\Sigma_A^{-1}c V A = c T Σ A − 1 c with c = ∑ k J k − T g k c=\sum_k J_k^{-\mathsf{T}}g_k c = ∑ k J k − T g k .
Held-out Reference events. With sample access the expected value in (9) is itself a sum over a finite Reference fold, which adds the variance of that sum. Each held-out Reference event e ∈ R k e\in\mathcal{R}_k e ∈ R k contributes ω k ϕ ~ k , e \omega_k\widetilde{\phi}_{k,e} ω k ϕ k , e , where
ϕ ~ k , e = ϕ ~ k ( T ν ^ ( − k ) X e ′ ) (13) \widetilde{\phi}_{k,e}=\widetilde{\phi}_k\left(T_{\hat{\nu}^{(-k)}}X'_e\right) \tag*{(13)} ϕ k , e = ϕ k ( T ν ^ ( − k ) X e ′ ) (13)
is the orthogonalized witness at the transformed event, ω k = N 0 e ν ^ n ( − k ) / ( K M k ) \omega_k=N_0e^{\hat{\nu}^{(-k)}_n}/(KM_k) ω k = N 0 e ν ^ n ( − k ) / ( K M k ) is the weight of a held-out Reference event and M k M_k M k is the number of events in R k \mathcal{R}_k R k . Given the size of the Reference fold, the variance of their sum is estimated by the centered sum of squares
V ^ k R = ω k 2 ∑ e ∈ R k ( ϕ ~ k , e − ϕ ~ ‾ k ) 2 , (14) \widehat{V}_k^R=\omega_k^2\sum_{e\in\mathcal{R}_k}\left(\widetilde{\phi}_{k,e}-\overline{\widetilde{\phi}}_k\right)^2, \tag*{(14)} V k R = ω k 2 e ∈ R k ∑ ( ϕ k , e − ϕ k ) 2 , (14)
with ϕ ~ ‾ k \overline{\widetilde{\phi}}_k ϕ k the mean of the ϕ ~ k , e \widetilde{\phi}_{k,e} ϕ k , e . The variance is centered, unlike the Poisson data term, because the size of the Reference fold is fixed and carries no information about the data. Near the central value V ^ k R \hat{V}^{R}_{k} V ^ k R is about r = N 0 / M r = N_{0}/M r = N 0 / M times the data term, so at r = 0.2 r = 0.2 r = 0.2 ignoring it would inflate the false-positive rate of a nominal 5% test to about 7%. With oracle access V ^ k R = 0 \hat{V}^{R}_{k} = 0 V ^ k R = 0 .
Randomness of the witness fits. The terms above treat each witness as fixed. However, the witnesses are random and share training events: the events held out in fold k k k are also in the training set of ϕ j \phi_j ϕ j , j ≠ k j \ne k j = k , so the contributions of folds j j j and k k k are correlated. When the learner is stable (its output does not move much when one event is replaced), these correlations are negligible against the conditional variance and V ^ f i t = 0 \hat{V}_{\mathrm{fit}} = 0 V ^ fit = 0 is asymptotically correct. Under the null hypothesis in our experiments, the fitted witness is mostly estimation noise and not stable enough, and the cross-fold covariance of the witness must be accounted for. We estimate it by the first-order expression derived in Appendix § 8 .§ 3 ,
V ^ f i t = ∑ j ≠ k E j E k tr ( D k H k − 1 Ω ~ k j D j H j − 1 Ω ~ j k ) (15) \hat{V}_{\mathrm{fit}} = \sum_{j \ne k} E_j E_k \operatorname{tr}\left(D_k H_k^{-1} \tilde{\Omega}_{kj} D_j H_j^{-1} \tilde{\Omega}_{jk}\right) \tag*{(15)} V ^ fit = j = k ∑ E j E k tr ( D k H k − 1 Ω ~ k j D j H j − 1 Ω ~ j k ) (15)
where
E k = E k , ν ^ ( − k ) [ 1 ] E_k = E_{k,\hat{\nu}^{(-k)}}[1] E k = E k , ν ^ ( − k ) [ 1 ] is the expected number of held-out events in fold k k k ;
H k H_k H k is the Hessian of fold k k k 's witness fit in its free directions—active atoms in the dictionary or non-clipped parameters in the network;
Ω ~ k j \tilde{\Omega}_{kj} Ω ~ k j is the second moment, under the normalized fitted null, of the gradients of the witnesses of folds k k k and j j j in their free directions;
D k D_k D k is a diagonal matrix that damps the directions shared with the null fit (Appendix § 10 .§ 7 ).
No estimator of the variance of a K K K -fold statistic computed from the fold statistics alone can be unbiased in general [17 ] ; V ^ f i t \hat{V}_{\mathrm{fit}} V ^ fit escapes this because it uses the fitted learner’s first-order response to its training events, not only the fold statistics; it is unbiased only to first order.
Algorithm and cost
Assign the data events, and with sample access the Reference events, to K K K folds at random.
For each fold k k k : fit the nuisances on the other folds and the auxiliary measurement (Eq. (4) or Eq. (6) ); fit the witness ϕ k \phi_k ϕ k on the other folds; evaluate S k S_k S k (Eq. (9) ) and the fold’s terms of the variance (§ 3.3 ).
Combine the folds into V ^ \hat{V} V ^ and Z Z Z (Eq. (10) ) and report the one-sided p p p -value 1 − Φ ( Z ) 1-\Phi(Z) 1 − Φ ( Z ) , where Φ \Phi Φ is the standard normal cumulative distribution function.
The cost is K K K fits of the witness per data set, one per fold, with everything else computed from quantities the fits already provide; no pseudo-experiments are needed for the calibration. We use K = 10 K = 10 K = 10 throughout.
What is guaranteed, and where it can fail
The justification of (10) is a central limit theorem for cross-validated statistics [11 ] , extended to a Poisson data set with a Reference sample and constrained nuisances. We state it informally; the precise assumptions and a proof sketch are in Appendix § 9 .
Result. Under H 0 H_0 H 0 , as the expected number of events grows with K K K and r r r fixed, Z Z Z converges in distribution to a standard normal variable, so the test has asymptotic size α \alpha α , provided the following conditions hold.
Data (D). The data, the Reference sample and the auxiliary measurement are independent, and, given their number, the Reference events are independent draws from the Reference model. The test conditions on the Reference fold sizes, which may be random but must not depend on the events themselves.
Witness (W1, W2). The fitted departure stays bounded where the Reference events lie (W1). The learner is stable relative to the size of its own output (W2): replacing a single training event changes the witness, at a typical point, by an amount small compared with σ ϕ / N 0 \sigma_\phi/\sqrt{N_0} σ ϕ / N 0 , where σ ϕ \sigma_\phi σ ϕ is the typical size of the witness (a deterministic scale, for example the root mean square of its standard deviation under the Reference model). The witness need not converge to a non-zero limit: σ ϕ \sigma_\phi σ ϕ may shrink as the data set grows, provided the effect of a single event, measured relative to σ ϕ \sigma_\phi σ ϕ , vanishes faster than N 0 − 1 / 2 N_0^{-1/2} N 0 − 1/2 .
Under these conditions V ^ f i t \hat{V}_{\mathrm{fit}} V ^ fit is negligible and may be omitted. Three features of the result matter for its use. First, (W2) concerns the output of the learner, not its parameters: a clipped, penalized, early-stopped or non-identifiable model satisfies it as long as no single event moves its fit much, and regularization helps. Second, the held-out construction means the test conditions on the realized witnesses: a poor witness lowers the power but not the validity. Third, the learned function δ ^ 1 \hat{\delta}_1 δ ^ 1 enters our test only as a component of the estimating function ψ = ( 1 , δ ^ 1 ) \psi=(1,\hat{\delta}_1) ψ = ( 1 , δ ^ 1 ) in the pushforward equations (6), and every expectation under the null is computed by applying the exact nuisance transformation to Reference events, so (N) holds whatever the error of δ ^ 1 \hat{\delta}_1 δ ^ 1 , which affects only the asymptotic variance of the nuisance estimate. In contrast, in Ref. [3 ] , the learned representation enters both terms of t = τ − Δ t=\tau-\Delta t = τ − Δ , and it is unclear how its error affects the validity of the test.
The degenerate regime. Condition (W2) can fail under the null hypothesis whenever the learner, given no departure to learn, returns a witness that is pure estimation noise, as small as the fitting noise itself, so the effect of a single event is no longer small relative to it. This happened for every witness in our experiments. The variance of S S S then contains the cross-fold correlations described above, and V ^ f i t \widehat{V}_{\mathrm{fit}} V fit is required. In this regime the theorem does not apply and we have no limit theorem in its place. V ^ f i t \widehat{V}_{\mathrm{fit}} V fit corrects the first-order bias of the conditional variance as an estimate of Var ( S ) \operatorname{Var}(S) Var ( S ) . In the null studies of § 5 and § 6 , the variance-corrected statistic Z Z Z is close enough to standard normal that the false-positive rates at nominal 5% and 1% stay close to nominal.
Witnesses
The calibration of Section 3 treats the witness as the output of an arbitrary learner. This section states what that learner must provide and describes the two we use. They were chosen to be as different as possible: a penalized linear expansion, whose fit is a convex problem with an exact solution, and the small neural networks of Ref. [3 ] , trained by stochastic optimization for a fixed number of epochs. The same calibration rule is applied to both.
Requirements on the learner
A witness for fold k k k must be a function ϕ k ( x ) \phi_k(x) ϕ k ( x ) that can be evaluated at any point, computed from the training folds and the auxiliary measurement alone. Any choice made from those inputs is allowed, including its form, its tuning and any modification of its output, because the calibration conditions on the realized witness. The theory then asks for the stability and boundedness conditions (W1) and (W2) of § 3.5 . Both are properties of the fitted function rather than of a parametrization, and regularization of any kind (a penalty, weight clipping, early stopping) helps to meet them.
Two further pieces of information are needed for the fitting-randomness term V ^ f i t \widehat{V}_{\mathrm{fit}} V fit of Eq. (15) , which describes to first order how the witness responds to its training events: the directions in which the fit is free to move, and the curvature of the training loss in those directions. For a fit that maximizes an extended-likelihood loss both are standard by-products; § 3.3 and Appendix § 10 give them for our witnesses. A learner that cannot supply them can still be used when the fitting randomness is negligible, but otherwise its null calibration needs another estimate of V ^ f i t \widehat{V}_{\mathrm{fit}} V fit .
All our witnesses fit the same loss, the extended log-likelihood of a tilt of the fitted null on the training folds,
L k [ f ] = ∑ i ∈ D − k f ( X i ) − E k , ν ^ ( − k ) [ e f − 1 ] , (16) \mathcal{L}_k[f] = \sum_{i \in\mathcal{D}_{-k}} f(X_i) - \mathbb{E}_{k,\widehat{\nu}_{(-k)}}\left[e^f - 1\right], \tag*{(16)} L k [ f ] = i ∈ D − k ∑ f ( X i ) − E k , ν ( − k ) [ e f − 1 ] , (16)
maximized over a class of functions f f f , possibly with a penalty, with ϕ k = f ^ \phi_k = \widehat{f} ϕ k = f . This is NPLM’s loss with the Reference at the fitted nuisances in place of the central value.
Dictionary witness
The first witness is a penalized expansion, f = ∑ j β j A j f = \sum_j \beta_j A_j f = ∑ j β j A j , in a dictionary of functions (atoms) { A j } \{A_j\} { A j } fixed in advance, fitted by penalized Poisson regression, a convex problem solved numerically to convergence. The dictionary has three blocks: a tangent block, the directions in which the null itself moves (the constant and the nuisance scores), and a smooth block for broad distortions, both unpenalized, and a bump block of Gaussian bumps for localized departures, with an ℓ 1 \ell_1 ℓ 1 (lasso) penalty [18 ] . It serves as a fast stand-in for a black-box learner. The choice of the dictionary affects the power only, not the calibration. We report it for the benchmark of § 5 , where its atoms and penalty are specified.
Neural-network witness
The second witness is the network of Ref. [3]: a fully connected network with sigmoid activations and a linear output, trained by maximizing Eq. (16) using the Adam optimizer [19 ] with NPLM’s settings (Appendix § 10 .8) for a fixed number of epochs, with every weight clipped to [ − c , c ] [-c,c] [ − c , c ] after each step. We use the same architectures as Ref. [3 ] .
A network witness can extrapolate freely in a sparsely populated tail of the Reference distribution, where its value on a rare held-out event can carry much of the test statistic. When this is a concern, we can multiply the network output by a taper τ k ( x ) \tau_k(x) τ k ( x ) , which equals one where the fitted null is well populated beyond x x x and falls to zero as x x x increases (Appendix § 10 .8). The taper depends only on the fitted null, so the tapered output is still a valid witness. We use it for the network of § 5 ; the network of § 6 is used without one, and its null studies (§ 6.3 ) show none is needed there.
The clipping bound, the training length and, where it is used, the taper are the only tuning choices, and are listed with each benchmark in Sections 5 and 6. Unlike in Ref. [3 ] , they are not selected to make a statistic follow a χ 2 \chi^2 χ 2 distribution, and much shorter training suffices.
One-dimensional benchmark
Setup
The benchmark is the univariate problem of Ref. [3 ] , where the Reference intensity is exponential:
n ( x ∣ R ν ) = N 0 exp [ − x e − ν s − ν s + ν n ] , x ≥ 0 , (17) n(x \mid R_\nu) = N_0 \exp\left[-x e^{-\nu_s} - \nu_s + \nu_n\right], \qquad x \ge0, \tag*{(17)} n ( x ∣ R ν ) = N 0 exp [ − x e − ν s − ν s + ν n ] , x ≥ 0 , (17)
with N 0 = 2000 N_0 = 2000 N 0 = 2000 expected events, a normalization nuisance ν n \nu_n ν n and a scale nuisance ν s \nu_s ν s . The three signals of Ref. [3 ] are added on top of the Reference:
NP1: 10 expected events in a Gaussian peak at x = 6.4 x = 6.4 x = 6.4 of width 0.16;
NP2: 180 expected events with the broad shape 1 2 x 2 e − x \frac{1}{2}x^2e^{-x} 2 1 x 2 e − x ;
NP3: 90 expected events in a Gaussian peak at x = 1.6 x = 1.6 x = 1.6 of width 0.16.
Data sets are generated with the number of background and signal events drawn from Poisson distributions, and the auxiliary estimates ν ^ A \hat{\nu}_A ν ^ A are drawn from N ( ν ∗ , Σ A ) N(\nu^*, \Sigma_A) N ( ν ∗ , Σ A ) , where Σ A \Sigma_A Σ A is diagonal with diagonal elements σ n 2 = σ s 2 = σ A 2 \sigma_n^2 = \sigma_s^2 = \sigma_A^2 σ n 2 = σ s 2 = σ A 2 . Unlike Ref. [3 ] , which represents the Reference by a sample of 2 × 10 5 2 \times10^5 2 × 1 0 5 events, we use the exact density (17), making this a case of oracle access.
Dictionary witness. In fold k k k , let p ^ \hat{p} p ^ be the density of the fitted null n ( ⋅ ∣ R ν ^ ( − k ) ) / ( N 0 e ν ^ s ( − k ) ) n(\cdot\mid R_{\hat{\nu}^{(-k)}})/(N_0e^{\hat{\nu}_s^{(-k)}}) n ( ⋅ ∣ R ν ^ ( − k ) ) / ( N 0 e ν ^ s ( − k ) ) , F ^ \hat{F} F ^ its distribution function, q ^ 0.999 \hat{q}_{0.999} q ^ 0.999 its 0.999 quantile, and ( μ ^ , σ ^ ) (\hat{\mu},\hat{\sigma}) ( μ ^ , σ ^ ) its mean and standard deviation. For the exponential (17), μ ^ = σ ^ = e ν ^ s ( − k ) \hat{\mu}=\hat{\sigma}=e^{\hat{\nu}_s^{(-k)}} μ ^ = σ ^ = e ν ^ s ( − k ) . The dictionary witness is
f ( x ) = β 0 + β s s ~ ( x ) + ∑ l = 1 5 γ l P l ( x ) + ∑ j = 1 J β j B j ( x ) , (18) f(x)=\beta_0+\beta_s\tilde{s}(x)+\sum_{l=1}^{5}\gamma_lP_l(x)+\sum_{j=1}^{J}\beta_jB_j(x), \tag*{(18)} f ( x ) = β 0 + β s s ~ ( x ) + l = 1 ∑ 5 γ l P l ( x ) + j = 1 ∑ J β j B j ( x ) , (18)
with the following atoms.
s ~ \tilde{s} s ~ is the score of the scale nuisance ν s \nu_s ν s , centered and normalized, where the score of ν s \nu_s ν s is ∂ ν s log n ( x ∣ R ν ) = x e − ν ^ s ( − k ) − 1 \partial_{\nu_s}\log n(x\mid R_\nu)=x e^{-\hat{\nu}_s^{(-k)}}-1 ∂ ν s log n ( x ∣ R ν ) = x e − ν ^ s ( − k ) − 1 ; together with the constant, s ~ \tilde{s} s ~ spans the tangent block.
P 1 , … , P 5 P_1,\ldots,P_5 P 1 , … , P 5 form an orthonormal basis of the polynomials of degree at most 6 in 2 F ^ ( x ) − 1 2\hat{F}(x)-1 2 F ^ ( x ) − 1 that are orthogonal to 1 and to s ~ \tilde{s} s ~ , ordered so that P l P_l P l has degree at most l + 1 l+1 l + 1 .
B j B_j B j is the Gaussian bump b j ( x ) = exp { − ( x − c j ) 2 / 2 w 2 } b_j(x)=\exp\{-(x-c_j)^2/2w^2\} b j ( x ) = exp { − ( x − c j ) 2 /2 w 2 } with width w = 0.2 σ ^ w=0.2\hat{\sigma} w = 0.2 σ ^ and centers c j = 0.1 σ ^ ( j − 1 ) c_j=0.1\hat{\sigma}(j-1) c j = 0.1 σ ^ ( j − 1 ) , j = 1 , … , J j=1,\ldots,J j = 1 , … , J , up to q ^ 0.999 \hat{q}_{0.999} q ^ 0.999 (J = 70 J=70 J = 70 ), with its projection on { 1 , s ~ , P 1 , … , P 5 } \{1,\tilde{s},P_1,\ldots,P_5\} { 1 , s ~ , P 1 , … , P 5 } removed, and scaled to ∫ B j 2 p ^ = 1 \int B_j^2\hat{p}=1 ∫ B j 2 p ^ = 1 .
The three blocks are mutually orthogonal under p ^ \hat{p} p ^ , and the smooth and bump atoms are bounded. The coefficients β 0 , β s , γ l \beta_0,\beta_s,\gamma_l β 0 , β s , γ l are unpenalized, and the β j \beta_j β j carry an ℓ 1 \ell_1 ℓ 1 penalty of level 1.3. This level was set once, before any test, from null simulations: it is the rounded version of the smallest level at which, on average, no more than 5% of the bumps enter a null fit. It is used unchanged at every ν ∗ \nu^* ν ∗ and σ A \sigma_A σ A .
Network witness. The network uses the architecture of Ref. [3 ] :
f ( x ) = b 2 + ∑ h = 1 4 W 2 , h sigmoid ( W 1 , h x + b 1 , h ) , f(x)=b_2+\sum_{h=1}^{4}W_{2,h}\operatorname{sigmoid}(W_{1,h}x+b_{1,h}), f ( x ) = b 2 + h = 1 ∑ 4 W 2 , h sigmoid ( W 1 , h x + b 1 , h ) ,
with its eight weights W 1 , h , W 2 , h W_{1,h},W_{2,h} W 1 , h , W 2 , h clipped at c = 4 c=4 c = 4 and its five biases free, trained for 3 × 10 4 3\times10^4 3 × 1 0 4 epochs and tapered with κ = 2 \kappa=2 κ = 2 (Eq. (50) ).
Validity
Table 2 gives the false-positive rate of both witnesses at nominal 5% and 1%, at the central value and with each nuisance shifted by one standard deviation, for σ A ∈ { 0.05 , 0.10 , 0.15 } \sigma_A \in\{0.05, 0.10, 0.15\} σ A ∈ { 0.05 , 0.10 , 0.15 } . With σ A = 0.05 \sigma_A = 0.05 σ A = 0.05 every rate is at or below its nominal value within Monte Carlo error, for both witnesses and at all five nuisance points: between 0.0375 and 0.0475 at 5%, and between 0.0025 and 0.0175 at 1%. With σ A = 0.15 \sigma_A = 0.15 σ A = 0.15 both witnesses stay within about two standard errors of nominal at all five points, with a wider spread: between 0.0300 and 0.0650 at 5%, and between 0.0025 and 0.0200 at 1%. The largest deviation at 5% is the network at σ A = 0.10 \sigma_A = 0.10 σ A = 0.10 , 0.0700 (and 0.0200 at 1%), about two standard errors above nominal; at σ A = 0.15 \sigma_A = 0.15 σ A = 0.15 the same network is at or below nominal at 5% at every point, so the deviation does not grow with σ A \sigma_A σ A . The test is slightly conservative overall: the mean of Z Z Z under the null hypothesis lies between − 0.22 -0.22 − 0.22 and 0.00 in every configuration.
Table 2: One-dimensional benchmark: false-positive rate at nominal 5% and 1%, 400 data sets per entry (Monte Carlo standard errors about 0.011 and 0.005). ν ∗ \nu^* ν ∗ is the true value of the nuisances: 0, or one nuisance shifted by ± 1 \pm1 ± 1 standard deviation. At σ A = 0.10 \sigma_A = 0.10 σ A = 0.10 only the central value was run.
Table 2.
Figure 1 shows the distribution of Z Z Z for the network at the five nuisance points, together with the statistic obtained without the fitting-randomness term. With the correction the distribution follows the standard normal; without it the spread is visibly too large and the rate at nominal 5% is between 1.5 and 2 times its nominal value, which is the degenerate regime of § 3.5 at work. The corresponding figure for the dictionary is in Appendix § 11 .
Figure 1. One-dimensional benchmark, network witness, σ A = 0.05 \sigma_A = 0.05 σ A = 0.05 : distribution of Z Z Z under the null hypothesis at the central value (left) and with each nuisance shifted by ± 1 \pm1 ± 1 standard deviation (right), with (blue) and without (orange) the fitting-randomness term V ^ f i t \hat{V}_{\mathrm{fit}} V ^ fit , against the standard normal density (grey). The rates at nominal 5% and 1% are given above each panel. 400 data sets per panel.
Ref. [3 ] validates its calibration at the same nuisance points with a Kolmogorov–Smirnov test of the whole distribution of its statistic on 100 data sets, whereas we measure the rejection rate in the tail directly, on 400 data sets. The two checks measure different things. The Kolmogorov–Smirnov test is most sensitive near the center of the distribution, and with 100 data sets it can barely see the tail, where the validity of a test is decided.
Power
Table 3 gives the median Z Z Z , the counterpart of the median Z Z Z -score Z ˉ \bar{Z} Z ˉ of Ref. [3 ] , and the power at nominal 5% and 1%, at the central value with σ A = 0.05 \sigma_A = 0.05 σ A = 0.05 . The two witnesses have similar power on the broad NP2 and the bulk peak NP3; on the narrow tail peak NP1 the dictionary, whose bumps have a width comparable to that peak, is ahead. Ref. [3 ] reports median Z Z Z -scores of similar size for NP1 and NP3 and a larger one (1.9 ± 0.12 1.9 \pm0.12 1.9 ± 0.12 ) for NP2. Tighter clipping, such as c = 3 c = 3 c = 3 , would raise the median Z Z Z of NP2 to about 1.27 (§ 5.4 ).
Table 3. One-dimensional benchmark: median Z Z Z (with its bootstrap standard error) and power (rejection rate) at nominal 5% and 1%, at ν ∗ = 0 \nu^* = 0 ν ∗ = 0 and σ A = 0.05 \sigma_A = 0.05 σ A = 0.05 , 400 data sets per entry.
Figure 2 , the counterpart of Fig. 8 of Ref. [3 ] , shows how the power depends on the nuisances. As σ A \sigma_A σ A grows from 0.05 to 0.15, the median Z Z Z for NP2 drops from about 1.2 to between 0.7 and 0.9 for both witnesses. The median Z Z Z for the resonant NP1 drops much less, by at most 0.5, and the one for NP3 hardly changes. Ref. [3 ] finds the same pattern and the same reason: a change of scale can imitate a broad excess in the tail, so a less constrained scale nuisance absorbs part of NP2, but no change of scale or normalization produces a narrow peak. The right panel varies the true value of the nuisances at fixed σ A \sigma_A σ A . A shift of the normalization leaves the sensitivity nearly unchanged; a shift of the scale moves it between 1.9 and 3.5 for the network (NP1), because it changes the amount of background under the signal. Since the figure shows median Z Z Z itself rather than its ratio to a model-dependent ideal witness, this dependence on the true scale is visible directly.
Figure 2. One-dimensional benchmark: median Z Z Z for NP1–NP3 (bars: bootstrap standard error, 400 data sets per point). Left: central value ν ∗ = 0 \nu^*=0 ν ∗ = 0 against the nuisance uncertainty σ A \sigma_A σ A . Right: σ A = 0.05 \sigma_A=0.05 σ A = 0.05 , at the central value and with each nuisance shifted by ± 1 \pm1 ± 1 standard deviation. Signals are distinguished by marker shape (NP1 circle, NP2 triangle, NP3 square) and, on the left, by line style (solid, dashed, dotted); filled markers: network, open markers: dictionary.
Sensitivity to tuning
Figure 3 varies the two tuning choices of the network, the clipping bound c ∈ { 3 , 4 , 6 } c \in\{3, 4, 6\} c ∈ { 3 , 4 , 6 } and the training length from 2 × 10 4 2 \times10^4 2 × 1 0 4 to 5 × 10 4 5 \times10^4 5 × 1 0 4 epochs, with everything else fixed; Table 7 in Appendix § 11 lists every configuration, for both witnesses. The size is at or below nominal in all nine configurations, at most 0.045 at 5% and 0.010 at 1%. The power moves in the directions one would expect from the shape of each signal: a tighter bound helps the broad NP2 (median Z Z Z about 1.27 at c = 3 c = 3 c = 3 against 1.15 at c = 6 c = 6 c = 6 ), a looser one helps the bulk peak NP3 (about 3.4 against 3.9), and NP1 gains from longer training. The dictionary behaves in the same way under its penalty level λ ∈ { 1.1 , 1.3 , 1.5 } \lambda\in\{1.1, 1.3, 1.5\} λ ∈ { 1.1 , 1.3 , 1.5 } , run on the same data sets: the size stays between 0.038 and 0.045 at 5%, and a heavier penalty raises the median Z Z Z of NP2 from 1.09 to 1.21 while leaving NP1 and NP3 nearly unchanged. The calibration is indifferent to the tuning, and the power responds to it as a property of the witness.
Figure 3. One-dimensional benchmark, network witness, ν ∗ = 0 \nu^* = 0 ν ∗ = 0 , σ A = 0.05 \sigma_A = 0.05 σ A = 0.05 : rate at nominal 5% under the null hypothesis (left) and median Z Z Z for NP1–NP3 against the training length, for clipping bounds c = 3 , 4 , 6 c = 3, 4, 6 c = 3 , 4 , 6 (each marked by its own color, marker and line style). Bars: Monte Carlo standard errors, 400 data sets per point. Grey long-dashed lines: the nominal level (left) and the dictionary witness at its default penalty (other panels). Shaded bands (left): the range of ± 1 \pm1 ± 1 (darker) and ± 2 \pm2 ± 2 (lighter) Monte Carlo standard errors around the nominal 5% expected for a valid test.
Table 7. One-dimensional benchmark, ν ∗ = 0 \nu^{*} = 0 ν ∗ = 0 , σ A = 0.05 \sigma_A = 0.05 σ A = 0.05 : false-positive rate at nominal 5% and 1%, and median Z Z Z for NP1–NP3 with its bootstrap standard error in parentheses, 400 data sets per entry. Network: clipping bound c c c and number of training epochs; dictionary: penalty level λ \lambda λ . †: the configuration used in § 5 .
Five-dimensional dilepton benchmark
Data
Variables. The second benchmark is the dilepton final state of [3 ] , a case of sample access. Each event contains two leptons, and is described by the five features x = ( p T , 1 , p T , 2 , η 1 , η 2 , Δ ϕ 12 ) x=(p_{T,1},p_{T,2},\eta_1,\eta_2,\Delta\phi_{12}) x = ( p T , 1 , p T , 2 , η 1 , η 2 , Δ ϕ 12 ) : the transverse momenta p T , 1 ≥ p T , 2 p_{T,1} \ge p_{T,2} p T , 1 ≥ p T , 2 of the leading and subleading lepton, that is, the components of their momenta perpendicular to the beam axis; their pseudorapidities η 1 , 2 = − ln tan ( θ 1 , 2 / 2 ) \eta_{1,2}=-\ln\tan(\theta_{1,2}/2) η 1 , 2 = − ln tan ( θ 1 , 2 /2 ) , where θ \theta θ is the polar angle with respect to the beam axis; and the difference Δ ϕ 12 = ϕ 1 − ϕ 2 \Delta\phi_{12}=\phi_1-\phi_2 Δ ϕ 12 = ϕ 1 − ϕ 2 of their azimuthal angles around that axis, taken in [ 0 , 2 π ) [0, 2\pi) [ 0 , 2 π ) . The dilepton invariant mass, which a dedicated resonance search would use, is a function of these features and is not given to the witness separately.
Event selection. We use the event selection of Ref. [3 ] , the requirements on measured quantities that every event must meet to enter the analysis: p T > 20 p_T > 20 p T > 20 GeV for both leptons, p T , 1 < 1 p_{T,1} < 1 p T , 1 < 1 TeV for the leading one, and a dilepton invariant mass above 100 GeV. The expected number of Standard Model events that pass it at the central value ν = 0 \nu= 0 ν = 0 is N 0 = 8700 N_0 = 8700 N 0 = 8700 .
Nuisances. The nuisances are the normalization, with σ n = 0.025 \sigma_n = 0.025 σ n = 0.025 , and the lepton momentum scale in the electron-like regime of Ref. [3 ] , with σ s = 3 × 10 − 3 \sigma_s = 3 \times10^{-3} σ s = 3 × 1 0 − 3 . The scale acts on simulated events through the transformation T ν s T_{\nu_s} T ν s of § 2 : each lepton’s transverse momentum is multiplied by e ν s e^{\nu_s} e ν s , or by e 3 ν s e^{3\nu_s} e 3 ν s for a lepton with ∣ η ∣ ≥ 2.1 |\eta| \ge2.1 ∣ η ∣ ≥ 2.1 , and the selection is then applied to the transformed event. Only ν s \nu_s ν s changes which events pass the selection; ν n \nu_n ν n multiplies the expected number of events by e ν n e^{\nu_n} e ν n .
Simulated sample. We are given the simulated Standard Model sample S \mathcal{S} S of Ref. [20 ] , 3 735 456 events at the central nuisance value, generated with requirements looser than the selection. It is split once, at random, into two disjoint parts,
S = S δ ∪ S t o y , ∣ S δ ∣ : ∣ S t o y ∣ = 1 : 3. (19) \mathcal{S}=\mathcal{S}_{\delta}\cup\mathcal{S}_{\mathrm{toy}},\qquad|\mathcal{S}_{\delta}|:|\mathcal{S}_{\mathrm{toy}}|=1:3. \tag*{(19)} S = S δ ∪ S toy , ∣ S δ ∣ : ∣ S toy ∣ = 1 : 3. (19)
S δ \mathcal{S}_{\delta} S δ is used only to learn δ ^ 1 , 2 \hat{\delta}_{1,2} δ ^ 1 , 2 (§ 6.2 ), and S t o y \mathcal{S}_{\mathrm{toy}} S toy supplies the Reference samples and the data sets. For a scale value ν s \nu_s ν s , let P ν s \mathcal{P}_{\nu_s} P ν s be the events X ∈ S t o y X\in\mathcal{S}_{\mathrm{toy}} X ∈ S toy whose transform T ν s X T_{\nu_s}X T ν s X passes the selection, so that P 0 \mathcal{P}_0 P 0 are those passing at the central value. The expected number of selected events at ν \nu ν is then
N ν = N 0 e ν ∣ P ν s ∣ ∣ P 0 ∣ . N_{\nu}=N_0 e^{\nu}\frac{|\mathcal{P}_{\nu_s}|}{|\mathcal{P}_0|}. N ν = N 0 e ν ∣ P 0 ∣ ∣ P ν s ∣ .
Reference sample and null data sets. The two kinds of sample play different roles. A null data set plays the role of the observed data: what an experiment would record at the true value ν ∗ \nu^\ast ν ∗ . It is drawn in two steps: its number of events is Poisson with mean N ν ∗ N_{\nu^\ast} N ν ∗ , and that many events are drawn with replacement from P ν ∗ \mathcal{P}_{\nu^\ast} P ν ∗ . The Reference represents the null model inside the test: its weighted sums, transformed to any ν \nu ν , estimate the expectations E k , ν \mathbb{E}_{k,\nu} E k , ν of § 3.1 . For these sums to estimate the expectations of the null data, the Reference is drawn in the same way, as a null data set at the central value, with two differences: its size is fixed, M = 5 N 0 = 43 500 M=5N_0=43\,500 M = 5 N 0 = 43 500 events from P 0 \mathcal{P}_0 P 0 (so r = 0.2 r=0.2 r = 0.2 ), and it also contains the near-threshold events, in the same proportion as in S t o y \mathcal{S}_{\mathrm{toy}} S toy (Appendix § 10 .§ 1 ). Signal data sets are built in the same way as null data sets from the signal simulations, as described below. Each data set is drawn independently of its Reference sample. Null studies use 400 data sets per configuration and signal studies 160.
Signals. The two signals are those of Ref. [3 ] . For the Z ′ Z' Z ′ resonance of mass 300 GeV, the data set is a null data set plus a sample drawn from the Z ′ Z' Z ′ simulation whose number of events is Poisson with mean 120 at the central nuisance value. For the effective-field-theory deformation with c W = 1 T e V − 2 c_W=1\ \mathrm{TeV}^{-2} c W = 1 TeV − 2 , the whole data set is drawn from the EFT simulation instead of the Standard Model one, with 1.0216 N 0 1.0216N_0 1.0216 N 0 expected events at the central nuisance value. In both cases the signal events are transformed by the same T ν s ∗ T_{\nu_s^\ast} T ν s ∗ as the Standard Model events and their expected number is scaled in the same way, since a miscalibrated momentum scale affects every lepton. As in Ref. [3 ] , the signal data sets are generated with the scale nuisance one standard deviation away from its central value, ν s ∗ = + σ s \nu_s^\ast=+\sigma_s ν s ∗ = + σ s .
Estimation
Nuisance functions. The functions δ ^ 1 , 2 \hat{\delta}_{1,2} δ ^ 1 , 2 are learned on S δ \mathcal{S}_{\delta} S δ as in Ref. [3 ] . For training points ν i ∈ { ± 1.5 , ± 3 , ± 6 , ± 10 } × 10 − 3 \nu_i \in\{\pm1.5,\pm3,\pm6,\pm10\} \times10^{-3} ν i ∈ { ± 1.5 , ± 3 , ± 6 , ± 10 } × 1 0 − 3 of the scale nuisance, let S 1 \mathcal{S}_1 S 1 be the events of S δ \mathcal{S}_{\delta} S δ that pass the selection at ν = 0 \nu=0 ν = 0 and S 0 ( ν i ) \mathcal{S}_0(\nu_i) S 0 ( ν i ) those that pass it after the transformation T ν i T_{\nu_i} T ν i . Two networks δ 1 , δ 2 \delta_1,\delta_2 δ 1 , δ 2 (five hidden layers of ten units each) minimize
∑ i [ ∑ x ∈ S 0 ( ν i ) c i ( x ) 2 + ∑ x ∈ S 1 ( 1 − c i ( x ) ) 2 ] \sum_i \left[\sum_{x\in\mathcal{S}_0(\nu_i)} c_i(x)^2+\sum_{x\in\mathcal{S}_1}(1-c_i(x))^2\right] i ∑ x ∈ S 0 ( ν i ) ∑ c i ( x ) 2 + x ∈ S 1 ∑ ( 1 − c i ( x ) ) 2
c i ( x ) = 1 1 + exp { ν i δ 1 ( x ) + 1 2 ν i 2 δ 2 ( x ) } (20) c_i(x)=\frac{1}{1+\exp\left\{\nu_i\delta_1(x)+\frac{1}{2}\nu_i^2\delta_2(x)\right\}} \tag*{(20)} c i ( x ) = 1 + exp { ν i δ 1 ( x ) + 2 1 ν i 2 δ 2 ( x ) } 1 (20)
whose minimizer makes ν i δ ^ 1 + 1 2 ν i 2 δ ^ 2 \nu_i\hat{\delta}_1+\frac{1}{2}\nu_i^2\hat{\delta}_2 ν i δ ^ 1 + 2 1 ν i 2 δ ^ 2 the log-ratio of the shifted to the nominal event density. A fifth of the events are held out to select, among 2000 training epochs, the networks with the lowest validation loss. Of the two functions, our test uses only δ ^ 1 \hat{\delta}_1 δ ^ 1 , in the estimating function ψ = ( 1 , δ ^ 1 ) \psi=(1,\hat{\delta}_1) ψ = ( 1 , δ ^ 1 ) of the pushforward fit, Eq. (6) , and of the orthogonalized witness, Eq. (11) .
Witness. The witness is the network of § 4.3 with the architecture of Ref. [3 ] , three hidden layers of five units (96 parameters), all parameters clipped at c = 0.7 c=0.7 c = 0.7 , trained for 3000 epochs, with K = 10 K=10 K = 10 folds; the features are standardized as in Ref. [2 ] . In this higher-dimensional setting the dictionary witness was much weaker than the network in exploratory studies, and we do not report it.
Validity
Table 4 and Figure 4 give the null distribution of Z Z Z at the central value and with each nuisance shifted by one standard deviation, the five points at which Ref. [3 ] validates its own calibration. The rate at nominal 5% lies between 0.0350 and 0.0575, and at nominal 1% between 0.0050 and 0.0150, all within about one and a half Monte Carlo standard errors of nominal. The mean of Z Z Z is within 0.08 of zero and its standard deviation between 0.93 and 0.97, so the test is, if anything, slightly conservative. Without the fitting-randomness term the rate at nominal 5% rises to between 0.09 and 0.11 (Figure 4 ): the degenerate regime is present here as in one dimension, and the correction V ^ f i t \widehat{V}_{\mathrm{fit}} V fit , including its Reference component, removes it.
Table 4. Dilepton benchmark, network witness: mean and standard deviation of Z Z Z under the null hypothesis, and its rate at nominal 5% and 1%, at the central value and with each nuisance shifted by one standard deviation. 400 data sets per row (Monte Carlo standard errors about 0.011 and 0.005).
Figure 4. Dilepton benchmark, network witness: distribution of Z Z Z under the null hypothesis at the central value (left) and with each nuisance shifted by one standard deviation (right), with (blue) and without (orange) the fitting-randomness term, against the standard normal density (grey). 400 data sets per panel.
Power: Z ′ Z' Z ′ and EFT
Figure 5 shows the distribution of Z Z Z under the two signals, and Table 5 compares its median with the corresponding numbers in Ref. [3 ] . Our network is less sensitive than NPLM to the narrow Z ′ Z' Z ′ resonance (median Z Z Z 2.80 against NPLM’s median Z Z Z -score Z ‾ = 3.9 \overline{Z} = 3.9 Z = 3.9 , both converted from the test’s own p p p -value) and more sensitive to the broad EFT deformation (7.00 against 5.1). This is the pattern of § 5 : the calibration is the same for both signals, and the power reflects what the witness, here a small network trained for 3000 epochs with tight clipping, captures well. A smooth, broad deformation is easy for it to fit; a narrow resonance in a sparse region of five dimensions is harder for it to resolve.
Table 5. Dilepton benchmark: sensitivity of the network witness compared with Ref. [3 ] , electron-like regime, ν s = + σ s \nu_s = +\sigma_s ν s = + σ s . Our median Z Z Z (bootstrap standard error) and power from 160 data sets; NPLM’s median Z Z Z -score Z ‾ \overline{Z} Z as printed in Ref. [3 ] (100 data sets).
Figure 5. Dilepton benchmark, network witness: distribution of Z Z Z under the Z ′ Z' Z ′ (top) and EFT (bottom) signals at ν s ∗ = + σ s \nu_s^* = +\sigma_s ν s ∗ = + σ s , with (blue) and without (orange) the fitting-randomness term; grey: the standard normal density expected under the null hypothesis. The median Z Z Z and power, and the median Z Z Z -score of Ref. [3 ] for the same signal, are given above each panel. 160 data sets per panel.
Sensitivity to tuning and computational cost
Figure 6 varies the clipping bound, c ∈ { 0.7 , 1.0 , 1.3 } c \in\{0.7, 1.0, 1.3\} c ∈ { 0.7 , 1.0 , 1.3 } , and the training length, from 2000 to 5000 epochs; Table 8 in Appendix § 11 lists every configuration.
Figure 6. Dilepton benchmark, network witness: rate at nominal 5% under the null hypothesis (left; 400 data sets per point) and median Z Z Z for Z ′ Z' Z ′ and EFT (160 data sets per point) against the training length, for clipping bounds c = 0.7 , 1.0 , 1.3 c = 0.7, 1.0, 1.3 c = 0.7 , 1.0 , 1.3 , each marked by its own color, marker and line style. Bars: Monte Carlo standard errors. Shaded bands (left): the range of ± 1 \pm1 ± 1 (darker) and ± 2 \pm2 ± 2 (lighter) Monte Carlo standard errors around the nominal 5% expected for a valid test.
Table 8. Dilepton benchmark, network witness: variance of Z Z Z under the null hypothesis and its rate at nominal 5% and 1% (ν ∗ = 0 \nu^* = 0 ν ∗ = 0 , 400 data sets), and median Z Z Z for Z ′ Z' Z ′ and EFT (160 data sets) with its bootstrap standard error in parentheses, against the clipping bound c c c and the number of training epochs. †: the configuration used in § 6 .
The rate at nominal 5% stays between 0.040 and 0.065 in all nine configurations, within about one and a half Monte Carlo standard errors of nominal.
The power again responds to the witness: the median Z Z Z for Z ′ Z^\prime Z ′ hardly moves (between 2.68 and 2.92), while that for the EFT rises with the clipping bound, from about 7.0 at c = 0.7 c = 0.7 c = 0.7 to between 8.7 and 9.5 at c = 1.3 c = 1.3 c = 1.3 . Our default c = 0.7 c = 0.7 c = 0.7 is therefore conservative for the EFT; a looser bound would increase its sensitivity further without affecting the calibration.
The network can be trained briefly, without having to reach a χ 2 \chi^2 χ 2 regime: 3000 epochs here, against 5 × 10 5 5 \times10^5 5 × 1 0 5 or more in Ref. [3], where a single training takes a few hours of CPU time. On one GPU, training the ten networks of one dilepton data set takes about half a minute.
Discussion
We have presented a goodness-of-fit test for new-physics searches in which a flexible learner fits the departure from the Reference model on part of the data and is evaluated on the rest, cross-fitted so that every event is used for both, and calibrated analytically, with explicit terms for the estimated nuisances, the finite Reference sample and the randomness of the fits. On the benchmarks of Ref. [3 ] , the false-positive rate stayed close to nominal in every configuration we checked. In both benchmarks this held at the central value and with each nuisance shifted by one standard deviation. In the one-dimensional benchmark it also held for nuisance uncertainties up to σ A = 0.15 \sigma_A = 0.15 σ A = 0.15 . No pseudo-experiment entered the calibration; the pseudo-experiments in this paper serve only to check it.
What the calibration buys. The central consequence is that the choice of learner is freed from the calibration. Our calibration conditions on the realized fits, so a learner is admissible as it is, within the limits discussed below, and its tuning can be chosen for power alone. Two consequences follow. The power depends, as it should, on how well the learner captures the signal, and the best tuning differs from signal to signal: in one dimension a tighter clipping bound or a heavier penalty helped the broad NP2 and a looser bound the bulk peak NP3, while in five dimensions a looser bound helped the EFT deformation. Throughout, the calibration did not change. And the fits are short, because nothing requires them to reach a χ 2 \chi^2 χ 2 regime.
Predictability, computability and stability. The construction of our predictive goodness-of-fit test can be read through the predictability, computability and stability (PCS) framework of veridical data science [21 , 22 ] . Predictability is the basis of detection: a fitted departure counts as evidence only to the extent that it improves the prediction of future events. Computability shows in the cost: regularization and early stopping are used as they are, rather than tuned until the statistic reaches a χ 2 \chi^2 χ 2 regime, and no pseudo-experiments or resampling enter the calibration. Stability [23 ] is the starting point of the calibration, through the central limit theorem for cross-validated statistics, but not all of it: under the null hypothesis our learners were not stable enough for that theory alone, and it is completed by the correction for the fitting randomness.
Limitations and outlook. We list the points on which the results above rest on approximation or on evidence that is less than complete, and where they leave room for further work.
The degenerate regime. Under the null hypothesis our learners were not stable enough for the theorem of § 3.5 to apply directly, and the calibration relied on the cross-fold correction V ^ f i t \widehat{V}_{\mathrm{fit}} V fit . The correction is a first-order approximation. No limit theorem covers this regime, and the normal reference rests on the null studies of § 5 and § 6 . For the network, its linearization treats each parameter as either free or held at the clipping bound and carries one regularization constant fixed beforehand (Appendix § 10 .8). The linearization is adequate at the configurations we use and can under-count the fitting variance when many parameters reach the bound.
Witness construction. Power depends on how well the witness captures the signal, and we did not engineer the witness for power. Held-out evaluation and short training have a price on some signals: at the operating points we chose, our network is less sensitive than NPLM to the Z ′ Z^{\prime} Z ′ resonance, and both of our witnesses are less sensitive than NPLM to the broad one-dimensional excess N P 2 \mathrm{NP2} NP2 . Conversely, the width of the dictionary’s bumps was set at the scale of the narrow benchmark signals, which may favor its power there. Because the calibration conditions on whatever witness each fold produces, the framework leaves room for engineering the witness further, which we have not explored: larger networks or longer training; a dictionary adapted to the signals sought; tuning made data-driven, with the clipping bound or penalty selected within each fold by validation on its training events alone; or other learners, for example the kernel methods already used with NPLM [24 ] . NPLM’s own architectures can be used unchanged, as here, so that the two approaches can share a learner and differ only in how it is calibrated. Finally, the toy-free calibration makes it practical to scan many learners or many regions of a data set, provided the resulting multiplicity of tests is accounted for.
Two nuisances. Both benchmarks have a normalization and a scale nuisance. The construction is written for any finite set of nuisances, but realistic analyses have many more, and the cost of the pushforward
fit and of the variance terms with many nuisances has not been studied here.
Data and code availability
The five-dimensional dilepton samples are publicly available [20 ] ; the one-dimensional data sets are simulated. The code that reproduces all simulation results, tables and figures of this paper is publicly available at https://github.com/jinglei/predictive-gof.
Calibration formulas in full
This appendix collects the formulas behind Eq. (10) as they are computed, and derives the orthogonalized witness (11) and the fitting-randomness term (15), using first-order approximations. Sections A.1–A.3 assume oracle access; Section A.4 lists what changes with sample access.
Estimating equations
Every term needs expectations of functions of x x x under the fitted null of a fold. We write them for a function u u u as
E k , ν ^ ( − k ) [ u ] = 1 K ∫ n ^ k u , E k , ν ^ ( − k ) t r [ u ] = K − 1 K ∫ n ^ k u , (21) \mathbb{E}_{k,\hat{\nu}^{(-k)}}[u] = \frac{1}{K}\int\hat{n}_k u,\qquad\mathbb{E}^{\mathrm{tr}}_{k,\hat{\nu}^{(-k)}}[u] = \frac{K-1}{K}\int\hat{n}_k u, \tag*{(21)} E k , ν ^ ( − k ) [ u ] = K 1 ∫ n ^ k u , E k , ν ^ ( − k ) tr [ u ] = K K − 1 ∫ n ^ k u , (21)
the expected sum of u u u over the held-out and the training events of fold k k k , and E k = E k , ν ^ ( − k ) [ 1 ] E_k = \mathbb{E}_{k,\hat{\nu}^{(-k)}}[1] E k = E k , ν ^ ( − k ) [ 1 ] for the expected number of held-out events under the fitted null n ^ k \hat{n}_k n ^ k . E k , ν E_{k,\nu} E k , ν and E k , ν t r E^{\mathrm{tr}}_{k,\nu} E k , ν tr denote the corresponding expectations with n ^ k \hat{n}_k n ^ k replaced by n ( ⋅ ∣ R ν ) n(\cdot\mid R_\nu) n ( ⋅ ∣ R ν ) . The corresponding empirical sums over the data events are E ^ k [ u ] = ∑ i ∈ D k u ( X i ) \hat{E}_k[u] = \sum_{i\in D_k}u(X_i) E ^ k [ u ] = ∑ i ∈ D k u ( X i ) and E ^ k t r [ u ] = ∑ i ∈ D − k u ( X i ) \hat{E}^{\mathrm{tr}}_k[u] = \sum_{i\in D_{-k}}u(X_i) E ^ k tr [ u ] = ∑ i ∈ D − k u ( X i ) .
Both nuisance fits of Section 3.1 solve estimating equations of the form
F k , ψ ( ν ) : = E ^ k t r [ ψ ] − E k , ν t r [ ψ ] − Σ A − 1 ( ν − ν ^ A ) = 0 , (22) F_{k,\psi}(\nu) := \hat{E}^{\mathrm{tr}}_k[\psi] - E^{\mathrm{tr}}_{k,\nu}[\psi] - \Sigma_A^{-1}(\nu-\hat{\nu}_A) = 0, \tag*{(22)} F k , ψ ( ν ) := E ^ k tr [ ψ ] − E k , ν tr [ ψ ] − Σ A − 1 ( ν − ν ^ A ) = 0 , (22)
where ψ \psi ψ is a vector of estimating functions, which may or may not depend on ν \nu ν , one per nuisance. We write
J k = { ∂ ν E k , ν t r [ ψ ν ] − E k , ν ^ ( − k ) [ ∂ ν ψ ν ] + Σ A − 1 } ν = ν ^ ( − k ) ≈ − ∂ F k , ψ ∂ ν ∣ ν = ν ^ ( − k ) (23) J_k = \left\{\partial_\nu E^{\mathrm{tr}}_{k,\nu}[\psi_\nu] - \mathbb{E}_{k,\hat{\nu}^{(-k)}}[\partial_\nu\psi_\nu] + \Sigma_A^{-1}\right\}_{\nu=\hat{\nu}^{(-k)}} \approx-\left.\frac{\partial F_{k,\psi}}{\partial\nu}\right|_{\nu=\hat{\nu}^{(-k)}} \tag*{(23)} J k = { ∂ ν E k , ν tr [ ψ ν ] − E k , ν ^ ( − k ) [ ∂ ν ψ ν ] + Σ A − 1 } ν = ν ^ ( − k ) ≈ − ∂ ν ∂ F k , ψ ν = ν ^ ( − k ) (23)
for the approximate sign-reversed Jacobian of F k , ψ F_{k,\psi} F k , ψ , with the data sum replaced by the expectation under the fitted null; the subscript in ψ ν \psi_\nu ψ ν makes explicit any dependence of ψ \psi ψ on ν \nu ν . Differentiating the intensity, ∂ ν n ( ⋅ ∣ R ν ) = n ( ⋅ ∣ R ν ) s \partial_\nu n(\cdot\mid R_\nu)=n(\cdot\mid R_\nu)s ∂ ν n ( ⋅ ∣ R ν ) = n ( ⋅ ∣ R ν ) s with s = ∂ ν log n ( ⋅ ∣ R ν ) s=\partial_\nu\log n(\cdot\mid R_\nu) s = ∂ ν log n ( ⋅ ∣ R ν ) the score, the first term is E k , ν ^ ( − k ) t r [ ψ s T ] + E k , ν ^ ( − k ) t r [ ∂ ν ψ ν ] \mathbb{E}^{\mathrm{tr}}_{k,\hat{\nu}^{(-k)}}[\psi s^{\mathsf{T}}]+\mathbb{E}^{\mathrm{tr}}_{k,\hat{\nu}^{(-k)}}[\partial_\nu\psi_\nu] E k , ν ^ ( − k ) tr [ ψ s T ] + E k , ν ^ ( − k ) tr [ ∂ ν ψ ν ] , the terms in ∂ ν ψ ν \partial_\nu\psi_\nu ∂ ν ψ ν cancel, and
J k = E k , ν ^ ( − k ) t r [ ψ s T ] + Σ A − 1 , (24) J_k=\mathbb{E}^{\mathrm{tr}}_{k,\hat{\nu}^{(-k)}}[\psi s^{\mathsf{T}}]+\Sigma_A^{-1}, \tag*{(24)} J k = E k , ν ^ ( − k ) tr [ ψ s T ] + Σ A − 1 , (24)
with rows indexing the equations and columns the nuisances. The two fits differ only in ψ \psi ψ . With oracle access the likelihood fit has ψ = s \psi=s ψ = s , and
J k = E k , ν ^ ( − k ) t r [ s s T ] + Σ A − 1 , (25) J_k=\mathbb{E}^{\mathrm{tr}}_{k,\hat{\nu}^{(-k)}}[s s^{\mathsf{T}}]+\Sigma_A^{-1}, \tag*{(25)} J k = E k , ν ^ ( − k ) tr [ s s T ] + Σ A − 1 , (25)
the Fisher information of the training fit, auxiliary term included, so that J k − 1 J_k^{-1} J k − 1 is the asymptotic variance of ν ^ ( − k ) \hat{\nu}^{(-k)} ν ^ ( − k ) . This J k J_k J k is symmetric, so J k − T = J k − 1 J_k^{-\mathsf{T}}=J_k^{-1} J k − T = J k − 1 in what follows; the transposes are kept because they matter for the pushforward fit used with sample access (Section A.4).
Derivation of the orthogonalized witness
In the notation of Section A.1, Eq. (9) reads S k = E ^ k [ ϕ k ] − E k , ν ^ ( − k ) [ ϕ k ] S_k=\widehat{\mathbb{E}}_k[\phi_k]-\mathbb{E}_{k,\hat{\nu}^{(-k)}}[\phi_k] S k = E k [ ϕ k ] − E k , ν ^ ( − k ) [ ϕ k ] . For now we treat the witnesses as fixed and defer the study of their own randomness to Section A.3. S k S_k S k then depends on the data through the held-out sum and, through the nuisance estimate ν ^ ( − k ) \hat{\nu}^{(-k)} ν ^ ( − k ) , on the training events and the auxiliary measurement. Expanding around ν ∗ \nu^* ν ∗ to first order,
S k = { E ^ k [ ϕ k ] − E k , ν ∗ [ ϕ k ] } − g k T ( ν ^ ( − k ) − ν ∗ ) + ⋯ , (26) S_k=\left\{\widehat{\mathbb{E}}_k[\phi_k]-\mathbb{E}_{k,\nu^*}[\phi_k]\right\}-g_k^{\mathsf{T}}(\hat{\nu}^{(-k)}-\nu^*)+\cdots, \tag*{(26)} S k = { E k [ ϕ k ] − E k , ν ∗ [ ϕ k ] } − g k T ( ν ^ ( − k ) − ν ∗ ) + ⋯ , (26)
where
g k = ∂ ν E k , ν [ ϕ k ] ∣ ν = ν ^ ( − k ) = E k , ν ^ ( − k ) [ ϕ k s ] . g_k=\left.\partial_\nu\mathbb{E}_{k,\nu}[\phi_k]\right|_{\nu=\hat{\nu}^{(-k)}}=\mathbb{E}_{k,\hat{\nu}^{(-k)}}[\phi_k s]. g k = ∂ ν E k , ν [ ϕ k ] ∣ ν = ν ^ ( − k ) = E k , ν ^ ( − k ) [ ϕ k s ] .
The first term in (26) is the held-out sum centered at its null expectation. For the second term, F k , ψ ( ν ^ ( − k ) ) = 0 F_{k,\psi}(\hat{\nu}^{(-k)})=0 F k , ψ ( ν ^ ( − k ) ) = 0 and − ∂ F k , ψ / ∂ ν ≈ J k -\partial F_{k,\psi}/\partial\nu\approx J_k − ∂ F k , ψ / ∂ ν ≈ J k , so linearizing (22) around ν ∗ \nu^* ν ∗ gives
ν ^ ( − k ) − ν ∗ = J k − 1 F k , ψ ( ν ∗ ) + ⋯ = J k − 1 [ E ^ k t r [ ψ ] − E k , ν ∗ t r [ ψ ] + Δ A ] + ⋯ , (27) \hat{\nu}^{(-k)}-\nu^*=J_k^{-1}F_{k,\psi}(\nu^*)+\cdots=J_k^{-1}\left[\widehat{\mathbb{E}}_k^{\mathrm{tr}}[\psi]-\mathbb{E}_{k,\nu^*}^{\mathrm{tr}}[\psi]+\Delta_A\right]+\cdots, \tag*{(27)} ν ^ ( − k ) − ν ∗ = J k − 1 F k , ψ ( ν ∗ ) + ⋯ = J k − 1 [ E k tr [ ψ ] − E k , ν ∗ tr [ ψ ] + Δ A ] + ⋯ , (27)
with Δ A = Σ A − 1 ( ν ^ A − ν ∗ ) \Delta_A=\Sigma_A^{-1}(\hat{\nu}_A-\nu^*) Δ A = Σ A − 1 ( ν ^ A − ν ∗ ) . The training sum of fold k k k is the sum of the held-out sums of the other folds, E ^ k t r = ∑ j ≠ k E ^ j \widehat{\mathbb{E}}_k^{\mathrm{tr}}=\sum_{j\ne k}\widehat{\mathbb{E}}_j E k tr = ∑ j = k E j , and likewise E k , ν ∗ t r = ∑ j ≠ k E j , ν ∗ \mathbb{E}_{k,\nu^*}^{\mathrm{tr}}=\sum_{j\ne k}\mathbb{E}_{j,\nu^*} E k , ν ∗ tr = ∑ j = k E j , ν ∗ , since at a common ν \nu ν the expectation does not depend on the fold. Substituting (27) into (26), summing over k k k and regrouping the training terms by the fold j j j in which their events are held out,
S = ∑ j = 1 K { E ^ j [ ϕ ~ j ] − E j , ν ∗ [ ϕ ~ j ] } − c T Δ A + ⋯ , (28) S=\sum_{j=1}^{K}\left\{\widehat{\mathbb{E}}_j[\tilde{\phi}_j]-\mathbb{E}_{j,\nu^*}[\tilde{\phi}_j]\right\}-c^{\mathsf{T}}\Delta_A+\cdots, \tag*{(28)} S = j = 1 ∑ K { E j [ ϕ ~ j ] − E j , ν ∗ [ ϕ ~ j ] } − c T Δ A + ⋯ , (28)
with
ϕ ~ j = ϕ j − ( ∑ k ≠ j J k − T g k ) T ψ , c = ∑ k = 1 K J k − T g k . (29) \widetilde{\phi}_j=\phi_j-\left(\sum_{k\ne j}J_k^{-\mathsf{T}}g_k\right)^{\mathsf{T}}\psi,\qquad c=\sum_{k=1}^{K}J_k^{-\mathsf{T}}g_k. \tag*{(29)} ϕ j = ϕ j − k = j ∑ J k − T g k T ψ , c = k = 1 ∑ K J k − T g k . (29)
To leading order J k − T g k J_k^{-\mathsf{T}}g_k J k − T g k does not depend on k k k , since the folds’ fits differ only by the exchange of a fraction 1 / K 1/K 1/ K of the events, so ∑ k ≠ j J k − T g k ≈ ( K − 1 ) J j − T g j = b j \sum_{k\ne j}J_k^{-\mathsf{T}}g_k\approx(K-1)J_j^{-\mathsf{T}}g_j=b_j ∑ k = j J k − T g k ≈ ( K − 1 ) J j − T g j = b j and ϕ ~ j = ϕ j − b j T ψ \widetilde{\phi}_j=\phi_j-b_j^{\mathsf{T}}\psi ϕ j = ϕ j − b j T ψ is the orthogonalized witness of Eq. (11) , the form that is computed.
Table 6 reads (28) one unit of noise at a time. A data event X i X_i X i held out in fold j j j enters through its evaluation ϕ j ( X i ) \phi_j(X_i) ϕ j ( X i ) in S j S_j S j and through the nuisance fits of the other K − 1 K-1 K − 1 folds, each of which it shifts by J k − 1 ψ ( X i ) J_k^{-1}\psi(X_i) J k − 1 ψ ( X i ) ; together these give ϕ ~ j ( X i ) \widetilde{\phi}_j(X_i) ϕ j ( X i ) . The auxiliary measurement is never held out, so it has no evaluation; it enters the fits of all K K K folds, and its shifts, driven by one random vector, add coherently to − c T Δ A -c^{\mathsf{T}}\Delta_A − c T Δ A .
Variance with fitted witnesses. Write
U j : = E j ^ [ ϕ ~ j ] − E j , ν ∗ [ ϕ ~ j ] U_j:=\mathbb{E}_{\hat{j}}[\widetilde{\phi}_j]-\mathbb{E}_{j,\nu^*}[\widetilde{\phi}_j] U j := E j ^ [ ϕ j ] − E j , ν ∗ [ ϕ j ]
so that (28) becomes
S = ∑ j U j − c T Δ A + ⋯ S=\sum_j U_j-c^{\mathsf{T}}\Delta_A+\cdots S = j ∑ U j − c T Δ A + ⋯
U j U_j U j collects the contributions of the events in D j \mathcal{D}_j D j through their evaluation and the other folds’ nuisance fits. Let F − j \mathcal{F}_{-j} F − j denote everything except the events of fold j j j : the other folds and the auxiliary measurement. The witness ϕ j \phi_j ϕ j , its sensitivity g j g_j g j , J j J_j J j and hence the computed ϕ ~ j = ϕ j − b j T ψ \widetilde{\phi}_j=\phi_j-b_j^{\mathsf{T}}\psi ϕ j = ϕ j − b j T ψ are functions of F − j \mathcal{F}_{-j} F − j , and the events in D j D_j D j are independent of F − j \mathcal{F}_{-j} F − j , so E [ U j ∣ F − j ] = 0 \mathbb{E}[U_j \mid\mathcal{F}_{-j}] = 0 E [ U j ∣ F − j ] = 0 . Treating c c c as fixed, the covariances of U j U_j U j with c T Δ A c^{\mathsf{T}}\Delta_A c T Δ A therefore vanish, and
Var ( S ) ≈ ∑ j Var ( U j ) + Var ( c T Δ A ) + ∑ j ≠ k Cov ( U j , U k ) . (30) \operatorname{Var}(S) \approx\sum_j \operatorname{Var}(U_j) + \operatorname{Var}(c^{\mathsf{T}}\Delta_A) + \sum_{j\ne k} \operatorname{Cov}(U_j,U_k). \tag*{(30)} Var ( S ) ≈ j ∑ Var ( U j ) + Var ( c T Δ A ) + j = k ∑ Cov ( U j , U k ) . (30)
By the law of total variance, applied to each term with its own conditioning, Var ( U j ) = E [ Var ( U j ∣ F − j ) ] \operatorname{Var}(U_j) = \mathbb{E}[\operatorname{Var}(U_j \mid\mathcal{F}_{-j})] Var ( U j ) = E [ Var ( U j ∣ F − j )] , whose plug-in estimate is V ^ j D \widehat{V}^{D}_j V j D . The auxiliary term is Var ( c T Δ A ) = c T Σ A − 1 c = V A \operatorname{Var}(c^{\mathsf{T}}\Delta_A) = c^{\mathsf{T}}\Sigma_A^{-1}c = V_A Var ( c T Δ A ) = c T Σ A − 1 c = V A , since Var ( Δ A ) = Σ A − 1 \operatorname{Var}(\Delta_A) = \Sigma_A^{-1} Var ( Δ A ) = Σ A − 1 . With fitted witnesses the cross terms do not vanish, because ϕ ~ j \widetilde{\phi}_j ϕ j is trained on the events of fold k k k and ϕ ~ k \widetilde{\phi}_k ϕ k on those of fold j j j ; they are the fitting-randomness term addressed in Section A.3.
The fitting-randomness term
For a fixed fold k k k , the witness is ϕ k = f θ ^ k \phi_k = f_{\widehat{\theta}_k} ϕ k = f θ k , where θ ^ k \widehat{\theta}_k θ k maximizes the training objective (16) over a parameter vector θ \theta θ , possibly with a penalty. In the notation of Section A.1 the objective reads
L k ( θ ) = E ^ k t r [ f θ ] − E k , ν ^ ( − k ) t r [ e f θ − 1 ] , (31) L_k(\theta) = \widehat{\mathbb{E}}^{\mathrm{tr}}_k[f_\theta] - \mathbb{E}^{\mathrm{tr}}_{k,\widehat{\nu}_{(-k)}}[e^{f_\theta}-1], \tag*{(31)} L k ( θ ) = E k tr [ f θ ] − E k , ν ( − k ) tr [ e f θ − 1 ] , (31)
and θ ^ k \widehat{\theta}_k θ k solves the estimating equations
G k ( θ ) : = ∂ θ L k ( θ ) = E ^ k t r [ a θ ] − E k , ν ^ ( − k ) t r [ e f θ a θ ] = 0 , (32) G_k(\theta) := \partial_\theta L_k(\theta) = \widehat{\mathbb{E}}^{\mathrm{tr}}_k[a_\theta] - \mathbb{E}^{\mathrm{tr}}_{k,\widehat{\nu}_{(-k)}}[e^{f_\theta}a_\theta] = 0, \tag*{(32)} G k ( θ ) := ∂ θ L k ( θ ) = E k tr [ a θ ] − E k , ν ( − k ) tr [ e f θ a θ ] = 0 , (32)
where a θ = ∂ θ f θ a_\theta= \partial_\theta f_\theta a θ = ∂ θ f θ is restricted to the free directions of fold k k k (the active atoms of the dictionary, the free parameters of the network; Appendix § 10 ), and a k = a θ ^ k a_k = a_{\widehat{\theta}_k} a k = a θ k . As in (22) , G k G_k G k is a data sum minus an expectation, here under the tilted null e f θ ^ k ν ^ k e^{f_{\widehat{\theta}_k}}\widehat{\nu}_k e f θ k ν k . We write
H k = { ∂ θ E k , ν ^ ( − k ) t r [ e f θ a θ ] − E k , ν ^ ( − k ) t r [ e f θ ∂ θ a θ ] } θ = θ ^ k ≈ − ∂ G k ∂ θ ∣ θ = θ ^ k (33) \begin{aligned}
H_k &= \left\{\partial_\theta\mathbb{E}^{\mathrm{tr}}_{k,\widehat{\nu}_{(-k)}}[e^{f_\theta}a_\theta] - \mathbb{E}^{\mathrm{tr}}_{k,\widehat{\nu}_{(-k)}}[e^{f_\theta}\partial_\theta a_\theta]\right\}_{\theta=\widehat{\theta}_k} \\
&\approx-\left.\frac{\partial G_k}{\partial\theta}\right|_{\theta=\widehat{\theta}_k} \tag*{(33)}
\end{aligned} H k = { ∂ θ E k , ν ( − k ) tr [ e f θ a θ ] − E k , ν ( − k ) tr [ e f θ ∂ θ a θ ] } θ = θ k ≈ − ∂ θ ∂ G k θ = θ k (33)
for the approximate sign-reversed Jacobian of G k G_k G k with the data sum E ^ k t r [ ∂ θ a θ ] \widehat{\mathbb{E}}^{\mathrm{tr}}_k[\partial_\theta a_\theta] E k tr [ ∂ θ a θ ] replaced by its expectation under the fitted tilted null. This is the witness counterpart of J k J_k J k in (23) . A similar cancellation leads to
H k = E k , ν ^ ( − k ) t r [ e ϕ k a k a k T ] . (34) H_k = \mathbb{E}^{\mathrm{tr}}_{k,\widehat{\nu}_{(-k)}}[e^{\phi_k}a_ka_k^{\mathsf{T}}]. \tag*{(34)} H k = E k , ν ( − k ) tr [ e ϕ k a k a k T ] . (34)
For the dictionary a θ a_\theta a θ is the vector of active atoms and does not depend on θ \theta θ , so there is no term to cancel and H k H_k H k is the Hessian of the penalized Poisson regression on its active columns. For the network the cancellation is the Gauss–Newton approximation, and H k H_k H k is the Gauss–Newton matrix (49) , with its ridge.
First-order covariance. Under H 0 H_0 H 0 the fitted witness is close to a parameter θ 0 \theta_0 θ 0 with f θ 0 ≡ 0 f_{\theta_0} \equiv0 f θ 0 ≡ 0 . Linearizing (32) around θ 0 \theta_0 θ 0 , as Eq. (27) linearizes (22) ,
θ ^ k − θ 0 = H k − 1 G k ( θ 0 ) + … . \hat{\theta}_k-\theta_0=H_k^{-1}G_k(\theta_0)+\ldots. θ ^ k − θ 0 = H k − 1 G k ( θ 0 ) + … .
We center at the true value, so that each sum depends on the events of one fold only:
ξ j ( u ) = E ^ j [ u ] − E j , ν ∗ [ u ] (35) \xi_j(u)=\hat{\mathbb{E}}_j[u]-\mathbb{E}_{j,\nu^*}[u] \tag*{(35)} ξ j ( u ) = E ^ j [ u ] − E j , ν ∗ [ u ] (35)
is the centered sum of a function u u u over the events of fold j j j ; ξ j ( a k ) \xi_j(a_k) ξ j ( a k ) is that of fold k k k ’s free directions, and
G k ( θ 0 ) = ∑ j ≠ k ξ j ( a k ) − E k , ν ^ ( − k ) t r [ a k s ( − k ) ( ν ^ ( − k ) − ν ∗ ) ] + … . G_k(\theta_0)=\sum_{j\ne k}\xi_j(a_k)-\mathbb{E}_{k,\hat{\nu}^{(-k)}}^{\mathrm{tr}}\left[a_k s^{(-k)}\left(\hat{\nu}^{(-k)}-\nu^*\right)\right]+\ldots. G k ( θ 0 ) = j = k ∑ ξ j ( a k ) − E k , ν ^ ( − k ) tr [ a k s ( − k ) ( ν ^ ( − k ) − ν ∗ ) ] + … .
The second term is the part of the training fluctuation absorbed by the nuisance fit, against which the witness is fitted. We set it aside here and account for it in the computation by a damping of the nuisance directions (Appendix § 10 .§ 7 ); then
θ ^ k − θ 0 ≈ H k − 1 ∑ j ≠ k ξ j ( a k ) . (36) \hat{\theta}_k-\theta_0\approx H_k^{-1}\sum_{j\ne k}\xi_j(a_k). \tag*{(36)} θ ^ k − θ 0 ≈ H k − 1 j = k ∑ ξ j ( a k ) . (36)
The witness is, to first order, ϕ k = a k T ( θ ^ k − θ 0 ) \phi_k=a_k^{\mathsf T}(\hat{\theta}_k-\theta_0) ϕ k = a k T ( θ ^ k − θ 0 ) . Starting from the definition of U k U_k U k in Section A.2, with b k b_k b k treated as fixed given F − k \mathcal{F}_{-k} F − k ,
U k = ξ k ( ϕ ~ k ) = ξ k ( ϕ k ) − b k T ξ k ( ψ ) = ξ k ( a k ) T ( θ ^ k − θ 0 ) − b k T ξ k ( ψ ) + … = ξ k ( a k ) T H k − 1 ∑ j ≠ k ξ j ( a k ) − b k T ξ k ( ψ ) + … (37) \begin{aligned}
U_k&=\xi_k(\tilde{\phi}_k)\\
&=\xi_k(\phi_k)-b_k^{\mathsf T}\xi_k(\psi)\\
&=\xi_k(a_k)^{\mathsf T}(\hat{\theta}_k-\theta_0)-b_k^{\mathsf T}\xi_k(\psi)+\ldots\\
&=\xi_k(a_k)^{\mathsf T}H_k^{-1}\sum_{j\ne k}\xi_j(a_k)-b_k^{\mathsf T}\xi_k(\psi)+\ldots \tag*{(37)}
\end{aligned} U k = ξ k ( ϕ ~ k ) = ξ k ( ϕ k ) − b k T ξ k ( ψ ) = ξ k ( a k ) T ( θ ^ k − θ 0 ) − b k T ξ k ( ψ ) + … = ξ k ( a k ) T H k − 1 j = k ∑ ξ j ( a k ) − b k T ξ k ( ψ ) + … (37)
The first line is the definition of U k U_k U k in the notation of (35), the second splits ϕ ~ k = ϕ k − b k T ψ \tilde{\phi}_k=\phi_k-b_k^{\mathsf T}\psi ϕ ~ k = ϕ k − b k T ψ , using that ξ k \xi_k ξ k is linear, the third substitutes the linearized witness ϕ k = a k T ( θ ^ k − θ 0 ) \phi_k=a_k^{\mathsf T}(\hat{\theta}_k-\theta_0) ϕ k = a k T ( θ ^ k − θ 0 ) , and the last uses (36). The first term carries the fitting noise: the held-out events of fold k k k paired with the training events. For j ≠ k j\ne k j = k , U j U_j U j and U k U_k U k share two such pairs: the events of fold k k k enter U k U_k U k as held-out events and U j U_j U j as training events, and vice versa for fold j j j . Since the folds are independent Poisson processes and each centered sum has mean zero, only these pairs contribute:
Cov ( U j , U k ) = Cov ( ξ j ( a j ) T H j − 1 ξ k ( a j ) , ξ k ( a k ) T H k − 1 ξ j ( a k ) ) = tr ( H j − 1 E [ ξ k ( a j ) ξ k ( a k ) T ] H k − 1 E [ ξ j ( a k ) ξ j ( a j ) T ] ) = E j E k tr ( H k − 1 Ω k j H j − 1 Ω j k ) . (38) \begin{aligned}
\operatorname{Cov}(U_j,U_k)&=\operatorname{Cov}\left(\xi_j(a_j)^{\mathsf T}H_j^{-1}\xi_k(a_j),\xi_k(a_k)^{\mathsf T}H_k^{-1}\xi_j(a_k)\right)\\
&=\operatorname{tr}\left(H_j^{-1}\mathbb{E}\left[\xi_k(a_j)\xi_k(a_k)^{\mathsf T}\right]H_k^{-1}\mathbb{E}\left[\xi_j(a_k)\xi_j(a_j)^{\mathsf T}\right]\right)\\
&=\mathbb{E}_j\mathbb{E}_k\operatorname{tr}\left(H_k^{-1}\Omega_{kj}H_j^{-1}\Omega_{jk}\right). \tag*{(38)}
\end{aligned} Cov ( U j , U k ) = Cov ( ξ j ( a j ) T H j − 1 ξ k ( a j ) , ξ k ( a k ) T H k − 1 ξ j ( a k ) ) = tr ( H j − 1 E [ ξ k ( a j ) ξ k ( a k ) T ] H k − 1 E [ ξ j ( a k ) ξ j ( a j ) T ] ) = E j E k tr ( H k − 1 Ω k j H j − 1 Ω j k ) . (38)
The second line writes the product of the two scalars as x T A y z T B w = tr ( A y z T B w x T ) x^{\mathsf{T}}Ay z^{\mathsf{T}}Bw = \operatorname{tr}(Ayz^{\mathsf{T}}Bwx^{\mathsf{T}}) x T A y z T B w = tr ( A y z T B w x T ) and takes the expectation fold by fold: ξ k ( a j ) \xi_k(a_j) ξ k ( a j ) and ξ k ( a k ) \xi_k(a_k) ξ k ( a k ) depend on the events of fold k k k , ξ j ( a k ) \xi_j(a_k) ξ j ( a k ) and ξ j ( a j ) \xi_j(a_j) ξ j ( a j ) on those of fold j j j , and the folds are independent. The last line uses Campbell’s theorem, E [ ξ k ( a j ) ξ k ( a k ) T ] = E k , ν ∗ [ a j a k T ] = E k Ω j k \mathbb{E}[\xi_k(a_j)\xi_k(a_k)^{\mathsf{T}}] = \mathbb{E}_{k,\nu^*}[a_ja_k^{\mathsf{T}}] = \mathbb{E}_k\Omega_{jk} E [ ξ k ( a j ) ξ k ( a k ) T ] = E k , ν ∗ [ a j a k T ] = E k Ω j k , and the cyclic property of the trace, where, in the ideal case,
Ω k j = ∫ a k a j T d Q ∗ , Q ∗ = n ( ⋅ ∣ R ν ∗ ) ∫ n ( ⋅ ∣ R ν ∗ ) (39) \Omega_{kj} = \int a_k a_j^{\mathsf{T}}\,\mathrm{d}Q^*, \qquad Q^* = \frac{n(\cdot\mid R_{\nu^*})}{\int n(\cdot\mid R_{\nu^*})} \tag*{(39)} Ω k j = ∫ a k a j T d Q ∗ , Q ∗ = ∫ n ( ⋅ ∣ R ν ∗ ) n ( ⋅ ∣ R ν ∗ ) (39)
is the second moment of the free directions of folds k k k and j j j under the normalized true null; how it is computed is described in Appendix C.6. With H k − 1 H_k^{-1} H k − 1 replaced by D k H k − 1 D_kH_k^{-1} D k H k − 1 , the damping of Appendix C.7, this is the summand of Eq. (15) . When all folds share the same p p p unpenalized directions, orthonormal under Q ∗ Q^* Q ∗ , the sum over j ≠ k j \ne k j = k equals the conditional variance ∑ k V ^ k D \sum_k\widehat{V}_k^D ∑ k V k D to leading order: in the linear case the fitting randomness doubles the variance. For such a linear witness with known nuisances, standard linear algebra shows that, given the first-order expansion of the fit, this correction is exact.
Sample access: what changes
With sample access the Reference model is known only through a simulated sample, and every expectation E k , ν \mathbb{E}_{k,\nu} E k , ν or E k , ν t r \mathbb{E}_{k,\nu}^{\mathrm{tr}} E k , ν tr in Sections A.1–A.3 that is computed, rather than only written, is replaced by its Reference estimate E ˉ k , ν \bar{\mathbb{E}}_{k,\nu} E ˉ k , ν or E ˉ k , ν t r \bar{\mathbb{E}}_{k,\nu}^{\mathrm{tr}} E ˉ k , ν tr . The difference E ˉ − E \bar{\mathbb{E}}-\mathbb{E} E ˉ − E is the Reference noise. It adds a third source of noise to Table 6 , the term V ^ k R \widehat{V}_k^R V k R to the variance, and a Reference part to the overlaps of V ^ f i t \widehat{V}_{\mathrm{fit}} V fit .
Table 6. Contribution to S S S of one unit of each source of noise, with the witnesses fixed. A data event belongs to fold j j j and enters the nuisance fits of the K − 1 K-1 K − 1 folds k ≠ j k\ne j k = j ; the auxiliary measurement enters the fits of all K K K folds. The middle columns are per fold k k k whose fit the unit enters; the last column sums the evaluation and all such shifts, as in (28). With sample access a third row is added (Section A.4).
Reference expectations. With T ν s T_{\nu s} T ν s the nuisance transformation followed by the event selection and M k M_k M k , M − k M_{-k} M − k the numbers of held-out and training Reference events that pass the selection at ν = 0 \nu=0 ν = 0 ,
E ˉ k , ν [ u ] = N 0 e ν n K M k ∑ e ∈ R k 1 [ T ν s X e ′ passes ] u ( T ν s X e ′ ) , (40) \bar{\mathbb{E}}_{k,\nu}[u] = \frac{N_0 e^{\nu_n}}{K M_k}\sum_{e\in R_k}\mathbf{1}[T_{\nu s}X'_e\ \text{passes}]\,u(T_{\nu s}X'_e), \tag*{(40)} E ˉ k , ν [ u ] = K M k N 0 e ν n e ∈ R k ∑ 1 [ T ν s X e ′ passes ] u ( T ν s X e ′ ) , (40)
and E ˉ k , ν t r \bar{\mathbb{E}}_{k,\nu}^{\mathrm{tr}} E ˉ k , ν tr is the same sum over R − k R_{-k} R − k with weight ( K − 1 ) N 0 e ν n / ( K M − k ) (K-1)N_0e^{\nu_n}/(K M_{-k}) ( K − 1 ) N 0 e ν n / ( K M − k ) . At the fitted value ν = ν ^ ( − k ) \nu=\hat{\nu}^{(-k)} ν = ν ^ ( − k ) the held-out weight is ω k = N 0 e ν ^ n ( − k ) / ( K M k ) \omega_k=N_0e^{\hat{\nu}^{(-k)}_n}/(K M_k) ω k = N 0 e ν ^ n ( − k ) / ( K M k ) , with ν ^ n ( − k ) \hat{\nu}^{(-k)}_n ν ^ n ( − k ) the normalization component of ν ^ ( − k ) \hat{\nu}^{(-k)} ν ^ ( − k ) . Both weights are close to r e ν ^ n ( − k ) r e^{\hat{\nu}^{(-k)}_n} r e ν ^ n ( − k ) , since each held-out fold holds about a fraction 1 / K 1/K 1/ K of the Reference sample. The Reference folds are drawn with fixed sizes (Appendix C.5). The sensitivity g k g_k g k , which carries the nuisance estimate into the variance through the orthogonalization b k b_k b k , is computed from these sums: its entry for ν n \nu_n ν n is g k , n = E ˉ k , ν ^ ( − k ) [ ϕ k ] g_{k,n}=\bar{E}_{k,\hat{\nu}^{(-k)}}[\phi_k] g k , n = E ˉ k , ν ^ ( − k ) [ ϕ k ] , because the weight is proportional to e ν n e^{\nu_n} e ν n , and its entry for ν s \nu_s ν s , like the ν s \nu_s ν s -derivatives in J k J_k J k , is a central difference of these sums, with the selection repeated at each shifted value (Appendix § 10 .§ 2 ).
Pushforward nuisance fit. The default fit (6) has ψ = ( 1 , δ ^ 1 ) \psi=(1,\hat{\delta}_1) ψ = ( 1 , δ ^ 1 ) , a fixed function. Because the intensity is proportional to e ν n e^{\nu_n} e ν n , its two training expectations factor as E ˉ k , ν t r [ 1 ] = e ν n C 0 , k ( ν s ) \bar{E}^{\mathrm{tr}}_{k,\nu}[1]=e^{\nu_n}C_{0,k}(\nu_s) E ˉ k , ν tr [ 1 ] = e ν n C 0 , k ( ν s ) and E ˉ k , ν t r [ δ ^ 1 ] = e ν n C 1 , k ( ν s ) \bar{E}^{\mathrm{tr}}_{k,\nu}[\hat{\delta}_1]=e^{\nu_n}C_{1,k}(\nu_s) E ˉ k , ν tr [ δ ^ 1 ] = e ν n C 1 , k ( ν s ) . The entries of (24) are their derivatives: in ν n \nu_n ν n the expectations themselves, and in ν s \nu_s ν s the derivatives C 0 , k ′ C'_{0,k} C 0 , k ′ and C 1 , k ′ C'_{1,k} C 1 , k ′ , computed on the training Reference,
J k = e ν ^ n ( − k ) ( C 0 , k C 0 , k ′ C 1 , k C 1 , k ′ ) + Σ A − 1 . (41) J_k=e^{\hat{\nu}^{(-k)}_n}
\begin{pmatrix}
C_{0,k} & C'_{0,k}\\
C_{1,k} & C'_{1,k}
\end{pmatrix}
+\Sigma_A^{-1}. \tag*{(41)} J k = e ν ^ n ( − k ) ( C 0 , k C 1 , k C 0 , k ′ C 1 , k ′ ) + Σ A − 1 . (41)
Reference noise in U j U_j U j . The subtracted expectations are now Reference sums, and the centered sum (35) becomes
ξ j ( u ) = E ^ j [ u ] − E ˉ j , ν ∗ [ u ] = { E ^ j [ u ] − E j , ν ∗ [ u ] } − { E ˉ j , ν ∗ [ u ] − E j , ν ∗ [ u ] } . \xi_j(u)=\hat{E}_j[u]-\bar{E}_{j,\nu^*}[u]
=\left\{\hat{E}_j[u]-E_{j,\nu^*}[u]\right\}
-\left\{\bar{E}_{j,\nu^*}[u]-E_{j,\nu^*}[u]\right\}. ξ j ( u ) = E ^ j [ u ] − E ˉ j , ν ∗ [ u ] = { E ^ j [ u ] − E j , ν ∗ [ u ] } − { E ˉ j , ν ∗ [ u ] − E j , ν ∗ [ u ] } .
the data noise minus the Reference noise of fold j j j , both functions of the data and Reference events of fold j j j only. The training Reference events enter the nuisance fits through E ˉ k , ν t r [ ψ ] \bar{E}^{\mathrm{tr}}_{k,\nu}[\psi] E ˉ k , ν tr [ ψ ] , and E ˉ k , ν t r = ∑ j ≠ k E ˉ j , ν \bar{E}^{\mathrm{tr}}_{k,\nu}=\sum_{j\ne k}\bar{E}_{j,\nu} E ˉ k , ν tr = ∑ j = k E ˉ j , ν up to the imbalance of the fold sizes, so the regrouping of Section A.2 goes through unchanged: S = ∑ j U j − c T Δ A + … S=\sum_j U_j-\mathbf{c}^{\mathsf{T}}\Delta_A+\ldots S = ∑ j U j − c T Δ A + … with U j = ξ j ( ϕ ~ j ) U_j=\xi_j(\tilde{\phi}_j) U j = ξ j ( ϕ ~ j ) , and F − j \mathcal{F}_{-j} F − j now excludes the Reference events of fold j j j as well. A Reference event X e ′ X'_e X e ′ of fold j j j therefore acts as a data event with the opposite sign and weight ω j \omega_j ω j : every entry of its row in Table 6 is − ω j -\omega_j − ω j times the corresponding entry of the data row, with ϕ j ( e ) \phi_j(e) ϕ j ( e ) and ψ ( e ) \psi(e) ψ ( e ) evaluated at the transformed event T ν ^ s ( − j ) X e ′ T_{\hat{\nu}_s}^{(-j)}X'_e T ν ^ s ( − j ) X e ′ and set to zero if it fails the selection, and its total contribution is
− ω j ϕ ~ j ( e ) . (42) -\omega_j\tilde{\phi}_j(e). \tag*{(42)} − ω j ϕ ~ j ( e ) . (42)
The data and Reference parts of ξ j \xi_j ξ j are independent, so Var ( U j ∣ F − j ) \operatorname{Var}(U_j\mid\mathcal{F}_{-j}) Var ( U j ∣ F − j ) in (30) is the sum of the data part, estimated by V ^ j D \hat{V}^{D}_j V ^ j D , and the Reference part, the variance of the sum of the totals (42) over R j \mathcal{R}_j R j , estimated by the centered V ^ j R \hat{V}^{R}_j V ^ j R of Eq. (14) (Appendix § 10 .§ 5 ); it is approximately ω j 2 ∑ e ϕ ~ j , e 2 = ω j E ˉ j , ν ^ ( − j ) [ ϕ ~ j 2 ] \omega_j^2\sum_e\tilde{\phi}_{j,e}^2=\omega_j\bar{E}_{j,\hat{\nu}^{(-j)}}[\tilde{\phi}_j^2] ω j 2 ∑ e ϕ ~ j , e 2 = ω j E ˉ j , ν ^ ( − j ) [ ϕ ~ j 2 ] , about r r r times the data part.
Fitting randomness. The Reference events of fold j j j are also in the training samples of the witnesses ϕ k \phi_k ϕ k , k ≠ j k \ne j k = j , so the cross terms Cov ( U j , U k ) \operatorname{Cov}(U_j,U_k) Cov ( U j , U k ) are derived as in Section A.3, with the updated definition of ξ k \xi_k ξ k . The data and Reference parts of ξ k \xi_k ξ k are independent, and the data part gives E k , ν ∗ [ a j a k T ] = E k Ω j k \mathbb{E}_{k,\nu^*}[a_j a_k^{\mathsf{T}}]=E_k\Omega_{jk} E k , ν ∗ [ a j a k T ] = E k Ω j k as before. The Reference part is ω k \omega_k ω k times a sum over the M k M_k M k Reference events of fold k k k , a fixed number of draws from the normalized null Q ∗ Q^* Q ∗ . The covariance of such a sum is M k M_k M k times the covariance of a single draw, Ω j k − μ j μ k T \Omega_{jk}-\mu_j\mu_k^{\mathsf{T}} Ω j k − μ j μ k T , rather than the raw second moment Ω j k \Omega_{jk} Ω j k that a Poisson count gives: with a fixed number of draws there is no fluctuation of the count to add μ j μ k T \mu_j\mu_k^{\mathsf{T}} μ j μ k T . With ω k M k = E k \omega_kM_k=E_k ω k M k = E k , the expected number of held-out events, and ω k ≈ r \omega_k\approx r ω k ≈ r near the central value,
E [ ξ k ( a j ) ξ k ( a k ) T ] = E k , ν ∗ [ a j a k T ] + ω k 2 M k Cov Q ∗ ( a j , a k ) = E k Ω j k + ω k E k ( Ω j k − μ j μ k T ) ≈ E k Ω ~ j k \begin{aligned}
\mathbb{E}\left[\xi_k(a_j)\xi_k(a_k)^{\mathsf{T}}\right] &= \mathbb{E}_{k,\nu^*}\left[a_j a_k^{\mathsf{T}}\right]+\omega_k^2M_k\operatorname{Cov}_{Q^*}(a_j,a_k) \\
&= E_k\Omega_{jk}+\omega_kE_k\left(\Omega_{jk}-\mu_j\mu_k^{\mathsf{T}}\right) \\
&\approx E_k\widetilde{\Omega}_{jk}
\end{aligned} E [ ξ k ( a j ) ξ k ( a k ) T ] = E k , ν ∗ [ a j a k T ] + ω k 2 M k Cov Q ∗ ( a j , a k ) = E k Ω j k + ω k E k ( Ω j k − μ j μ k T ) ≈ E k Ω j k
with
Ω ~ k j = Ω k j + r ( Ω k j − μ k μ j T ) , μ k = ∫ a k d Q ∗ . (43) \widetilde{\Omega}_{kj}=\Omega_{kj}+r\left(\Omega_{kj}-\mu_k\mu_j^{\mathsf{T}}\right),\qquad\mu_k=\int a_k\,\mathrm{d}Q^*. \tag*{(43)} Ω k j = Ω k j + r ( Ω k j − μ k μ j T ) , μ k = ∫ a k d Q ∗ . (43)
Here Q ∗ Q^* Q ∗ is the normalized true null of Eq. (39) . The factor r r r comes from the weights: a Reference fold has about 1 / r 1/r 1/ r times as many events as the data fold, each weighted by r r r , so its sum has ( 1 / r ) r 2 = r (1/r)\,r^2=r ( 1/ r ) r 2 = r times the variance of the data sum. Had the Reference fold been drawn as a Poisson process, its moment would be uncentered like the data part, and Ω ~ = ( 1 + r ) Ω \widetilde{\Omega}=(1+r)\Omega Ω = ( 1 + r ) Ω .
Summary
For each fold the computation returns S k S_k S k , g k g_k g k , J k J_k J k , ϕ ~ k \widetilde{\phi}_k ϕ k on the held-out data and the fitted null, V ^ k D \widehat{V}_k^D V k D , V ^ k R \widehat{V}_k^R V k R , and, for V ^ f i t \widehat{V}_{\mathrm{fit}} V fit , the free directions on the common measure Q ^ \widehat{Q} Q (Appendix § 10 .§ 6 ) with H k H_k H k and D k D_k D k . The statistic is
Z = ∑ k S k V ^ , Z=\frac{\sum_k S_k}{\sqrt{\widehat{V}}}, Z = V ∑ k S k ,
V ^ = ∑ k ( E k , ν ^ ( − k ) [ ϕ ~ k 2 ] + V ^ k R ) + c T Σ A − 1 c + ∑ j ≠ k E j E k tr ( D k H k − 1 Ω ~ k j D j H j − 1 Ω ~ j k ) . (44) \begin{aligned}
\widehat{V}&=\sum_k\left(\mathbb{E}_{k,\widehat{\nu}^{(-k)}}[\widetilde{\phi}_k^2]+\widehat{V}_k^R\right)+c^{\mathsf{T}}\Sigma_A^{-1}c \\
&\quad+\sum_{j\ne k}E_jE_k\operatorname{tr}\left(D_kH_k^{-1}\widetilde{\Omega}_{kj}D_jH_j^{-1}\widetilde{\Omega}_{jk}\right). \tag*{(44)}
\end{aligned} V = k ∑ ( E k , ν ( − k ) [ ϕ k 2 ] + V k R ) + c T Σ A − 1 c + j = k ∑ E j E k tr ( D k H k − 1 Ω k j D j H j − 1 Ω j k ) . (44)
With oracle access the expectations are exact, V ^ k R = 0 \widehat{V}_k^R=0 V k R = 0 and Ω ~ k j = Ω k j \widetilde{\Omega}_{kj}=\Omega_{kj} Ω k j = Ω k j ; with sample access every computed E \mathbb{E} E is the Reference estimate E ‾ \overline{E} E of Section A.4.
The numerator uses the raw witness ϕ k \phi_k ϕ k and the variance the orthogonalized ϕ ~ k \tilde{\phi}_k ϕ ~ k (Section 3.3).
Statements of the limit theorems and proof sketches
We state the result of Section 3.5 in the form used here and sketch its proof. Precise statements, the proofs, and the extension to the degenerate regime will be given in a companion paper in statistics.
Setting and scale. The expected number of events N 0 N_0 N 0 grows, with K K K , r = N 0 / M r = N_0/M r = N 0 / M and Σ A N 0 \Sigma_A N_0 Σ A N 0 fixed. Let σ ϕ = [ E Var Q ∗ ( ϕ k ) ] 1 / 2 \sigma_\phi= [\mathbb{E}\operatorname{Var}_{Q^*}(\phi_k)]^{1/2} σ ϕ = [ E Var Q ∗ ( ϕ k ) ] 1/2 be the typical size of the witness, where Var Q ∗ ( ϕ k ) \operatorname{Var}_{Q^*}(\phi_k) Var Q ∗ ( ϕ k ) is the conditional variance of ϕ k \phi_k ϕ k under Q ∗ Q^* Q ∗ in (39). Let σ S 2 = ∑ k ( V k D + V k R ) + V A \sigma_S^2 = \sum_k(V_k^D + V_k^R) + V_A σ S 2 = ∑ k ( V k D + V k R ) + V A , with V k D V_k^D V k D and V k R V_k^R V k R the conditional variances given the training folds that V ^ k D \widehat{V}_k^D V k D and V ^ k R \widehat{V}_k^R V k R estimate (Appendices C.4 and A.4). The conditions of Section 3.5 read:
(D) D \mathcal{D} D is a Poisson process with intensity n ( ⋅ ∣ R ν ∗ ) n(\cdot\mid R_{\nu^*}) n ( ⋅ ∣ R ν ∗ ) ; given the stratum sizes (Appendix C.1), the Reference events are independent draws from the Reference model; ν ^ A ∼ N ( ν ∗ , Σ A ) \widehat{\nu}_A \sim N(\nu^*, \Sigma_A) ν A ∼ N ( ν ∗ , Σ A ) ; the three are independent, and the fold assignment is random within strata.
(N) Each ν ^ ( − k ) \widehat{\nu}^{(-k)} ν ( − k ) admits the linearization (27) with remainder o P ( N 0 − 1 / 2 ) o_P(N_0^{-1/2}) o P ( N 0 − 1/2 ) , and ν ↦ E k , ν [ ϕ k ] \nu\mapsto E_{k,\nu}[\phi_k] ν ↦ E k , ν [ ϕ k ] is twice differentiable near ν ∗ \nu^* ν ∗ with second derivative O P ( N 0 σ ϕ ) O_P(N_0\sigma_\phi) O P ( N 0 σ ϕ ) .
(W1) With probability tending to one, sup x ∣ ϕ k ( x ) ∣ ≤ B σ ϕ \sup_x|\phi_k(x)| \le B\sigma_\phi sup x ∣ ϕ k ( x ) ∣ ≤ B σ ϕ on the support of the Reference events, for a constant B B B .
(W2) Replacing one training data event by an independent copy changes ϕ k \phi_k ϕ k at an independent point by o ( σ ϕ / N 0 ) o(\sigma_\phi/\sqrt{N_0}) o ( σ ϕ / N 0 ) in L 2 L_2 L 2 ; replacing one training Reference event, whose weight in the loss is about r r r , changes it by o ( r σ ϕ / N 0 ) o(\sqrt{r}\,\sigma_\phi/\sqrt{N_0}) o ( r σ ϕ / N 0 ) .
Theorem. Under H 0 H_0 H 0 and (D), (N), (W1), (W2),
S ∑ k ( V ^ k D + V ^ k R ) + V ^ A ⇝ N ( 0 , 1 ) . \frac{S}{\sqrt{\sum_k(\widehat{V}_k^D+\widehat{V}_k^R)+\widehat{V}_A}} \rightsquigarrow N(0,1). ∑ k ( V k D + V k R ) + V A S ⇝ N ( 0 , 1 ) .
The cross-fold covariance that V ^ f i t \widehat{V}_{\mathrm{fit}} V fit estimates is o ( σ S 2 ) o(\sigma_S^2) o ( σ S 2 ) , so Z Z Z of Eq. (10) has the same limit whenever V ^ f i t / σ S 2 → 0 \widehat{V}_{\mathrm{fit}}/\sigma_S^2 \to0 V fit / σ S 2 → 0 in probability. With oracle access the Reference terms are absent. No condition involves δ ^ 1 , 2 \hat{\delta}_{1,2} δ ^ 1 , 2 : the nuisance transformation is applied exactly to Reference events, so the learned functions affect only the precision of ν ^ ( − k ) \hat{\nu}^{(-k)} ν ^ ( − k ) .
Proof sketch. The argument is the random-centering central limit theorem for cross-validation [11 ] , applied to two input types and an auxiliary measurement.
Plug-in. Expanding S k S_k S k around ν ∗ \nu^* ν ∗ and substituting (27) gives S = ∑ j U j − c T Δ A + R S = \sum_j U_j - \mathbf{c}^{\mathsf{T}}\Delta_A + R S = ∑ j U j − c T Δ A + R , with U j = ξ j ( ϕ ~ j ) U_j = \xi_j(\widetilde{\phi}_j) U j = ξ j ( ϕ j ) as in Appendix A.2: ξ j \xi_j ξ j is the centered sum (35) over the data events of fold j j j , minus its Reference counterpart with sample access (Appendix A.4), and Δ A \Delta_A Δ A is as in (27). By (N) and (W1) the remainder R R R , second order in ν ^ ( − k ) − ν ∗ \hat{\nu}^{(-k)}-\nu^* ν ^ ( − k ) − ν ∗ , is o P ( σ S ) o_P(\sigma_S) o P ( σ S ) .
Stabilization. Let ϕ ˉ j ( x ) = E [ ϕ ~ j ( x ) ] \bar{\phi}_j(x) = \mathbb{E}[\widetilde{\phi}_j(x)] ϕ ˉ j ( x ) = E [ ϕ j ( x )] , the expectation over the training events of fold j j j (data and Reference) and ν ^ A \hat{\nu}_A ν ^ A at fixed x x x . By the Efron–Stein inequality, (W2), summed over the training events of both types, gives ϕ ~ j = ϕ ˉ j + o P ( σ ϕ ) \widetilde{\phi}_j = \bar{\phi}_j + o_P(\sigma_\phi) ϕ j = ϕ ˉ j + o P ( σ ϕ ) in L 2 ( Q ∗ ) L_2(Q^*) L 2 ( Q ∗ ) . Replacing ϕ ~ j \widetilde{\phi}_j ϕ j by ϕ ˉ j \bar{\phi}_j ϕ ˉ j therefore changes S S S by o P ( σ S ) o_P(\sigma_S) o P ( σ S ) , and the dependence of S j S_j S j on the evaluation events of S k S_k S k , j ≠ k j \ne k j = k , contributes o ( σ S 2 ) o(\sigma_S^2) o ( σ S 2 ) to Var ( S ) \operatorname{Var}(S) Var ( S ) .
Central limit theorem. The leading term is a sum of independent contributions: a compound-Poisson sum over the data events, whose variance is uncentered; a sum over the Reference events, centered within strata; and the Gaussian − c T Δ A -\mathbf{c}^{\mathsf{T}}\Delta_A − c T Δ A . Its variance is σ S 2 \sigma_S^2 σ S 2 , and (W1) gives the Lindeberg condition.
Studentization. Given the training folds, V ^ k D \hat{V}^{D}_k V ^ k D and V ^ k R \hat{V}^{R}_k V ^ k R are unbiased for V k D V^{D}_k V k D and V k R V^{R}_k V k R , and by (W1), (W2) the sum is ratio-consistent for σ S 2 − V A \sigma_S^2 - V_A σ S 2 − V A . Slutsky’s lemma concludes.
Condition (W2) can fail under H 0 H_0 H 0 , when the witness is pure estimation noise (§ 3.5 ). Step 2 then breaks down, the cross-fold covariance is no longer negligible, and the correction of Appendix A.3 is needed.
Implementation details
This appendix describes how the quantities of Appendix A are computed: the Reference sample with sample access, the expectations and their nuisance derivatives, the nuisance fits and the learned functions δ ^ 1 , 2 \hat{\delta}_{1,2} δ ^ 1 , 2 they use with sample access, the variance terms, and the fitting-randomness term for each witness.
The Reference sample with sample access
In the benchmark of § 6 the selection depends on the scale nuisance, so a Reference made only of the events that pass at ν = 0 \nu=0 ν = 0 would lose, after a transformation T ν s T_{\nu_s} T ν s , the events that the shift brings into the selection. The Reference is therefore drawn before the selection. The scale shifts considered lie in V s = [ − ν ˉ s , ν ˉ s ] \mathcal{V}_s=[-\bar{\nu}_s,\bar{\nu}_s] V s = [ − ν ˉ s , ν ˉ s ] , ν ˉ s = 0.065 / 3 ≈ 0.022 \bar{\nu}_s=0.065/3\approx0.022 ν ˉ s = 0.065/3 ≈ 0.022 (about 7 σ s 7\sigma_s 7 σ s ), which contains every value used in the fits and in the data sets. Let B \mathcal{B} B be the events of S t o y \mathcal{S}_{\mathrm{toy}} S toy that fail the selection at ν = 0 \nu=0 ν = 0 but pass it with its p T p_T p T and invariant-mass thresholds loosened by a factor e 0.065 e^{0.065} e 0.065 . Since no momentum moves by more than this factor for ν s ∈ V s \nu_s\in\mathcal{V}_s ν s ∈ V s , B \mathcal{B} B contains every event that such a shift can bring into the selection,
⋃ ν s ∈ V s ∖ { 0 } P ν s ∖ P 0 ⊆ B , \bigcup_{\nu_s\in\mathcal{V}_s\setminus\{0\}}\mathcal{P}_{\nu_s}\setminus\mathcal{P}_0\subseteq\mathcal{B}, ν s ∈ V s ∖ { 0 } ⋃ P ν s ∖ P 0 ⊆ B ,
with P ν s \mathcal{P}_{\nu_s} P ν s as in § 6.1 . The Reference consists of M M M events drawn with replacement from P 0 \mathcal{P}_0 P 0 and, in addition, n B = M ∣ B ∣ / ∣ P 0 ∣ n_B=M|\mathcal{B}|/|\mathcal{P}_0| n B = M ∣ B ∣/∣ P 0 ∣ events drawn with replacement from B \mathcal{B} B , so that the two kinds appear in the same proportion as in S t o y \mathcal{S}_{\mathrm{toy}} S toy . Its weights are normalized by M M M , the events that pass at ν = 0 \nu=0 ν = 0 (Eq. (40) ), and an event contributes to an expectation at ν \nu ν only if T ν s T_{\nu_s} T ν s brings it into the selection. Drawing the second stratum from all of S t o y ∖ P 0 \mathcal{S}_{\mathrm{toy}}\setminus\mathcal{P}_0 S toy ∖ P 0 at the same rate would give the same expectations: restricting it to B \mathcal{B} B only omits events that pass the selection at no ν s ∈ V s \nu_s\in\mathcal{V}_s ν s ∈ V s and therefore contribute zero, which saves transforming them at every ν s \nu_s ν s . The two strata are kept separate when the Reference is split into folds (Appendix § 10 .§ 5 ).
Expectations and nuisance derivatives
With oracle access the integrals of Eq. (21) are computed by the trapezoid rule on a uniform grid that covers the support of the fitted null up to its 1 − 10 − 9 1-10^{-9} 1 − 1 0 − 9 quantile, with 16 001 nodes for the dictionary witness and 4 001 for the network.
With sample access the expectations are the Reference sums (40). Their derivatives in ν n \nu_n ν n are the sums themselves; in ν s \nu_s ν s they are central differences,
g k , s = E ‾ k , ( ν ^ n ( − k ) , ν ^ s ( − k ) + ϵ ) [ ϕ k ] − E ‾ k , ( ν ^ n ( − k ) , ν ^ s ( − k ) − ϵ ) [ ϕ k ] 2 ϵ , ϵ = 10 − 3 , (45) g_{k,s}=\frac{\overline{\mathbb{E}}_{k,(\hat{\nu}_n^{(-k)},\hat{\nu}_s^{(-k)}+\epsilon)}[\phi_k]-\overline{\mathbb{E}}_{k,(\hat{\nu}_n^{(-k)},\hat{\nu}_s^{(-k)}-\epsilon)}[\phi_k]}{2\epsilon},\qquad\epsilon=10^{-3}, \tag*{(45)} g k , s = 2 ϵ E k , ( ν ^ n ( − k ) , ν ^ s ( − k ) + ϵ ) [ ϕ k ] − E k , ( ν ^ n ( − k ) , ν ^ s ( − k ) − ϵ ) [ ϕ k ] , ϵ = 1 0 − 3 , (45)
where the held-out Reference events are transformed to the shifted value and the selection is repeated, so that the events that cross a selection threshold are counted. The derivatives C 0 , k ′ C'_{0,k} C 0 , k ′ and C 1 , k ′ C'_{1,k} C 1 , k ′ in Eq. (41) are computed in the same way on the training Reference.
Nuisance fits
Likelihood fit. With oracle access the likelihood fit, Eq. (4) with ψ = s \psi=s ψ = s , is solved by Newton’s method, started at the unconstrained estimate ( Σ A − 1 = 0 ) (\Sigma^{-1}_{A}=0) ( Σ A − 1 = 0 ) and iterated until the residual of the estimating equations is below 10 − 10 10^{-10} 1 0 − 10 . In the benchmark of § 5 the normalization and scale equations separate into two concave one-dimensional problems, and the iteration is monotone after at most one overshoot.
Pushforward fit. The count equation of (6) is strictly decreasing in ν n \nu_n ν n at fixed ν s \nu_s ν s , and is solved for ν n \nu_n ν n by Newton’s method to 10 − 12 10^{-12} 1 0 − 12 . Substituting this profiled value ν n ( ν s ) \nu_n(\nu_s) ν n ( ν s ) leaves one equation in the scale,
F k ( ν s ) = ∑ i ∈ D − k δ ^ 1 ( X i ) − e ν n ( ν s ) C 1 , k ( ν s ) − ν s − ν ^ A , s σ s 2 = 0 , F_k(\nu_s) = \sum_{i\in\mathcal{D}_{-k}} \hat{\delta}_1(X_i) - e^{\nu_n(\nu_s)} C_{1,k}(\nu_s) - \frac{\nu_s-\hat{\nu}_{A,s}}{\sigma_s^2}=0, F k ( ν s ) = i ∈ D − k ∑ δ ^ 1 ( X i ) − e ν n ( ν s ) C 1 , k ( ν s ) − σ s 2 ν s − ν ^ A , s = 0 ,
with C 1 , k C_{1,k} C 1 , k as in Appendix § 8 .§ 4 . C 1 , k C_{1,k} C 1 , k is a sum over the training Reference with the selection repeated at each ν s \nu_s ν s , so it jumps whenever a Reference event crosses a selection threshold; the root is therefore found by Brent’s method, which needs no derivative, to an absolute tolerance of 10 − 6 10^{-6} 1 0 − 6 in ν s \nu_s ν s . The search is confined to ∣ ν s ∣ ≤ 10 − 2 |\nu_s|\leq10^{-2} ∣ ν s ∣ ≤ 1 0 − 2 , the range of scale shifts on which δ ^ 1 , 2 \hat{\delta}_{1,2} δ ^ 1 , 2 are trained and within which the Reference retains every event the shift can bring into the selection (Appendix § 10 .§ 1 ). The full-data fit is solved first on this interval. Each fold’s fit starts from a bracket of half-width 10 − 3 10^{-3} 1 0 − 3 around the full-data estimate, widened by a factor of four until F k F_k F k changes sign or the bracket reaches the interval. If F k F_k F k does not change sign on the interval, the estimate is set to the bound and the fit is flagged. In the studies of § 6 (2320 data sets, 23 200 fold fits) no fit reached the bound; the largest ∣ ν ^ s ( − k ) ∣ |\hat{\nu}^{(-k)}_s| ∣ ν ^ s ( − k ) ∣ was 0.0076.
The learned functions δ ^ 1 , 2 \hat{\delta}_{1,2} δ ^ 1 , 2 . The samples S 1 S_1 S 1 and S 0 ( ν i ) S_0(\nu_i) S 0 ( ν i ) of the loss (20) are built from the same events of S δ S_\delta S δ , before and after T ν i T_{\nu_i} T ν i . The inputs are preprocessed as in [2 ] : the pseudorapidities are standardized and the positive features ( p T , 1 , p T , 2 , Δ ϕ 12 ) (p_{T,1},p_{T,2},\Delta\phi_{12}) ( p T , 1 , p T , 2 , Δ ϕ 12 ) divided by their mean, with statistics from the training events of S 1 S_1 S 1 . Both networks have ReLU hidden units and a linear output, are initialized by the Glorot-uniform rule, and are trained jointly, full batch, with Adam at the settings of Appendix § 10 .8. The validation loss on the held-out fifth (split by event, so that an event and its shifted copies fall on the same side) is evaluated every ten epochs. In the test the networks are evaluated by a forward pass that reproduces the trainer’s output to within 10 − 8 10^{-8} 1 0 − 8 .
Computing V ^ k D \hat{V}_k^D V ^ k D
V ^ k D \hat{V}_k^D V ^ k D is the variance of the sum, over the events held out in fold k k k , of each event’s total contribution ϕ ~ k ( X i ) \tilde{\phi}_k(X_i) ϕ ~ k ( X i ) in Table 6 . Given the training folds, the held-out events approximately form a Poisson process with intensity n ^ k / K \hat{n}_k/K n ^ k / K : their number is random as well as their locations. By Campbell’s theorem [25 ] the variance of E ^ k [ ϕ ~ k ] \hat{\mathbb{E}}_k[\tilde{\phi}_k] E ^ k [ ϕ ~ k ] is the uncentered second moment V ^ k D = E k , ν ^ ( − k ) [ ϕ ~ k 2 ] \hat{V}_k^D = \mathbb{E}_{k,\hat{\nu}^{(-k)}}[\tilde{\phi}_k^2] V ^ k D = E k , ν ^ ( − k ) [ ϕ ~ k 2 ] ; the fluctuation of the count is part of the null fluctuation of S S S .
Computing V ^ k R \hat{V}_k^R V ^ k R
The Reference sample has two strata (Appendix § 10 .§ 1 ): the events that pass the selection at ν = 0 \nu= 0 ν = 0 and the near-threshold events that fail it, which T ν ^ ( − k ) T_{\hat{\nu}^{(-k)}} T ν ^ ( − k ) can move into the acceptance; an event that still fails at ν ^ ( − k ) \hat{\nu}^{(-k)} ν ^ ( − k ) has ϕ ~ k , e = 0 \tilde{\phi}_{k,e} = 0 ϕ ~ k , e = 0 . Let P 0 , k P_{0,k} P 0 , k and B 0 , k B_{0,k} B 0 , k be the held-out Reference events of fold k k k in the two strata, with sizes M k = ∣ P 0 , k ∣ M_k = |P_{0,k}| M k = ∣ P 0 , k ∣ and n B , k = ∣ B 0 , k ∣ n_{B,k} = |B_{0,k}| n B , k = ∣ B 0 , k ∣ . The folds are drawn separately within the strata, so M k M_k M k and n B , k n_{B,k} n B , k are fixed, the weight ω k \omega_k ω k is normalized by M k M_k M k , and only which events were drawn is random. Within a stratum the held-out events are then a simple random sample, and the variance of their sum is the centered within-stratum sum of squares,
V ^ k R = ω k 2 [ ∑ e ∈ P 0 , k ( ϕ ~ k , e − ϕ ~ k P ) 2 + ∑ e ∈ B 0 , k ( ϕ ~ k , e − ϕ ~ k B ) 2 ] (46) \hat{V}_k^R = \omega_k^2 \left[\sum_{e\in P_{0,k}}(\tilde{\phi}_{k,e}-\tilde{\phi}_k^P)^2 + \sum_{e\in B_{0,k}}(\tilde{\phi}_{k,e}-\tilde{\phi}_k^B)^2\right] \tag*{(46)} V ^ k R = ω k 2 e ∈ P 0 , k ∑ ( ϕ ~ k , e − ϕ ~ k P ) 2 + e ∈ B 0 , k ∑ ( ϕ ~ k , e − ϕ ~ k B ) 2 (46)
with ϕ ~ k P \tilde{\phi}_k^P ϕ ~ k P and ϕ ~ k B \tilde{\phi}_k^B ϕ ~ k B the means over P 0 , k P_{0,k} P 0 , k and B 0 , k B_{0,k} B 0 , k . Centering within strata rather than over the whole fold matters: B 0 , k B_{0,k} B 0 , k consists mostly of events with ϕ ~ k , e = 0 \tilde{\phi}_{k,e}=0 ϕ ~ k , e = 0 , and the difference between the stratum means, which does not fluctuate when the stratum sizes are fixed, would otherwise be counted as variance. With a single stratum, Eq. (46) reduces to (14) . Had the fold been drawn as a Poisson process, Campbell’s theorem would apply as for the data term and give the uncentered ω k 2 ∑ e ϕ ~ k , e 2 \omega_k^2\sum_e\tilde{\phi}_{k,e}^2 ω k 2 ∑ e ϕ ~ k , e 2 ; the two differ by ω k 2 [ M k ( ϕ ~ k P ) 2 + n B , k ( ϕ ~ k B ) 2 ] \omega_k^2[M_k(\tilde{\phi}_k^P)^2+n_{B,k}(\tilde{\phi}_k^B)^2] ω k 2 [ M k ( ϕ ~ k P ) 2 + n B , k ( ϕ ~ k B ) 2 ] .
Computing V f i t V_{\mathrm{fit}} V fit
Poisson moments. Under H 0 H_0 H 0 the data events form a Poisson process with intensity n ( ⋅ ∣ R ν ∗ ) n(\cdot\mid R_{\nu^*}) n ( ⋅ ∣ R ν ∗ ) , and the random assignment of events to folds splits it into K K K independent Poisson processes, each with intensity n ( ⋅ ∣ R ν ∗ ) / K n(\cdot\mid R_{\nu^*})/K n ( ⋅ ∣ R ν ∗ ) / K . For vector functions b b b and c c c , Campbell’s theorem [25 ] gives the covariance of their sums over the events of fold l l l as an uncentered second moment,
Cov ( E ^ l [ b ] , E ^ l [ c ] ) = E l , ν ∗ [ b c T ] , (47) \operatorname{Cov}(\hat{\mathbb{E}}_l[b],\hat{\mathbb{E}}_l[c])=\mathbb{E}_{l,\nu^*}\left[bc^{\mathsf{T}}\right], \tag*{(47)} Cov ( E ^ l [ b ] , E ^ l [ c ]) = E l , ν ∗ [ b c T ] , (47)
of which Appendix C.4 is the case b = c = ϕ ~ i b=c=\tilde{\phi}_i b = c = ϕ ~ i ; sums over different folds are independent. With the free directions held fixed, the centered sums (35) therefore have E [ ξ l ( a j ) ξ l ( a k ) T ] = E l , ν ∗ [ a j a k T ] \mathbb{E}\left[\xi_l(a_j)\xi_l(a_k)^{\mathsf{T}}\right]=\mathbb{E}_{l,\nu^*}\left[a_j a_k^{\mathsf{T}}\right] E [ ξ l ( a j ) ξ l ( a k ) T ] = E l , ν ∗ [ a j a k T ] for every fold l l l , and are independent across l l l .
Pairing. Plugging (37) into Eq. (38) , only the shared pairs contribute: ξ j ( a j ) T H j − 1 ξ l ( a j ) ξ k ( a k ) T H k − 1 ξ m ( a k ) \xi_j(a_j)^{\mathsf{T}}H_j^{-1}\xi_l(a_j)\xi_k(a_k)^{\mathsf{T}}H_k^{-1}\xi_m(a_k) ξ j ( a j ) T H j − 1 ξ l ( a j ) ξ k ( a k ) T H k − 1 ξ m ( a k ) with l = k l=k l = k and m = j m=j m = j , because the folds are independent and each ξ \xi ξ has mean zero.
Common measure and overlaps. Writing E l , ν ∗ [ ⋅ ] = E l [ ⋅ d Q l ] \mathbb{E}_{l,\nu^*}[\cdot]=\mathbb{E}_l[\cdot\,dQ_l] E l , ν ∗ [ ⋅ ] = E l [ ⋅ d Q l ] , with Q l Q_l Q l the normalized null of fold l l l , Eq. (38) needs the second moments of the free directions of two folds under the null of a third. The folds’ fitted nulls differ only through their nuisance estimates, at relative order N 0 − 1 / 2 N_0^{-1/2} N 0 − 1/2 , so the computation replaces all of them, and Q ∗ Q^* Q ∗ , by one common probability measure Q ^ \hat{Q} Q ^ . With oracle access, Q ^ \hat{Q} Q ^ is the normalized fitted null of the first fold, evaluated on its integration grid. With sample access, it is the normalized null at the full-data nuisance fit, represented by the Reference sample. The computed overlaps are
Ω k j = ∫ a k a j T d Q ^ , (48) \Omega_{kj}=\int a_k a_j^{\mathsf{T}}\,d\hat{Q}, \tag*{(48)} Ω k j = ∫ a k a j T d Q ^ , (48)
uncentered for the same reason as V ^ k D \hat{V}^{D}_k V ^ k D , and with the damping of Appendix C.7 the summand of V ^ f i t \hat{V}_{\mathrm{fit}} V ^ fit is E j E k tr ( D k H k − 1 Ω k j D j H j − 1 Ω j k ) E_jE_k\operatorname{tr}\left(D_kH_k^{-1}\Omega_{kj}D_jH_j^{-1}\Omega_{jk}\right) E j E k tr ( D k H k − 1 Ω k j D j H j − 1 Ω j k ) . The curvature is computed on the same measure, rescaled to the training exposure of fold k k k : H k = E k t r ∫ ϕ k a k a k T d Q ^ H_k=E_k^{\mathrm{tr}}\int\phi_k a_k a_k^{\mathsf{T}}\,d\hat{Q} H k = E k tr ∫ ϕ k a k a k T d Q ^ , with E k t r = E k , ν ( − k ) t r [ 1 ] E_k^{\mathrm{tr}}=E_{k,\nu^{(-k)}}^{\mathrm{tr}}[1] E k tr = E k , ν ( − k ) tr [ 1 ] the expected number of training events. With sample access the overlaps acquire the Reference part of Eq. (43) .
Damping
The linearized witness (36) sets aside the second term of G k ( θ 0 ) G_k(\theta_0) G k ( θ 0 ) , the part of the training fluctuation absorbed by the nuisance fit. Along a direction in which the null itself can move, a training fluctuation is shared between the null and the witness: the nuisance fit takes a fraction ρ \rho ρ of it and the witness keeps the rest. The auxiliary measurement limits how far the null can follow the data, so the share 1 − ρ 1-\rho 1 − ρ left to the witness lies between 0, for an unconstrained nuisance, which absorbs the direction entirely, and 1, for a nuisance pinned by the auxiliary measurement. The damping scales the fitting randomness of such directions by this share.
Formally, substituting (27) into the second term of G k ( θ 0 ) G_k(\theta_0) G k ( θ 0 ) , its data part replaces the training sums of a k a_k a k by those of the residualized directions
a ~ k = a k − E k , ν ^ ( − k ) t r [ a k s ⊤ ] J k − 1 ψ \tilde{a}_k=a_k-\mathbb{E}^{\mathrm{tr}}_{k,\hat{\nu}_{(-k)}}[a_k s^\top]J_k^{-1}\psi a ~ k = a k − E k , ν ^ ( − k ) tr [ a k s ⊤ ] J k − 1 ψ
the free directions with the part absorbed by the nuisance fit removed. Two atoms of the dictionary are themselves nuisance scores, and we call them the score atoms: the intercept, which is the score 1 of the normalization, and the atom s ~ \tilde{s} s ~ of Eq. (18) , a multiple of the scale score s s s_s s s . With the likelihood fit, ψ = s \psi=s ψ = s , so each score atom is a multiple of one estimating function, a = c ψ m a=c\psi_m a = c ψ m . Since E k , ν ^ ( − k ) t r [ ψ m s ⊤ ] \mathbb{E}^{\mathrm{tr}}_{k,\hat{\nu}_{(-k)}}[\psi_m s^\top] E k , ν ^ ( − k ) tr [ ψ m s ⊤ ] is row m m m of J k − Σ A − 1 J_k-\Sigma_A^{-1} J k − Σ A − 1 by Eq. (24) ,
a ~ k = c e m ⊤ Σ A − 1 J k − 1 ψ = ( 1 − ρ k , m ) a \tilde{a}_k=c e_m^\top\Sigma_A^{-1}J_k^{-1}\psi=(1-\rho_{k,m})a a ~ k = c e m ⊤ Σ A − 1 J k − 1 ψ = ( 1 − ρ k , m ) a
where the second equality uses that J k J_k J k is diagonal, the two score atoms being orthogonal under the fitted null. In the unit-information parametrization
ρ k , m = E k t r E k t r + σ m − 2 \rho_{k,m}=\frac{E_k^{\mathrm{tr}}}{E_k^{\mathrm{tr}}+\sigma_m^{-2}} ρ k , m = E k tr + σ m − 2 E k tr
with E k t r E_k^{\mathrm{tr}} E k tr the expected number of training events (Appendix § 10 .§ 6 ) and σ m \sigma_m σ m the uncertainty of the auxiliary measurement of nuisance m m m . ρ k , m \rho_{k,m} ρ k , m is the shrinkage of the constrained nuisance fit: the fitted nuisance moves the fraction ρ k , m \rho_{k,m} ρ k , m of the way from ν ^ A \hat{\nu}_A ν ^ A to the unconstrained estimate, and the witness’s coefficient on the score atom is 1 − ρ k , m 1-\rho_{k,m} 1 − ρ k , m times what it would be against an unconstrained null.
For the dictionary witness, D k D_k D k in Eq. (15) has the entry 1 − ρ k , m 1-\rho_{k,m} 1 − ρ k , m for the score atom of nuisance m m m and 1 for the smooth atoms and the bumps, which are not damped because they are orthogonal to 1 and s s s_s s s under the fitted null by construction (§ 5.1 ).
For the network the residualization has no closed form: the parameter gradients a k a_k a k are not orthogonal to the scores, and the part of each that the nuisance fit absorbs is not computed. Only the output bias, which moves the witness along the constant, is damped by 1 − ρ k , n 1-\rho_{k,n} 1 − ρ k , n ; every other free parameter keeps the factor 1, although hidden units can also produce near-constant shifts and the scale direction has no dedicated parameter. Leaving a partly absorbed direction undamped over-counts the fitting variance, so this choice is conservative.
Other details of V ^ f i t \hat{V}_{\mathrm{fit}} V ^ fit
The networks are trained with Adam at learning rate 10 − 3 10^{-3} 1 0 − 3 , β 1 = 0.9 \beta_1 = 0.9 β 1 = 0.9 , β 2 = 0.99 \beta_2 = 0.99 β 2 = 0.99 and ϵ = 10 − 7 \epsilon= 10^{-7} ϵ = 1 0 − 7 , as in Ref. [2 ] , full batch (one step per epoch), with the clipping applied after every step. With a k ( x ) = ∂ f ( x ; θ ) / ∂ θ a_k(x) = \partial f(x;\theta)/\partial\theta a k ( x ) = ∂ f ( x ; θ ) / ∂ θ restricted to the free parameters, the curvature is the Gauss–Newton matrix of Eq. (16) ,
H k = K − 1 K ∫ [ n ^ k e ϕ k a k a k ⊤ + ϵ H diag H ‾ I ] (49) H_k = \frac{K-1}{K}\int\left[\hat{n}_k e^{\phi_k} a_k a_k^{\top} + \epsilon_H \overline{\operatorname{diag} H} I\right] \tag*{(49)} H k = K K − 1 ∫ [ n ^ k e ϕ k a k a k ⊤ + ϵ H diag H I ] (49)
where I I I is the identity and diag H ‾ \overline{\operatorname{diag} H} diag H the mean diagonal element of the first term, and the overlaps Ω ~ k j \widetilde{\Omega}_{kj} Ω k j are built from a k a_k a k and a j a_j a j on a common measure. Below we discuss the choice of free parameters, the ridge ϵ H \epsilon_H ϵ H , and tapered witnesses.
Free parameters. The free parameters are those strictly inside the clipping bound, together with any parameters that are not clipped. A parameter at the bound of a box constraint does not respond to a small change of the data at an exact constrained optimum; training with a fixed number of epochs does not reach one. In the null studies the rule can under-count the fitting variance as more parameters reach the bound (Table 8 : the variance of Z Z Z grows with the training length), and it is adequate at the configurations we use.
Ridge. Without regularization H k H_k H k is nearly singular in some free directions and V ^ f i t \hat{V}_{\mathrm{fit}} V ^ fit is unbiased on average but noisy, and occasionally negative. The ridge ϵ H = 10 − 4 \epsilon_H = 10^{-4} ϵ H = 1 0 − 4 was chosen once, on null simulations of the dilepton benchmark at an earlier configuration (c = 0.72 c = 0.72 c = 0.72 , 2800 epochs; 288 data sets), checked on held-out ones, and is used unchanged at every configuration in both benchmarks; it is the only calibration constant fixed in this way.
Tapering. For a feature with a sparsely populated upper tail, the taper of § 4.3 is
τ k ( x ) = min { 1 , E k t r [ 1 − F k ( x ) ] κ } (50) \tau_k(x) = \min\left\{1,\frac{E_k^{\mathrm{tr}}\left[1-F_k(x)\right]}{\kappa}\right\} \tag*{(50)} τ k ( x ) = min { 1 , κ E k tr [ 1 − F k ( x ) ] } (50)
where F k F_k F k is the distribution function of the fitted null and E k t r E_k^{\mathrm{tr}} E k tr its expected number of training events (Appendix § 10 .§ 6 ), so the numerator is the expected number of training events beyond x x x . The witness τ k f \tau_k^f τ k f equals the network output while at least κ \kappa κ training events are expected beyond x x x and fades in proportion to that number further out. With a taper (used for the network of § 5 ), the network responds to its training events through the untapered gradient a k a_k a k , since it is trained without the taper, while the statistic sees the tapered witness through τ k a k \tau_k a_k τ k a k . The overlaps therefore pair one with the other: Ω k j \Omega_{kj} Ω k j in Eq. (39) becomes Ω k j ( τ ) = ∫ a k ( τ j a j ) ⊤ d Q ∗ \Omega_{kj}(\tau)=\int a_k(\tau_j a_j)^{\top}\,\mathrm{d}Q^* Ω k j ( τ ) = ∫ a k ( τ j a j ) ⊤ d Q ∗ , computed on the common measure Q ^ \widehat{Q} Q as in Appendix § 10 .§ 6 , which reduces to Ω k j \Omega_{kj} Ω k j when τ ≡ 1 \tau\equiv1 τ ≡ 1 . The dependence of τ k \tau_k τ k on the nuisance estimate is neglected; its contribution is the product of the witness and the nuisance error, which is second order under the null hypothesis, where the witness is itself of the size of the noise.
Additional results
This appendix collects results referred to in § 5 and § 6 : the null distribution of Z Z Z for the dictionary witness, and the full tuning grids behind Figure 3 and Figure 6 .
Dictionary witness under the null hypothesis. Figure 7 is the counterpart of Figure 1 for the dictionary witness, at the same five nuisance points with σ A = 0.05 \sigma_A=0.05 σ A = 0.05 . The picture is the same as for the neural network. With the fitting-randomness term the rate at nominal 5% is between 0.0400 and 0.0475; without it the distribution is visibly too wide and the rate is between 0.080 and 0.100, 1.6 to 2 times the nominal value.
Figure 7. As Figure 1 , for the dictionary witness.
Tuning grids. Table 7 and Table 8 give the values plotted in Figure 3 and Figure 6 , and, for the one-dimensional benchmark, the scan of the dictionary’s penalty level summarized in § 5.4 . For each witness all configurations are run on the same data sets, so differences between its rows are not inflated by independent Monte Carlo noise.