Introduction
Calibration and multiaccuracy. Calibration and multiaccuracy are both statistical consistency measures that we can ask of a model p : X → [ 0 , 1 ] p : \mathcal{X} \to[0,1] p : X → [ 0 , 1 ] mapping features to predictions of bounded labels Y ∈ [ 0 , 1 ] Y \in[0,1] Y ∈ [ 0 , 1 ] . Calibration asks that, among examples assigned prediction value p p p , the average label should be close to p p p . Multiaccuracy asks that for every test (or “group”) function g : X → [ − 1 , 1 ] g : \mathcal{X} \to[-1,1] g : X → [ − 1 , 1 ] in a prescribed family, the residual Y − p ( X ) Y - p(X) Y − p ( X ) should be nearly uncorrelated with g ( X ) g(X) g ( X ) [19 , 22 ] . Multicalibration combines these two ideas in a strong way, asking for calibration not just overall but also simultaneously within the feature subsets or test-weighted populations specified by the group family [19 ] .
This paper studies an intermediate guarantee, weaker than multicalibration, obtained by imposing global calibration together with multiaccuracy. We study both randomized and deterministic predictors. In both regimes, the training algorithm may use randomness. The important distinction is the type of predictor it outputs. A randomized predictor Q = ( Q x ) x ∈ X Q = (Q_x)_{x\in\mathcal{X}} Q = ( Q x ) x ∈ X assigns to each feature value x x x a distribution Q x Q_x Q x over predictions in [ 0 , 1 ] [0,1] [ 0 , 1 ] . On a fresh example ( X , Y ) (X,Y) ( X , Y ) , let P ∼ Q X P \sim Q_X P ∼ Q X be the realized prediction, drawn independently of Y Y Y conditional on X X X . A deterministic predictor is instead a fixed function p : X → [ 0 , 1 ] p : \mathcal{X} \to[0,1] p : X → [ 0 , 1 ] , corresponding to the special case in which Q x Q_x Q x is a point mass at p ( x ) p(x) p ( x ) , so that P = p ( X ) P = p(X) P = p ( X ) . For a finite class G \mathcal{G} G of tests g : X → [ − 1 , 1 ] g : \mathcal{X} \to[-1,1] g : X → [ − 1 , 1 ] , define the multiaccuracy (MA) error and expected calibration error (ECE) in terms of the realized prediction:
MA ( Q ; G ) = sup g ∈ G ∣ E [ g ( X ) ( Y − P ) ] ∣ , ECE ( Q ) = E ∣ E [ Y − P ∣ P ] ∣ . \operatorname{MA}(Q;\mathcal{G}) = \sup_{g\in\mathcal{G}} \left|\mathbb{E}[g(X)(Y-P)]\right|,\qquad\operatorname{ECE}(Q) = \mathbb{E}\left|\mathbb{E}[Y-P\mid P]\right|. MA ( Q ; G ) = g ∈ G sup ∣ E [ g ( X ) ( Y − P )] ∣ , ECE ( Q ) = E ∣ E [ Y − P ∣ P ] ∣ .
The calibrated multiaccuracy error is
CMA ( Q ; G ) = max { MA ( Q ; G ) , ECE ( Q ) } . \operatorname{CMA}(Q;\mathcal{G}) = \max\{\operatorname{MA}(Q;\mathcal{G}),\operatorname{ECE}(Q)\}. CMA ( Q ; G ) = max { MA ( Q ; G ) , ECE ( Q )} .
Why calibrated multiaccuracy is interesting. Over the past several years, multicalibration has been the subject of intense study in part because it has found so many different applications, from omniprediction [16 ] to conditional guarantees in conformal prediction [1 , 20 ] to complexity-theoretic constructions [3 ] to multiparty information aggregation [6 , 7 , 21 ] . A growing line of work, however, has shown that calibrated multiaccuracy is enough for tasks where multicalibration had previously been the standard tool. In omniprediction, the outcome-indistinguishability viewpoint decomposes loss minimization into calibration plus multiaccuracy for a loss-derived class of tests [17 ] . Casacuberta et al. [ [4 ] show that adding global calibration to multiaccuracy recovers several implications previously known from multicalibration, including optimal-density hardcore measures. In computational complexity, the multicalibration-based characterization of product-distribution indistinguishability of Marcussen et al. [2025] can also be obtained from calibrated multiaccuracy [11 ] .
These results suggest that calibrated multiaccuracy is a useful relaxation of multicalibration: strong enough for many applications, but structurally weaker. However, prior to this paper, it had not been established that calibrated multiaccuracy error could actually be driven to 0 0 0 any faster than multicalibration error, as a function of the number of samples needed for learning. The best known sample complexity upper bounds for calibrated multiaccuracy in the regime ∣ G ∣ = poly ( 1 / ε ) |\mathcal{G}| = \operatorname{poly}(1/\varepsilon) ∣ G ∣ = poly ( 1/ ε ) were O ~ ( ε − 3 ) \widetilde{O}(\varepsilon^{-3}) O ( ε − 3 ) [15 ] (Noarov and Roth 2027), no better than the minimax optimal rates for multicalibration [9 ] . The only non-trivial lower bound for calibrated multiaccuracy was the Ω ( ε − 5 / 2 ) \Omega(\varepsilon^{-5/2}) Ω ( ε − 5/2 ) bound of Gibbs and Tibshirani [ [15 ] , which applied only when the output after training was a deterministic predictor p : X → [ 0 , 1 ] p : \mathcal{X} \to[0,1] p : X → [ 0 , 1 ] . In particular, no super-ε − 2 \varepsilon^{-2} ε − 2 lower bound was known for algorithms outputting randomized predictors.
Randomized versus deterministic predictors. One might naturally expect allowing the output predictor to randomize not to matter for a batch learning problem. For many familiar distributional learning objectives, randomization is not needed. It is never needed for risk minimization of a single expected loss, for example. The closely related multicalibration problem reinforces this expectation: Collina et al. [ [9 ] identified the minimax optimal sample complexity, initially with upper bounds that were realized by randomized predictors. However subsequently, Noarov and Roth [2027] showed that deterministic predictors suffice to achieve the minimax optimal sample complexity. Thus one might reasonably expect the same for calibrated multiaccuracy — that there should be no worst-case advantage to outputting a randomized predictor. Surprisingly (to us, at least), we show that the story is different for calibrated multiaccuracy: for polynomial-size test families, randomized predictors attain a strictly smaller minimax sample complexity!
Our results
Write A = max { 1 , log ∣ G ∣ } A = \max\{1, \log|\mathcal{G}|\} A = max { 1 , log ∣ G ∣ } for the group budget. We prove the following, where the lower bounds take the worst case over distributions and bounded test families of the specified cardinality.
Tight randomized sample complexity. We give an efficient algorithm which, given n n n samples and a test family G \mathcal{G} G , outputs a randomized predictor Q Q Q satisfying, with probability 1 − δ 1-\delta 1 − δ :
CMA ( Q ; G ) ≤ C { log ( ∣ G ∣ / δ ) n + ( log ( n / δ ) n ) 2 / 5 } . \operatorname{CMA}(Q;\mathcal{G}) \le C \left\{ \sqrt{\frac{\log(|\mathcal{G}|/\delta)}{n}} + \left(\frac{\log(n/\delta)}{n}\right)^{2/5} \right\}. CMA ( Q ; G ) ≤ C { n log ( ∣ G ∣/ δ ) + ( n log ( n / δ ) ) 2/5 } .
Equivalently, error ε \varepsilon ε is achievable with O ~ ( A ε 2 + 1 ε 5 / 2 ) \widetilde{O}\left(\frac{A}{\varepsilon^2} + \frac{1}{\varepsilon^{5/2}}\right) O ( ε 2 A + ε 5/2 1 ) samples. We prove a matching lower bound for arbitrary randomized predictors that is tight for every value of A A A . For polynomial-size test families, this rate is Θ ~ ( ε − 5 / 2 ) \widetilde{\Theta}(\varepsilon^{-5/2}) Θ ( ε − 5/2 ) , compared with Θ ~ ( ε − 3 ) \widetilde{\Theta}(\varepsilon^{-3}) Θ ( ε − 3 ) for full multicalibration. The formal upper bound is Theorem 4.1 ; the matching randomized lower bound is Theorem 6.1 .
Tight deterministic sample complexity and a separation. For algorithms that must output a deterministic predictor p p p , we prove the information-theoretic sample-complexity upper bound
O ~ ( A ε 2 + A 1 / 3 ε 8 / 3 ) . \widetilde{O}\left(\frac{A}{\varepsilon^2}+\frac{A^{1/3}}{\varepsilon^{8/3}}\right). O ( ε 2 A + ε 8/3 A 1/3 ) .
We also prove that, for log ( 1 / ε ) ≲ A ≲ ε − 1 \log(1/\varepsilon) \lesssim A \lesssim\varepsilon^{-1} log ( 1/ ε ) ≲ A ≲ ε − 1 , some bounded test family with log ∣ G ∣ = Θ ( A ) \log|\mathcal{G}| = \Theta(A) log ∣ G ∣ = Θ ( A ) requires Ω ( A 1 / 3 ε − 8 / 3 ) \Omega(A^{1/3}\varepsilon^{-8/3}) Ω ( A 1/3 ε − 8/3 ) samples from every algorithm whose output is a deterministic predictor. The randomized Ω ( A / ε 2 ) \Omega(A/\varepsilon^2) Ω ( A / ε 2 ) multiaccuracy lower bound applies a fortiori to deterministic predictors and supplies the matching term. Thus the upper bound is tight up to logarithmic factors for every A = Ω ( log ( 1 / ε ) ) A = \Omega(\log(1/\varepsilon)) A = Ω ( log ( 1/ ε )) . In particular, the matching bounds show that the unusual A 1 / 3 A^{1/3} A 1/3 dependence is a genuine feature of deterministic prediction, not an artifact of the upper-bound analysis. Unlike the efficient algorithm for randomized predictors in item 1, this is an information-theoretic construction whose direct implementation can require exponential time. The formal upper and lower bounds are Theorems 5.1 and 7.1 , respectively.
In the matching lower-bound range, this deterministic rate is polynomially larger than the randomized rate whenever A ≤ ε − 1 + κ A \le\varepsilon^{-1+\kappa} A ≤ ε − 1 + κ for a fixed κ ∈ ( 0 , 1 ) \kappa\in(0,1) κ ∈ ( 0 , 1 ) . For example, at A = Θ ( log ( 1 / ε ) ) A = \Theta(\log(1/\varepsilon)) A = Θ ( log ( 1/ ε )) , deterministic predictors require Θ ~ ( ε − 8 / 3 ) \widetilde{\Theta}(\varepsilon^{-8/3}) Θ ( ε − 8/3 ) samples, while randomized predictors need only Θ ~ ( ε − 5 / 2 ) \widetilde{\Theta}(\varepsilon^{-5/2}) Θ ( ε − 5/2 ) . At A ≳ ε − 1 A \gtrsim\varepsilon^{-1} A ≳ ε − 1 , both deterministic terms are of order ε − 3 \varepsilon^{-3} ε − 3 , matching the deterministic multicalibration rate of Noarov and Roth [2027].
It is useful to visualize the group-budget dependence by writing A = ε − β A = \varepsilon^{-\beta} A = ε − β . Figure 1 summarizes the resulting sample-complexity landscape.
Figure 1. The group-budget rate landscape, with A = ε − β A = \varepsilon^{-\beta} A = ε − β and vertical axis the sample-complexity exponent of 1 / ε 1/\varepsilon 1/ ε , suppressing logarithmic factors. Blue and red give the tight randomized and deterministic calibrated multiaccuracy rates; teal gives the tight multicalibration rate. The open endpoints represent subpolynomial budgets.
Technical overview
A shared upper-bound template. Both upper bounds first learn a real valued intermediate score S ∈ [ 0 , 1 ] S \in[0,1] S ∈ [ 0 , 1 ] and then transform it into the final discrete prediction P P P . We call this second stage score coarsening : it replaces S S S by a predictor with finitely many prediction values.
The final objective involves two kinds of tests. Each g ∈ G g \in\mathcal{G} g ∈ G defines the multiaccuracy test ϕ g ( x , p ) = g ( x ) \phi_g(x,p) = g(x) ϕ g ( x , p ) = g ( x ) . Calibration also has a test-based form: writing Q Q Q for the final predictor and P ∼ Q X P \sim Q_X P ∼ Q X for its realized prediction,
ECE ( Q ) = sup h : [ 0 , 1 ] → { − 1 , 1 } E [ h ( P ) ( Y − P ) ] . \operatorname{ECE}(Q) = \sup_{h:[0,1]\to\{-1,1\}} \mathbb{E}[h(P)(Y-P)]. ECE ( Q ) = h : [ 0 , 1 ] → { − 1 , 1 } sup E [ h ( P ) ( Y − P )] .
Thus each sign-valued function h h h of the prediction defines a calibration test ϕ h ( x , p ) = h ( p ) \phi_h(x,p) = h(p) ϕ h ( x , p ) = h ( p ) .
Now fix a coarsening rule. For any bounded test ϕ ( x , p ) \phi(x,p) ϕ ( x , p ) of the context and final prediction, define its lift to the intermediate score by
ϕ ↑ ( x , s ) = E [ ϕ ( x , P ) ∣ X = x , S = s ] , \phi^\uparrow(x,s) = \mathbb{E}[\phi(x,P)\mid X=x,S=s], ϕ ↑ ( x , s ) = E [ ϕ ( x , P ) ∣ X = x , S = s ] ,
where the expectation is over any randomness in the coarsening rule. The rule uses no information about Y Y Y once ( X , S ) (X,S) ( X , S ) is fixed, and so Lemma 2.1 will give:
E [ ϕ ( X , P ) ( Y − P ) ] = E [ ϕ ↑ ( X , S ) ( Y − S ) ] + E [ ϕ ( X , P ) ( S − P ) ] . (1) \mathbb{E}[\phi(X,P)(Y-P)] = \mathbb{E}[\phi^\uparrow(X,S)(Y-S)] + \mathbb{E}[\phi(X,P)(S-P)]. \tag*{(1)} E [ ϕ ( X , P ) ( Y − P )] = E [ ϕ ↑ ( X , S ) ( Y − S )] + E [ ϕ ( X , P ) ( S − P )] . (1)
For a multiaccuracy test ϕ g \phi_g ϕ g , the lift is simply g g g . For a calibration test ϕ h \phi_h ϕ h , write
a h ( x , s ) = E [ h ( P ) ∣ X = x , S = s ] , a_h(x,s) = \mathbb{E}[h(P)\mid X=x,S=s], a h ( x , s ) = E [ h ( P ) ∣ X = x , S = s ] ,
for its lift. The score learner controls residuals of S S S against both the original tests g ∈ G g \in\mathcal{G} g ∈ G and these additional lifted calibration tests. The analysis of the coarsening rule controls the second term in the decomposition, and we choose the coarsening rule as a function of S S S to minimize it.
There is an apparent circularity: the chosen coarsening rule depends on the learned score, but its lifted tests must be known when the score is learned. Both algorithms resolve this by specifying a finite menu of candidate rules in advance and learning S S S against every induced lifted test. The randomized algorithm then chooses one rule from the menu. The deterministic algorithm will use different rules on different parts of the context space.
The randomized algorithm coarsens using mean-preserving rounding to a grid. The deterministic algorithm coarsens using category averaging: it partitions contexts into categories and replaces the scores in each category by their average. We next explain the main idea in each construction, followed by the two lower bounds.
Randomized upper bound
We process the i.i.d. training examples ( X 1 , Y 1 ) , … , ( X n , Y n ) (X_1,Y_1),\ldots,(X_n,Y_n) ( X 1 , Y 1 ) , … , ( X n , Y n ) sequentially, learning score rules s 1 , … , s n s_1,\ldots,s_n s 1 , … , s n . Rule s t s_t s t depends only on the preceding labeled examples ( X i , Y i ) i < t (X_i,Y_i)_{i<t} ( X i , Y i ) i < t . On observing X t X_t X t , it produces the score S t = s t ( X t ) S_t=s_t(X_t) S t = s t ( X t ) before observing Y t Y_t Y t . On a new input x x x , the intermediate predictor Q p r e Q^{\mathrm{pre}} Q pre draws an index J J J uniformly from [ n ] [n] [ n ] and outputs the score S = s J ( x ) S=s_J(x) S = s J ( x ) .
In addition to the original multiaccuracy tests G \mathcal{G} G , the learner controls a finite class A \mathcal{A} A of lifted calibration tests, corresponding to the linear interpolations of binary signs at points on a fixed candidate collection of grids. For every candidate grid and sign assignment to its points, A \mathcal{A} A contains the corresponding lift from (1) . After training, we choose a grid Γ ^ \widehat{\Gamma} Γ with O ( m ) O(m) O ( m ) intervals using the recorded scores S 1 , … , S n S_1,\ldots,S_n S 1 , … , S n . The parameter m m m trades off learning a larger auxiliary class against more accurate rounding. The final predictor rounds S S S to this grid while preserving its conditional mean. Figure 2 summarizes the construction.
Figure 2. Rule s t s_t s t is learned from the preceding examples and produces the recorded score S t = s t ( X t ) S_t=s_t(X_t) S t = s t ( X t ) before observing Y t Y_t Y t . These n n n scores determine a grid from the fixed candidate menu. On a new input, the final predictor evaluates a uniformly chosen saved score rule and then rounds its score to the selected grid while preserving its mean.
Learning the pre-rounded scores. We now bound the size of the auxiliary class A \mathcal{A} A , which is separate from the original multiaccuracy test class G \mathcal{G} G . Each candidate grid consists of O ( m ) O(m) O ( m ) partition points selected from a fixed fine mesh with polynomially many points in n n n , and each selected point receives a sign in { − 1 , 1 } \{-1,1\} { − 1 , 1 } in each calibration test defined on that grid. For every collection of O ( m ) O(m) O ( m ) grid points from the mesh and assignment of signs to the grid points, we include in A \mathcal{A} A the function that linearly interpolates the signs between the grid points. The choices of points and signs give at most exp ( O ( m log n ) ) \exp(O(m\log n)) exp ( O ( m log n )) lifted tests, so log ∣ A ∣ = O ( m log n ) \log|\mathcal{A}|=O(m\log n) log ∣ A ∣ = O ( m log n ) . Standard multiobjective learning methods (e.g. [13 ] (Lee et al. 2022; Noarov et al. 2025)) let us learn score rules promising:
max { sup g ∈ G ∣ 1 n ∑ t = 1 n g ( X t ) ( Y t − S t ) ∣ , sup a ∈ A ∣ 1 n ∑ t = 1 n a ( S t ) ( Y t − S t ) ∣ } ≲ log ∣ G ∣ + m log n n . \max\left\{\sup_{g\in\mathcal{G}}\left|\frac{1}{n}\sum_{t=1}^{n}g(X_t)(Y_t-S_t)\right|,\sup_{a\in\mathcal{A}}\left|\frac{1}{n}\sum_{t=1}^{n}a(S_t)(Y_t-S_t)\right|\right\}\lesssim\sqrt{\frac{\log|\mathcal{G}|+m\log n}{n}}. max { g ∈ G sup n 1 t = 1 ∑ n g ( X t ) ( Y t − S t ) , a ∈ A sup n 1 t = 1 ∑ n a ( S t ) ( Y t − S t ) } ≲ n log ∣ G ∣ + m log n .
Rounding for calibration. The original tests ensure multiaccuracy of the scores, but the auxiliary tests do not directly ensure calibration (since they correspond to lifts of calibration tests for scores that are restricted to discrete grids, but our learned scores are not confined to a grid). Deterministically rounding scores to m m m grid values can introduce Θ ( 1 / m ) \Theta(1/m) Θ ( 1/ m ) error; balancing this with the learning error m / n \sqrt{m/n} m / n gives only the n − 1 / 3 n^{-1/3} n − 1/3 rate from prior work. We instead randomly round S S S to one of its two neighboring grid points so that
E [ P ∣ S ] = S . \mathbb{E}[P\mid S]=S. E [ P ∣ S ] = S .
This preserves every prediction-independent multiaccuracy constraint without loss.
For calibration, fix a grid Γ = ( γ 0 , … , γ M ) \Gamma=(\gamma_0,\ldots,\gamma_M) Γ = ( γ 0 , … , γ M ) and a sign test h h h on its points. This rounding rule depends on S S S but not on X X X , so its lift is the function
a h ( s ) = E [ h ( P ) ∣ S = s ] . a_h(s)=\mathbb{E}[h(P)\mid S=s]. a h ( s ) = E [ h ( P ) ∣ S = s ] .
This function is the linear interpolant of the signs h ( γ j ) h(\gamma_j) h ( γ j ) and belongs to A \mathcal{A} A . It remains to control the error created by rounding. Write h j = h ( γ j ) h_j=h(\gamma_j) h j = h ( γ j ) and let q j q_j q j denote the coefficient measuring the expected rounding contribution from the j j j th interval:
q j = E [ ( S − γ j ) ( γ j + 1 − S ) γ j + 1 − γ j 1 { γ j < S < γ j + 1 } ] . q_j=\mathbb{E}\left[\frac{(S-\gamma_j)(\gamma_{j+1}-S)}{\gamma_{j+1}-\gamma_j}\mathbf{1}\{\gamma_j<S<\gamma_{j+1}\}\right]. q j = E [ γ j + 1 − γ j ( S − γ j ) ( γ j + 1 − S ) 1 { γ j < S < γ j + 1 } ] .
A direct calculation from the two-point rounding rule gives
E [ h ( P ) ( S − P ) ] = ∑ j = 0 M − 1 ( h j − h j + 1 ) q j . \mathbb{E}[h(P)(S-P)]=\sum_{j=0}^{M-1}(h_j-h_{j+1})q_j. E [ h ( P ) ( S − P )] = j = 0 ∑ M − 1 ( h j − h j + 1 ) q j .
The factor h j − h j + 1 h_j-h_{j+1} h j − h j + 1 creates the potential for cancellation between adjacent prediction values. If all the coefficients q j q_j q j were to equal a common value q q q , then the sum would telescope to
∑ j = 0 M − 1 ( h j − h j + 1 ) q = q ( h 0 − h M ) , \sum_{j=0}^{M-1}(h_j-h_{j+1})q=q(h_0-h_M), j = 0 ∑ M − 1 ( h j − h j + 1 ) q = q ( h 0 − h M ) ,
whose magnitude is at most 2 q 2q 2 q , independently of the number of intervals. This is the cancellation the construction will approximate. Set q − 1 = q M = 0 q_{-1}=q_M=0 q − 1 = q M = 0 . Taking the supremum over h h h and applying summation by parts shows that the worst rounding contribution is the endpoint-inclusive total variation of the q j q_j q j coefficients:
q 0 + q M − 1 + ∑ j = 1 M − 1 ∣ q j − q j − 1 ∣ = ∑ j = 0 M ∣ q j − q j − 1 ∣ . q_0+q_{M-1}+\sum_{j=1}^{M-1}|q_j-q_{j-1}|=\sum_{j=0}^{M}|q_j-q_{j-1}|. q 0 + q M − 1 + j = 1 ∑ M − 1 ∣ q j − q j − 1 ∣ = j = 0 ∑ M ∣ q j − q j − 1 ∣.
Thus we want a partition for which the coefficients ( q j ) (q_j) ( q j ) are nearly equal and small. We construct it directly from the recorded scores S 1 , … , S n S_1,\ldots,S_n S 1 , … , S n . Starting with a left endpoint a = 0 a=0 a = 0 , move the right endpoint b b b to the right along a fixed fine grid, tracking
q ^ ( a , b ) = 1 n ∑ t : a < S t < b ( S t − a ) ( b − S t ) b − a . \widehat{q}(a,b)=\frac{1}{n}\sum_{t:a<S_t<b}\frac{(S_t-a)(b-S_t)}{b-a}. q ( a , b ) = n 1 t : a < S t < b ∑ b − a ( S t − a ) ( b − S t ) .
This is the coefficient q j q_j q j for the candidate interval ( a , b ) (a,b) ( a , b ) , with the expectation replaced by the empirical average of the recorded scores. It is nondecreasing as b b b increases. End the interval at the first grid point where q ^ ( a , b ) \widehat{q}(a,b) q ( a , b ) reaches a common threshold τ ≍ m − 2 \tau\asymp m^{-2} τ ≍ m − 2 , then start the next interval there. If the threshold is never reached, end the final interval at 1 1 1 . This rule produces O ( m ) O(m) O ( m ) intervals whose empirical coefficients have total variation O ( m − 2 ) O(m^{-2}) O ( m − 2 ) . Figure 3 illustrates the cancellation.
Figure 3. The adaptive partition makes the coefficients ( q j ) (q_j) ( q j ) nearly equal. Top: the greedy rule places partition points γ j \gamma_j γ j from the marginal distribution of S S S , more densely where S S S has more mass, so that each full interval has coefficient close to τ ≍ m − 2 \tau\asymp m^{-2} τ ≍ m − 2 . Bottom: the resulting sequence is nearly flat. The terms q 0 q_0 q 0 and q M − 1 q_{M-1} q M − 1 are the boundary jumps from q − 1 = q M = 0 q_{-1}=q_M=0 q − 1 = q M = 0 ; only the final interval may fall below the threshold. The endpoint-inclusive total variation, and hence the calibration error from rounding, is O ( m − 2 ) O(m^{-2}) O ( m − 2 ) .
Each score rule s t s_t s t was chosen using only preceding examples. For each fixed candidate grid and test, a martingale bound controls the average residual from rounding the recorded scores by the average population residual of the saved score rules after rounding. The bound holds simultaneously for all candidate grids and tests, so it remains valid for the grid chosen using the recorded scores. Its statistical error is of order ( log ∣ G ∣ + m log n ) / n \sqrt{(\log|\mathcal{G}|+m\log n)/n} ( log ∣ G ∣ + m log n ) / n .
Applying (1) to a sign test h h h , the lifted residual is controlled because a h ∈ A a_h\in\mathcal{A} a h ∈ A , while the rounding contribution is O ( m − 2 ) O(m^{-2}) O ( m − 2 ) . The resulting error is
log ∣ G ∣ + m log n n + m − 2 . \sqrt{\frac{\log|\mathcal{G}|+m\log n}{n}}+m^{-2}. n log ∣ G ∣ + m log n + m − 2 .
Choosing m ≍ ( n / log n ) 1 / 5 m\asymp(n/\log n)^{1/5} m ≍ ( n / log n ) 1/5 gives the theorem.
Deterministic upper bound
Our randomized construction uses randomness in two places: the score function S S S it learns is already randomized, and the coarsening procedure adds additional randomness. To give a deterministic upper bound we need to remove both sources of randomness. Recall that A = max { 1 , log ∣ G ∣ } A = \max\{1, \log|\mathcal{G}|\} A = max { 1 , log ∣ G ∣ } denotes the group budget. To learn a deterministic score function, we use two components of the deterministic finite-test construction of Noarov and Roth [2027]: an algorithm that learns a randomized score satisfying a finite family of residual tests, followed by a procedure that fixes one random seed on each part of a finite context partition, making that score deterministic. Given a finite family of bounded tests a : X × [ 0 , 1 ] → [ − 1 , 1 ] a : \mathcal{X} \times[0,1] \to[-1,1] a : X × [ 0 , 1 ] → [ − 1 , 1 ] the resulting deterministic score S S S has small residual E [ a ( X , S ( X ) ) ( Y − S ( X ) ) ] \mathbb{E}[a(X,S(X))(Y-S(X))] E [ a ( X , S ( X )) ( Y − S ( X ))] for every test a a a . With N N N labeled examples and test family Φ \Phi Φ , the statistical error is O ~ ( log ∣ Φ ∣ / N ) \widetilde{O}(\sqrt{\log|\Phi|/N}) O ( log ∣Φ∣/ N ) . We include both the original multiaccuracy tests and auxiliary tests that anticipate the later coarsening. Lemma 5.5 gives the precise guarantee.
The main difficulty is in removing the randomness of the coarsening rule. Why does deterministic prediction need a different coarsening rule, rather than there being a simple derandomization of our randomized rounding procedure? If the context distribution were discrete and every context were rare, we could fix one independent rounding coin per context: each test would average many low-influence choices, and the realized calibrated multiaccuracy error would be close to its expectation, resulting in a simple derandomization of our randomized construction. This fails if certain contexts have substantial mass, since now fixing the randomness on each context might be a high variance operation. On the other hand, very frequent contexts can be identified in the training sample and their conditional label means estimated. Thus very frequent contexts could be handled as a special case. At the target sample size, however, a context can have enough probability mass that fixing its coin causes substantial error, yet appear too few times to estimate its conditional label mean to the required accuracy. Our construction does give each very frequent context its own category and keeps its score unchanged. But rather than attempting to fix the randomness of other contexts it handles all remaining contexts collectively by assigning them to a small number of categories and replacing the scores in each category by their average. This is the deterministic score-coarsening step.
Category averaging. Assign each sufficiently frequent context its own singleton category, and assign all remaining contexts to K + 1 K+1 K + 1 shared categories. On every category C j C_j C j , set the final prediction to p ( x ) = E [ S ( X ) ∣ X ∈ C j ] p(x)=\mathbb{E}[S(X)\mid X\in C_j] p ( x ) = E [ S ( X ) ∣ X ∈ C j ] ; on a singleton this simply retains the original score. This results in a predictor that is calibrated to the score S S S (but without further argument, not yet to the labels Y Y Y ). To obtain calibration relative to Y Y Y , it suffices to make every signed combination of the category residuals e j = E [ 1 { X ∈ C j } ( Y − S ) ] e_j=\mathbb{E}[1\{X\in C_j\}(Y-S)] e j = E [ 1 { X ∈ C j } ( Y − S )] small. Maximizing ∑ j σ j e j \sum_j \sigma_j e_j ∑ j σ j e j over signs gives ∑ j ∣ e j ∣ \sum_j |e_j| ∑ j ∣ e j ∣ , and category averaging preserves each residual. Indeed, applying Lemma 2.1 with ϕ j ( x , p ) = 1 { x ∈ C j } \phi_j(x,p)=1\{x\in C_j\} ϕ j ( x , p ) = 1 { x ∈ C j } and using E [ S − p ∣ X ∈ C j ] = 0 \mathbb{E}[S-p\mid X\in C_j]=0 E [ S − p ∣ X ∈ C j ] = 0 gives
E [ 1 { X ∈ C j } ( Y − p ) ] = E [ 1 { X ∈ C j } ( Y − S ) ] . \mathbb{E}[1\{X\in C_j\}(Y-p)] = \mathbb{E}[1\{X\in C_j\}(Y-S)]. E [ 1 { X ∈ C j } ( Y − p )] = E [ 1 { X ∈ C j } ( Y − S )] .
We establish this control using the auxiliary tests and the assignment analysis below.
Writing P X P_X P X for the marginal distribution of X X X , for any test h h h the change in the multiaccuracy residual of p p p relative to S S S is a sum of within-category covariances (singleton categories contribute zero):
E [ h ( X ) ( S ( X ) − p ( X ) ) ] = ∑ j = 0 K P X ( C j ) Cov ( h ( X ) , S ( X ) ∣ X ∈ C j ) . \mathbb{E}[h(X)(S(X)-p(X))] = \sum_{j=0}^{K} P_X(C_j)\operatorname{Cov}(h(X),S(X)\mid X\in C_j). E [ h ( X ) ( S ( X ) − p ( X ))] = j = 0 ∑ K P X ( C j ) Cov ( h ( X ) , S ( X ) ∣ X ∈ C j ) .
It remains to choose categories for which all these covariance sums are small.
Choosing the categories. Let H = G ∪ ( − G ) \mathcal{H}=\mathcal{G}\cup(-\mathcal{G}) H = G ∪ ( − G ) , so controlling the largest residual over H \mathcal{H} H controls absolute error for every test in G \mathcal{G} G . Endow the tests in H \mathcal{H} H temporarily with a distribution π \pi π . Leave the sufficiently frequent contexts in their singleton categories, where their scores remain unchanged. Partition all other contexts into low-mass parts. For each part U U U , independently sample m s p m_{\mathrm{sp}} m sp tests from π \pi π and average them:
f U ( x ) = 1 m s p ∑ ℓ = 1 m s p h U , ℓ ( x ) . f_U(x)=\frac{1}{m_{\mathrm{sp}}}\sum_{\ell=1}^{m_{\mathrm{sp}}}h_{U,\ell}(x). f U ( x ) = m sp 1 ℓ = 1 ∑ m sp h U , ℓ ( x ) .
Here h U , 1 , … , h U , m s p h_{U,1},\ldots,h_{U,m_{\mathrm{sp}}} h U , 1 , … , h U , m sp are the sampled tests, and we write U ( x ) U(x) U ( x ) for the part containing x x x . We assign x ∈ U x\in U x ∈ U to a category by rounding the scalar f U ( x ) + λ c a t S ( x ) f_U(x)+\lambda_{\mathrm{cat}}S(x) f U ( x ) + λ cat S ( x ) , where λ c a t > 0 \lambda_{\mathrm{cat}}>0 λ cat > 0 controls the relative weight on the score, to an equally spaced grid of K + 1 K+1 K + 1 values; write J ( x ) J(x) J ( x ) for the resulting category index. The score learner includes the signed category tests for every rule that uses one tuple from H m s p \mathcal{H}^{m_{\mathrm{sp}}} H m sp throughout the context space. The expected residual under the cellwise choices is an average of these finite-menu residuals; we later use concentration to fix the choices.
Why the assignment rule preserves multiaccuracy. Fix the sampled tests and consider a shared category C j C_j C j . By construction, f U ( x ) ( x ) + λ c a t S ( x ) f_{U(x)}(x)+\lambda_{\mathrm{cat}}S(x) f U ( x ) ( x ) + λ cat S ( x ) is close to the grid point u j u_j u j defining this category. Because p p p is the average of S S S within C j C_j C j , the difference S − p S-p S − p has mean zero conditional on X ∈ C j X\in C_j X ∈ C j . Since p p p is constant on C j C_j C j , we also have
E [ S ( S − p ) ∣ X ∈ C j ] = E [ ( S − p ) 2 ∣ X ∈ C j ] + p E [ S − p ∣ X ∈ C j ] = E [ ( S − p ) 2 ∣ X ∈ C j ] . \mathbb{E}[S(S-p)\mid X\in C_j]=\mathbb{E}[(S-p)^2\mid X\in C_j]+p\mathbb{E}[S-p\mid X\in C_j]
=\mathbb{E}[(S-p)^2\mid X\in C_j]. E [ S ( S − p ) ∣ X ∈ C j ] = E [( S − p ) 2 ∣ X ∈ C j ] + p E [ S − p ∣ X ∈ C j ] = E [( S − p ) 2 ∣ X ∈ C j ] .
Since u j u_j u j is constant within C j C_j C j , its contribution is exactly zero:
E [ u j ( S − p ) ∣ X ∈ C j ] = u j E [ S − p ∣ X ∈ C j ] = 0. \mathbb{E}[u_j(S-p)\mid X\in C_j]=u_j\mathbb{E}[S-p\mid X\in C_j]=0. E [ u j ( S − p ) ∣ X ∈ C j ] = u j E [ S − p ∣ X ∈ C j ] = 0.
Subtracting u j u_j u j and using the identity for S ( S − p ) S(S-p) S ( S − p ) therefore gives
E [ f U ( X ) ( X ) ( S − p ) ∣ X ∈ C j ] = − λ c a t E [ ( S − p ) 2 ∣ X ∈ C j ] + E [ ( f U ( X ) ( X ) + λ c a t S − u j ) ( S − p ) ∣ X ∈ C j ] . \mathbb{E}[f_{U(X)}(X)(S-p)\mid X\in C_j]=-\lambda_{\mathrm{cat}}\mathbb{E}[(S-p)^2\mid X\in C_j]
+\mathbb{E}[(f_{U(X)}(X)+\lambda_{\mathrm{cat}}S-u_j)(S-p)\mid X\in C_j]. E [ f U ( X ) ( X ) ( S − p ) ∣ X ∈ C j ] = − λ cat E [( S − p ) 2 ∣ X ∈ C j ] + E [( f U ( X ) ( X ) + λ cat S − u j ) ( S − p ) ∣ X ∈ C j ] .
The first term is nonpositive: it subtracts λ c a t \lambda_{\mathrm{cat}} λ cat times the mean squared change in predictions within this category. The second term is the grid approximation error, which we bound below.
We now average over the sampled tests as well. Write V = E [ ( S − p ) 2 ] V=\mathbb{E}[(S-p)^2] V = E [( S − p ) 2 ] for the expected squared change caused by category averaging, where the expectation includes both the context and the randomly sampled tests. Let d h ( π ) d_h(\pi) d h ( π ) be the corresponding expected change in the residual for test h h h from category averaging.
For each context assigned to a shared category, f U ( x ) f_U(x) f U ( x ) averages m s p m_{\mathrm{sp}} m sp independent tests in [ − 1 , 1 ] [-1,1] [ − 1 , 1 ] . It therefore has mean f π ( x ) = E h ∼ π [ h ( x ) ] f_\pi(x)=\mathbb{E}_{h\sim\pi}[h(x)] f π ( x ) = E h ∼ π [ h ( x )] and mean-squared error at most 1 / m s p 1/m_{\mathrm{sp}} 1/ m sp . Replacing f U f_U f U by f π f_\pi f π in the residual multiplies this error by S − p S-p S − p . Cauchy–Schwarz, averaging over both contexts and sampled tests, bounds the resulting contribution by V / m s p \sqrt{V/m_{\mathrm{sp}}} V / m sp . This does not require independence between S − p S-p S − p and the sampling error.
For the grid error, let w w w denote the grid spacing. For x ∈ C j x\in C_j x ∈ C j , the assignment score f U ( x ) ( x ) + λ c a t S ( x ) f_U(x)(x)+\lambda_{\mathrm{cat}}S(x) f U ( x ) ( x ) + λ cat S ( x ) is within w / 2 w/2 w /2 of u j u_j u j . Averaging over contexts and sampled tests, the absolute contribution of the grid approximation error is therefore at most
w 2 E ∣ S − p ∣ ≤ w 2 V . \frac{w}{2}\mathbb{E}|S-p|\leq\frac{w}{2}\sqrt{V}. 2 w E ∣ S − p ∣ ≤ 2 w V .
Contexts whose scores remain unchanged contribute zero to both errors. Adding the bounds and using that f π f_\pi f π is the π \pi π -weighted average of the tests gives
∑ h ∈ H π ( h ) d h ( π ) ≤ e a p p V − λ c a t V , e a p p = w 2 + 1 m s p . \sum_{h\in\mathcal{H}} \pi(h)d_h(\pi) \le e_{\mathrm{app}}\sqrt{V}-\lambda_{\mathrm{cat}}V,\qquad e_{\mathrm{app}}=\frac{w}{2}+\frac{1}{\sqrt{m_{\mathrm{sp}}}}. h ∈ H ∑ π ( h ) d h ( π ) ≤ e app V − λ cat V , e app = 2 w + m sp 1 .
Finally recall that the distribution π \pi π is not intrinsic to the problem, and that we are free to choose it. A fixed-point argument chooses π \pi π self-consistently so that it places weight only on tests maximizing d h ( π ) d_h(\pi) d h ( π ) . Hence
max h d h ( π ) = ∑ h π ( h ) d h ( π ) . \max_h d_h(\pi)=\sum_h \pi(h)d_h(\pi). h max d h ( π ) = h ∑ π ( h ) d h ( π ) .
The negative quadratic term now bounds both the largest residual increase and V V V . Lemma 5.3 makes this argument precise. This is the conceptual core of the deterministic upper bound. The argument applies to any context distribution, including an empirical one. The training algorithm therefore searches for a mixture with small expected empirical residuals and then fixes the random category assignments.
Fixing the category assignments. The preceding argument selects a distribution over category assignments. The training algorithm now draws and stores one test set for every low-mass part U U U . This produces a fixed category map and hence a deterministic predictor. A variance-sensitive concentration bound shows that the multiaccuracy residuals remain small with high probability over the training randomness. We apply this argument to the empirical context distribution, using S S S as the label. Calibration relative to S S S is then exact for every assignment: each category predicts its empirical average score. It remains to transfer both guarantees to the population and the true labels Y Y Y .
Implementing the population argument from samples. A preprocessing sample is used to identify frequent contexts, build confidence intervals for their conditional means, and partition the remaining space into low-mass parts. A second labeled sample is used to learn S S S . On a fresh context-only sample, the algorithm then chooses the assignment distribution and computes the final category averages. A transfer argument compares the final predictor’s population residuals against Y Y Y with its empirical residuals against S S S , for both group tests and signs on categories. The finite-menu score guarantees and sample concentration control the expected difference; the confidence radii and squared part masses control fluctuations across the independent assignments. This comparison is uniform over the category averages. Thus the same context sample can both be used to select the assignments and supply their predictions. § 5 gives the details.
The error beyond the score-learning term is O ( A / K 3 ) O(\sqrt{A/K^3}) O ( A / K 3 ) . Balancing it with the target error ε \varepsilon ε gives K ≍ ( A / ε 2 ) 1 / 3 K\asymp(A/\varepsilon^2)^{1/3} K ≍ ( A / ε 2 ) 1/3 . Learning the resulting finite test class uses O ~ ( ( A + K ) / ε 2 ) \widetilde{O}((A+K)/\varepsilon^2) O (( A + K ) / ε 2 ) samples, and hence
O ~ ( A ε 2 + A 1 / 3 ε 8 / 3 ) . \widetilde{O}\left(\frac{A}{\varepsilon^2}+\frac{A^{1/3}}{\varepsilon^{8/3}}\right). O ( ε 2 A + ε 8/3 A 1/3 ) .
The matching lower bound shows that this unusual cube-root dependence on A A A is intrinsic. § 5 gives the formal construction and proof.
Lower bounds
A shared hard family with different decoding mechanisms. Both lower bounds use the same basic construction. On an ordered finite domain, the conditional mean at point i i i is a known increasing baseline value plus a small perturbation determined by a hidden randomly chosen sign vector θ \theta θ . We show that a low-error predictor could be used to decode many coordinates of θ \theta θ . The shared recovery bound in Lemma 6.2 then shows that too few samples cannot produce such a predictor.
What differs in the two bounds is how the predictor reveals the hidden vector. For an arbitrary randomized predictor, calibration and multiaccuracy with respect to the single test g ( x ) = x g(x)=x g ( x ) = x force the realized prediction close to the public baseline in squared error. This controls distance at the relatively coarse scale ε \sqrt{\varepsilon} ε , enough to distinguish a grid of k ≍ ε − 1 / 2 k \asymp\varepsilon^{-1/2} k ≍ ε − 1/2 points and give the ε − 5 / 2 \varepsilon^{-5/2} ε − 5/2 lower bound. For a deterministic predictor, we use the test-family budget A A A to resolve more points. On a domain of R R R ordered points, a family of exp ( Θ ( A ) ) \exp(\Theta(A)) exp ( Θ ( A )) sign tests forces the average distance between p ( i ) p(i) p ( i ) and the public baseline to be at most O ( ε R / A ) O(\varepsilon\sqrt{R/A}) O ( ε R / A ) . The baseline values are spaced 1 / R 1/R 1/ R apart, so balancing these two scales gives R ≍ A 1 / 3 ε − 2 / 3 R \asymp A^{1/3}\varepsilon^{-2/3} R ≍ A 1/3 ε − 2/3 . For this choice, most prediction values are distinct and hence form singleton level sets. Calibration on these singletons reveals Ω ( R ) \Omega(R) Ω ( R ) coordinates of θ \theta θ , and the resulting information bound gives the A 1 / 3 ε − 8 / 3 A^{1/3}\varepsilon^{-8/3} A 1/3 ε − 8/3 lower-bound term.
Randomized predictors. The randomized lower bound uses the finite-domain construction of Gibbs and Tibshirani [ [15 ] for deterministic predictors, with the single bounded test g ( x ) = x g(x)=x g ( x ) = x . A sample draws a uniform grid index I ∈ { 1 , … , k } I \in\{1,\ldots,k\} I ∈ { 1 , … , k } and sets X = x I X=x_I X = x I , where x i = i / k x_i=i/k x i = i / k . The label Y Y Y is Bernoulli with conditional mean
E [ Y ∣ X = x i ] = b i + Δ θ i , b i = 1 4 + x i 2 , Δ ≍ k − 2 . \mathbb{E}[Y \mid X=x_i]=b_i+\Delta\theta_i,\qquad b_i=\frac{1}{4}+\frac{x_i}{2},\qquad\Delta\asymp k^{-2}. E [ Y ∣ X = x i ] = b i + Δ θ i , b i = 4 1 + 2 x i , Δ ≍ k − 2 .
where the hidden bits θ 1 , … , θ k \theta_1,\ldots,\theta_k θ 1 , … , θ k are chosen independently and uniformly from { 0 , 1 } \{0,1\} { 0 , 1 } . Calibration controls E [ Y − P ] \mathbb{E}[Y-P] E [ Y − P ] and E [ P ( Y − P ) ] \mathbb{E}[P(Y-P)] E [ P ( Y − P )] , and multiaccuracy controls E [ X ( Y − P ) ] \mathbb{E}[X(Y-P)] E [ X ( Y − P )] . Since the baseline is linear in X X X , combining these moments bounds E [ ( P − b I ) 2 ] \mathbb{E}[(P-b_I)^2] E [( P − b I ) 2 ] by O ( ε + Δ 2 ) O(\varepsilon+\Delta^2) O ( ε + Δ 2 ) . The baselines are separated by Θ ( 1 / k ) \Theta(1/k) Θ ( 1/ k ) , so at the target accuracy a prediction is closest to its input’s baseline most of the time.
To recover the hidden bits, group prediction values by their nearest baseline value. Calibration controls the total label residual in each such bin. Subtracting the contribution of b I b_I b I , the original input’s baseline value, from the predictions in a bin therefore estimates its hidden offset. Predictions assigned to incorrect bins affect only a small fraction of the mass, so thresholding these estimates recovers most of the bits. § 6 gives the quantitative argument.
Deterministic predictors. The deterministic lower bound uses R R R ordered points with public baseline values t 1 < ⋯ < t R t_1<\cdots<t_R t 1 < ⋯ < t R separated by Θ ( 1 / R ) \Theta(1/R) Θ ( 1/ R ) . The conditional mean at point i i i is t i + Θ ( ε ) θ i t_i+\Theta(\varepsilon)\theta_i t i + Θ ( ε ) θ i for an unknown sign θ i \theta_i θ i .
We construct a family of sign tests with a detection property: unless the average distance between p i = p ( i ) p_i=p(i) p i = p ( i ) and t i t_i t i is small, some test has noticeable correlation with ( t i − p i ) i = 1 R (t_i-p_i)_{i=1}^R ( t i − p i ) i = 1 R . The strength of this property grows with the test budget. Multiaccuracy therefore places p i p_i p i within a small fraction of the baseline spacing for most indices.
This is where determinism enters. A deterministic predictor partitions the domain into level sets { i : p i = v } \{i:p_i=v\} { i : p i = v } . No two indices whose predictions are close to their respective baselines can share a value, because the baselines are separated. Moreover, any such index that does share its value must share it with one of the few poorly approximated indices. Hence most points form singleton prediction level sets.
On a singleton level set { i } \{i\} { i } , calibration compares p i p_i p i directly with t i + Θ ( ε ) θ i t_i+\Theta(\varepsilon)\theta_i t i + Θ ( ε ) θ i . The sign of p i − t i p_i-t_i p i − t i must therefore recover θ i \theta_i θ i on most such points; otherwise their calibration errors add up. Thus low multiaccuracy error and low ECE decode a constant fraction of the hidden signs. Flipping one sign changes the label mean by O ( ε ) O(\varepsilon) O ( ε ) at only one of the R R R equally likely contexts, so the shared recovery lemma requires Ω ( R / ε 2 ) \Omega(R/\varepsilon^2) Ω ( R / ε 2 ) samples. With R ≍ A 1 / 3 ε − 2 / 3 R \asymp A^{1/3}\varepsilon^{-2/3} R ≍ A 1/3 ε − 2/3 , this is the claimed Ω ( A 1 / 3 ε − 8 / 3 ) \Omega(A^{1/3}\varepsilon^{-8/3}) Ω ( A 1/3 ε − 8/3 ) bound.
This argument does not extend to randomized predictors because the sign tests force only the mean prediction p ˉ ( i ) = E [ P ∣ X = i ] \bar{p}(i) = \mathbb{E}[P \mid X = i] p ˉ ( i ) = E [ P ∣ X = i ] close to t i t_i t i , whereas calibration conditions on the realized P P P . For a deterministic predictor, P = p ˉ ( X ) = p ( X ) P = \bar{p}(X) = p(X) P = p ˉ ( X ) = p ( X ) , so both constraints concern the same level sets.
Related work
Calibration goes back at least to Dawid [ [10 ] . Hébert-Johnson et al. [ [19 ] introduced multicalibration and also studied, under the name multi-AE , the groupwise mean-accuracy condition now called multiaccuracy (cf. [22 ] ). These conditions were initially motivated as fairness guarantees that prevent systematic bias on algorithmically identifiable subpopulations. Dwork et al. [ [12 ] later placed them in a hierarchy of outcome-indistinguishability conditions: the lower levels recover multiaccuracy and multicalibration, while the stronger levels permit tests with greater access to the predictor. Omniprediction supplied a compelling downstream motivation by connecting these conditions to simultaneous loss minimization [16 , 17 ] . Subsequent work showed that full multicalibration is stronger than necessary for several of these applications, including omniprediction [17 , 14 ] (Okoroafor et al. 2025). Sharp lower bounds for multicalibration in both batch and online settings further motivate the study of weaker conditions [9 , 8 ] .
Gopalan et al. [ [17 ] show that calibrated multiaccuracy suffices for omniprediction for important classes of losses. Casacuberta et al. [ [4 ] study calibrated multiaccuracy more generally and show that it recovers strong agnostic learning and optimal-density hardcore measures, consequences that had previously been obtained using stronger multicalibration-based tools. Dwork and Tankala [ [11 ] similarly show that the multicalibration-based characterization of product-distribution indistinguishability due to Marcussen et al. [2025] can be obtained from calibrated multiaccuracy.
These applications motivate understanding the statistical complexity of calibrated multiaccuracy, a study initiated by Gibbs and Tibshirani [ [15 ] . They prove an Ω ( ε − 5 / 2 ) \Omega(\varepsilon^{-5/2}) Ω ( ε − 5/2 ) sample lower bound for algorithms whose output is a deterministic predictor. They also prove a multiaccuracy lower bound that gives the log ∣ G ∣ / ε 2 \log|\mathcal{G}|/\varepsilon^2 log ∣ G ∣/ ε 2 term in our randomized lower bound after specializing to a finite bounded test family. Our ε − 5 / 2 \varepsilon^{-5/2} ε − 5/2 lower bound uses their hard family, with a decoder that also applies to randomized predictors.
Several other papers compare randomized and deterministic prediction in batch learning. Noarov and Roth [2027] show that randomized predictors are not needed for minimax-optimal learning of multicalibrated predictors, in contrast to what we find for calibrated multiaccuracy. Agnostic multi-distribution learning is another problem where randomization is needed. In that problem, the learning algorithm seeks one predictor whose worst-case risk is small across several data distributions. Recent work gives near-optimal sample complexity for VC classes [Peng, 2024, Zhang et al., 2024]; in particular, Zhang et al. [2024] obtain the optimal order with randomized hypotheses and prove that deterministic hypotheses can require more samples. Larsen et al. [2024] show further that, in the fully general multi-distribution setting, derandomizing such predictors can be computationally hard even when ERM over the benchmark class is efficient. Our setting is different: calibrated multiaccuracy is evaluated under a single joint distribution, not by worst-case risk across several distributions. The connection is that both lines of work identify natural batch learning objectives for which randomized prediction can reduce sample complexity.
Setting and calibration definitions
Let ( X , Y ) ∼ D (X,Y)\sim\mathcal{D} ( X , Y ) ∼ D , where X ∈ X X\in\mathcal{X} X ∈ X and Y ∈ [ 0 , 1 ] Y\in[0,1] Y ∈ [ 0 , 1 ] , and write P X P_X P X for the marginal distribution of X X X . A randomized predictor Q = ( Q x ) x ∈ X Q=(Q_x)_{x\in\mathcal{X}} Q = ( Q x ) x ∈ X assigns to each input x x x a distribution Q x Q_x Q x on [ 0 , 1 ] [0,1] [ 0 , 1 ] . When evaluating the predictor, we draw P ∼ Q X P\sim Q_X P ∼ Q X using randomness independent of Y Y Y conditional on X X X . All expectations below include this prediction randomness. We write the error as a function of the predictor Q Q Q , with the realized prediction P P P appearing inside the defining expectations.
For a finite class G \mathcal{G} G of maps g : X → [ − 1 , 1 ] g:\mathcal{X}\to[-1,1] g : X → [ − 1 , 1 ] , define the multiaccuracy error of a predictor as:
MA ( Q ; G ) = sup g ∈ G ∣ E [ g ( X ) ( Y − P ) ] ∣ . \operatorname{MA}(Q;\mathcal{G})=\sup_{g\in\mathcal{G}}\left|\mathbb{E}[g(X)(Y-P)]\right|. MA ( Q ; G ) = g ∈ G sup ∣ E [ g ( X ) ( Y − P )] ∣ .
The population expected calibration error is
ECE ( Q ) = E ∣ E [ Y − P ∣ P ] ∣ . \operatorname{ECE}(Q)=\mathbb{E}\left|\mathbb{E}[Y-P\mid P]\right|. ECE ( Q ) = E ∣ E [ Y − P ∣ P ] ∣ .
Equivalently,
ECE ( Q ) = sup h : [ 0 , 1 ] → { − 1 , 1 } E [ h ( P ) ( Y − P ) ] , (2) \operatorname{ECE}(Q)=\sup_{h:[0,1]\to\{-1,1\}}\mathbb{E}[h(P)(Y-P)], \tag*{(2)} ECE ( Q ) = h : [ 0 , 1 ] → { − 1 , 1 } sup E [ h ( P ) ( Y − P )] , (2)
where h h h ranges over sign-valued one-dimensional tests of the prediction value. This is equivalent to the absolute-value definition because the supremum is attained by choosing h ( P ) h(P) h ( P ) to be the sign of E [ Y − P ∣ P ] \mathbb{E}[Y-P\mid P] E [ Y − P ∣ P ] , with either sign chosen when this conditional expectation is zero.
The calibrated multiaccuracy error of a predictor is
CMA ( Q ; G ) = max { MA ( Q ; G ) , ECE ( Q ) } . \operatorname{CMA}(Q;\mathcal{G})=\max\{\operatorname{MA}(Q;\mathcal{G}),\operatorname{ECE}(Q)\}. CMA ( Q ; G ) = max { MA ( Q ; G ) , ECE ( Q )} .
A score coarsening identity
Both upper bounds learn an intermediate score and then coarsen it. The following simple identity separates the residual already controlled while learning the score from the error introduced by this coarsening.
Lemma 2.1 (Residual decomposition under postprocessing). Let ( X , Y , S ) (X,Y,S) ( X , Y , S ) be jointly distributed, with S ∈ [ 0 , 1 ] S\in[0,1] S ∈ [ 0 , 1 ] . For each input-score pair ( x , s ) (x,s) ( x , s ) , let R x , s R_{x,s} R x , s be a distribution on [ 0 , 1 ] [0,1] [ 0 , 1 ] , and draw the postprocessed prediction P ∼ R X , S P\sim R_{X,S} P ∼ R X , S using randomness independent of Y Y Y conditional on ( X , S ) (X,S) ( X , S ) . For a bounded test ϕ : X × [ 0 , 1 ] → [ − 1 , 1 ] \phi:\mathcal{X}\times[0,1]\to[-1,1] ϕ : X × [ 0 , 1 ] → [ − 1 , 1 ] , define its lift to the intermediate score by
ϕ † ( x , s ) = E P ∼ R x , s [ ϕ ( x , P ) ] . \phi^\dagger(x,s)=\mathbb{E}_{P\sim R_{x,s}}[\phi(x,P)]. ϕ † ( x , s ) = E P ∼ R x , s [ ϕ ( x , P )] . Then
E [ ϕ ( X , P ) ( Y − P ) ] = E [ ϕ † ( X , S ) ( Y − S ) ] + E [ ϕ ( X , P ) ( S − P ) ] . (3) \mathbb{E}[\phi(X,P)(Y-P)]=\mathbb{E}[\phi^\dagger(X,S)(Y-S)]+\mathbb{E}[\phi(X,P)(S-P)]. \tag*{(3)} E [ ϕ ( X , P ) ( Y − P )] = E [ ϕ † ( X , S ) ( Y − S )] + E [ ϕ ( X , P ) ( S − P )] . (3)
Proof. Split Y − P = ( Y − S ) + ( S − P ) Y-P=(Y-S)+(S-P) Y − P = ( Y − S ) + ( S − P ) . Conditional independence gives
E [ ϕ ( X , P ) ( Y − S ) ∣ X , S ] = ϕ † ( X , S ) E [ Y − S ∣ X , S ] . \mathbb{E}[\phi(X,P)(Y-S)\mid X,S]=\phi^\dagger(X,S)\mathbb{E}[Y-S\mid X,S]. E [ ϕ ( X , P ) ( Y − S ) ∣ X , S ] = ϕ † ( X , S ) E [ Y − S ∣ X , S ] .
Taking expectations and applying the tower property to the right-hand side proves the identity. □
The first term in (3) explains why the score learner will anticipate a finite menu of rules: it controls the corresponding lifted tests before the data are used to select a rule or a distribution over rules. The two upper bounds differ in how they control the second term.
Ingredients for the randomized upper bound
Learning against finitely many residual tests
The first ingredient is a standard online algorithm that controls finitely many residual tests. Such multiobjective learning arguments have been used for online multiaccuracy and multicalibration [18 , 13 ] (Lee et al. 2022; Noarov et al. 2025). We use its predictions to choose the rounding partition, then convert the rounded predictions into a batch predictor. Appendix D gives the standard analysis for completeness.
Lemma 3.1 (Online residual control for finite tests). Let N ≥ 1 N \ge1 N ≥ 1 , and let Φ \Phi Φ be a finite nonempty class of tests ϕ : X × [ 0 , 1 ] → [ − 1 , 1 ] \phi: \mathcal{X} \times[0,1] \to[-1,1] ϕ : X × [ 0 , 1 ] → [ − 1 , 1 ] that are continuous in their second argument. There is an online algorithm that, before round t t t , determines a prediction rule s t : X → [ 0 , 1 ] s_t : \mathcal{X} \to[0,1] s t : X → [ 0 , 1 ] from the preceding examples. It observes X t X_t X t , predicts S t = s t ( X t ) S_t = s_t(X_t) S t = s t ( X t ) , and then observes Y t Y_t Y t . For every sequence of examples in X × [ 0 , 1 ] \mathcal{X} \times[0,1] X × [ 0 , 1 ] ,
sup ϕ ∈ Φ ∣ 1 N ∑ t = 1 N ϕ ( X t , S t ) ( Y t − S t ) ∣ ≤ C log ( 2 ∣ Φ ∣ ) N . \sup_{\phi\in\Phi}\left|\frac{1}{N}\sum_{t=1}^{N}\phi(X_t,S_t)(Y_t-S_t)\right| \le C\sqrt{\frac{\log(2|\Phi|)}{N}}. ϕ ∈ Φ sup N 1 t = 1 ∑ N ϕ ( X t , S t ) ( Y t − S t ) ≤ C N log ( 2∣Φ∣ ) .
This lemma controls the empirical residuals of the sequential predictions. For i.i.d. examples, a martingale argument will transfer the final rounded residuals to the population in the proof of Theorem 4.1 . The deterministic upper bound uses an analogous finite-test learner in Lemma 5.5, with additional structure to make the intermediate predictor deterministic.
Mean-preserving randomized rounding
The second ingredient is a one-dimensional randomized rounding scheme. It rounds an intermediate prediction to finitely many values while preserving its conditional mean.
Fix a grid increment ρ > 0 \rho> 0 ρ > 0 such that 1 / ρ 1/\rho 1/ ρ is an integer, and write
Λ ρ = { 0 , ρ , 2 ρ , … , 1 } . \Lambda_\rho= \{0,\rho,2\rho,\ldots,1\}. Λ ρ = { 0 , ρ , 2 ρ , … , 1 } .
A grid partition is a sequence
Γ = ( γ 0 , … , γ M ) , 0 = γ 0 < γ 1 < ⋯ < γ M = 1 , γ j ∈ Λ ρ . \Gamma= (\gamma_0,\ldots,\gamma_M), \qquad0=\gamma_0<\gamma_1<\cdots<\gamma_M=1, \qquad\gamma_j \in\Lambda_\rho. Γ = ( γ 0 , … , γ M ) , 0 = γ 0 < γ 1 < ⋯ < γ M = 1 , γ j ∈ Λ ρ .
We call γ 0 , … , γ M \gamma_0,\ldots,\gamma_M γ 0 , … , γ M the partition points. Given Γ \Gamma Γ , define the adjacent mean-preserving randomized rounding rule Round Γ \operatorname{Round}_{\Gamma} Round Γ as follows. If s ∈ [ γ j , γ j + 1 ] s \in[\gamma_j,\gamma_{j+1}] s ∈ [ γ j , γ j + 1 ] , let Δ j = γ j + 1 − γ j \Delta_j=\gamma_{j+1}-\gamma_j Δ j = γ j + 1 − γ j and set
P ( Round Γ ( s ) = γ j ) = γ j + 1 − s Δ j , P ( Round Γ ( s ) = γ j + 1 ) = s − γ j Δ j . \mathbb{P}(\operatorname{Round}_{\Gamma}(s)=\gamma_j)=\frac{\gamma_{j+1}-s}{\Delta_j}, \qquad\mathbb{P}(\operatorname{Round}_{\Gamma}(s)=\gamma_{j+1})=\frac{s-\gamma_j}{\Delta_j}. P ( Round Γ ( s ) = γ j ) = Δ j γ j + 1 − s , P ( Round Γ ( s ) = γ j + 1 ) = Δ j s − γ j .
At a partition point either adjacent interval gives the same prediction P = s P=s P = s . The rule preserves the conditional mean: if S = s ∈ [ γ j , γ j + 1 ] S=s \in[\gamma_j,\gamma_{j+1}] S = s ∈ [ γ j , γ j + 1 ] , then
E [ P ∣ S = s ] = γ j γ j + 1 − s Δ j + γ j + 1 s − γ j Δ j = γ j γ j + 1 − γ j s + γ j + 1 s − γ j γ j + 1 Δ j = s . \begin{aligned}
\mathbb{E}[P\mid S=s]=\gamma_j\frac{\gamma_{j+1}-s}{\Delta_j}+\gamma_{j+1}\frac{s-\gamma_j}{\Delta_j} \\
&=\frac{\gamma_j\gamma_{j+1}-\gamma_js+\gamma_{j+1}s-\gamma_j\gamma_{j+1}}{\Delta_j}=s.
\end{aligned} E [ P ∣ S = s ] = γ j Δ j γ j + 1 − s + γ j + 1 Δ j s − γ j = Δ j γ j γ j + 1 − γ j s + γ j + 1 s − γ j γ j + 1 = s .
Thus, for P = Round Γ ( S ) P=\operatorname{Round}_{\Gamma}(S) P = Round Γ ( S ) ,
E [ P ∣ S ] = S . (4) \mathbb{E}[P\mid S]=S. \tag*{(4)} E [ P ∣ S ] = S . (4)
We next observe that the lift of a test defined on the grid under this randomized rounding scheme is simply a linear interpolation of the original test values on the grid points:
Lemma 3.2 (Lifted rounded tests are linear interpolants). Fix a grid partition Γ = ( γ 0 , … , γ M ) \Gamma=(\gamma_0,\ldots,\gamma_M) Γ = ( γ 0 , … , γ M ) and a test h : { γ 0 , … , γ M } → R h:\{\gamma_0,\ldots,\gamma_M\}\to\mathbb{R} h : { γ 0 , … , γ M } → R . Let P = Round Γ ( S ) P=\operatorname{Round}_{\Gamma}(S) P = Round Γ ( S ) and define
a h ( s ) = E [ h ( P ) ∣ S = s ] . a_h(s)=\mathbb{E}[h(P)\mid S=s]. a h ( s ) = E [ h ( P ) ∣ S = s ] . Then, for s ∈ [ γ j , γ j + 1 ] s\in[\gamma_j,\gamma_{j+1}] s ∈ [ γ j , γ j + 1 ] ,
a h ( s ) = h ( γ j ) γ j + 1 − s γ j + 1 − γ j + h ( γ j + 1 ) s − γ j γ j + 1 − γ j . a_h(s)=h(\gamma_j)\frac{\gamma_{j+1}-s}{\gamma_{j+1}-\gamma_j}+h(\gamma_{j+1})\frac{s-\gamma_j}{\gamma_{j+1}-\gamma_j}. a h ( s ) = h ( γ j ) γ j + 1 − γ j γ j + 1 − s + h ( γ j + 1 ) γ j + 1 − γ j s − γ j . Thus a h a_h a h is the continuous piecewise-linear interpolation of the values h ( γ j ) h(\gamma_j) h ( γ j ) on the partition points.
Proof. The formula follows by averaging the two endpoint values of h h h with the rounding probabilities. It is affine on each interval and equals h ( γ j ) h(\gamma_j) h ( γ j ) at each partition point, so the pieces agree at their endpoints.
We next identify the rounding error that our choice of partition must control. Fix a bounded calibration test h h h on the rounded prediction values and define a h ( s ) = E [ h ( P ) ∣ S = s ] a_h(s)=\mathbb{E}[h(P)\mid S=s] a h ( s ) = E [ h ( P ) ∣ S = s ] . Applying Lemma 2.1 with ϕ ( x , p ) = h ( p ) \phi(x,p)=h(p) ϕ ( x , p ) = h ( p ) gives
E [ h ( P ) ( Y − P ) ] = E [ a h ( S ) ( Y − S ) ] + E [ h ( P ) ( S − P ) ] . \mathbb{E}[h(P)(Y-P)]=\mathbb{E}[a_h(S)(Y-S)]+\mathbb{E}[h(P)(S-P)]. E [ h ( P ) ( Y − P )] = E [ a h ( S ) ( Y − S )] + E [ h ( P ) ( S − P )] .
The score-learning step controls the first term. We now analyze the second, which is the error introduced by mean-preserving rounding.
For an interval I j = ( γ j , γ j + 1 ) I_j=(\gamma_j,\gamma_{j+1}) I j = ( γ j , γ j + 1 ) , define
r j ( s ) = ( s − γ j ) ( γ j + 1 − s ) γ j + 1 − γ j 1 { s ∈ I j } . r_j(s)=\frac{(s-\gamma_j)(\gamma_{j+1}-s)}{\gamma_{j+1}-\gamma_j}\mathbf{1}\{s\in I_j\}. r j ( s ) = γ j + 1 − γ j ( s − γ j ) ( γ j + 1 − s ) 1 { s ∈ I j } .
For a distribution ν \nu ν on [ 0 , 1 ] [0,1] [ 0 , 1 ] , write
q j ( ν , Γ ) = E S ∼ ν [ r j ( S ) ] . q_j(\nu,\Gamma)=\mathbb{E}_{S\sim\nu}[r_j(S)]. q j ( ν , Γ ) = E S ∼ ν [ r j ( S )] .
Define the following quantity from the sequence q j ( ν , Γ ) q_j(\nu,\Gamma) q j ( ν , Γ ) :
RoundErr ( ν , Γ ) = sup h : { γ 0 , … , γ M } → { − 1 , 1 } ∣ ∑ j = 0 M − 1 ( h ( γ j ) − h ( γ j + 1 ) ) q j ( ν , Γ ) ∣ . \operatorname{RoundErr}(\nu,\Gamma)=\sup_{h:\{\gamma_0,\ldots,\gamma_M\}\to\{-1,1\}}\left|\sum_{j=0}^{M-1}(h(\gamma_j)-h(\gamma_{j+1}))q_j(\nu,\Gamma)\right|. RoundErr ( ν , Γ ) = h : { γ 0 , … , γ M } → { − 1 , 1 } sup j = 0 ∑ M − 1 ( h ( γ j ) − h ( γ j + 1 )) q j ( ν , Γ ) .
The supremum ranges over the sign-valued calibration tests on the finite set of possible rounded predictions; h ( γ j ) h(\gamma_j) h ( γ j ) is the value assigned to prediction γ j \gamma_j γ j . The next lemma shows that RoundErr ( ν , Γ ) \operatorname{RoundErr}(\nu,\Gamma) RoundErr ( ν , Γ ) is exactly the largest calibration residual caused by rounding and rewrites it as the total variation of the sequence ( q j ) (q_j) ( q j ) .
Lemma 3.3 (Rounding error as total variation). Let S ∼ ν S\sim\nu S ∼ ν , let P = Round Γ ( S ) P=\operatorname{Round}_{\Gamma}(S) P = Round Γ ( S ) , and set q − 1 = q M = 0 q_{-1}=q_M=0 q − 1 = q M = 0 . Then
RoundErr ( ν , Γ ) = sup h : { γ 0 , … , γ M } → [ − 1 , 1 ] ∣ E [ h ( P ) ( S − P ) ] ∣ = q 0 + q M − 1 + ∑ j = 1 M − 1 ∣ q j − q j − 1 ∣ \operatorname{RoundErr}(\nu,\Gamma)=\sup_{h:\{\gamma_0,\ldots,\gamma_M\}\to[-1,1]}\left|\mathbb{E}[h(P)(S-P)]\right|=q_0+q_{M-1}+\sum_{j=1}^{M-1}|q_j-q_{j-1}| RoundErr ( ν , Γ ) = h : { γ 0 , … , γ M } → [ − 1 , 1 ] sup ∣ E [ h ( P ) ( S − P )] ∣ = q 0 + q M − 1 + j = 1 ∑ M − 1 ∣ q j − q j − 1 ∣ = ∑ j = 0 M ∣ q j − q j − 1 ∣ , =\sum_{j=0}^{M}|q_j-q_{j-1}|, = j = 0 ∑ M ∣ q j − q j − 1 ∣ , where q j = q j ( ν , Γ ) q_j=q_j(\nu,\Gamma) q j = q j ( ν , Γ ) .
Proof. Fix a test h : { γ 0 , … , γ M } → [ − 1 , 1 ] h:\{\gamma_0,\ldots,\gamma_M\}\to[-1,1] h : { γ 0 , … , γ M } → [ − 1 , 1 ] and write h j = h ( γ j ) h_j=h(\gamma_j) h j = h ( γ j ) . Condition on S = s ∈ ( γ j , γ j + 1 ) S=s\in(\gamma_j,\gamma_{j+1}) S = s ∈ ( γ j , γ j + 1 ) . Then
E [ h ( P ) ( S − P ) ∣ S = s ] = h j γ j + 1 − s Δ j ( s − γ j ) + h j + 1 s − γ j Δ j ( s − γ j + 1 ) = ( h j − h j + 1 ) ( s − γ j ) ( γ j + 1 − s ) Δ j . \begin{aligned}
\mathbb{E}[h(P)(S-P)\mid S=s]=h_j\frac{\gamma_{j+1}-s}{\Delta_j}(s-\gamma_j)+h_{j+1}\frac{s-\gamma_j}{\Delta_j}(s-\gamma_{j+1}) \\
&=(h_j-h_{j+1})\frac{(s-\gamma_j)(\gamma_{j+1}-s)}{\Delta_j}.
\end{aligned} E [ h ( P ) ( S − P ) ∣ S = s ] = h j Δ j γ j + 1 − s ( s − γ j ) + h j + 1 Δ j s − γ j ( s − γ j + 1 ) = ( h j − h j + 1 ) Δ j ( s − γ j ) ( γ j + 1 − s ) .
At partition points the same conditional expectation is zero. Taking expectations gives
E [ h ( P ) ( S − P ) ] = ∑ j = 0 M − 1 ( h ( γ j ) − h ( γ j + 1 ) ) q j ( ν , Γ ) . \mathbb{E}[h(P)(S-P)]=\sum_{j=0}^{M-1}(h(\gamma_j)-h(\gamma_{j+1}))q_j(\nu,\Gamma). E [ h ( P ) ( S − P )] = j = 0 ∑ M − 1 ( h ( γ j ) − h ( γ j + 1 )) q j ( ν , Γ ) .
Summation by parts makes the cancellation between adjacent intervals explicit:
∑ j = 0 M − 1 ( h j − h j + 1 ) q j = h 0 q 0 − h M q M − 1 + ∑ j = 1 M − 1 h j ( q j − q j − 1 ) = ∑ j = 0 M h j ( q j − q j − 1 ) , \begin{aligned}
\sum_{j=0}^{M-1}(h_j-h_{j+1})q_j=h_0q_0-h_Mq_{M-1}+\sum_{j=1}^{M-1}h_j(q_j-q_{j-1}) \\
&=\sum_{j=0}^{M}h_j(q_j-q_{j-1}),
\end{aligned} j = 0 ∑ M − 1 ( h j − h j + 1 ) q j = h 0 q 0 − h M q M − 1 + j = 1 ∑ M − 1 h j ( q j − q j − 1 ) = j = 0 ∑ M h j ( q j − q j − 1 ) ,
where q − 1 = q M = 0 q_{-1}=q_M=0 q − 1 = q M = 0 . The values h j h_j h j can be chosen independently, so the supremum over h j ∈ [ − 1 , 1 ] h_j\in[-1,1] h j ∈ [ − 1 , 1 ] is attained by choosing each h j h_j h j to have the sign of q j − q j − 1 q_j-q_{j-1} q j − q j − 1 , with either sign when the difference is zero. Its value is therefore
∑ j = 0 M ∣ q j − q j − 1 ∣ = q 0 + q M − 1 + ∑ j = 1 M − 1 ∣ q j − q j − 1 ∣ . \sum_{j=0}^{M}|q_j-q_{j-1}|=q_0+q_{M-1}+\sum_{j=1}^{M-1}|q_j-q_{j-1}|. j = 0 ∑ M ∣ q j − q j − 1 ∣ = q 0 + q M − 1 + j = 1 ∑ M − 1 ∣ q j − q j − 1 ∣.
The maximizing choices are sign-valued, so this supremum is also the quantity RoundErr ( ν , Γ ) \operatorname{RoundErr}(\nu,\Gamma) RoundErr ( ν , Γ ) defined above.
The scale of the coefficients explains why an m − 2 m^{-2} m − 2 bound is possible. Writing Δ j = γ j + 1 − γ j \Delta_j=\gamma_{j+1}-\gamma_j Δ j = γ j + 1 − γ j and s = γ j + u Δ j s=\gamma_j+u\Delta_j s = γ j + u Δ j for u ∈ [ 0 , 1 ] u\in[0,1] u ∈ [ 0 , 1 ] gives
r j ( s ) = Δ j u ( 1 − u ) ≤ Δ j 4 , q j ≤ Δ j 4 Pr ( S ∈ I j ) . r_j(s)=\Delta_j u(1-u)\le\frac{\Delta_j}{4},\qquad q_j\le\frac{\Delta_j}{4}\Pr(S\in I_j). r j ( s ) = Δ j u ( 1 − u ) ≤ 4 Δ j , q j ≤ 4 Δ j Pr ( S ∈ I j ) .
Thus m − 2 m^{-2} m − 2 is the natural target when both the interval width and its probability mass are of order 1 / m 1/m 1/ m . For example, if S S S is uniform and the partition consists of m m m equal-width intervals, then every interval has
q j = ∫ γ j γ j + 1 r j ( s ) d s = 1 6 m 2 . q_j=\int_{\gamma_j}^{\gamma_{j+1}}r_j(s)\,ds=\frac{1}{6m^2}. q j = ∫ γ j γ j + 1 r j ( s ) d s = 6 m 2 1 .
Summing the interval contributions separately would give only an m − 1 m^{-1} m − 1 bound. The useful cancellation occurs across adjacent intervals. If q 0 = ⋯ = q M − 1 = q q_0=\cdots=q_{M-1}=q q 0 = ⋯ = q M − 1 = q , then
∑ j = 0 M − 1 ( h j − h j + 1 ) q = q ( h 0 − h M ) . \sum_{j=0}^{M-1}(h_j-h_{j+1})q=q(h_0-h_M). j = 0 ∑ M − 1 ( h j − h j + 1 ) q = q ( h 0 − h M ) .
Thus all interior values of h h h cancel, regardless of how rapidly h h h changes across the grid, and the rounding error is at most 2 q 2q 2 q . In the uniform example this is 1 / ( 3 m 2 ) 1/(3m^2) 1/ ( 3 m 2 ) . More generally, Lemma 3.3 shows that only the endpoint terms and the total variation of ( q j ) (q_j) ( q j ) matter. The construction below chooses the grid to make this small.
Choosing a low-variation rounding partition
The next lemma introduces the two parameters used to choose the partition. The parameter m m m is the target number of rounding intervals, up to a constant factor; later it will be optimized against the statistical error. The parameter ρ \rho ρ is a fine-grid increment used to make the candidate partitions finite, and it will be chosen small enough that its effect is absorbed into the m − 2 m^{-2} m − 2 rounding term.
Lemma 3.4 (Population grid rounding rule). Let ν \nu ν be any distribution on [ 0 , 1 ] [0,1] [ 0 , 1 ] , let m ≥ 2 m \ge2 m ≥ 2 , and let ρ > 0 \rho> 0 ρ > 0 with 1 / ρ 1/\rho 1/ ρ an integer and ρ ≤ m − 2 \rho\le m^{-2} ρ ≤ m − 2 . There is a partition Γ \Gamma Γ whose partition points belong to Λ ρ = { 0 , ρ , 2 ρ , … , 1 } \Lambda_\rho= \{0,\rho,2\rho,\ldots,1\} Λ ρ = { 0 , ρ , 2 ρ , … , 1 } , with at most 4 m + 2 4m+2 4 m + 2 intervals, such that
RoundErr ( ν , Γ ) ≤ C m 2 . \operatorname{RoundErr}(\nu,\Gamma) \le\frac{C}{m^2}. RoundErr ( ν , Γ ) ≤ m 2 C .
Proof. Let S ∼ ν S \sim\nu S ∼ ν ; all expectations in this proof are with respect to this score distribution. By Lemma 3.3 , it suffices to make the interval contributions q j q_j q j nearly equal while keeping their common scale small. We do this constructively by iteratively growing the next interval, and then ending it and beginning the next when its contribution first reaches a common threshold.
Equalizing the interval contributions. Let τ = 1 64 m 2 \tau= \frac{1}{64m^2} τ = 64 m 2 1 . Starting from γ 0 = 0 \gamma_0 = 0 γ 0 = 0 , greedily choose γ j + 1 \gamma_{j+1} γ j + 1 to be the smallest gridpoint larger than γ j \gamma_j γ j such that
E [ ( S − γ j ) ( γ j + 1 − S ) γ j + 1 − γ j 1 { γ j < S < γ j + 1 } ] ≥ τ , \mathbb{E}\left[\frac{(S-\gamma_j)(\gamma_{j+1}-S)}{\gamma_{j+1}-\gamma_j}\mathbf{1}\{\gamma_j<S<\gamma_{j+1}\}\right] \ge\tau, E [ γ j + 1 − γ j ( S − γ j ) ( γ j + 1 − S ) 1 { γ j < S < γ j + 1 } ] ≥ τ ,
if such a gridpoint exists. Otherwise set γ j + 1 = 1 \gamma_{j+1}=1 γ j + 1 = 1 . Stop as soon as the right endpoint reaches 1. Call an interval full if the search finds a right endpoint whose contribution is at least τ \tau τ . If the search never reaches the threshold, the algorithm adds one final leftover interval ending at 1.
The fine grid limits the total overshoot. Fix a left endpoint a a a . Scores s ≤ a s \le a s ≤ a contribute zero. For s > a s>a s > a , the contribution is nondecreasing in the right endpoint b b b ; where b > s b>s b > s its derivative is
d d b ( s − a ) ( b − s ) b − a = ( s − a ) 2 ( b − a ) 2 ∈ [ 0 , 1 ] . \frac{d}{db}\frac{(s-a)(b-s)}{b-a}=\frac{(s-a)^2}{(b-a)^2}\in[0,1]. d b d b − a ( s − a ) ( b − s ) = ( b − a ) 2 ( s − a ) 2 ∈ [ 0 , 1 ] .
It is zero for b ≤ s b \le s b ≤ s and continuous at b = s b=s b = s . Increasing the right endpoint by one grid step therefore changes the contribution by at most ρ \rho ρ , and only for scores inside the new interval. Write I j = ( γ j , γ j + 1 ) I_j=(\gamma_j,\gamma_{j+1}) I j = ( γ j , γ j + 1 ) and let ν ( I j ) = Pr S ∼ ν ( S ∈ I j ) \nu(I_j)=\Pr_{S\sim\nu}(S\in I_j) ν ( I j ) = Pr S ∼ ν ( S ∈ I j ) denote its score probability mass. At the first threshold crossing, a full interval consequently has
q j = τ + e j , 0 ≤ e j ≤ ρ ν ( I j ) . q_j=\tau+e_j,\qquad0\le e_j\le\rho\nu(I_j). q j = τ + e j , 0 ≤ e j ≤ ρ ν ( I j ) .
The intervals are disjoint, so ∑ full j e j ≤ ρ \sum_{\text{full }j}e_j\le\rho ∑ full j e j ≤ ρ . A final leftover interval has contribution less than τ \tau τ .
Bounding the number of intervals. Every full interval has q j ≥ τ q_j\ge\tau q j ≥ τ . Since
q j ≤ Δ j 4 ν ( ( γ j , γ j + 1 ) ) , q_j\le\frac{\Delta_j}{4}\nu((\gamma_j,\gamma_{j+1})), q j ≤ 4 Δ j ν (( γ j , γ j + 1 )) ,
each full interval satisfies
Δ j ν ( ( γ j , γ j + 1 ) ) ≥ 4 τ . \Delta_j\nu((\gamma_j,\gamma_{j+1}))\ge4\tau. Δ j ν (( γ j , γ j + 1 )) ≥ 4 τ .
If J J J is the number of full intervals, Cauchy–Schwarz and disjointness give
2 J τ ≤ ∑ j = 0 J − 1 Δ j ν ( ( γ j , γ j + 1 ) ) ≤ ( ∑ j Δ j ) 1 / 2 ( ∑ j ν ( ( γ j , γ j + 1 ) ) ) 1 / 2 ≤ 1. 2J\sqrt{\tau}\leq\sum_{j=0}^{J-1}\sqrt{\Delta_j\nu((\gamma_j,\gamma_{j+1}))}\leq\left(\sum_j\Delta_j\right)^{1/2}\left(\sum_j\nu((\gamma_j,\gamma_{j+1}))\right)^{1/2}\leq1. 2 J τ ≤ j = 0 ∑ J − 1 Δ j ν (( γ j , γ j + 1 )) ≤ ( j ∑ Δ j ) 1/2 ( j ∑ ν (( γ j , γ j + 1 )) ) 1/2 ≤ 1.
Thus J ≤ ( 2 τ ) − 1 = 4 m J\leq(2\sqrt{\tau})^{-1}=4m J ≤ ( 2 τ ) − 1 = 4 m . There is at most one leftover interval, so M ≤ 4 m + 1 M\leq4m+1 M ≤ 4 m + 1 .
Bounding the rounding error. Replace every full coefficient q j q_j q j by τ \tau τ and retain the final leftover coefficient, if there is one. This reference sequence is constant until a possible final drop to a value below τ \tau τ , so its variation, including both endpoints at zero, is at most 2 τ 2\tau 2 τ . Restoring the overshoots increases variation by at most 2 ∑ f u l l j e j ≤ 2 ρ 2\sum_{\mathrm{full}\ j}e_j\leq2\rho 2 ∑ full j e j ≤ 2 ρ , since each coefficient occurs in two adjacent differences. Lemma 3.3 gives
RoundErr ( ν , Γ ) ≤ 2 τ + 2 ρ ≤ C / m 2 . \operatorname{RoundErr}(\nu,\Gamma)\leq2\tau+2\rho\leq C/m^2. RoundErr ( ν , Γ ) ≤ 2 τ + 2 ρ ≤ C / m 2 .
We will apply this construction to the empirical distribution of the sequential predictions. Its guarantee holds for any distribution, so this step requires no independence among those predictions.
Prediction-value tests induced by rounding
Lemma 3.2 says that every sign-valued test of a rounded predictor lifts to a piecewise-linear test of the pre-rounded score. The next finite class collects exactly these lifted tests for grid partitions with at most M M M intervals. For an integer M ≥ 1 M\geq1 M ≥ 1 and grid Λ ρ \Lambda_\rho Λ ρ , let A M , ρ \mathcal{A}_{M,\rho} A M , ρ be the class of functions obtained as follows: choose a grid partition Γ = ( γ 0 , … , γ L ) \Gamma=(\gamma_0,\ldots,\gamma_L) Γ = ( γ 0 , … , γ L ) with L ≤ M L\leq M L ≤ M intervals, choose a sign-valued test h : { γ 0 , … , γ L } → { − 1 , 1 } h:\{\gamma_0,\ldots,\gamma_L\}\to\{-1,1\} h : { γ 0 , … , γ L } → { − 1 , 1 } on the partition points, and include the lifted function
a h ( s ) = E [ h ( Round Γ ( s ) ) ] , a_h(s)=\mathbb{E}[h(\operatorname{Round}_{\Gamma}(s))], a h ( s ) = E [ h ( Round Γ ( s ))] ,
where the expectation is only over the rounding randomness. Equivalently, if P = Round Γ ( S ) P=\operatorname{Round}_{\Gamma}(S) P = Round Γ ( S ) , then a h ( s ) = E [ h ( P ) ∣ S = s ] a_h(s)=\mathbb{E}[h(P)\mid S=s] a h ( s ) = E [ h ( P ) ∣ S = s ] ; by Lemma 3.2 , a h a_h a h is the continuous piecewise-linear interpolation of the values a h ( γ j ) = h ( γ j ) a_h(\gamma_j)=h(\gamma_j) a h ( γ j ) = h ( γ j ) .
We can bound the size of A M , ρ \mathcal{A}_{M,\rho} A M , ρ by counting. Write K ρ = ∣ Λ ρ ∣ = 1 / ρ + 1 ≤ 2 / ρ K_\rho=|\Lambda_\rho|=1/\rho+1\leq2/\rho K ρ = ∣ Λ ρ ∣ = 1/ ρ + 1 ≤ 2/ ρ . For a fixed number L L L of intervals, there are at most ( K ρ L + 1 ) \binom{K_\rho}{L+1} ( L + 1 K ρ ) choices of partition points and 2 L + 1 2^{L+1} 2 L + 1 choices of signs. Therefore
∣ A M , ρ ∣ ≤ ∑ L = 1 M ( K ρ L + 1 ) 2 L + 1 ≤ ( M + 1 ) ( 2 K ρ ) M + 1 . |\mathcal{A}_{M,\rho}|\leq\sum_{L=1}^{M}\binom{K_\rho}{L+1}2^{L+1}\leq(M+1)(2K_\rho)^{M+1}. ∣ A M , ρ ∣ ≤ L = 1 ∑ M ( L + 1 K ρ ) 2 L + 1 ≤ ( M + 1 ) ( 2 K ρ ) M + 1 .
Taking logarithms gives
log ∣ A M , ρ ∣ ≤ log ( M + 1 ) + ( M + 1 ) log ( 2 K ρ ) . \log|\mathcal{A}_{M,\rho}|\leq\log(M+1)+(M+1)\log(2K_\rho). log ∣ A M , ρ ∣ ≤ log ( M + 1 ) + ( M + 1 ) log ( 2 K ρ ) .
Here K ρ ≤ 2 / ρ K_\rho\leq2/\rho K ρ ≤ 2/ ρ , so log ( 2 K ρ ) ≤ C log ( e / ρ ) \log(2K_\rho)\leq C\log(e/\rho) log ( 2 K ρ ) ≤ C log ( e / ρ ) . The log ( M + 1 ) \log(M+1) log ( M + 1 ) term is also absorbed: since M ≥ 1 M\geq1 M ≥ 1 and log ( e / ρ ) ≥ 1 \log(e/\rho)\geq1 log ( e / ρ ) ≥ 1 , we have log ( M + 1 ) ≤ M ≤ M log ( e / ρ ) \log(M+1)\leq M\leq M\log(e/\rho) log ( M + 1 ) ≤ M ≤ M log ( e / ρ ) . Hence, for a universal constant C C C ,
log ∣ A M , ρ ∣ ≤ C M log ( e / ρ ) . (5) \log|\mathcal{A}_{M,\rho}|\leq CM\log(e/\rho). \tag*{(5)} log ∣ A M , ρ ∣ ≤ C M log ( e / ρ ) . (5)
Thus A M , ρ \mathcal{A}_{M,\rho} A M , ρ is the auxiliary finite class needed for the learning step: controlling the pre-rounded score against all functions in A M , ρ \mathcal{A}_{M,\rho} A M , ρ controls every sign-valued calibration test after rounding to any grid partition with at most M M M intervals.
Algorithm 1 Learning a randomized calibrated-multiaccurate predictor
Input: n n n labeled examples, a finite test class G \mathcal{G} G , and a failure probability δ \delta δ .
Set
m = max { 2 , ⌈ ( n log ( 2 n / δ ) ) 1 / 5 ⌉ } , ρ = m − 2 , M ∗ = 4 m + 2 , m=\max\left\{2,\left\lceil\left(\frac{n}{\log(2n/\delta)}\right)^{1/5}\right\rceil\right\},\qquad\rho=m^{-2},\qquad M_* = 4m+2, m = max { 2 , ⌈ ( log ( 2 n / δ ) n ) 1/5 ⌉ } , ρ = m − 2 , M ∗ = 4 m + 2 ,
and let A = A M ∗ , ρ \mathcal{A}=\mathcal{A}_{M_*,\rho} A = A M ∗ , ρ be the lifted test class from Subsection 3.4.
Run Lemma 3.1 on all n n n examples with
Φ G , A = { ( x , s ) ↦ g ( x ) : g ∈ G } ∪ { ( x , s ) ↦ a ( s ) : a ∈ A } . \Phi_{\mathcal{G},\mathcal{A}}=\{(x,s)\mapsto g(x):g\in\mathcal{G}\}\cup\{(x,s)\mapsto a(s):a\in\mathcal{A}\}. Φ G , A = {( x , s ) ↦ g ( x ) : g ∈ G } ∪ {( x , s ) ↦ a ( s ) : a ∈ A } .
Save the prediction rules s 1 , … , s n s_1,\ldots,s_n s 1 , … , s n and the scores S t = s t ( X t ) S_t=s_t(X_t) S t = s t ( X t ) made before observing Y t Y_t Y t .
Apply the greedy construction from Lemma 3.4 to ν ^ = n − 1 ∑ t = 1 n δ S t \widehat{\nu}=n^{-1}\sum_{t=1}^{n}\delta_{S_t} ν = n − 1 ∑ t = 1 n δ S t , with parameters m , ρ m,\rho m , ρ , to obtain a grid partition Γ ^ \widehat{\Gamma} Γ .
Output: the randomized predictor Q Q Q that, on a new input x x x , draws J J J uniformly from { 1 , … , n } \{1,\ldots,n\} { 1 , … , n } and then draws
P = Round Γ ^ ( s J ( x ) ) P=\operatorname{Round}_{\widehat{\Gamma}}(s_J(x)) P = Round Γ ( s J ( x ))
using fresh independent rounding randomness.
Upper bound for randomized predictors
We now combine the residual identity (3) with the ingredients from § 3 . We learn score rules sequentially and choose the rounding partition from the scores recorded during training. The output rounds a uniformly chosen score rule.
Theorem 4.1 (Randomized upper bound for calibrated multiaccuracy). There is a universal constant C < ∞ C<\infty C < ∞ such that the following holds. Let G \mathcal{G} G be a finite class of functions g : X → [ − 1 , 1 ] g:\mathcal{X}\to[-1,1] g : X → [ − 1 , 1 ] . Given n ≥ 2 n\ge2 n ≥ 2 i.i.d. samples from a distribution on X × [ 0 , 1 ] \mathcal{X}\times[0,1] X × [ 0 , 1 ] and δ ∈ ( 0 , 1 / 2 ) \delta\in(0,1/2) δ ∈ ( 0 , 1/2 ) , Algorithm 1 returns a randomized predictor Q = ( Q x ) x ∈ X Q=(Q_x)_{x\in\mathcal{X}} Q = ( Q x ) x ∈ X such that, with probability at least 1 − δ 1-\delta 1 − δ over the training sample and the construction randomness,
CMA ( Q ; G ) ≤ C { log ( 2 ∣ G ∣ / δ ) n + ( log ( 2 n / δ ) n ) 2 / 5 } . \operatorname{CMA}(Q;\mathcal{G})\le C\left\{\sqrt{\frac{\log(2|\mathcal{G}|/\delta)}{n}}+\left(\frac{\log(2n/\delta)}{n}\right)^{2/5}\right\}. CMA ( Q ; G ) ≤ C { n log ( 2∣ G ∣/ δ ) + ( n log ( 2 n / δ ) ) 2/5 } .
The computational issue is that the auxiliary prediction-value test class A \mathcal{A} A is too large to enumerate directly. There is an efficient implementation which represents each piecewise-linear test by the fine-grid breakpoints where its sign is specified. With this representation, the exponential-potential update factors over paths in a directed acyclic graph on the fine grid, so the online algorithm can compute its next prediction by dynamic programming rather than by summing over all tests. The rounding partition can also be found from sorted predictions and prefix sums. Appendix § 15 gives the details of this efficient implementation; in the body we focus on sample complexity.
The theorem immediately gives the following sample-complexity form.
Corollary 4.2 (Sample complexity for randomized predictors). There is a universal constant C < ∞ C < \infty C < ∞ such that, for every ε , δ ∈ ( 0 , 1 / 2 ) \varepsilon,\delta\in(0,1/2) ε , δ ∈ ( 0 , 1/2 ) , the following holds. Write
A δ = log ( 8 ∣ G ∣ / δ ) + 1. A_{\delta} = \log(8|\mathcal{G}|/\delta) + 1. A δ = log ( 8∣ G ∣/ δ ) + 1. If the algorithm receives
n ≥ C ( A δ ε 2 + log ( 2 ( A δ + 2 ) / ( ε δ ) ) ε 5 / 2 ) n \ge C\left(\frac{A_{\delta}}{\varepsilon^2}+\frac{\log(2(A_{\delta}+2)/(\varepsilon\delta))}{\varepsilon^{5/2}}\right) n ≥ C ( ε 2 A δ + ε 5/2 log ( 2 ( A δ + 2 ) / ( ε δ )) ) samples, it outputs a randomized predictor Q Q Q satisfying CMA ( Q ; G ) ≤ ε \operatorname{CMA}(Q;\mathcal{G}) \le\varepsilon CMA ( Q ; G ) ≤ ε with probability at least 1 − δ 1-\delta 1 − δ .
Proof of Theorem 4.1 . Keep m ≥ 2 m \ge2 m ≥ 2 and ρ ≤ m − 2 \rho\le m^{-2} ρ ≤ m − 2 symbolic until the final optimization, and write A = A 4 m + 2 , ρ A=A_{4m+2,\rho} A = A 4 m + 2 , ρ .
Controlling the rounded residuals on the sample. Lemma 3.1 and (5) give, for every realized sample,
sup ϕ ∈ Φ G , A ∣ 1 n ∑ t = 1 n ϕ ( X t , S t ) ( Y t − S t ) ∣ ≤ B n : = C log ( 2 ∣ G ∣ ) + m log ( e / ρ ) n . \sup_{\phi\in\Phi_{\mathcal{G},\mathcal{A}}}\left|\frac{1}{n}\sum_{t=1}^{n}\phi(X_t,S_t)(Y_t-S_t)\right|\le B_n:=C\sqrt{\frac{\log(2|\mathcal{G}|)+m\log(e/\rho)}{n}}. ϕ ∈ Φ G , A sup n 1 t = 1 ∑ n ϕ ( X t , S t ) ( Y t − S t ) ≤ B n := C n log ( 2∣ G ∣ ) + m log ( e / ρ ) .
Lemma 3.4 , applied to the empirical distribution ν ^ \hat{\nu} ν ^ of these scores, gives RoundErr ( ν ^ , Γ ^ ) ≤ C / m 2 \operatorname{RoundErr}(\hat{\nu},\hat{\Gamma})\le C/m^2 RoundErr ( ν ^ , Γ ^ ) ≤ C / m 2 .
For a candidate partition Γ \Gamma Γ with at most 4 m + 2 4m+2 4 m + 2 intervals and a sign assignment h h h on its points, define
Z t ( Γ , h ) = E P ∼ Round Γ ( S t ) [ h ( P ) ( Y t − P ) ] . Z_t(\Gamma,h)=\mathbb{E}_{P\sim\operatorname{Round}_{\Gamma}(S_t)}[h(P)(Y_t-P)]. Z t ( Γ , h ) = E P ∼ Round Γ ( S t ) [ h ( P ) ( Y t − P )] .
Here the example and score are fixed; only the rounding draw is averaged. The lift a Γ , h ( s ) = E [ h ( Round Γ ( s ) ) ] a_{\Gamma,h}(s)=\mathbb{E}[h(\operatorname{Round}_{\Gamma}(s))] a Γ , h ( s ) = E [ h ( Round Γ ( s ))] belongs to A \mathcal{A} A . Applying Lemma 2.1 to the uniform empirical distribution on ( X t , Y t , S t ) (X_t,Y_t,S_t) ( X t , Y t , S t ) gives
∣ 1 n ∑ t = 1 n Z t ( Γ ^ , h ) ∣ ≤ B n + RoundErr ( ν ^ , Γ ^ ) ≤ B n + C / m 2 . \left|\frac{1}{n}\sum_{t=1}^{n}Z_t(\hat{\Gamma},h)\right|\le B_n+\operatorname{RoundErr}(\hat{\nu},\hat{\Gamma})\le B_n+C/m^2. n 1 t = 1 ∑ n Z t ( Γ ^ , h ) ≤ B n + RoundErr ( ν ^ , Γ ^ ) ≤ B n + C / m 2 .
This holds for every sign assignment on the selected partition. For g ∈ G g\in\mathcal{G} g ∈ G , mean preservation gives
E P ∼ Round Γ ( S t ) [ g ( X t ) ( Y t − P ) ] = g ( X t ) ( Y t − S t ) , \mathbb{E}_{P\sim\operatorname{Round}_{\Gamma}(S_t)}[g(X_t)(Y_t-P)]=g(X_t)(Y_t-S_t), E P ∼ Round Γ ( S t ) [ g ( X t ) ( Y t − P )] = g ( X t ) ( Y t − S t ) ,
so the empirical multiaccuracy residuals are bounded by B n B_n B n for every partition.
Transferring the final residuals to the population. Let F t − 1 \mathcal{F}_{t-1} F t − 1 be the history before example t t t . For each fixed candidate pair ( Γ , h ) (\Gamma,h) ( Γ , h ) , define
Z ‾ t ( Γ , h ) = E [ Z t ( Γ , h ) ∣ F t − 1 ] . \overline{Z}_t(\Gamma,h)=\mathbb{E}[Z_t(\Gamma,h)\mid\mathcal{F}_{t-1}]. Z t ( Γ , h ) = E [ Z t ( Γ , h ) ∣ F t − 1 ] .
The rule s t s_t s t is determined by this history, and example t t t is independent of it. Thus Z ‾ t ( Γ , h ) \overline{Z}_t(\Gamma,h) Z t ( Γ , h ) is the population residual of the rule s t s_t s t rounded using Γ \Gamma Γ . Since ∣ Z t ( Γ , h ) ∣ ≤ 1 |Z_t(\Gamma,h)|\le1 ∣ Z t ( Γ , h ) ∣ ≤ 1 , the differences Z t − Z ‾ t Z_t-\overline{Z}_t Z t − Z t are martingale differences bounded by 2 2 2 . The number of candidate partition-sign pairs is at most
∑ L ≤ 4 m + 2 ( ∣ Λ ρ ∣ L + 1 ) 2 L + 1 ≤ exp { C m log ( e / ρ ) } . \sum_{L\le4m+2}\binom{|\Lambda_{\rho}|}{L+1}2^{L+1}\le\exp\{Cm\log(e/\rho)\}. L ≤ 4 m + 2 ∑ ( L + 1 ∣ Λ ρ ∣ ) 2 L + 1 ≤ exp { C m log ( e / ρ )} .
Azuma–Hoeffding and a union bound over these pairs and the ∣ G ∣ |\mathcal{G}| ∣ G ∣ multiaccuracy tests therefore give, with probability at least 1 − δ 1-\delta 1 − δ , simultaneous deviations of the averages n − 1 ∑ t Z t ( Γ , h ) n^{-1}\sum_t Z_t(\Gamma,h) n − 1 ∑ t Z t ( Γ , h ) and n − 1 ∑ t g ( X t ) ( Y t − S t ) n^{-1}\sum_t g(X_t)(Y_t-S_t) n − 1 ∑ t g ( X t ) ( Y t − S t ) from their conditional population averages of at most
D n = C log ( 2 ∣ G ∣ / δ ) + m log ( e / ρ ) n . D_n=C\sqrt{\frac{\log(2|\mathcal{G}|/\delta)+m\log(e/\rho)}{n}}. D n = C n log ( 2∣ G ∣/ δ ) + m log ( e / ρ ) .
Fix a complete training transcript on this event. In what follows, all population expectations are over an independent test example and fresh prediction randomness, conditional on this transcript. The final predictor draws J J J uniformly from [ n ] [n] [ n ] and rounds s J ( X ) s_J(X) s J ( X ) with Γ ^ \widehat{\Gamma} Γ , so for every sign test on its support,
E [ h ( P ) ( Y − P ) ] = 1 n ∑ t = 1 n Z ^ t ( Γ ^ , h ) . \mathbb{E}[h(P)(Y-P)]=\frac{1}{n}\sum_{t=1}^{n}\widehat{Z}_t(\widehat{\Gamma},h). E [ h ( P ) ( Y − P )] = n 1 t = 1 ∑ n Z t ( Γ , h ) .
The functions Z ^ t ( Γ , h ) \widehat{Z}_t(\Gamma,h) Z t ( Γ , h ) were defined for fixed candidates; we substitute Γ ^ \widehat{\Gamma} Γ only after obtaining the uniform event. Consequently, the preceding empirical bounds imply
MA ( Q ; G ) ≤ B n + D n , ECE ( Q ) ≤ B n + D n + C / m 2 . \operatorname{MA}(Q;\mathcal{G})\le B_n+D_n,\qquad\operatorname{ECE}(Q)\le B_n+D_n+C/m^2. MA ( Q ; G ) ≤ B n + D n , ECE ( Q ) ≤ B n + D n + C / m 2 .
Here the calibration bound uses the finite-support dual form (2) . In particular,
CMA ( Q ; G ) ≤ C { log ( 2 ∣ G ∣ / δ ) + m log ( e / ρ ) n + 1 m 2 } . (6) \operatorname{CMA}(Q;\mathcal{G})\le C\left\{\sqrt{\frac{\log(2|\mathcal{G}|/\delta)+m\log(e/\rho)}{n}}+\frac{1}{m^2}\right\}. \tag*{(6)} CMA ( Q ; G ) ≤ C { n log ( 2∣ G ∣/ δ ) + m log ( e / ρ ) + m 2 1 } . (6)
Choose m m m and ρ = m − 2 \rho=m^{-2} ρ = m − 2 as in Algorithm 1. When n / log ( 2 n / δ ) ≥ 32 n/\log(2n/\delta)\ge32 n / log ( 2 n / δ ) ≥ 32 , the ceiling changes m m m by at most a constant factor, and
m log ( e / ρ ) n + m − 2 ≤ C ( log ( 2 n / δ ) n ) 2 / 5 . \sqrt{\frac{m\log(e/\rho)}{n}}+m^{-2}\le C\left(\frac{\log(2n/\delta)}{n}\right)^{2/5}. n m log ( e / ρ ) + m − 2 ≤ C ( n log ( 2 n / δ ) ) 2/5 .
In the remaining case the theorem follows from CMA ( Q ; G ) ≤ 1 \operatorname{CMA}(Q;\mathcal{G})\le1 CMA ( Q ; G ) ≤ 1 after increasing C C C . Substituting into (6) proves the claim. □
Proof of Corollary 4.2. Let
A δ = log ( 8 ∣ G ∣ / δ ) + 1 , L = log ( 2 ( A δ + 2 ) / ( ε δ ) ) . A_\delta=\log(8|\mathcal{G}|/\delta)+1,\qquad L=\log(2(A_\delta+2)/(\varepsilon\delta)). A δ = log ( 8∣ G ∣/ δ ) + 1 , L = log ( 2 ( A δ + 2 ) / ( ε δ )) .
Set
n 0 = ⌈ C ( A δ ε − 2 + L ε − 5 / 2 ) ⌉ n_0=\left\lceil C\left(A_\delta\varepsilon^{-2}+L\varepsilon^{-5/2}\right)\right\rceil n 0 = ⌈ C ( A δ ε − 2 + L ε − 5/2 ) ⌉
for a sufficiently large universal constant C C C . Then C A δ / n 0 ≤ ε / 2 C\sqrt{A_\delta/n_0}\le\varepsilon/2 C A δ / n 0 ≤ ε /2 . Also log ( 2 n 0 / δ ) ≤ C ′ L \log(2n_0/\delta)\le C'L log ( 2 n 0 / δ ) ≤ C ′ L after increasing constants, because ε , δ < 1 / 2 \varepsilon,\delta<1/2 ε , δ < 1/2 and L L L already dominates log ( A δ + 2 ) \log(A_\delta+2) log ( A δ + 2 ) , log ( 1 / ε ) \log(1/\varepsilon) log ( 1/ ε ) , and log ( 1 / δ ) \log(1/\delta) log ( 1/ δ ) . Hence
C ( log ( 2 n 0 / δ ) n 0 ) 2 / 5 ≤ ε / 2. C\left(\frac{\log(2n_0/\delta)}{n_0}\right)^{2/5}\le\varepsilon/2. C ( n 0 log ( 2 n 0 / δ ) ) 2/5 ≤ ε /2.
Theorem 4.1, applied to any subset of n 0 n_0 n 0 examples if more are available, gives the claim. □
Upper bound for deterministic predictors
This construction follows the same strategy of choosing a coarsening rule from a finite menu, as in the randomized upper bound. Before learning an intermediate score S S S , we enumerate a finite family of rules that assign each context-score pair ( x , s ) (x,s) ( x , s ) to a category. For each rule, we include auxiliary tests that assign an arbitrary sign to each category and measure the corresponding signed residual of S S S . Combining the finite-test learning and cellwise rounding procedures of Noarov and Roth [2027], we learn a deterministic score function S S S against the original multiaccuracy tests and these auxiliary tests. After S S S is known, we choose the category assignments and replace the scores in each category by their average.
The residual identity (3) specializes here to the identities in Lemma 5.2 . The auxiliary tests control the residuals inherited from S S S , while the assignment rule controls the error caused by replacing S S S with the category averages. First suppose we could replace the scores in each category C j C_j C j by their true average under the context distribution. The resulting predictor p p p satisfies p ( x ) = E [ S ( X ) ∣ X ∈ C j ] p(x) = \mathbb{E}[S(X) \mid X \in C_j] p ( x ) = E [ S ( X ) ∣ X ∈ C j ] for x ∈ C j x \in C_j x ∈ C j , so S − p S-p S − p has mean zero within every category. Consequently, category averaging adds no error to any signed sum of category residuals. The same cancellation applies to every calibration test h ( p ( X ) ) h(p(X)) h ( p ( X )) , since p p p , and hence h ( p ( X ) ) h(p(X)) h ( p ( X )) , is constant within each category. For a multiaccuracy test g ( X ) g(X) g ( X ) , which can vary within a category, the additional residual is instead
E [ g ( X ) ( S ( X ) − p ( X ) ) ] = ∑ j P ( X ∈ C j ) Cov ( g ( X ) , S ( X ) ∣ X ∈ C j ) . \mathbb{E}[g(X)(S(X)-p(X))] = \sum_j \mathbb{P}(X \in C_j)\operatorname{Cov}(g(X),S(X) \mid X \in C_j). E [ g ( X ) ( S ( X ) − p ( X ))] = j ∑ P ( X ∈ C j ) Cov ( g ( X ) , S ( X ) ∣ X ∈ C j ) .
The algorithm estimates the category averages from samples; we later bound the resulting estimation error.
We first choose a distribution over assignments for which the additional multiaccuracy residuals are small in expectation. We then fix the random choices during training. Concentration, using the small probability mass of each part receiving an independent choice, keeps these residuals small. Calibration requires a different argument: category averaging is exactly calibrated relative to S S S , but we need calibration relative to Y Y Y . The auxiliary tests control the signed sums of Y − S Y-S Y − S over the categories in expectation over the assignment choices. Concentration then controls these sums for the fixed assignment, allowing us to transfer calibration from S S S to Y Y Y .
The training algorithm below may randomize, but after training it outputs a fixed function of the context. Unlike the randomized upper bound in § 4 , the construction is information-theoretic: its direct implementation can require exponential time.
Theorem 5.1 (Deterministic upper bound). Suppose X ⊆ [ 0 , 1 ] d \mathcal{X} \subseteq[0,1]^d X ⊆ [ 0 , 1 ] d is a Borel set, and let G \mathcal{G} G be a finite nonempty family of measurable tests g : X → [ − 1 , 1 ] g : \mathcal{X} \to[-1,1] g : X → [ − 1 , 1 ] . There is a learning algorithm that, given accuracy and confidence parameters ε , δ ∈ ( 0 , 1 / 10 ) \varepsilon,\delta\in(0,1/10) ε , δ ∈ ( 0 , 1/10 ) , outputs a deterministic predictor p : X → [ 0 , 1 ] p : \mathcal{X} \to[0,1] p : X → [ 0 , 1 ] satisfying
CMA ( p ; G ) ≤ ε \operatorname{CMA}(p;\mathcal{G}) \le\varepsilon CMA ( p ; G ) ≤ ε with probability at least 1 − δ 1-\delta 1 − δ using a set of i.i.d. samples of size
O ~ ( A δ ε 2 + A δ 1 / 3 ε 8 / 3 ) , A δ = log 8 ∣ G ∣ δ + 1. \widetilde{O}\left(\frac{A_\delta}{\varepsilon^2}+\frac{A_\delta^{1/3}}{\varepsilon^{8/3}}\right), \qquad A_\delta= \log\frac{8|\mathcal{G}|}{\delta}+1. O ( ε 2 A δ + ε 8/3 A δ 1/3 ) , A δ = log δ 8∣ G ∣ + 1. The probability is over the sample and the training algorithm’s randomness; the output is the fixed function p p p .
What category averaging accomplishes
Category averaging has a direct interpretation as an L 2 L_2 L 2 projection: it replaces the score by its conditional expectation given the category. We will use the following elementary identities which follow from this viewpoint.
For a finite measurable partition C \mathcal{C} C of X \mathcal{X} X , define its cellwise calibration error by
Cal C ( q ) = ∑ C ∈ C ∣ E [ 1 { X ∈ C } ( Y − q ( X ) ) ] ∣ . \operatorname{Cal}_{\mathcal{C}}(q)=\sum_{C\in\mathcal{C}}\left|\mathbb{E}\left[1\{\mathcal{X}\in C\}(Y-q(X))\right]\right|. Cal C ( q ) = C ∈ C ∑ ∣ E [ 1 { X ∈ C } ( Y − q ( X )) ] ∣ .
Lemma 5.2 (Category averaging as projection). Fix an intermediate score S : X → [ 0 , 1 ] S:\mathcal{X}\to[0,1] S : X → [ 0 , 1 ] and a measurable assignment J : X → J J:\mathcal{X}\to\mathcal{J} J : X → J of contexts to a finite set of categories J \mathcal{J} J . Set
p J ( X ) = E [ S ( X ) ∣ J ] and R J = S − p J . p_J(X)=\mathbb{E}[S(X)\mid J]\qquad\text{and}\qquad R_J=S-p_J. p J ( X ) = E [ S ( X ) ∣ J ] and R J = S − p J . Then
E [ R J ∣ J ] = 0 , E [ S R J ] = E [ R J 2 ] . (7) \mathbb{E}[R_J\mid J]=0,\qquad\mathbb{E}[SR_J]=\mathbb{E}[R_J^2]. \tag*{(7)} E [ R J ∣ J ] = 0 , E [ S R J ] = E [ R J 2 ] . (7) Consequently, for every bounded test g : X → R g:\mathcal{X}\to\mathbb{R} g : X → R ,
E [ g ( X ) R J ( X ) ] = ∑ j ∈ J P ( J = j ) Cov ( g ( X ) , S ( X ) ∣ J = j ) . (8) \mathbb{E}[g(X)R_J(X)]=\sum_{j\in\mathcal{J}}\mathbb{P}(J=j)\operatorname{Cov}(g(X),S(X)\mid J=j). \tag*{(8)} E [ g ( X ) R J ( X )] = j ∈ J ∑ P ( J = j ) Cov ( g ( X ) , S ( X ) ∣ J = j ) . (8) Moreover, if C J = { J − 1 ( j ) : j ∈ J } \mathcal{C}_J=\{J^{-1}(j):j\in\mathcal{J}\} C J = { J − 1 ( j ) : j ∈ J } , then
Cal C J ( p J ) = max σ ∈ { − 1 , 1 } J ∣ E [ σ J ( X ) ( Y − S ( X ) ) ] ∣ . (9) \operatorname{Cal}_{\mathcal{C}_J}(p_J)=\max_{\sigma\in\{-1,1\}^{\mathcal{J}}}\left|\mathbb{E}\left[\sigma_{J(X)}(Y-S(X))\right]\right|. \tag*{(9)} Cal C J ( p J ) = σ ∈ { − 1 , 1 } J max E [ σ J ( X ) ( Y − S ( X )) ] . (9)
Proof. The first identity is the defining property of conditional expectation. Since p J p_J p J is constant within each category and E [ R J ∣ J ] = 0 \mathbb{E}[R_J\mid J]=0 E [ R J ∣ J ] = 0 , we have E [ p J R J ] = E [ p J E [ R J ∣ J ] ] = 0 \mathbb{E}[p_JR_J]=\mathbb{E}[p_J\mathbb{E}[R_J\mid J]]=0 E [ p J R J ] = E [ p J E [ R J ∣ J ]] = 0 . Therefore,
E [ S R J ] = E [ ( p J + R J ) R J ] = E [ R J 2 ] . \mathbb{E}[SR_J]=\mathbb{E}[(p_J+R_J)R_J]=\mathbb{E}[R_J^2]. E [ S R J ] = E [( p J + R J ) R J ] = E [ R J 2 ] .
Conditioning E [ g R J ] \mathbb{E}[gR_J] E [ g R J ] on each category gives (8) . Finally, E [ 1 { J = j } R J ] = 0 \mathbb{E}[1\{J=j\}R_J]=0 E [ 1 { J = j } R J ] = 0 for every j j j , so
E [ 1 { J = j } ( Y − p J ) ] = E [ 1 { J = j } ( Y − S ) ] . \mathbb{E}[1\{J=j\}(Y-p_J)]=\mathbb{E}[1\{J=j\}(Y-S)]. E [ 1 { J = j } ( Y − p J )] = E [ 1 { J = j } ( Y − S )] .
Summing absolute values over j j j and applying ℓ 1 / ℓ ∞ \ell_1/\ell_\infty ℓ 1 / ℓ ∞ duality proves (9) . □
By (8) , the change in the multiaccuracy residual for g g g is the probability-weighted sum of its within-category covariances with S S S . Our goal is therefore to choose the categories so that this sum is small in absolute value for every g ∈ G g\in\mathcal{G} g ∈ G .
If q q q is constant on every cell of a partition C \mathcal{C} C , then
ECE ( q ) ≤ Cal C ( q ) . (10) \operatorname{ECE}(q)\leq\operatorname{Cal}_{\mathcal{C}}(q). \tag*{(10)} ECE ( q ) ≤ Cal C ( q ) . (10)
ECE groups together all contexts receiving the same prediction. Since q q q is constant on each cell, each such group is a union of cells assigned the same prediction value. Combining these cells adds their residual expectations before taking an absolute value. By the triangle inequality, this is at most the sum of the absolute residual expectations of the individual cells.
We call the expectations E [ σ J ( X ) ( Y − S ( X ) ) ] \mathbb{E}[\sigma_{J(X)}(Y-S(X))] E [ σ J ( X ) ( Y − S ( X ))] , one for each choice of category signs σ \sigma σ , the category-sign residuals . The score-learning algorithm will need to control these residuals for the assignment rules used in the later stages.
Three different partitions appear later, with different roles. An assignment cell is a set of contexts that shares one random choice made during training. Using a finite partition lets the training algorithm store one seed per cell and thereby define a fixed measurable predictor. A category is a set J − 1 ( j ) J^{-1}(j) J − 1 ( j ) on which we replace S S S by its average. A prediction level set contains all contexts receiving a particular prediction value; it may be a union of several categories.
The proof has two steps. The population argument chooses a distribution over category assignments for which the expected signed change in every multiaccuracy residual is small in absolute value, and the expected squared change in the score is small. Both expectations are over the assignments. The finite-sample argument applies the same construction to an empirical context distribution, fixes one assignment per cell, and transfers the resulting empirical coarsening guarantees to the population.
The population assignment argument
We first control a weighted average of the changes in the multiaccuracy residuals that come from category averaging. We will then choose the weights so that this average equals the largest change among the signed tests. Including both g g g and − g -g − g lets us control changes in either direction. To see how this works, let H = G ∪ ( − G ) \mathcal{H}=\mathcal{G}\cup(-\mathcal{G}) H = G ∪ ( − G ) , let π \pi π be a distribution on H \mathcal{H} H , and write
f π ( x ) = E h ∼ π [ h ( x ) ] . f_{\pi}(x)=\mathbb{E}_{h\sim\pi}[h(x)]. f π ( x ) = E h ∼ π [ h ( x )] .
Suppose that, for some λ c a t > 0 \lambda_{\mathrm{cat}}>0 λ cat > 0 , we could group contexts by the exact value of Z = f π ( X ) + λ c a t S ( X ) Z=f_{\pi}(X)+\lambda_{\mathrm{cat}}S(X) Z = f π ( X ) + λ cat S ( X ) and replace S S S by p ⋆ = E [ S ∣ Z ] p^\star=\mathbb{E}[S\mid Z] p ⋆ = E [ S ∣ Z ] . Fix π \pi π , so p ⋆ p^\star p ⋆ does not depend on which test h h h is drawn. Since f π ( x ) = E h ∼ π [ h ( x ) ] f_{\pi}(x)=\mathbb{E}_{h\sim\pi}[h(x)] f π ( x ) = E h ∼ π [ h ( x )] , averaging the residual over tests drawn from π \pi π is the same as testing against f π f_{\pi} f π . Thus
E h ∼ π E [ h ( X ) ( S − p ⋆ ) ] = E [ f π ( X ) ( S − p ⋆ ) ] = E [ ( Z − λ c a t S ) ( S − p ⋆ ) ] = − λ c a t E [ ( S − p ⋆ ) 2 ] . \begin{aligned}
\mathbb{E}_{h\sim\pi}\mathbb{E}[h(X)(S-p^\star)]&=\mathbb{E}[f_{\pi}(X)(S-p^\star)]\\
&=\mathbb{E}[(Z-\lambda_{\mathrm{cat}}S)(S-p^\star)]\\
&=-\lambda_{\mathrm{cat}}\mathbb{E}[(S-p^\star)^2].
\end{aligned} E h ∼ π E [ h ( X ) ( S − p ⋆ )] = E [ f π ( X ) ( S − p ⋆ )] = E [( Z − λ cat S ) ( S − p ⋆ )] = − λ cat E [( S − p ⋆ ) 2 ] .
The term containing Z Z Z vanishes because E [ S − p ⋆ ∣ Z ] = 0 \mathbb{E}[S-p^\star\mid Z]=0 E [ S − p ⋆ ∣ Z ] = 0 , while E [ S ( S − p ⋆ ) ] = E [ ( S − p ⋆ ) 2 ] \mathbb{E}[S(S-p^\star)]=\mathbb{E}[(S-p^\star)^2] E [ S ( S − p ⋆ )] = E [( S − p ⋆ ) 2 ] . Thus grouping by f π + λ c a t S f_{\pi}+\lambda_{\mathrm{cat}}S f π + λ cat S and averaging S S S creates a negative quadratic term in the π \pi π -weighted change in the multiaccuracy residuals.
The construction below approximates f π f_{\pi} f π by an average of a small number of sampled tests and the exact level sets of Z Z Z by K + 1 K+1 K + 1 categories. These approximations introduce an error proportional to the root-mean-square change in the score; Lemma 5.3 makes this tradeoff precise. We now define the finite construction. Fix an intermediate score S S S , a finite measurable partition U \mathcal{U} U , and a finite set B = { x 1 p r i v , … , x K p r i v p r i v } \mathcal{B}=\{x^{\mathrm{priv}}_1,\ldots,x^{\mathrm{priv}}_{K_{\mathrm{priv}}}\} B = { x 1 priv , … , x K priv priv } whose singletons are cells of U \mathcal{U} U . Each point in B \mathcal{B} B will form a private category and retain its score; every other cell will independently choose an assignment rule as described below. Also fix an integer K ≥ 1 K\ge1 K ≥ 1 , a tuple length m s p ≥ 1 m_{\mathrm{sp}}\ge1 m sp ≥ 1 , and a parameter λ c a t > 0 \lambda_{\mathrm{cat}}>0 λ cat > 0 .
For this finite construction, let π \pi π again denote a distribution over the signed tests in H \mathcal{H} H . For a tuple τ = ( h 1 , … , h m s p ) ∈ H m s p \tau=(h_1,\ldots,h_{m_{\mathrm{sp}}})\in\mathcal{H}^{m_{\mathrm{sp}}} τ = ( h 1 , … , h m sp ) ∈ H m sp , define its sparse average
f τ ( x ) = 1 m s p ∑ ℓ = 1 m s p h ℓ ( x ) . f_{\tau}(x)=\frac{1}{m_{\mathrm{sp}}}\sum_{\ell=1}^{m_{\mathrm{sp}}}h_{\ell}(x). f τ ( x ) = m sp 1 ℓ = 1 ∑ m sp h ℓ ( x ) .
For a possible score value s ∈ [ 0 , 1 ] s\in[0,1] s ∈ [ 0 , 1 ] , the assignment score f τ ( x ) + λ c a t s f_{\tau}(x)+\lambda_{\mathrm{cat}}s f τ ( x ) + λ cat s lies in [ − 1 , λ c a t + 1 ] [-1,\lambda_{\mathrm{cat}}+1] [ − 1 , λ cat + 1 ] . Let u 0 , … , u K u_0,\ldots,u_K u 0 , … , u K be the uniform grid on this interval, with spacing
w = λ c a t + 2 K , w=\frac{\lambda_{\mathrm{cat}}+2}{K}, w = K λ cat + 2 ,
and let j τ ( x , s ) ∈ { 0 , … , K } j_\tau(x,s) \in\{0,\ldots,K\} j τ ( x , s ) ∈ { 0 , … , K } be the index of the nearest grid point, with fixed tie-breaking. We call the categories indexed by 0 , … , K 0,\ldots,K 0 , … , K the nominal categories , to distinguish them from the private singleton categories. The full category map is
J τ ( x , s ) = { j τ ( x , s ) , x ∉ B , K + i , x = x i p r i v . J_\tau(x,s) =
\begin{cases}
j_\tau(x,s), & x \notin B,\\
K+i, & x=x_i^{\mathrm{priv}}.
\end{cases} J τ ( x , s ) = { j τ ( x , s ) , K + i , x ∈ / B , x = x i priv .
Scores assigned to the same nominal category, even under different tuples, are close: if j τ ( x , s ) = j τ ′ ( x ′ , s ′ ) j_\tau(x,s)=j_{\tau'}(x',s') j τ ( x , s ) = j τ ′ ( x ′ , s ′ ) , then
λ c a t ∣ s − s ′ ∣ ≤ ∣ f τ ( x ) − f τ ′ ( x ′ ) ∣ + w ≤ 2 + w . \lambda_{\mathrm{cat}}|s-s'| \leq|f_\tau(x)-f_{\tau'}(x')|+w \leq2+w. λ cat ∣ s − s ′ ∣ ≤ ∣ f τ ( x ) − f τ ′ ( x ′ ) ∣ + w ≤ 2 + w .
Thus every nominal category has score diameter at most
D c a t = 2 + w λ c a t . (11) D_{\mathrm{cat}}=\frac{2+w}{\lambda_{\mathrm{cat}}}. \tag*{(11)} D cat = λ cat 2 + w . (11)
A private category has score diameter zero.
Independently for each nonprivate cell U ∈ U U\in\mathcal{U} U ∈ U , draw τ U ∼ π m s p \tau_U\sim\pi^{\mathrm{msp}} τ U ∼ π msp . Write ω = ( τ U ) U \omega=(\tau_U)_U ω = ( τ U ) U and, for x ∈ U x\in U x ∈ U , set
f ω ( x ) = f τ U ( x ) , J ω ( x ) = j τ U ( x , S ( x ) ) . f_\omega(x)=f_{\tau_U}(x),\qquad J_\omega(x)=j_{\tau_U}(x,S(x)). f ω ( x ) = f τ U ( x ) , J ω ( x ) = j τ U ( x , S ( x )) .
For x = x i p r i v x=x_i^{\mathrm{priv}} x = x i priv , set J ω ( x ) = K + i J_\omega(x)=K+i J ω ( x ) = K + i ; the value of f ω f_\omega f ω there is set to zero. For every category of positive mass, let r ω , j = E [ S ( X ) ∣ J ω ( X ) = j ] r_{\omega,j}=\mathbb{E}[S(X)\mid J_\omega(X)=j] r ω , j = E [ S ( X ) ∣ J ω ( X ) = j ] . Set r ω , K + i = S ( x i p r i v ) r_{\omega,K+i}=S(x_i^{\mathrm{priv}}) r ω , K + i = S ( x i priv ) for a private category of probability mass zero, and assign zero to a nominal category of probability mass zero. Define the category-averaged predictor globally by
p ω ( x ) = r ω , J ω ( x ) . (12) p_\omega(x)=r_{\omega,J_\omega(x)}. \tag*{(12)} p ω ( x ) = r ω , J ω ( x ) . (12)
This is a version of E [ S ( X ) ∣ J ω ] \mathbb{E}[S(X)\mid J_\omega] E [ S ( X ) ∣ J ω ] and equals S ( x i p r i v ) S(x_i^{\mathrm{priv}}) S ( x i priv ) on a private singleton.
For a fixed assignment, define the additional residual for test h h h and the squared change in the score by
F h ( ω ) = E [ h ( X ) ( S ( X ) − p ω ( X ) ) ] , V ( ω ) = E [ ( S ( X ) − p ω ( X ) ) 2 ] . F_h(\omega)=\mathbb{E}[h(X)(S(X)-p_\omega(X))],\qquad V(\omega)=\mathbb{E}[(S(X)-p_\omega(X))^2]. F h ( ω ) = E [ h ( X ) ( S ( X ) − p ω ( X ))] , V ( ω ) = E [( S ( X ) − p ω ( X ) ) 2 ] .
Let
d h ( π ) = E ω F h ( ω ) , V ‾ ( π ) = E ω V ( ω ) . d_h(\pi)=\mathbb{E}_\omega F_h(\omega),\qquad\overline{V}(\pi)=\mathbb{E}_\omega V(\omega). d h ( π ) = E ω F h ( ω ) , V ( π ) = E ω V ( ω ) .
Thus d h ( π ) d_h(\pi) d h ( π ) is the expected signed change in the multiaccuracy residual for test h h h , and V ‾ ( π ) \overline{V}(\pi) V ( π ) is the expected squared change caused by category averaging. We call d d d the residual-change map.
The next lemma contains the complete population argument. Its first step bounds the π \pi π -weighted average of the residual changes. Its second chooses π \pi π supported on tests attaining the largest expected change d h ( π ) d_h(\pi) d h ( π ) , so this weighted average equals the maximum.
Lemma 5.3 (Population category assignment). There is a distribution π ⋆ \pi^\star π ⋆ on H \mathcal{H} H such that
max h d h ( π ⋆ ) ≤ e a p p 2 4 λ c a t , V ‾ ( π ⋆ ) ≤ e a p p 2 λ c a t 2 , e a p p = w 2 + 1 m s p . \max_h d_h(\pi^\star)\leq\frac{e_{\mathrm{app}}^2}{4\lambda_{\mathrm{cat}}},\qquad\overline{V}(\pi^\star)\leq\frac{e_{\mathrm{app}}^2}{\lambda_{\mathrm{cat}}^2},\qquad e_{\mathrm{app}}=\frac{w}{2}+\frac{1}{\sqrt{m_{\mathrm{sp}}}}. h max d h ( π ⋆ ) ≤ 4 λ cat e app 2 , V ( π ⋆ ) ≤ λ cat 2 e app 2 , e app = 2 w + m sp 1 . The bounds hold for every context distribution and every fixed choice of S S S , U \mathcal{U} U , and B B B in the construction above.
Proof. Fix any distribution π \pi π on H \mathcal{H} H and let f π = ∑ h π ( h ) h f_\pi= \sum_h \pi(h)h f π = ∑ h π ( h ) h . On a point in nominal category j j j , write
e ω ( x ) = f ω ( x ) + λ c a t S ( x ) − u j , ∣ e ω ( x ) ∣ ≤ w / 2. e_\omega(x) = f_\omega(x) + \lambda_{\mathrm{cat}}S(x) - u_j, \qquad|e_\omega(x)| \le w/2. e ω ( x ) = f ω ( x ) + λ cat S ( x ) − u j , ∣ e ω ( x ) ∣ ≤ w /2.
Set e ω = 0 e_\omega=0 e ω = 0 on the private categories, where S − p ω = 0 S-p_\omega=0 S − p ω = 0 . The category-projection identities give E [ u J ω ( S − p ω ) ] = 0 \mathbb{E}[u_J\omega(S-p_\omega)]=0 E [ u J ω ( S − p ω )] = 0 (extend u j u_j u j by zero on private indices) and E [ S ( S − p ω ) ] = V ( ω ) \mathbb{E}[S(S-p_\omega)]=V(\omega) E [ S ( S − p ω )] = V ( ω ) . Since S − p ω = 0 S-p_\omega=0 S − p ω = 0 on every private category,
E [ f ω ( X ) ( S − p ω ) ] = − λ c a t V ( ω ) + E [ e ω ( X ) ( S − p ω ) ] ≤ w 2 V ( ω ) − λ c a t V ( ω ) . \begin{aligned}
\mathbb{E}[f_\omega(X)(S-p_\omega)] = -\lambda_{\mathrm{cat}}V(\omega) + \mathbb{E}[e_\omega(X)(S-p_\omega)] \\
&\le\frac{w}{2}\sqrt{V(\omega)}-\lambda_{\mathrm{cat}}V(\omega).
\end{aligned} E [ f ω ( X ) ( S − p ω )] = − λ cat V ( ω ) + E [ e ω ( X ) ( S − p ω )] ≤ 2 w V ( ω ) − λ cat V ( ω ) .
For each fixed nonprivate context, f ω ( x ) f_\omega(x) f ω ( x ) is the average of m s p m_{\mathrm{sp}} m sp independent draws from π \pi π , so it has mean f π ( x ) f_\pi(x) f π ( x ) and variance at most 1 / m s p 1/m_{\mathrm{sp}} 1/ m sp . Since S − p ω = 0 S-p_\omega=0 S − p ω = 0 on the private points, Cauchy–Schwarz over the context and assignment randomness gives
∣ E ω , X [ ( f π ( X ) − f ω ( X ) ) ( S ( X ) − p ω ( X ) ) ] ∣ ≤ m s p − 1 / 2 V ( π ) . \left|\mathbb{E}_{\omega,X}[(f_\pi(X)-f_\omega(X))(S(X)-p_\omega(X))]\right| \le m_{\mathrm{sp}}^{-1/2}\sqrt{V(\pi)}. ∣ E ω , X [( f π ( X ) − f ω ( X )) ( S ( X ) − p ω ( X ))] ∣ ≤ m sp − 1/2 V ( π ) .
Thus replacing f ω f_\omega f ω by f π f_\pi f π in the averaged residual changes it by at most this amount. Averaging the preceding residual bound over ω \omega ω and applying Jensen’s inequality gives
∑ h π ( h ) d h ( π ) ≤ ϵ a p p V ( π ) − λ c a t V ( π ) . (13) \sum_h \pi(h)d_h(\pi) \le\epsilon_{\mathrm{app}}\sqrt{V(\pi)}-\lambda_{\mathrm{cat}}V(\pi). \tag*{(13)} h ∑ π ( h ) d h ( π ) ≤ ϵ app V ( π ) − λ cat V ( π ) . (13)
Worst-test fixed point. For each fixed seed vector ω \omega ω , F h ( ω ) F_h(\omega) F h ( ω ) is independent of π \pi π . Because U \mathcal{U} U and H \mathcal{H} H are finite, d h ( π ) d_h(\pi) d h ( π ) is a finite sum of these fixed residuals weighted by assignment probabilities, each polynomial in π \pi π . Hence d d d is continuous. Also d − h ( π ) = − d h ( π ) d_{-h}(\pi)=-d_h(\pi) d − h ( π ) = − d h ( π ) . Let Π Δ \Pi_\Delta Π Δ be Euclidean projection onto the simplex Δ ( H ) \Delta(\mathcal{H}) Δ ( H ) . The map
π ⟼ Π Δ ( π + d ( π ) ) \pi\longmapsto\Pi_\Delta(\pi+d(\pi)) π ⟼ Π Δ ( π + d ( π ))
is continuous and maps the simplex to itself, so Brouwer’s theorem gives a fixed point π ⋆ \pi^\star π ⋆ . By the definition of projection, moving from π ⋆ \pi^\star π ⋆ toward any q ∈ Δ ( H ) q\in\Delta(\mathcal{H}) q ∈ Δ ( H ) cannot decrease squared distance to π ⋆ + d ( π ⋆ ) \pi^\star+d(\pi^\star) π ⋆ + d ( π ⋆ ) . Differentiating along this segment at its starting point gives
⟨ d ( π ⋆ ) , q − π ⋆ ⟩ ≤ 0. \langle d(\pi^\star),q-\pi^\star\rangle\le0. ⟨ d ( π ⋆ ) , q − π ⋆ ⟩ ≤ 0.
Taking q q q to be each point mass shows that every coordinate of d ( π ⋆ ) d(\pi^\star) d ( π ⋆ ) is at most its π ⋆ \pi^\star π ⋆ -weighted average. Hence
max h d h ( π ⋆ ) = ∑ h π ⋆ ( h ) d h ( π ⋆ ) . \max_h d_h(\pi^\star)=\sum_h\pi^\star(h)d_h(\pi^\star). h max d h ( π ⋆ ) = h ∑ π ⋆ ( h ) d h ( π ⋆ ) .
Combining this identity with (13) gives
max h d h ( π ⋆ ) ≤ ϵ a p p V ( π ⋆ ) − λ c a t V ( π ⋆ ) ≤ ϵ a p p 2 4 λ c a t . \max_h d_h(\pi^\star)\le\epsilon_{\mathrm{app}}\sqrt{V(\pi^\star)}-\lambda_{\mathrm{cat}}V(\pi^\star)\le\frac{\epsilon_{\mathrm{app}}^2}{4\lambda_{\mathrm{cat}}}. h max d h ( π ⋆ ) ≤ ϵ app V ( π ⋆ ) − λ cat V ( π ⋆ ) ≤ 4 λ cat ϵ app 2 .
Antisymmetry makes the maximum nonnegative, so
0 ≤ ϵ a p p V ( π ⋆ ) − λ c a t V ( π ⋆ ) . 0\le\epsilon_{\mathrm{app}}\sqrt{V(\pi^\star)}-\lambda_{\mathrm{cat}}V(\pi^\star). 0 ≤ ϵ app V ( π ⋆ ) − λ cat V ( π ⋆ ) .
Solving this quadratic inequality in V ( π ⋆ ) \sqrt{V(\pi^\star)} V ( π ⋆ ) proves the variance bound.
This completes the population argument. The remaining work is to construct S S S , U U U , and B B B from samples, apply this argument to an empirical context distribution, and fix the assignment tuples. We next derive the parameters from the errors they must control. The next subsections construct the finite-sample partition and score and then choose the assignments; here we first record the scales those steps must achieve. Set
K = ⌈ c K ( A δ / ε 2 ) 1 / 3 ⌉ , α = c α ε , γ = α / 64 , K = \left\lceil c_K(A_\delta/\varepsilon^2)^{1/3} \right\rceil,\qquad\alpha= c_\alpha\varepsilon,\qquad\gamma= \alpha/64, K = ⌈ c K ( A δ / ε 2 ) 1/3 ⌉ , α = c α ε , γ = α /64 ,
where c K c_K c K is large and c α c_\alpha c α is small. We first consider A δ ≤ c / ε A_\delta\le c/\varepsilon A δ ≤ c / ε , which implies A δ ≤ K A_\delta\le K A δ ≤ K ; the complementary range will follow by applying the finite-test learner directly. Write
ξ = A δ K 3 . \xi= \sqrt{\frac{A_\delta}{K^3}}. ξ = K 3 A δ .
The score learner must anticipate every sparse tuple and every sign assignment to the eventual O ( K ) O(K) O ( K ) categories. The resulting auxiliary class has log-cardinality m s p log ∣ H ∣ + O ( K ) m_{\mathrm{sp}}\log|\mathcal{H}| + O(K) m sp log ∣ H ∣ + O ( K ) . Taking
m s p = ⌈ K A δ ⌉ m_{\mathrm{sp}} = \left\lceil\frac{K}{A_\delta} \right\rceil m sp = ⌈ A δ K ⌉
keeps this quantity O ( K ) O(K) O ( K ) and gives sparse-average error m s p − 1 / 2 = O ( A δ / K ) m_{\mathrm{sp}}^{-1/2} = O(\sqrt{A_\delta/K}) m sp − 1/2 = O ( A δ / K ) . Match the category-grid spacing to this error as follows. For a general choice of λ c a t \lambda_{\mathrm{cat}} λ cat ,
e a p p = O ( λ c a t K + A δ K ) , e a p p 2 λ c a t = O ( λ c a t K 2 + A δ K λ c a t ) . e_{\mathrm{app}} = O\left(\frac{\lambda_{\mathrm{cat}}}{K} + \sqrt{\frac{A_\delta}{K}}\right),\qquad\frac{e_{\mathrm{app}}^2}{\lambda_{\mathrm{cat}}} = O\left(\frac{\lambda_{\mathrm{cat}}}{K^2} + \frac{A_\delta}{K\lambda_{\mathrm{cat}}}\right). e app = O ( K λ cat + K A δ ) , λ cat e app 2 = O ( K 2 λ cat + K λ cat A δ ) .
Balancing these two terms leads to
λ c a t = c c a t A δ K , w = λ c a t + 2 K . \lambda_{\mathrm{cat}} = c_{\mathrm{cat}}\sqrt{A_\delta K},\qquad w = \frac{\lambda_{\mathrm{cat}}+2}{K}. λ cat = c cat A δ K , w = K λ cat + 2 .
Then e a p p = w / 2 + m s p − 1 / 2 = O ( A δ / K ) e_{\mathrm{app}} = w/2 + m_{\mathrm{sp}}^{-1/2} = O(\sqrt{A_\delta/K}) e app = w /2 + m sp − 1/2 = O ( A δ / K ) , and Lemma 5.3 gives a population mixture with
e a p p 2 λ c a t = O ( ξ ) , V ‾ ( π ⋆ ) = O ( K − 2 ) . \frac{e_{\mathrm{app}}^2}{\lambda_{\mathrm{cat}}} = O(\xi),\qquad\overline{V}(\pi^\star) = O(K^{-2}). λ cat e app 2 = O ( ξ ) , V ( π ⋆ ) = O ( K − 2 ) .
The same bounds hold when the context distribution is empirical, which will let us choose the assignment distribution from samples. Lemma A.1 bounds the deviation of each additional multiaccuracy residual from its expectation, when fixing the assignment seeds, by
O ( b V ‾ ( π ) A δ + b D c a t A δ ) , O\left(\sqrt{b\overline{V}(\pi)A_\delta}+bD_{\mathrm{cat}}A_\delta\right), O ( b V ( π ) A δ + b D cat A δ ) ,
where b b b is the largest assignment-cell mass. Since V ‾ ( π ) = O ( K − 2 ) \overline{V}(\pi) = O(K^{-2}) V ( π ) = O ( K − 2 ) and D c a t = O ( ( A δ K ) − 1 / 2 ) D_{\mathrm{cat}} = O((A_\delta K)^{-1/2}) D cat = O (( A δ K ) − 1/2 ) for the chosen distribution, both terms are O ( ξ ) O(\xi) O ( ξ ) when b = O ( 1 / K ) b = O(1/K) b = O ( 1/ K ) . We therefore give sufficiently frequent contexts private categories and partition the rest into cells of mass O ( 1 / K ) O(1/K) O ( 1/ K ) . The finite-sample construction uses three independent samples. A labeled preprocessing sample constructs confidence intervals for the conditional label means and the context partition. A second labeled sample learns the intermediate deterministic score. A context-only sample then supplies both the assignment distribution and the final category means.
Learning a score for the later assignments
Write p x = P X ( { x } ) p_x = P_X(\{x\}) p x = P X ({ x }) for the probability mass of a context x x x , and call x x x an atom of the context distribution when p x > 0 p_x > 0 p x > 0 . Use a labeled preprocessing sample to construct confidence intervals I x I_x I x , allowed grid values Λ x \Lambda_x Λ x , and a finite set B ^ \widehat{B} B of frequently observed contexts. Each point in B ^ \widehat{B} B forms a private singleton category and keeps its score S ( x ) S(x) S ( x ) , so we call B ^ \widehat{B} B the fixed-score set . It is chosen to contain every atom of mass greater than C / K C/K C / K and has size O ( K ) O(K) O ( K ) .
The same sample produces a finite measurable partition U \mathcal{U} U : each observed context is a singleton, and the remaining cells are the gaps between successive observed contexts in lexicographic order, together with the two outer gaps before the first and after the last observed context. A singleton from B ^ \widehat{B} B is excluded from the random assignment; every other cell is an assignment cell . All contexts in an assignment cell use the same sampled tuple of tests. The confidence intervals and partition also provide a squared-mass bound for controlling all category-sign tests at once.
Call a context observed if it appears in the preprocessing sample, and call a partition cell unobserved if it contains no observed context. The next lemma records all properties of this preprocessing that the proof uses. Its proof, including the construction of I x I_x I x , Λ x \Lambda_x Λ x , and U \mathcal{U} U , is in Appendix A. Let ρ x \rho_x ρ x be the confidence radius used to construct I x I_x I x before clipping to [ 0 , 1 ] [0,1] [ 0 , 1 ] , and fix a measurable version μ ( x ) = E [ Y ∣ X = x ] \mu(x) = \mathbb{E}[Y \mid X = x] μ ( x ) = E [ Y ∣ X = x ] with values in [ 0 , 1 ] [0,1] [ 0 , 1 ] .
Lemma 5.4 (Finite preprocessing). Set
ℓ = C ℓ log C ℓ ( A δ + K ) α δ , N = ⌈ C N ( A δ + K ) ℓ α 2 ⌉ \ell= C_{\ell} \log\frac{C_{\ell}(A_{\delta} + K)}{\alpha\delta}, \qquad N = \left\lceil\frac{C_N(A_{\delta} + K)\ell}{\alpha^2} \right\rceil ℓ = C ℓ log α δ C ℓ ( A δ + K ) , N = ⌈ α 2 C N ( A δ + K ) ℓ ⌉ for sufficiently large universal constants C ℓ , C N C_{\ell}, C_N C ℓ , C N . Using N N N labeled preprocessing examples, with probability at least 1 − δ / 10 1-\delta/10 1 − δ /10 all of the following hold simultaneously.
(i) The confidence intervals contain the conditional mean pointwise: μ ( x ) ∈ I x \mu(x) \in I_x μ ( x ) ∈ I x for every x ∈ X x \in\mathcal{X} x ∈ X . Moreover, every Λ x \Lambda_x Λ x is a nonempty subset of one common finite grid Λ ⊆ [ 0 , 1 ] \Lambda\subseteq[0,1] Λ ⊆ [ 0 , 1 ] , every u ∈ I x u \in I_x u ∈ I x lies within distance γ \gamma γ of Λ x \Lambda_x Λ x , and every v ∈ Λ x v \in\Lambda_x v ∈ Λ x lies within distance γ \gamma γ of I x I_x I x .
(ii) The fixed-score set has size
∣ B ^ ∣ = O ( K ) , (14) |\widehat{B}| = O(K), \tag*{(14)} ∣ B ∣ = O ( K ) , (14) and contains every atom of mass greater than C / K C/K C / K .
(iii) The partition satisfies
max U a s s i g n m e n t c e l l P X ( U ) = O ( 1 / K ) , (15) \max_{U\ \mathrm{assignment\ cell}} P_X(U) = O(1/K), \tag*{(15)} U assignment cell max P X ( U ) = O ( 1/ K ) , (15) and its squared-mass budget obeys
V U : = ∑ x o b s e r v e d p x > 0 p x 2 ρ x 2 + ∑ U u n o b s e r v e d c e l l P X ( U ) 2 ≤ C ℓ N ≤ C α 2 A δ + K . (16) V_{\mathcal{U}} := \sum_{\substack{x\ \mathrm{observed}\\p_x>0}} p_x^2\rho_x^2 + \sum_{U\ \mathrm{unobserved\ cell}} P_X(U)^2 \le C\frac{\ell}{N} \le C\frac{\alpha^2}{A_{\delta}+K}. \tag*{(16)} V U := x observed p x > 0 ∑ p x 2 ρ x 2 + U unobserved cell ∑ P X ( U ) 2 ≤ C N ℓ ≤ C A δ + K α 2 . (16)
The two terms in V U V_{\mathcal{U}} V U control the effects of fixing assignments. For a score restricted to Λ x \Lambda_x Λ x , its value and the conditional mean at an observed singleton are within 2 ρ x + γ 2\rho_x+\gamma 2 ρ x + γ of one another; on an unobserved cell their difference is at most one. The contribution of a cell U U U to any signed Y − S Y-S Y − S residual has absolute value at most ∫ U ∣ μ − S ∣ d P X \int_U |\mu-S|\,dP_X ∫ U ∣ μ − S ∣ d P X . Summing the squares of these bounds gives O ( V U ) O(V_{\mathcal{U}}) O ( V U ) plus a small grid-tolerance term. The same budget also controls the earlier cellwise rounding that makes S S S deterministic.
The next lemma states the consequence of the deterministic finite-test algorithm that we use. It packages two steps from Noarov and Roth [2027]: learning a randomized score from intervals known to contain the conditional mean and then fixing one sampler seed per partition cell.
Lemma 5.5 (Deterministic finite-test score learning). Fix a finite grid Λ ⊆ [ 0 , 1 ] \Lambda\subseteq[0,1] Λ ⊆ [ 0 , 1 ] , nonempty closed intervals ( I x ) x ∈ X (I_x)_{x\in\mathcal{X}} ( I x ) x ∈ X , nonempty allowed sets Λ x ⊆ Λ \Lambda_x \subseteq\Lambda Λ x ⊆ Λ , and a finite partition U \mathcal{U} U produced by the preprocessing construction. Suppose μ ( x ) ∈ I x \mu(x) \in I_x μ ( x ) ∈ I x for every x x x , every point of I x I_x I x lies within γ \gamma γ of Λ x \Lambda_x Λ x , and every point of Λ x \Lambda_x Λ x lies within γ \gamma γ of I x I_x I x . Let V U V_{\mathcal{U}} V U be the quantity in (16) . For every finite nonempty family Φ \Phi Φ of measurable tests ϕ : X × [ 0 , 1 ] → [ − 1 , 1 ] \phi:\mathcal{X}\times[0,1]\to[-1,1] ϕ : X × [ 0 , 1 ] → [ − 1 , 1 ] and every β ∈ ( 0 , 1 ) \beta\in(0,1) β ∈ ( 0 , 1 ) , an algorithm using N N N fresh labeled examples and training randomness outputs a deterministic score S S S with S ( x ) ∈ Λ x S(x)\in\Lambda_x S ( x ) ∈ Λ x for every x x x and, with probability at least 1 − β 1-\beta 1 − β ,
max ϕ ∈ Φ ∣ E [ ϕ ( X , S ( X ) ) ( Y − S ( X ) ) ] ∣ ≤ C ( γ + log ( 2 ∣ Φ ∣ / β ) N + V U log 2 ∣ Φ ∣ β ) . (17) \max_{\phi\in\Phi}\left|\mathbb{E}[\phi(X,S(X))(Y-S(X))]\right| \le C\left(\gamma+\sqrt{\frac{\log(2|\Phi|/\beta)}{N}}+\sqrt{V_{\mathcal{U}}\log\frac{2|\Phi|}{\beta}}\right). \tag*{(17)} ϕ ∈ Φ max ∣ E [ ϕ ( X , S ( X )) ( Y − S ( X ))] ∣ ≤ C ( γ + N log ( 2∣Φ∣/ β ) + V U log β 2∣Φ∣ ) . (17)
Proof. Condition on the preprocessing transcript, so the grid, intervals, allowed sets, partition, and test family are fixed. Lemma 8.1 of Noarov and Roth [2027], applied to Φ \Phi Φ with failure probability β / 2 \beta/2 β /2 , returns a randomized grid predictor Q Q Q supported on Λ x \Lambda_x Λ x whose residuals are at most the first two terms in (17) . Conditional also on this predictor, apply their Proposition 6.1 to the same intervals and partition, again with failure probability β / 2 \beta/2 β /2 . Its one-seed-per-cell rounding produces a deterministic S S S and adds at most the last square-root term and another O ( γ ) O(\gamma) O ( γ ) . A union bound proves the stated probability, and reversing S − Y S-Y S − Y to Y − S Y-S Y − S does not change the absolute residual.
The cellwise category assignment will be chosen only after S S S is learned. We first bound its category-sign residual in expectation over the assignment randomness, and later use concentration to fix the random choices. Order the fixed-score set lexicographically as B ^ = { x 1 p r i v , … , x K p r i v p r i v } \widehat{B}=\{x_1^{\mathrm{priv}},\ldots,x_{K_{\mathrm{priv}}}^{\mathrm{priv}}\} B = { x 1 priv , … , x K priv priv } , where K p r i v = ∣ B ^ ∣ = O ( K ) K_{\mathrm{priv}}=|\widehat{B}|=O(K) K priv = ∣ B ∣ = O ( K ) , and instantiate the full single-tuple map J τ J_\tau J τ above with B = B ^ B=\widehat{B} B = B . The private categories introduce no assignment randomness and retain the score S ( x i p r i v ) S(x_i^{\mathrm{priv}}) S ( x i priv ) . Every assignment cell draws its tuple from the same distribution. For a fixed context, its category therefore has the same distribution as if one tuple were drawn and used everywhere. Averaging over contexts shows that the expected category-sign residual is an average of the residuals for these global rules. It suffices to control each global rule while learning S S S ; concentration will later control the realized cellwise assignments. For every σ ∈ { − 1 , 1 } K + 1 + K p r i v \sigma\in\{-1,1\}^{K+1+K_{\mathrm{priv}}} σ ∈ { − 1 , 1 } K + 1 + K priv , include the test
a τ , σ ( x , s ) = σ J τ ( x , s ) . (18) a_{\tau,\sigma}(x,s)=\sigma_{J_\tau(x,s)}. \tag*{(18)} a τ , σ ( x , s ) = σ J τ ( x , s ) . (18)
The logarithm of the number of these tests is
m s p log ∣ H ∣ + ( K + 1 + K p r i v ) log 2 = O ( K ) . m_{\mathrm{sp}}\log|\mathcal{H}|+(K+1+K_{\mathrm{priv}})\log2=O(K). m sp log ∣ H ∣ + ( K + 1 + K priv ) log 2 = O ( K ) .
Let
Φ K = G ∪ { a τ , σ : τ ∈ H m s p , σ ∈ { − 1 , 1 } K + 1 + K p r i v } \Phi_K=\mathcal{G}\cup\{a_{\tau,\sigma}:\tau\in\mathcal{H}^{m_{\mathrm{sp}}},\ \sigma\in\{-1,1\}^{K+1+K_{\mathrm{priv}}}\} Φ K = G ∪ { a τ , σ : τ ∈ H m sp , σ ∈ { − 1 , 1 } K + 1 + K priv }
be the full finite residual-test family, where each g ∈ G g\in\mathcal{G} g ∈ G is viewed as the prediction-independent test ( x , s ) ↦ g ( x ) (x,s)\mapsto g(x) ( x , s ) ↦ g ( x ) . Since A δ ≤ K A_\delta\le K A δ ≤ K , its log-cardinality is O ( K ) O(K) O ( K ) . Conditional on the preprocessing sample, Lemma 5.5 applied to Φ K \Phi_K Φ K restricts each S ( x ) S(x) S ( x ) to Λ x \Lambda_x Λ x and returns a deterministic score S : X → [ 0 , 1 ] S:\mathcal{X}\to[0,1] S : X → [ 0 , 1 ] satisfying
max g ∈ G ∣ E [ g ( X ) ( Y − S ( X ) ) ] ∣ ≤ C α , (19) \max_{g\in\mathcal{G}}\left|\mathbb{E}[g(X)(Y-S(X))]\right|\le C\alpha, \tag*{(19)} g ∈ G max ∣ E [ g ( X ) ( Y − S ( X ))] ∣ ≤ C α , (19)
max τ , σ ∣ E [ a τ , σ ( X , S ( X ) ) ( Y − S ( X ) ) ] ∣ ≤ C α . (20) \max_{\tau,\sigma}\left|\mathbb{E}[a_{\tau,\sigma}(X,S(X))(Y-S(X))]\right|\le C\alpha. \tag*{(20)} τ , σ max ∣ E [ a τ , σ ( X , S ( X )) ( Y − S ( X ))] ∣ ≤ C α . (20)
Choosing assignments on the empirical distribution
Once preprocessing and score learning are complete, the score S S S , partition U \mathcal{U} U , and fixed-score set B ^ \widehat{B} B are fixed. Draw a fresh context-only sample Z 1 , … , Z N Z_1,\ldots,Z_N Z 1 , … , Z N . Write P X [ f ] = E [ f ( X ) ] P_X[f]=\mathbb{E}[f(X)] P X [ f ] = E [ f ( X )] and
P ^ X [ f ] = 1 N ∑ i = 1 N f ( Z i ) . \widehat{P}_X[f]=\frac{1}{N}\sum_{i=1}^{N}f(Z_i). P X [ f ] = N 1 i = 1 ∑ N f ( Z i ) .
We apply the population construction directly to this empirical distribution. For a seed vector ω \omega ω , let r ^ ω , j \widehat{r}_{\omega,j} r ω , j be the empirical average of S S S in nominal category j j j , using zero if no sample point falls in that category. Let p ^ ω \widehat{p}_\omega p ω predict this average on each nominal category and retain S S S on B ^ \widehat{B} B . Define
F ^ h ( ω ) = P ^ X [ h ( S − p ^ ω ) ] , V ^ ( ω ) = P ^ X [ ( S − p ^ ω ) 2 ] . \widehat{F}_h(\omega)=\widehat{P}_X[h(S-\widehat{p}_\omega)],\qquad\widehat{V}(\omega)=\widehat{P}_X[(S-\widehat{p}_\omega)^2]. F h ( ω ) = P X [ h ( S − p ω )] , V ( ω ) = P X [( S − p ω ) 2 ] .
and average over independent cell tuples with law π m s p \pi^{m_{\mathrm{sp}}} π m sp :
d ^ h ( π ) = E ω F ^ h ( ω ) , V ^ ( π ) = E ω V ^ ( ω ) . \widehat{d}_h(\pi)=\mathbb{E}_\omega\widehat{F}_h(\omega),\qquad\widehat{V}(\pi)=\mathbb{E}_\omega\widehat{V}(\omega). d h ( π ) = E ω F h ( ω ) , V ( π ) = E ω V ( ω ) .
These are finite sums over all cellwise assignments. Observations in the same partition cell share one tuple, just as in the population construction.
Lemma 5.6 (Choosing the empirical assignment distribution). For every context sample, the training algorithm can select a distribution π ^ \widehat{\pi} π on H \mathcal{H} H such that
max h ∈ H d ^ h ( π ^ ) ≤ C ξ , V ^ ( π ^ ) ≤ C / K 2 . (21) \max_{h\in\mathcal{H}}\widehat{d}_h(\widehat{\pi})\le C\xi,\qquad\widehat{V}(\widehat{\pi})\le C/K^2. \tag*{(21)} h ∈ H max d h ( π ) ≤ C ξ , V ( π ) ≤ C / K 2 . (21) The selection is information-theoretic.
Proof. Lemma 5.3 applies with context distribution P ^ X \widehat{P}_X P X , so some mixture has maximum empirical residual at most e a p p 2 / ( 4 λ c a t ) e_{\mathrm{app}}^2/(4\lambda_{\mathrm{cat}}) e app 2 / ( 4 λ cat ) . Enumerate the rational points of Δ ( H ) \Delta(\mathcal{H}) Δ ( H ) in a fixed order and accept the first π ^ \widehat{\pi} π satisfying
max h d ^ h ( π ^ ) < e a p p 2 4 λ c a t + ξ . \max_{h}\widehat{d}_h(\widehat{\pi})<\frac{e_{\mathrm{app}}^2}{4\lambda_{\mathrm{cat}}}+\xi. h max d h ( π ) < 4 λ cat e app 2 + ξ .
For each fixed assignment, its empirical residual is independent of π \pi π , while the assignment probability is a polynomial in π \pi π . Thus d ^ \widehat{d} d is continuous, and density of rational points and the strict slack ξ \xi ξ ensure termination. Each evaluation is a finite sum; choosing the first accepted point also makes the selection measurable.
Antisymmetry gives ∑ h π ^ ( h ) d ^ h ( π ^ ) ≥ − max h d ^ h ( π ^ ) \sum_h\widehat{\pi}(h)\widehat{d}_h(\widehat{\pi})\ge-\max_h\widehat{d}_h(\widehat{\pi}) ∑ h π ( h ) d h ( π ) ≥ − max h d h ( π ) . Write V ^ = V ^ ( π ^ ) \widehat{V}=\widehat{V}(\widehat{\pi}) V = V ( π ) . Applying (13) under P ^ X \widehat{P}_X P X therefore yields
λ c a t V ^ ≤ e a p p V ^ + max h d ^ h ( π ^ ) . \lambda_{\mathrm{cat}}\widehat{V}\le e_{\mathrm{app}}\sqrt{\widehat{V}}+\max_h\widehat{d}_h(\widehat{\pi}). λ cat V ≤ e app V + h max d h ( π ) .
Young’s inequality gives V ^ ≤ e a p p 2 / λ c a t 2 + 2 max h d ^ h ( π ^ ) / λ c a t = O ( K − 2 ) \widehat{V}\le e_{\mathrm{app}}^2/\lambda_{\mathrm{cat}}^2+2\max_h\widehat{d}_h(\widehat{\pi})/\lambda_{\mathrm{cat}}=O(K^{-2}) V ≤ e app 2 / λ cat 2 + 2 max h d h ( π ) / λ cat = O ( K − 2 ) .
On the preprocessing event, the empirical assignment cells also have small mass: with probability at least 1 − δ / 20 1-\delta/20 1 − δ /20 over the context sample,
b ^ : = max U assignment cell P ^ X ( U ) = O ( 1 / K ) . (22) \widehat{b}:=\max_{U\text{ assignment cell}}\widehat{P}_X(U)=O(1/K). \tag*{(22)} b := U assignment cell max P X ( U ) = O ( 1/ K ) . (22)
Appendix § 11 .§ 2 proves this bound together with the population transfer below. Conditional on this event, we can apply the same variance-sensitive concentration argument to the empirical distribution.
Fixing the category assignments
Draw one tuple from π ^ m s p \widehat{\pi}^{\mathrm{msp}} π msp for each assignment cell and store the resulting seed vector. We first show that the empirical multiaccuracy residuals remain small. Empirical calibration relative to S S S is exact for every assignment, since each category predicts its empirical average. The next subsection transfers both guarantees to the true labels.
The population argument applied to the sample and the assignment concentration bound have three rate-critical terms:
e a p p 2 λ c a t = O ( ξ ) (expected empirical residual) , b ^ V ^ ( π ^ ) A δ = O ( ξ ) (fixing seeds: variance term) , b ^ D c a t A δ = O ( ξ ) (fixing seeds: scale term) . \begin{aligned}
\frac{e_{\mathrm{app}}^{2}}{\lambda_{\mathrm{cat}}} &= O(\xi) &&\text{(expected empirical residual)},\\
\sqrt{\widehat{b}\widehat{V}(\widehat{\pi})}A_{\delta} &= O(\xi) &&\text{(fixing seeds: variance term)},\\
\widehat{b}D_{\mathrm{cat}}A_{\delta} &= O(\xi) &&\text{(fixing seeds: scale term)}.
\end{aligned} λ cat e app 2 b V ( π ) A δ b D cat A δ = O ( ξ ) = O ( ξ ) = O ( ξ ) (expected empirical residual) , (fixing seeds: variance term) , (fixing seeds: scale term) .
Here b ^ = O ( 1 / K ) \widehat{b}=O(1/K) b = O ( 1/ K ) and V ^ ( π ^ ) = O ( K − 2 ) \widehat{V}(\widehat{\pi})=O(K^{-2}) V ( π ) = O ( K − 2 ) . Consequently,
ξ = A δ / K 3 ≲ ε ⟺ K 3 ≳ A δ / ε 2 . \xi=\sqrt{A_{\delta}/K^{3}}\lesssim\varepsilon
\quad\Longleftrightarrow\quad
K^{3}\gtrsim A_{\delta}/\varepsilon^{2}. ξ = A δ / K 3 ≲ ε ⟺ K 3 ≳ A δ / ε 2 .
Together with the score-learning cost, this gives the error tradeoff O ( K / N + A δ / K 3 ) O(\sqrt{K/N}+\sqrt{A_{\delta}/K^{3}}) O ( K / N + A δ / K 3 ) , suppressing logarithmic factors. The transfer to the population will fit within the first term.
Lemma 5.7 (Fixing the cellwise assignments). Condition on successful preprocessing and score learning, and on a context sample satisfying (22) . Choose π ^ \widehat{\pi} π as in Lemma 5.6 . With probability at least 1 − δ / 10 1-\delta/10 1 − δ /10 over the independent tuples drawn for the assignment cells,
max g ∈ G ∣ F ^ g ( ω ) ∣ ≤ C ξ . (23) \max_{g\in\mathcal{G}}\left|\widehat{F}_{g}(\omega)\right|\le C\xi. \tag*{(23)} g ∈ G max F g ( ω ) ≤ C ξ . (23)
The proof is in Appendix § 11 .§ 3 . We use Lemma A.1 on the empirical distribution. Deleting an assignment cell changes the total covariance by an amount whose square is bounded by a constant times the cell’s mass times the integral of ( S − p ^ ω ) 2 (S-\widehat{p}_{\omega})^{2} ( S − p ω ) 2 over that cell. A moment form of the Efron–Stein inequality gives the two seed-fixing terms above.
Transferring the empirical guarantees to the true labels
The empirical category means use the same sample that selected π ^ \widehat{\pi} π , and the categories depend on the assignment seeds. We need a transfer bound that allows both dependencies. The next lemma compares the final predictor’s population residuals against Y Y Y directly with its empirical residuals against S S S . The auxiliary category-sign tests learned with S S S are what make this comparison possible for calibration.
Lemma 5.8 (Population transfer for the selected coarsening). Condition on successful preprocessing and score learning. Let π ^ \widehat{\pi} π be any measurable choice based on the fresh context sample. Conditional on this sample, independently draw one tuple from π ^ m s p \widehat{\pi}^{\mathrm{msp}} π msp per assignment cell, and let p ^ ω \widehat{p}_{\omega} p ω use the empirical category means defined above. With probability at least 1 − δ / 10 1-\delta/10 1 − δ /10 over this sample and these tuples, both
max g ∈ G ∣ E [ g ( X ) ( Y − p ^ ω ( X ) ) ] − P ^ X [ g ( S − p ^ ω ) ] ∣ ≤ C α , \max_{g\in\mathcal{G}}\left|\mathbb{E}[g(X)(Y-\widehat{p}_{\omega}(X))]-\widehat{P}_{X}[g(S-\widehat{p}_{\omega})]\right|\le C\alpha, g ∈ G max E [ g ( X ) ( Y − p ω ( X ))] − P X [ g ( S − p ω )] ≤ C α , max σ ∈ { ± 1 } K + 1 + K p r i v ∣ E [ σ J ω ( X ) ( Y − p ^ ω ( X ) ) ] − P ^ X [ σ J ω ( S − p ^ ω ) ] ∣ ≤ C α . (24) \max_{\sigma\in\{\pm1\}^{K+1+K_{\mathrm{priv}}}}\left|\mathbb{E}[\sigma J_{\omega}(X)(Y-\widehat{p}_{\omega}(X))]-\widehat{P}_{X}[\sigma J_{\omega}(S-\widehat{p}_{\omega})]\right|\le C\alpha. \tag*{(24)} σ ∈ { ± 1 } K + 1 + K priv max E [ σ J ω ( X ) ( Y − p ω ( X ))] − P X [ σ J ω ( S − p ω )] ≤ C α . (24) hold.
The proof in Appendix § 11 .§ 2 uses the same finite-menu principle as score learning. For each global tuple, the score-learning guarantee controls the Y − S Y-S Y − S residual, and sample concentration controls the remaining empirical error. Averaging over global tuples bounds the expected error for any selected law. Independent cell assignments then concentrate around this expectation, using the confidence intervals and squared cell masses. For fixed assignments and a fixed test, the residual difference is affine in the category prediction values. Its absolute value is therefore maximized at a vertex of [ 0 , 1 ] K + 1 [0,1]^{K+1} [ 0 , 1 ] K + 1 . Checking every assignment of prediction values in { 0 , 1 } \{0,1\} { 0 , 1 } to the nominal categories thus covers all values in [ 0 , 1 ] [0,1] [ 0 , 1 ] , including the empirical means. The context sample needs no labels: Y Y Y appears only in the population quantity being bounded.
We can now finish both error bounds. For multiaccuracy, the first transfer bound and Lemma 5.7 give
MA ( p ^ ω ; G ) ≤ max g ∣ F ^ g ( ω ) ∣ + C α ≤ C ( α + ξ ) . \operatorname{MA}(\widehat{p}_{\omega};\mathcal{G}) \leq\max_g \left|\widehat{F}_g(\omega)\right|+C\alpha\leq C(\alpha+\xi). MA ( p ω ; G ) ≤ g max F g ( ω ) + C α ≤ C ( α + ξ ) .
For calibration, every category has zero empirical coarsening residual:
P ^ X [ 1 { J ω = j } ( S − p ^ ω ) ] = 0. \widehat{P}_X[1\{J_\omega=j\}(S-\widehat{p}_\omega)]=0. P X [ 1 { J ω = j } ( S − p ω )] = 0.
This includes empty empirical categories and private singletons. The second transfer bound therefore gives Cal C ω ( p ^ ω ) ≤ C α \operatorname{Cal}_{\mathcal{C}_\omega}(\widehat{p}_\omega)\leq C\alpha Cal C ω ( p ω ) ≤ C α , where C ω \mathcal{C}_\omega C ω is the partition into the nominal categories and private singletons. Merging categories with equal numerical predictions can only decrease this error, so (10) also gives ECE ( p ^ ω ) ≤ C α \operatorname{ECE}(\widehat{p}_\omega)\leq C\alpha ECE ( p ω ) ≤ C α .
Algorithm 2 The deterministic construction for A δ ≤ c / ε A_\delta\leq c/\varepsilon A δ ≤ c / ε
Given ε \varepsilon ε , δ \delta δ , and G \mathcal{G} G with A δ ≤ c / ε A_\delta\leq c/\varepsilon A δ ≤ c / ε , use the parameter choices above and set L = A δ + K L=A_\delta+K L = A δ + K , ℓ = C ℓ log ( C ℓ L / ( α δ ) ) \ell=C_\ell\log(C_\ell L/(\alpha\delta)) ℓ = C ℓ log ( C ℓ L / ( α δ )) , and N = ⌈ C N L ℓ / α 2 ⌉ N=\lceil C_NL\ell/\alpha^2\rceil N = ⌈ C N L ℓ / α 2 ⌉ .
Use one labeled preprocessing sample to construct I X I_X I X , Λ X \Lambda_X Λ X , B ^ \widehat{B} B and the partition U \mathcal{U} U as in Lemma 5.4 .
Form Φ K \Phi_K Φ K and apply Lemma 5.5, with failure probability δ / 10 \delta/10 δ /10 , on a fresh labeled sample to learn the deterministic intermediate score S S S .
On a fresh context-only selection sample, construct the empirical residual-change map d ^ \widehat{d} d and use Lemma 5.6 to choose a mixture π ^ \widehat{\pi} π satisfying the empirical residual bound (21) .
Independently for each assignment cell U U U , draw and store τ U ∼ π ^ m s p \tau_U\sim\widehat{\pi}^{m_{\mathrm{sp}}} τ U ∼ π m sp , and use J τ U ( x , S ( x ) ) J_{\tau_U}(x,S(x)) J τ U ( x , S ( x )) to assign its contexts to nominal categories. Give each point in B ^ \widehat{B} B a private category and keep its score unchanged. Lemma 5.7 shows that coarsening introduces only small empirical multiaccuracy residuals.
Using the same context sample as in step 4, compute the empirical mean of S S S in each nominal category; if no sample point falls in a category, use zero. Keep the private predictions equal to their scores. Output p ^ ω \widehat{p}_\omega p ω , which has at most K + 1 + K p r i v = O ( K ) K+1+K_{\mathrm{priv}}=O(K) K + 1 + K priv = O ( K ) distinct prediction values. Lemma 5.8 transfers its empirical guarantees relative to S S S to the population guarantees relative to Y Y Y .
Each sample split has size N N N . The cell seeds inside Lemma 5.5 make S S S deterministic. After S S S and π ^ \widehat{\pi} π are fixed, fresh training randomness draws the independent assignment tuples τ U \tau_U τ U . Each stage succeeds with high probability, so the algorithm uses a single run.
Proof of Theorem 5.1 . In the range A δ ≤ c / ε A_\delta\leq c/\varepsilon A δ ≤ c / ε , choose K = Θ ( ( A δ / ε 2 ) 1 / 3 ) K=\Theta((A_\delta/\varepsilon^2)^{1/3}) K = Θ (( A δ / ε 2 ) 1/3 ) and α = Θ ( ε ) \alpha=\Theta(\varepsilon) α = Θ ( ε ) as above. Then
A δ K 3 = O ( ε ) . \sqrt{\frac{A_\delta}{K^3}}=O(\varepsilon). K 3 A δ = O ( ε ) .
The preceding construction uses a constant number of independent samples, each of size
O ~ ( A δ + K ε 2 ) = O ~ ( A δ ε 2 + A δ 1 / 3 ε 8 / 3 ) . \widetilde{O}\left(\frac{A_\delta+K}{\varepsilon^2}\right)=\widetilde{O}\left(\frac{A_\delta}{\varepsilon^2}+\frac{A_\delta^{1/3}}{\varepsilon^{8/3}}\right). O ( ε 2 A δ + K ) = O ( ε 2 A δ + ε 8/3 A δ 1/3 ) .
The preprocessing, score-learning, empirical cell-mass, assignment-fixing, and population-transfer events have failure probabilities at most δ / 10 \delta/10 δ /10 , δ / 10 \delta/10 δ /10 , δ / 20 \delta/20 δ /20 , δ / 10 \delta/10 δ /10 , δ / 10 \delta/10 δ /10 , respectively. Empirical assignment selection succeeds for every context sample. A union bound therefore gives success probability at least 1 − δ 1-\delta 1 − δ .
For A δ > c / ε A_\delta> c/\varepsilon A δ > c / ε , the finite-test learner suffices without postprocessing. Use the common uniform grid Λ = { i / N g r i d : 0 ≤ i ≤ N g r i d } \Lambda= \{i/N_{\mathrm{grid}} : 0 \le i \le N_{\mathrm{grid}}\} Λ = { i / N grid : 0 ≤ i ≤ N grid } with N g r i d = ⌈ 1 / γ ⌉ N_{\mathrm{grid}} = \lceil1/\gamma\rceil N grid = ⌈ 1/ γ ⌉ and γ = α / 64 \gamma= \alpha/64 γ = α /64 . For each σ ∈ { ± 1 } Λ \sigma\in\{\pm1\}^{\Lambda} σ ∈ { ± 1 } Λ , let a σ ( x , s ) = σ ( s ) a_\sigma(x,s)=\sigma(s) a σ ( x , s ) = σ ( s ) on this grid, extended by zero elsewhere. Take
Φ = G ∪ { a σ : σ ∈ { ± 1 } Λ } , log ( 2 ∣ Φ ∣ / δ ) = O ( A δ + 1 / ε ) . \Phi= \mathcal{G} \cup\{a_\sigma: \sigma\in\{\pm1\}^{\Lambda}\}, \qquad\log(2|\Phi|/\delta) = O(A_\delta+ 1/\varepsilon). Φ = G ∪ { a σ : σ ∈ { ± 1 } Λ } , log ( 2∣Φ∣/ δ ) = O ( A δ + 1/ ε ) .
Here a feature test g ∈ G g \in\mathcal{G} g ∈ G is regarded as the function ( x , s ) ↦ g ( x ) (x,s) \mapsto g(x) ( x , s ) ↦ g ( x ) . Construct the same confidence intervals and singleton-and-gap partition, using L = A δ + ∣ Λ ∣ L=A_\delta+|\Lambda| L = A δ + ∣Λ∣ in the sample-size formula of Algorithm 2. The coverage and squared-mass proof in Appendix § 11 does not use the fixed-score set: it gives V U = O ( α 2 / L ) V_U=O(\alpha^2/L) V U = O ( α 2 / L ) with probability at least 1 − δ / 10 1-\delta/10 1 − δ /10 . Apply Lemma 5.5 to Φ \Phi Φ with failure probability δ / 10 \delta/10 δ /10 and N N N fresh labeled examples. It returns a deterministic score S S S with every test residual O ( α ) O(\alpha) O ( α ) . The original tests bound MA, while
ECE ( S ) = max σ ∈ { ± 1 } Λ ∣ E [ σ ( S ( X ) ) ( Y − S ( X ) ) ] ∣ \operatorname{ECE}(S)=\max_{\sigma\in\{\pm1\}^{\Lambda}}\left|\mathbb{E}[\sigma(S(X))(Y-S(X))]\right| ECE ( S ) = σ ∈ { ± 1 } Λ max ∣ E [ σ ( S ( X )) ( Y − S ( X ))] ∣
bounds ECE by the same amount. Thus S S S itself is the final predictor, and the sample requirement is
O ~ ( A δ + 1 / ε ε 2 ) = O ~ ( A δ / ε 2 ) \widetilde{O}\left(\frac{A_\delta+1/\varepsilon}{\varepsilon^2}\right)=\widetilde{O}(A_\delta/\varepsilon^2) O ( ε 2 A δ + 1/ ε ) = O ( A δ / ε 2 )
in this range. Taking c α c_\alpha c α sufficiently small proves the theorem. □
Matching lower bound for randomized predictors
The matching randomized lower bound has two independent components. The log ∣ G ∣ / ε 2 \log|\mathcal{G}|/\varepsilon^2 log ∣ G ∣/ ε 2 term is already required by multiaccuracy for a finite family of tests. The ε − 5 / 2 \varepsilon^{-5/2} ε − 5/2 term is required by calibration together with a single multiaccuracy constraint, and therefore persists even when the bounded test family has constant size.
Theorem 6.1 (Matching lower bound for randomized predictors). There are universal constants c , c 0 > 0 c,c_0>0 c , c 0 > 0 such that the following holds. Fix an integer N G ≥ 2 N_{\mathcal{G}}\ge2 N G ≥ 2 and a sufficiently small ε > 0 \varepsilon>0 ε > 0 . Suppose a learning algorithm has the following uniform guarantee: for every finite domain X \mathcal{X} X , every bounded test family G ⊆ [ − 1 , 1 ] X \mathcal{G}\subseteq[-1,1]^{\mathcal{X}} G ⊆ [ − 1 , 1 ] X with ∣ G ∣ ≤ N G |\mathcal{G}|\le N_{\mathcal{G}} ∣ G ∣ ≤ N G , and every distribution D \mathcal{D} D on X × [ 0 , 1 ] \mathcal{X}\times[0,1] X × [ 0 , 1 ] , the algorithm receives n n n i.i.d. examples and outputs an arbitrary randomized predictor Q = ( Q x ) x ∈ X Q=(Q_x)_{x\in\mathcal{X}} Q = ( Q x ) x ∈ X satisfying
P ( CMAD D ( Q ; G ) ≤ c ε ) ≥ 2 3 . \mathbb{P}\left(\operatorname{CMAD}_{\mathcal{D}}(Q;\mathcal{G})\le c\varepsilon\right)\ge\frac{2}{3}. P ( CMAD D ( Q ; G ) ≤ c ε ) ≥ 3 2 . Then
n ≥ c 0 ( log N G ε 2 + 1 ε 5 / 2 ) . n\ge c_0\left(\frac{\log N_{\mathcal{G}}}{\varepsilon^2}+\frac{1}{\varepsilon^{5/2}}\right). n ≥ c 0 ( ε 2 log N G + ε 5/2 1 ) . Here the probability is over the sample and all randomness of the learning algorithm.
The sample cost of recovering hidden offsets
The two randomized lower-bound terms and the deterministic lower bound in § 7 all use distributions in which independent hidden bits add small offsets to otherwise fixed label means. The following lemma isolates their common sample requirement: changing one bit changes the label distribution at only one of the R R R equally likely contexts.
Lemma 6.2 (Sample cost of recovering hidden coordinates). There is a universal constant c i n f o > 0 c_{\mathrm{info}}>0 c info > 0 such that the following holds. Fix either B = { 0 , 1 } \mathcal{B}=\{0,1\} B = { 0 , 1 } or B = { ± 1 } \mathcal{B}=\{\pm1\} B = { ± 1 } . Let R ≥ 1 R\ge1 R ≥ 1 , η > 0 \eta>0 η > 0 , and t 1 , … , t R ∈ [ 0 , 1 ] t_1,\ldots,t_R\in[0,1] t 1 , … , t R ∈ [ 0 , 1 ] . For θ ∈ B R \theta\in\mathcal{B}^R θ ∈ B R , let D θ D_\theta D θ have uniform marginal on [ R ] [R] [ R ] and Bernoulli label means
μ i θ = t i + η θ i , \mu_i^\theta=t_i+\eta\theta_i, μ i θ = t i + η θ i , all lying in [ 1 / 8 , 7 / 8 ] [1/8,7/8] [ 1/8 , 7/8 ] . Suppose n n n i.i.d. samples and an independent random seed determine an estimate θ ^ ∈ B R \widehat{\theta}\in\mathcal{B}^R θ ∈ B R such that, for every θ \theta θ ,
P ( d H ( θ ^ , θ ) ≤ 0.2 R ) ≥ 2 3 , \mathbb{P}\left(d_H(\widehat{\theta},\theta)\le0.2R\right)\ge\frac{2}{3}, P ( d H ( θ , θ ) ≤ 0.2 R ) ≥ 3 2 , where d H d_H d H denotes Hamming distance. Then
n ≥ c i n f o R η 2 . n\ge c_{\mathrm{info}}\frac{R}{\eta^2}. n ≥ c info η 2 R .
The proof compares two hidden vectors that differ in one coordinate. With fewer than order R / η 2 R/\eta^2 R / η 2 samples, these two sample distributions are too similar to distinguish their bits reliably. Averaging this comparison over coordinates proves the lemma; the calculation is in Appendix § 12 .
We establish the two lower-bound terms separately. The finite-class multiaccuracy term is the finite-cardinality specialization of the lower bound of Gibbs and Tibshirani [ [15 ] .
Lemma 6.3 (Finite-class multiaccuracy lower bound [15 ] ). There are universal constants c , c 0 > 0 c,c_0>0 c , c 0 > 0 such that the following holds. For every integer N G ≥ 2 N_G\ge2 N G ≥ 2 and every sufficiently small ε > 0 \varepsilon>0 ε > 0 , there are a finite domain X 0 \mathcal{X}_0 X 0 , a bounded test family G 0 ⊆ { ± 1 } X 0 \mathcal{G}_0\subseteq\{\pm1\}^{\mathcal{X}_0} G 0 ⊆ { ± 1 } X 0 with ∣ G 0 ∣ ≤ N G |\mathcal{G}_0|\le N_G ∣ G 0 ∣ ≤ N G , and a finite family D 0 \mathcal{D}_0 D 0 of distributions on X 0 × { 0 , 1 } \mathcal{X}_0\times\{0,1\} X 0 × { 0 , 1 } such that the following is true. Let a learning algorithm receive n n n i.i.d. examples and output an arbitrary randomized predictor Q = ( Q x ) x ∈ X 0 Q=(Q_x)_{x\in\mathcal{X}_0} Q = ( Q x ) x ∈ X 0 . If, for every D ∈ D 0 D\in\mathcal{D}_0 D ∈ D 0 ,
P ( CMAD D ( Q ; G 0 ) ≤ c ε ) ≥ 2 3 , \mathbb{P}\left(\operatorname{CMAD}_D(Q;\mathcal{G}_0)\le c\varepsilon\right)\ge\frac{2}{3}, P ( CMAD D ( Q ; G 0 ) ≤ c ε ) ≥ 3 2 , then
n ≥ c 0 log N G ε 2 . n\ge c_0\frac{\log N_G}{\varepsilon^2}. n ≥ c 0 ε 2 log N G .
The proof uses sign tests on a domain of size Θ ( log N G ) \Theta(\log N_G) Θ ( log N G ) , chosen so that multiaccuracy bounds the average absolute difference between E [ P ∣ X = x ] \mathbb{E}[P\mid X=x] E [ P ∣ X = x ] and E [ Y ∣ X = x ] \mathbb{E}[Y\mid X=x] E [ Y ∣ X = x ] . Thresholding the prediction means recovers the hidden signs. Lemma 6.2 gives the sample bound; the details appear in Appendix § 12 .
We now turn to the ε − 5 / 2 \varepsilon^{-5/2} ε − 5/2 term, using the one-dimensional hard family from Proposition 2 of Gibbs and Tibshirani [ [15 ] . The bounded test family is the singleton G = { g } \mathcal{G}=\{g\} G = { g } with g ( x ) = x g(x)=x g ( x ) = x . We extend their deterministic-predictor lower bound by recovering hidden bits from an arbitrary randomized predictor.
The construction uses ordered points with known baseline means, each shifted by a small offset determined by a hidden bit. Calibration and the single multiaccuracy constraint first force realized predictions close to their baselines. We assign each prediction to its nearest baseline value; most predictions are then assigned to the correct input index. Calibration on these bins, after subtracting the known baseline contributions, reveals most hidden bits.
Fix an integer k ≥ 2 k \ge2 k ≥ 2 and let
x i = i k , b i = 1 4 + x i 2 , i = 1 , … , k . x_i = \frac{i}{k}, \qquad b_i = \frac{1}{4} + \frac{x_i}{2}, \qquad i = 1,\ldots,k. x i = k i , b i = 4 1 + 2 x i , i = 1 , … , k .
For θ ∈ { 0 , 1 } k \theta\in\{0,1\}^k θ ∈ { 0 , 1 } k and a parameter Δ > 0 \Delta> 0 Δ > 0 , define the distribution D θ D_\theta D θ by drawing I ∼ Unif { 1 , … , k } I \sim\operatorname{Unif}\{1,\ldots,k\} I ∼ Unif { 1 , … , k } , setting X = x I X=x_I X = x I , and drawing
Y ∣ I = i ∼ Ber ( μ i θ ) , μ i θ = b i + Δ θ i . Y \mid I=i \sim\operatorname{Ber}(\mu_i^\theta), \qquad\mu_i^\theta= b_i + \Delta\theta_i. Y ∣ I = i ∼ Ber ( μ i θ ) , μ i θ = b i + Δ θ i .
We will choose Δ = a / k 2 \Delta= a/k^2 Δ = a / k 2 for a sufficiently small universal constant a > 0 a>0 a > 0 , so all means lie in a fixed subinterval of ( 0 , 1 ) (0,1) ( 0 , 1 ) .
For a randomized predictor Q Q Q and a fixed vector θ \theta θ , consider the joint experiment in which ( X , Y ) ∼ D θ (X,Y)\sim D_\theta ( X , Y ) ∼ D θ and then P ∼ Q X P\sim Q_X P ∼ Q X is drawn independently of Y Y Y conditional on X X X . All expectations and conditional expectations in the next equation are with respect to this joint law. Write
CMA θ ( Q ) : = max { ∣ E [ X ( Y − P ) ] ∣ , E ∣ E [ Y − P ∣ P ] ∣ } . \operatorname{CMA}_\theta(Q) := \max\left\{\left|\mathbb{E}[X(Y-P)]\right|,\mathbb{E}\left|\mathbb{E}[Y-P\mid P]\right|\right\}. CMA θ ( Q ) := max { ∣ E [ X ( Y − P )] ∣ , E ∣ E [ Y − P ∣ P ] ∣ } .
This is exactly the calibrated multiaccuracy error under D θ D_\theta D θ for the singleton bounded test g ( x ) = x g(x)=x g ( x ) = x . The next lemma gives a decoder that depends only on the full predictor Q Q Q and the public construction.
Lemma 6.4 (Recovering hidden bits from a randomized predictor). There are universal constants a , c > 0 a,c>0 a , c > 0 such that, for Δ = a / k 2 \Delta=a/k^2 Δ = a / k 2 , there is a decoder depending only on Q Q Q , the public baselines, and Δ \Delta Δ whose estimate θ ^ \widehat{\theta} θ satisfies
CMA θ ( Q ) ≤ c / k 2 ⟹ d H ( θ ^ , θ ) ≤ k / 5 \operatorname{CMA}_\theta(Q) \le c/k^2 \quad\Longrightarrow\quad d_H(\widehat{\theta},\theta)\le k/5 CMA θ ( Q ) ≤ c / k 2 ⟹ d H ( θ , θ ) ≤ k /5 for every θ ∈ { 0 , 1 } k \theta\in\{0,1\}^k θ ∈ { 0 , 1 } k and every randomized predictor Q Q Q .
Proof. Fix Q Q Q , and write ν = CMA θ ( Q ) \nu=\operatorname{CMA}_\theta(Q) ν = CMA θ ( Q ) . All expectations are over a fresh test point and a prediction drawn from this fixed predictor. Let J ( p ) J(p) J ( p ) be the index of the baseline b j b_j b j nearest to p p p , breaking ties by the smaller index. Define
z j = k Δ E [ 1 { J ( P ) = j } ( P − b I ) ] , θ ^ j = 1 { z j ≥ 1 / 2 } . z_j = \frac{k}{\Delta}\mathbb{E}\left[1\{J(P)=j\}(P-b_I)\right], \qquad\widehat{\theta}_j = 1\{z_j\ge1/2\}. z j = Δ k E [ 1 { J ( P ) = j } ( P − b I ) ] , θ j = 1 { z j ≥ 1/2 } .
The joint law of ( I , P ) (I,P) ( I , P ) is determined by Q Q Q and the known uniform context distribution, so this decoder uses no labels or hidden bits. It subtracts the baseline contribution in each bin before estimating the small offset.
Most predictions identify the correct baseline. Calibration controls both E [ P ( Y − P ) ] \mathbb{E}[P(Y-P)] E [ P ( Y − P )] and E [ Y − P ] \mathbb{E}[Y-P] E [ Y − P ] in absolute value by ν \nu ν , while multiaccuracy controls E [ X ( Y − P ) ] \mathbb{E}[X(Y-P)] E [ X ( Y − P )] . Since b I = 1 / 4 + X / 2 b_I=1/4+X/2 b I = 1/4 + X /2 , it follows that
∣ E [ ( P − b I ) ( Y − P ) ] ∣ ≤ 7 4 ν . \left|\mathbb{E}[(P-b_I)(Y-P)]\right| \le\frac{7}{4}\nu. ∣ E [( P − b I ) ( Y − P )] ∣ ≤ 4 7 ν .
Put T = E [ ( P − b I ) 2 ] T = \mathbb{E}[(P-b_I)^2] T = E [( P − b I ) 2 ] . Conditional independence of P P P and Y Y Y given I I I and the formula for μ I θ \mu_I^\theta μ I θ give
E [ ( P − b I ) ( Y − P ) ] = − T + Δ E [ ( P − b I ) θ I ] . \mathbb{E}[(P-b_I)(Y-P)] = -T+\Delta\mathbb{E}[(P-b_I)\theta_I]. E [( P − b I ) ( Y − P )] = − T + Δ E [( P − b I ) θ I ] .
Cauchy–Schwarz and 0 ≤ θ I ≤ 1 0 \leq\theta_I \leq1 0 ≤ θ I ≤ 1 imply
T ≤ 7 4 ν + Δ T ≤ 7 4 ν + T 2 + Δ 2 2 , T ≤ 7 2 ν + Δ 2 . T \leq\frac{7}{4}\nu+\Delta\sqrt{T} \leq\frac{7}{4}\nu+\frac{T}{2}+\frac{\Delta^2}{2}, \qquad T \leq\frac{7}{2}\nu+\Delta^2. T ≤ 4 7 ν + Δ T ≤ 4 7 ν + 2 T + 2 Δ 2 , T ≤ 2 7 ν + Δ 2 .
Distinct baselines are separated by 1 / ( 2 k ) 1/(2k) 1/ ( 2 k ) , so J ( P ) ≠ I J(P) \ne I J ( P ) = I requires ∣ P − b I ∣ ≥ 1 / ( 4 k ) |P-b_I| \geq1/(4k) ∣ P − b I ∣ ≥ 1/ ( 4 k ) . Hence
q : = P ( J ( P ) ≠ I ) ≤ 16 k 2 T . q := \mathbb{P}(J(P) \ne I) \leq16k^2T. q := P ( J ( P ) = I ) ≤ 16 k 2 T .
Calibration reveals the offsets in these bins. For the analysis, let
c j = E [ 1 { J ( P ) = j } ( Y − P ) ] . c_j = \mathbb{E}[1\{J(P)=j\}(Y-P)]. c j = E [ 1 { J ( P ) = j } ( Y − P )] .
Each bin is an event determined by P P P , so c j = E [ 1 { J ( P ) = j } E [ Y − P ∣ P ] ] c_j = \mathbb{E}[1\{J(P)=j\}\mathbb{E}[Y-P\mid P]] c j = E [ 1 { J ( P ) = j } E [ Y − P ∣ P ]] . The bins partition the prediction values, and the triangle inequality gives ∑ j ∣ c j ∣ ≤ E ∣ E [ Y − P ∣ P ] ∣ ≤ ν \sum_j |c_j| \leq\mathbb{E}|\mathbb{E}[Y-P\mid P]| \leq\nu ∑ j ∣ c j ∣ ≤ E ∣ E [ Y − P ∣ P ] ∣ ≤ ν . The label-mean formula gives
z j = k E [ 1 { J ( P ) = j } θ I ] − k Δ c j . z_j = k\mathbb{E}[1\{J(P)=j\}\theta_I]-\frac{k}{\Delta}c_j. z j = k E [ 1 { J ( P ) = j } θ I ] − Δ k c j .
If every prediction were assigned correctly, the first term would be θ j \theta_j θ j . In general, moving a prediction to the wrong bin changes the vector of bin contributions in at most two coordinates. Formally,
∑ j ∣ E [ 1 { J ( P ) = j } θ I ] − θ j k ∣ ≤ E ∑ j ∣ ( 1 { J ( P ) = j } − 1 { I = j } ) θ I ∣ ≤ 2 q . \sum_j \left|\mathbb{E}[1\{J(P)=j\}\theta_I]-\frac{\theta_j}{k}\right|
\leq\mathbb{E}\sum_j |(1\{J(P)=j\}-1\{I=j\})\theta_I| \leq2q. j ∑ E [ 1 { J ( P ) = j } θ I ] − k θ j ≤ E j ∑ ∣ ( 1 { J ( P ) = j } − 1 { I = j }) θ I ∣ ≤ 2 q .
Therefore
1 k ∑ j ∣ z j − θ j ∣ ≤ 2 q + ν Δ . \frac{1}{k}\sum_j |z_j-\theta_j| \leq2q+\frac{\nu}{\Delta}. k 1 j ∑ ∣ z j − θ j ∣ ≤ 2 q + Δ ν .
Every incorrectly decoded bit contributes at least 1 / 2 1/2 1/2 to this absolute error. Combining the bounds gives
1 k d H ( θ ^ , θ ) ≤ 4 q + 2 ν Δ ≤ 224 k 2 ν + 64 k 2 Δ 2 + 2 ν Δ . \frac{1}{k}d_H(\widehat{\theta},\theta) \leq4q+\frac{2\nu}{\Delta} \leq224k^2\nu+64k^2\Delta^2+\frac{2\nu}{\Delta}. k 1 d H ( θ , θ ) ≤ 4 q + Δ 2 ν ≤ 224 k 2 ν + 64 k 2 Δ 2 + Δ 2 ν .
For Δ = a / k 2 \Delta=a/k^2 Δ = a / k 2 , ν ≤ c / k 2 \nu\leq c/k^2 ν ≤ c / k 2 , and k ≥ 2 k\geq2 k ≥ 2 , the last expression is at most 224 c + 16 a 2 + 2 c / a 224c+16a^2+2c/a 224 c + 16 a 2 + 2 c / a . Choose a ≤ 1 / 4 a\leq1/4 a ≤ 1/4 sufficiently small, then c > 0 c>0 c > 0 sufficiently small, to make this at most 1 / 5 1/5 1/5 . □
Combining this decoder with Lemma 6.2 gives the calibration-driven term in the sample lower bound.
Lemma 6.5 (Calibration lower bound for randomized predictors). There are universal constants c , c 0 > 0 c,c_0>0 c , c 0 > 0 such that the following holds for every sufficiently small ε > 0 \varepsilon>0 ε > 0 . There is a finite domain X ε ⊆ [ 0 , 1 ] \mathcal{X}_{\varepsilon}\subseteq[0,1] X ε ⊆ [ 0 , 1 ] such that, for the singleton bounded test family G = { g } \mathcal{G}=\{g\} G = { g } with g ( x ) = x g(x)=x g ( x ) = x on X ε \mathcal{X}_{\varepsilon} X ε , any learning algorithm with the following guarantee must use at least c 0 ε − 5 / 2 c_0\varepsilon^{-5/2} c 0 ε − 5/2 samples: for every distribution D D D on X ε × { 0 , 1 } \mathcal{X}_{\varepsilon}\times\{0,1\} X ε × { 0 , 1 } , the algorithm outputs an arbitrary randomized predictor Q = ( Q x ) x ∈ X ε Q=(Q_x)_{x\in\mathcal{X}_{\varepsilon}} Q = ( Q x ) x ∈ X ε satisfying
P ( CMAD D ( Q ; G ) ≤ c ε ) ≥ 2 3 . \mathbb{P}(\operatorname{CMAD}_D(Q;\mathcal{G})\leq c\varepsilon)\geq\frac{2}{3}. P ( CMAD D ( Q ; G ) ≤ c ε ) ≥ 3 2 .
Take k = Θ ( ε − 1 / 2 ) k = \Theta(\varepsilon^{-1/2}) k = Θ ( ε − 1/2 ) and Δ = Θ ( k − 2 ) \Delta= \Theta(k^{-2}) Δ = Θ ( k − 2 ) . Lemma 6.4 turns a successful predictor into a bit vector that is correct on at least 0.8 k 0.8k 0.8 k coordinates. Lemma 6.2 then requires Ω ( k / Δ 2 ) = Ω ( ε − 5 / 2 ) \Omega(k/\Delta^2) = \Omega(\varepsilon^{-5/2}) Ω ( k / Δ 2 ) = Ω ( ε − 5/2 ) samples. The parameter choices are recorded in Appendix § 12 .
The lemma uses the single bounded test g ( x ) = x g(x) = x g ( x ) = x . It also yields a version using only indicator tests, at the cost of a polynomial-size test family. On the grid above,
x i = 1 k ∑ j = 1 k 1 { x i ≥ x j } . x_i = \frac{1}{k}\sum_{j=1}^{k}\mathbf{1}\{x_i \ge x_j\}. x i = k 1 j = 1 ∑ k 1 { x i ≥ x j } .
Consequently, multiaccuracy for the k k k threshold tests on the right controls multiaccuracy for g ( x ) = x g(x) = x g ( x ) = x . Since the lower-bound choice is k = Θ ( ε − 1 / 2 ) k = \Theta(\varepsilon^{-1/2}) k = Θ ( ε − 1/2 ) , the same ε − 5 / 2 \varepsilon^{-5/2} ε − 5/2 obstruction holds for a polynomial-size family of indicator tests, while the constant-size statement uses the bounded test formulation.
Proof of Theorem 6.1 . Let c c c be no larger than the accuracy constants in Lemmas 6.3 and 6.5 . A learning algorithm satisfying the guarantee of Theorem 6.1 also satisfies the hypotheses of Lemma 6.5 , because the singleton bounded test family has size at most N G N_{\mathcal{G}} N G . Therefore n ≥ c 1 ε − 5 / 2 n \ge c_1\varepsilon^{-5/2} n ≥ c 1 ε − 5/2 for a universal c 1 > 0 c_1 > 0 c 1 > 0 .
The same learning algorithm also satisfies the hypotheses of Lemma 6.3 , so n ≥ c 2 log ( N G ) / ε 2 n \ge c_2\log(N_{\mathcal{G}})/\varepsilon^2 n ≥ c 2 log ( N G ) / ε 2 for a universal c 2 > 0 c_2 > 0 c 2 > 0 . Hence
n ≥ c 4 max { log N G ε 2 , 1 ε 5 / 2 } ≥ c 4 2 ( log N G ε 2 + 1 ε 5 / 2 ) , n \ge c_4 \max\left\{\frac{\log N_{\mathcal{G}}}{\varepsilon^2},\frac{1}{\varepsilon^{5/2}}\right\} \ge\frac{c_4}{2}\left(\frac{\log N_{\mathcal{G}}}{\varepsilon^2}+\frac{1}{\varepsilon^{5/2}}\right), n ≥ c 4 max { ε 2 log N G , ε 5/2 1 } ≥ 2 c 4 ( ε 2 log N G + ε 5/2 1 ) ,
which proves the theorem after renaming the constant.
Lower bound for deterministic predictors
At the level of the hard distributions, this construction resembles the randomized lower bound: the domain is ordered, and the conditional mean is a public baseline plus a small hidden perturbation. The decoding mechanism is different. The randomized proof uses the identity test g ( x ) = x g(x) = x g ( x ) = x , together with calibration, to place realized predictions close to the baseline at a relatively coarse scale. Here a larger family of sign tests forces a deterministic predictor p p p close to the public baseline at a finer scale. Because p p p is a fixed function, its prediction values create exact level sets { x : p ( x ) = v } \{x : p(x) = v\} { x : p ( x ) = v } that partition the domain.
The proof uses those level sets to recover one hidden sign per domain point. Multiaccuracy against the sign tests forces p p p to have small average distance from the known baseline. Since the baseline values are separated, most points then have distinct prediction values and hence singleton level sets. Calibration on a singleton directly reveals the corresponding hidden sign. An application of the shared recovery bound, Lemma 6.2 , converts recovery of many signs into the sample lower bound.
Theorem 7.1 (Deterministic lower bound with a group budget). There are universal constants c c c , c s i z e c_{\mathrm{size}} c size , c s a m p c_{\mathrm{samp}} c samp , C 0 C_0 C 0 , a 0 > 0 a_0 > 0 a 0 > 0 such that the following holds for every sufficiently small ε > 0 \varepsilon> 0 ε > 0 . Let A A A be a target budget for log ∣ G ∣ \log|\mathcal{G}| log ∣ G ∣ satisfying
C 0 log ( 1 / ε ) ≤ A ≤ a 0 ε − 1 . C_0\log(1/\varepsilon) \le A \le a_0\varepsilon^{-1}. C 0 log ( 1/ ε ) ≤ A ≤ a 0 ε − 1 .
Then there exist a finite domain X ε , A \mathcal{X}_{\varepsilon,A} X ε , A , a finite family D ε , A \mathcal{D}_{\varepsilon,A} D ε , A of distributions on X ε , A × { 0 , 1 } \mathcal{X}_{\varepsilon,A} \times\{0,1\} X ε , A × { 0 , 1 } , and a finite bounded test family G ε , A ⊆ { ± 1 } X ε , A \mathcal{G}_{\varepsilon,A} \subseteq\{\pm1\}^{\mathcal{X}_{\varepsilon,A}} G ε , A ⊆ { ± 1 } X ε , A with
c s i z e A ≤ log ∣ G ε , A ∣ ≤ A c_{\mathrm{size}}A \le\log|\mathcal{G}_{\varepsilon,A}| \le A c size A ≤ log ∣ G ε , A ∣ ≤ A
with the following property. If a learning algorithm receives n n n i.i.d. examples, outputs a deterministic predictor p : X ε , A → [ 0 , 1 ] p : \mathcal{X}_{\varepsilon,A} \to[0,1] p : X ε , A → [ 0 , 1 ] , and, for every D ∈ D ε , A \mathcal{D} \in\mathcal{D}_{\varepsilon,A} D ∈ D ε , A , guarantees
P ( C M A D ( p ; G ε , A ) ≤ c ε ) ≥ 2 3 , \mathbb{P}\left(\mathrm{CMAD}(p;\mathcal{G}_{\varepsilon,A}) \le c\varepsilon\right) \ge\frac{2}{3}, P ( CMAD ( p ; G ε , A ) ≤ c ε ) ≥ 3 2 ,
then
n ≥ c s a m p A 1 / 3 ε − 8 / 3 . n \ge c_{\mathrm{samp}}A^{1/3}\varepsilon^{-8/3}. n ≥ c samp A 1/3 ε − 8/3 .
Proof structure. The hard family uses R R R ordered points. The conditional mean at point i i i is a known baseline t i t_i t i plus a hidden offset ε θ i \varepsilon\theta_i ε θ i , where θ i ∈ { ± 1 } \theta_i \in\{\pm1\} θ i ∈ { ± 1 } . Figure 4 illustrates the counting step that turns closeness to the separated baseline into singleton prediction values.
Figure 4. Most prediction values p i p_i p i (orange) lie close to distinct baseline values t i t_i t i (blue), so they form singleton level sets. The displayed collision p 2 = p 6 p_2 = p_6 p 2 = p 6 is possible only because point 6 is far from its baseline. Each collision involving a baseline-accurate point can therefore be charged to a baseline-inaccurate point. Calibration on the remaining singletons makes the sign of p i − t i p_i - t_i p i − t i reveal θ i \theta_i θ i .
The first lemma isolates the deterministic part of the argument. It converts average closeness to the separated baseline into many singleton prediction values, on which calibration reveals the hidden signs directly.
Lemma 7.2 (Decoding signs from a predictor close to separated baselines). Let R ≥ 2 R \ge2 R ≥ 2 , let X X X be uniform on [ R ] [R] [ R ] , and let Δ t > 0 \Delta_t > 0 Δ t > 0 . Suppose t 1 , … , t R t_1,\ldots,t_R t 1 , … , t R satisfy ∣ t i − t j ∣ ≥ Δ t |t_i-t_j| \ge\Delta_t ∣ t i − t j ∣ ≥ Δ t whenever i ≠ j i \ne j i = j . Fix θ ∈ { ± 1 } R \theta\in\{\pm1\}^{R} θ ∈ { ± 1 } R and η > 0 \eta> 0 η > 0 , and suppose
μ i θ = t i + η θ i \mu_i^\theta= t_i + \eta\theta_i μ i θ = t i + η θ i defines valid Bernoulli means. Let D θ \mathcal{D}_\theta D θ be the distribution with this uniform marginal and these label means. Let p : [ R ] → [ 0 , 1 ] p : [R] \to[0,1] p : [ R ] → [ 0 , 1 ] be deterministic, and set
e ‾ ( p , t ) = 1 R ∑ i = 1 R ∣ p ( i ) − t i ∣ . \overline{e}(p,t) = \frac{1}{R}\sum_{i=1}^{R}|p(i)-t_i|. e ( p , t ) = R 1 i = 1 ∑ R ∣ p ( i ) − t i ∣.
For every 0 < r < Δ t / 2 0<r<\Delta_t/2 0 < r < Δ t /2 , the decoder θ ^ i = sign ( p ( i ) − t i ) \hat{\theta}_i=\operatorname{sign}(p(i)-t_i) θ ^ i = sign ( p ( i ) − t i ) , with ties broken arbitrarily, satisfies
1 R d H ( θ ^ , θ ) ≤ 2 e ˉ ( p , t ) r + ECE D θ ( p ) η , (25) \frac{1}{R}d_H(\hat{\theta},\theta)\leq\frac{2\bar{e}(p,t)}{r}+\frac{\operatorname{ECE}_{D_\theta}(p)}{\eta}, \tag*{(25)} R 1 d H ( θ ^ , θ ) ≤ r 2 e ˉ ( p , t ) + η ECE D θ ( p ) , (25)
where d H d_H d H denotes Hamming distance.
Proof. Write p i = p ( i ) p_i=p(i) p i = p ( i ) and call i i i good if ∣ p i − t i ∣ < r |p_i-t_i|<r ∣ p i − t i ∣ < r . Markov’s inequality shows that at most R e ˉ ( p , t ) / r R\bar{e}(p,t)/r R e ˉ ( p , t ) / r indices are bad. No two good indices have the same prediction value: if i ≠ j i\ne j i = j , then
∣ p i − p j ∣ ≥ ∣ t i − t j ∣ − ∣ p i − t i ∣ − ∣ p j − t j ∣ > Δ t − 2 r > 0. |p_i-p_j|\geq|t_i-t_j|-|p_i-t_i|-|p_j-t_j|>\Delta_t-2r>0. ∣ p i − p j ∣ ≥ ∣ t i − t j ∣ − ∣ p i − t i ∣ − ∣ p j − t j ∣ > Δ t − 2 r > 0.
Every good index that shares its prediction value with another index must therefore share it with a bad index. Different good indices have different prediction values, so they must share with different bad indices. Thus there are at most R e ˉ ( p , t ) / r R\bar{e}(p,t)/r R e ˉ ( p , t ) / r such good indices. All but at most 2 R e ˉ ( p , t ) / r 2R\bar{e}(p,t)/r 2 R e ˉ ( p , t ) / r indices are therefore good and have a prediction value shared by no other index.
If a good index i i i whose prediction value is unique is decoded incorrectly, then ∣ μ i θ − p i ∣ ≥ η |\mu_i^\theta-p_i|\geq\eta ∣ μ i θ − p i ∣ ≥ η : for example, when θ i = 1 \theta_i=1 θ i = 1 , an incorrect sign means p i ≤ t i p_i\leq t_i p i ≤ t i while μ i θ = t i + η \mu_i^\theta=t_i+\eta μ i θ = t i + η , and the other case is symmetric. Because no other point receives prediction p i p_i p i , this point contributes ∣ μ i θ − p i ∣ / R |\mu_i^\theta-p_i|/R ∣ μ i θ − p i ∣/ R to ECE. Hence the number of incorrectly decoded singleton good indices is at most
R ECE D θ ( p ) η . \frac{R\operatorname{ECE}_{D_\theta}(p)}{\eta}. η R ECE D θ ( p ) .
Adding this count to the bound on the remaining indices proves (25) .
Lemma 6.2 now converts this decoding guarantee into a sample lower bound of order R / η 2 R/\eta^2 R / η 2 . It remains to choose a prescribed number of sign tests that force the predictor close to the baseline. The next lemma uses a parameter K t e s t K_{\mathrm{test}} K test to construct about exp ( Θ ( K t e s t ) ) \exp(\Theta(K_{\mathrm{test}})) exp ( Θ ( K test )) sign tests such that every vector d ∈ R N d\in\mathbb{R}^N d ∈ R N has correlation at least a constant times K t e s t / N ∥ d ∥ 1 \sqrt{K_{\mathrm{test}}/N}\|d\|_1 K test / N ∥ d ∥ 1 with one of them. Therefore, if the residual vector d i = μ i θ − p i d_i=\mu_i^\theta-p_i d i = μ i θ − p i had large average absolute value, some test in the family would detect it. Multiaccuracy therefore bounds the distance from the conditional means, which are themselves close to the public baselines.
Lemma 7.3 (A small family of sign tests detects ℓ 1 \ell_1 ℓ 1 error). There are universal constants a ∗ , A ∗ , c ∗ , C ∗ > 0 a_*,A_*,c_*,C_*>0 a ∗ , A ∗ , c ∗ , C ∗ > 0 such that the following holds. Let N ≥ 2 N\geq2 N ≥ 2 and let K t e s t K_{\mathrm{test}} K test satisfy
A ∗ log N ≤ K t e s t ≤ a ∗ N . A_*\log N\leq K_{\mathrm{test}}\leq a_*N. A ∗ log N ≤ K test ≤ a ∗ N . Then there is a family G ⊆ { ± 1 } [ N ] \mathcal{G}\subseteq\{\pm1\}^{[N]} G ⊆ { ± 1 } [ N ] with
exp ( c ∗ K t e s t ) ≤ ∣ G ∣ ≤ exp ( C ∗ K t e s t ) \exp(c_*K_{\mathrm{test}})\leq|\mathcal{G}|\leq\exp(C_*K_{\mathrm{test}}) exp ( c ∗ K test ) ≤ ∣ G ∣ ≤ exp ( C ∗ K test ) such that, for every d ∈ R N d\in\mathbb{R}^N d ∈ R N ,
max g ∈ G ∣ ∑ i = 1 N g ( i ) d i ∣ ≥ c ∗ K t e s t N ∑ i = 1 N ∣ d i ∣ . (26) \max_{g\in\mathcal{G}}\left|\sum_{i=1}^{N}g(i)d_i\right|\geq c_*\sqrt{\frac{K_{\mathrm{test}}}{N}}\sum_{i=1}^{N}|d_i|. \tag*{(26)} g ∈ G max i = 1 ∑ N g ( i ) d i ≥ c ∗ N K test i = 1 ∑ N ∣ d i ∣. (26)
The construction splits the coordinates into about K t e s t K_{\mathrm{test}} K test blocks. A distribution over a small set of sign patterns gives, in each block, an expected absolute inner product at least a constant times the Euclidean norm of that block’s residual vector. We include every choice of sign flips on the blocks. For each pattern, suitable flips make all block contributions nonnegative, so averaging over patterns shows that some test attains the sum of these lower bounds. Each block has O ( N / K t e s t ) O(N/K_{\mathrm{test}}) O ( N / K test ) coordinates, so its Euclidean norm is at least a constant times K t e s t / N \sqrt{K_{\mathrm{test}}/N} K test / N times its ℓ 1 \ell_1 ℓ 1 norm. The proof is deferred to Appendix § 13 .
Proof of Theorem 7.1 . Let a ∗ a_* a ∗ , A ∗ A_* A ∗ , c ∗ c_* c ∗ , C ∗ C_* C ∗ be the constants from Lemma 7.3, increasing C ∗ C_* C ∗ if necessary so that C ∗ ≥ 1 C_* \ge1 C ∗ ≥ 1 . Set K t e s t = A / C ∗ K_{\mathrm{test}} = A/C_* K test = A / C ∗ .
Choosing the domain size. With R R R domain points, the sign-test lemma and multiaccuracy will bound the average distance from the conditional means by O ( ε R / K t e s t ) O(\varepsilon\sqrt{R/K_{\mathrm{test}}}) O ( ε R / K test ) . The means themselves are within ε \varepsilon ε of the public baselines. The decoding lemma requires average distance from the baselines to be a small fraction of their spacing, 1 / R 1/R 1/ R . Balancing the first error with this spacing gives
ε R K t e s t ≍ 1 R , so we set R = ⌊ K t e s t 1 / 3 ε − 2 / 3 ⌋ . \varepsilon\sqrt{\frac{R}{K_{\mathrm{test}}}} \asymp\frac{1}{R}, \qquad\text{so we set}\qquad R=\left\lfloor K_{\mathrm{test}}^{1/3}\varepsilon^{-2/3}\right\rfloor. ε K test R ≍ R 1 , so we set R = ⌊ K test 1/3 ε − 2/3 ⌋ .
The second error, ε \varepsilon ε , is small relative to 1 / R 1/R 1/ R because R ε ≤ ( K t e s t ε ) 1 / 3 ≤ ( a 0 / C ∗ ) 1 / 3 R\varepsilon\leq(K_{\mathrm{test}}\varepsilon)^{1/3}\leq(a_0/C_*)^{1/3} R ε ≤ ( K test ε ) 1/3 ≤ ( a 0 / C ∗ ) 1/3 . For sufficiently small ε \varepsilon ε , R ≥ 2 R\geq2 R ≥ 2 and the floor loses at most a factor two. Also log R = O ( log ( 1 / ε ) ) \log R=O(\log(1/\varepsilon)) log R = O ( log ( 1/ ε )) and
K t e s t R ≤ 2 ( K t e s t ε ) 2 / 3 ≤ 2 ( a 0 / C ∗ ) 2 / 3 . \frac{K_{\mathrm{test}}}{R}\leq2(K_{\mathrm{test}}\varepsilon)^{2/3}\leq2(a_0/C_*)^{2/3}. R K test ≤ 2 ( K test ε ) 2/3 ≤ 2 ( a 0 / C ∗ ) 2/3 .
Thus taking C 0 C_0 C 0 sufficiently large and a 0 a_0 a 0 sufficiently small ensures A ∗ log R ≤ K t e s t ≤ a ∗ R A_*\log R\leq K_{\mathrm{test}}\leq a_*R A ∗ log R ≤ K test ≤ a ∗ R , as required by the sign-test lemma.
Constructing the hard family. Apply Lemma 7.3 with N = R N=R N = R to obtain G ⊆ { ± 1 } [ R ] \mathcal{G}\subseteq\{\pm1\}^{[R]} G ⊆ { ± 1 } [ R ] satisfying (26) and
c ∗ C ∗ A ≤ log ∣ G ∣ ≤ A . \frac{c_*}{C_*}A\leq\log|\mathcal{G}|\leq A. C ∗ c ∗ A ≤ log ∣ G ∣ ≤ A .
Set X ε , A = [ R ] \mathcal{X}_{\varepsilon,A}=[R] X ε , A = [ R ] and G ε , A = G \mathcal{G}_{\varepsilon,A}=\mathcal{G} G ε , A = G . Let X X X be uniform on [ R ] [R] [ R ] , and define
t i = 1 3 + i 10 R , μ i θ = t i + ε θ i , i = 1 , … , R . t_i=\frac{1}{3}+\frac{i}{10R},\qquad\mu_i^\theta=t_i+\varepsilon\theta_i,\qquad i=1,\ldots,R. t i = 3 1 + 10 R i , μ i θ = t i + ε θ i , i = 1 , … , R .
For each θ ∈ { ± 1 } R \theta\in\{\pm1\}^R θ ∈ { ± 1 } R , let D θ D_\theta D θ have conditional labels Y ∣ X = i ∼ Ber ( μ i θ ) Y\mid X=i\sim\operatorname{Ber}(\mu_i^\theta) Y ∣ X = i ∼ Ber ( μ i θ ) , and put D ε , A = { D θ : θ ∈ { ± 1 } R } \mathcal{D}_{\varepsilon,A}=\{D_\theta:\theta\in\{\pm1\}^R\} D ε , A = { D θ : θ ∈ { ± 1 } R } . All means lie in [ 1 / 4 , 3 / 4 ] [1/4,3/4] [ 1/4 , 3/4 ] for sufficiently small ε \varepsilon ε .
Multiaccuracy forces closeness to the baseline. Fix θ \theta θ and a deterministic predictor p p p with MA D θ ( p ; G ) ≤ c ε \operatorname{MA}_{D_\theta}(p;\mathcal{G})\leq c\varepsilon MA D θ ( p ; G ) ≤ c ε , and write p i = p ( i ) p_i=p(i) p i = p ( i ) . Apply the sign-test lemma directly to the residual vector ( μ i θ − p i ) i = 1 R (\mu_i^\theta-p_i)_{i=1}^R ( μ i θ − p i ) i = 1 R :
c ∗ K t e s t R ∑ i = 1 R ∣ μ i θ − p i ∣ ≤ max g ∈ G ∣ ∑ i = 1 R g ( i ) ( μ i θ − p i ) ∣ ≤ R c ε . c_*\sqrt{\frac{K_{\mathrm{test}}}{R}}\sum_{i=1}^R|\mu_i^\theta-p_i|
\leq\max_{g\in\mathcal{G}}\left|\sum_{i=1}^R g(i)(\mu_i^\theta-p_i)\right|
\leq Rc\varepsilon. c ∗ R K test i = 1 ∑ R ∣ μ i θ − p i ∣ ≤ g ∈ G max i = 1 ∑ R g ( i ) ( μ i θ − p i ) ≤ R c ε .
Since ∣ μ i θ − t i ∣ = ε |\mu_i^\theta-t_i|=\varepsilon ∣ μ i θ − t i ∣ = ε , the triangle inequality gives
e ˉ ( p , t ) ≤ c c ∗ ε R K t e s t + ε . \bar e(p,t)\leq\frac{c}{c_*}\varepsilon\sqrt{\frac{R}{K_{\mathrm{test}}}}+\varepsilon. e ˉ ( p , t ) ≤ c ∗ c ε K test R + ε .
Calibration reveals the signs. On the event CMAD D θ ( p ; G ) ≤ c ε \operatorname{CMAD}_{D_\theta}(p;\mathcal{G})\leq c\varepsilon CMAD D θ ( p ; G ) ≤ c ε , we also have ECED D θ ( p ) ≤ c ε \operatorname{ECED}_{D_\theta}(p)\leq c\varepsilon ECED D θ ( p ) ≤ c ε . Apply Lemma 7.2 with r = 1 / ( 40 R ) r=1/(40R) r = 1/ ( 40 R ) and η = ε \eta=\varepsilon η = ε . The baselines have spacing 1 / ( 10 R ) > 2 r 1/(10R)>2r 1/ ( 10 R ) > 2 r , and
1 R d H ( θ , θ ^ ) ≤ 80 R e ˉ ( p , t ) + c ≤ 80 c c ∗ ε R 3 / 2 K t e s t + 80 R ε + c ≤ ( 80 c ∗ + 1 ) c + 80 ( a 0 / C ∗ ) 1 / 3 . \begin{aligned}
\frac{1}{R}d_H(\theta,\widehat{\theta})\leq80R\bar e(p,t)+c \\
&\leq\frac{80c}{c_*}\frac{\varepsilon R^{3/2}}{\sqrt{K_{\mathrm{test}}}}+80R\varepsilon+c \\
&\leq\left(\frac{80}{c_*}+1\right)c+80(a_0/C_*)^{1/3}.
\end{aligned} R 1 d H ( θ , θ ) ≤ 80 R e ˉ ( p , t ) + c ≤ c ∗ 80 c K test ε R 3/2 + 80 R ε + c ≤ ( c ∗ 80 + 1 ) c + 80 ( a 0 / C ∗ ) 1/3 .
Choose a 0 a_0 a 0 sufficiently small that the second term is at most 1 / 10 1/10 1/10 and c c c sufficiently small that the first is at most 1 / 10 1/10 1/10 . The decoder therefore recovers at least 0.8 R 0.8R 0.8 R hidden signs on the success event. It uses only p p p and the public baselines, not the conditional means used in the preceding analysis.
The learning guarantee makes this event occur with probability at least 2 / 3 2/3 2/3 for every θ \theta θ . Lemma 6.2 , with η = ε \eta=\varepsilon η = ε , gives
n ≥ c i n f o R ε 2 ≥ c ′ A 1 / 3 ε − 8 / 3 , n \ge c_{\mathrm{info}}\frac{R}{\varepsilon^2} \ge c' A^{1/3}\varepsilon^{-8/3}, n ≥ c info ε 2 R ≥ c ′ A 1/3 ε − 8/3 ,
using K t e s t = A / C ∗ K_{\mathrm{test}}=A/C_* K test = A / C ∗ and the floor estimate above. For constant confidence, the upper bound constructs Θ ( A 1 / 3 ε − 2 / 3 ) \Theta(A^{1/3}\varepsilon^{-2/3}) Θ ( A 1/3 ε − 2/3 ) categories, essentially the same number R R R of singleton prediction values forced by this lower bound. Taking c s i z e ≤ c ∗ / C ∗ c_{\mathrm{size}}\le c_*/C_* c size ≤ c ∗ / C ∗ and c s a m p ≤ c ′ c_{\mathrm{samp}}\le c' c samp ≤ c ′ proves the theorem.
Discussion
We have resolved the sample complexity of calibrated multiaccuracy for both randomized predictors and deterministic predictors and have shown that requiring the output to be deterministic comes with a polynomial statistical cost.
Two questions remain. First, the learning algorithm that we give achieving the tight deterministic upper bound runs in exponential time; finding a polynomial-time algorithm with the same rate is open. Second, our lower bound for deterministic learners requires log ∣ G ∣ = Ω ( log ( 1 / ε ) ) \log|\mathcal{G}|=\Omega(\log(1/\varepsilon)) log ∣ G ∣ = Ω ( log ( 1/ ε )) . Thus the deterministic rate remains open when log ∣ G ∣ = o ( log ( 1 / ε ) ) \log|\mathcal{G}|=o(\log(1/\varepsilon)) log ∣ G ∣ = o ( log ( 1/ ε )) , including in particular for constant-size families of real-valued bounded tests. For these constant-size families, the known bounds are Ω ( ε − 5 / 2 ) \Omega(\varepsilon^{-5/2}) Ω ( ε − 5/2 ) and O ~ ( ε − 8 / 3 ) \widetilde{O}(\varepsilon^{-8/3}) O ( ε − 8/3 ) . Note that easy improvements are possible in the special case of a constant number of binary valued indicator tests (i.e. “groups”): if we have k k k groups for some constant k k k , partitioning contexts by their 2 k 2^k 2 k group-membership patterns yields only a constant number of cells despite the exponential blow-up. Predicting the empirical label mean on each cell gives a deterministic predictor that satisfies calibrated multi-accuracy with sample complexity O ( ε − 2 ) O(\varepsilon^{-2}) O ( ε − 2 ) . This construction fails for real-valued test functions.
AI methodology
We used GPT models ranging from GPT-5.5 to GPT-6 in the development of this paper to explore proof strategies, simplify arguments, and draft and revise mathematical proofs. In particular, after we had the randomized upper bound and both lower bounds, the construction of the matching deterministic upper bound from § 5 was found by GPT-5.6 Sol during an approximately 24-hour goal-directed run in the Codex environment using Ultra mode. The authors have verified all proofs and are responsible for the contents of the paper.
Acknowledgments
This work was partially supported by the Simons Collaboration on Algorithmic Fairness, NSF grants RI-2551608 and CCF-2217062, and a gift from Apple.
Deferred proofs for the deterministic upper bound
This appendix supplies the preprocessing and concentration arguments used in § 5 . Each stage succeeds with high probability, so one run suffices for the theorem’s guarantee.
Throughout this appendix, assume A δ ≤ c / ε A_{\delta} \le c/\varepsilon A δ ≤ c / ε and use the parameters from the proof of Theorem 5.1 . Thus
K = ⌈ c K ( A δ / ε 2 ) 1 / 3 ⌉ , α = c α ε , L = A δ + K , K = \left\lceil c_K (A_{\delta}/\varepsilon^2)^{1/3} \right\rceil,\qquad\alpha= c_\alpha\varepsilon,\qquad L = A_{\delta} + K, K = ⌈ c K ( A δ / ε 2 ) 1/3 ⌉ , α = c α ε , L = A δ + K ,
with A δ ≤ K A_{\delta} \le K A δ ≤ K and A δ / K 3 = O ( ε ) \sqrt{A_{\delta}/K^3} = O(\varepsilon) A δ / K 3 = O ( ε ) . Let
ℓ = C ℓ log C ℓ L α δ , N = ⌈ C N L α 2 ⌉ . (27) \ell= C_{\ell}\log\frac{C_{\ell}L}{\alpha\delta},\qquad N = \left\lceil C_N\frac{L}{\alpha^2}\right\rceil. \tag*{(27)} ℓ = C ℓ log α δ C ℓ L , N = ⌈ C N α 2 L ⌉ . (27)
Here the universal constants are chosen so that the inequalities below hold. Each sample split has size N N N .
Confidence intervals and the context partition
Let O 0 \mathcal{O}_0 O 0 be the contexts observed in the preprocessing sample, and let N x N_x N x be the number of appearances of x x x . For x ∈ O 0 x \in\mathcal{O}_0 x ∈ O 0 , let μ ^ x \hat{\mu}_x μ ^ x be the average label and set
ρ x = min { 1 , ℓ / N x } , I x = [ μ ^ x − ρ x , μ ^ x + ρ x ] ∩ [ 0 , 1 ] . \rho_x = \min\{1,\sqrt{\ell/N_x}\}, \qquad I_x = [\hat{\mu}_x-\rho_x,\hat{\mu}_x+\rho_x]\cap[0,1]. ρ x = min { 1 , ℓ / N x } , I x = [ μ ^ x − ρ x , μ ^ x + ρ x ] ∩ [ 0 , 1 ] .
For x ∉ O 0 x \notin\mathcal{O}_0 x ∈ / O 0 , set I x = [ 0 , 1 ] I_x=[0,1] I x = [ 0 , 1 ] . With γ = α / 64 \gamma=\alpha/64 γ = α /64 and N g r i d = ⌈ 1 / γ ⌉ N_{\mathrm{grid}}=\lceil1/\gamma\rceil N grid = ⌈ 1/ γ ⌉ , define
Λ = { i / N g r i d : 0 ≤ i ≤ N g r i d } , Λ x = { v ∈ Λ : dist ( v , I x ) ≤ γ } . \Lambda=\{i/N_{\mathrm{grid}}:0\le i\le N_{\mathrm{grid}}\}, \qquad\Lambda_x=\{v\in\Lambda:\operatorname{dist}(v,I_x)\le\gamma\}. Λ = { i / N grid : 0 ≤ i ≤ N grid } , Λ x = { v ∈ Λ : dist ( v , I x ) ≤ γ } .
Fix a constant c f i x > 0 c_{\mathrm{fix}}>0 c fix > 0 and define
B ^ = { x : N x ≥ c f i x N / K } . (28) \widehat{B}=\{x:N_x\ge c_{\mathrm{fix}}N/K\}. \tag*{(28)} B = { x : N x ≥ c fix N / K } . (28)
Each point in this fixed-score set keeps its score and forms a private singleton category.
The preprocessing sample also induces the context partition. Sort its distinct observed contexts in lexicographic order as z 1 < ⋯ < z q z_1<\cdots<z_q z 1 < ⋯ < z q . Partition X ∖ O 0 \mathcal{X}\setminus\mathcal{O}_0 X ∖ O 0 into the gap cells
{ x : x < z 1 } , { x : z i < x < z i + 1 } ( 1 ≤ i < q ) , { x : x > z q } , \{x:x<z_1\}, \qquad\{x:z_i<x<z_{i+1}\}\ (1\le i<q), \qquad\{x:x>z_q\}, { x : x < z 1 } , { x : z i < x < z i + 1 } ( 1 ≤ i < q ) , { x : x > z q } ,
where every set is understood to lie in X ∖ O 0 \mathcal{X}\setminus\mathcal{O}_0 X ∖ O 0 , and add the singleton { x } \{x\} { x } for every x ∈ O 0 x\in\mathcal{O}_0 x ∈ O 0 . Empty gap cells may be retained by the implementation and are ignored when calling the resulting family a partition. Denote this finite measurable partition by U \mathcal{U} U . A singleton { x } \{x\} { x } with x ∈ B ^ x\in\widehat{B} x ∈ B is excluded from the random assignment; all other cells are assignment cells. If no assignment cells remain, their maximum mass is taken to be zero and all coarsening errors vanish.
Proof of Lemma 5.4 . The counts sum to N N N , so ∣ B ^ ∣ ≤ K / c f i x |\widehat{B}|\le K/c_{\mathrm{fix}} ∣ B ∣ ≤ K / c fix . At the parameters above, N / K ≥ c ℓ / ε 2 N/K\ge c\ell/\varepsilon^2 N / K ≥ c ℓ / ε 2 , so the inclusion threshold exceeds two. For every atom of mass p > C / K p>C/K p > C / K , its expected count is a sufficiently large constant factor above this threshold. A lower-tail Chernoff bound gives miss probability at most exp ( − c N / K ) \exp(-cN/K) exp ( − c N / K ) . There are at most K / C K/C K / C such atoms, so a union bound detects all of them with failure probability at most δ / 100 \delta/100 δ /100 . For coverage, condition on the full feature sample ( X 1 , … , X N ) (X_1,\ldots,X_N) ( X 1 , … , X N ) . Almost surely in this sample, the labels are conditionally independent and the labels at an observed context x x x have mean μ ( x ) \mu(x) μ ( x ) . Whenever ρ x < 1 \rho_x<1 ρ x < 1 , Hoeffding’s inequality gives
P ( ∣ μ ^ x − μ ( x ) ∣ > ℓ / N x | X 1 , … , X N ) ≤ 2 e − 2 ℓ . \mathbb{P}\left(\left|\hat{\mu}_x-\mu(x)\right|>\sqrt{\ell/N_x}\,\middle|\,X_1,\ldots,X_N\right)\le2e^{-2\ell}. P ( ∣ μ ^ x − μ ( x ) ∣ > ℓ / N x X 1 , … , X N ) ≤ 2 e − 2 ℓ .
There are at most N N N observed contexts. A union bound, followed by averaging over the feature sample, proves simultaneous coverage of them; contexts with ρ x = 1 \rho_x=1 ρ x = 1 and unobserved contexts receive [ 0 , 1 ] [0,1] [ 0 , 1 ] . Thus, on the coverage event, μ ( x ) ∈ I x \mu(x)\in I_x μ ( x ) ∈ I x for every x ∈ X x\in\mathcal{X} x ∈ X . Taking C ℓ C\ell C ℓ sufficiently large makes the failure probability 2 N e − 2 ℓ 2Ne^{-2\ell} 2 N e − 2 ℓ at most δ / 100 \delta/100 δ /100 . For any u ∈ I x u\in I_x u ∈ I x , the γ \gamma γ -net property of Λ \Lambda Λ gives a grid value v v v with ∣ u − v ∣ ≤ γ |u-v|\le\gamma ∣ u − v ∣ ≤ γ . Then dist ( v , I x ) ≤ γ \operatorname{dist}(v,I_x)\le\gamma dist ( v , I x ) ≤ γ , so v ∈ Λ x v\in\Lambda_x v ∈ Λ x . This also proves that every Λ x \Lambda_x Λ x is nonempty. By definition, every v ∈ Λ x v\in\Lambda_x v ∈ Λ x satisfies dist ( v , I x ) ≤ γ \operatorname{dist}(v,I_x)\le\gamma dist ( v , I x ) ≤ γ , and all allowed sets are subsets of the common finite grid Λ \Lambda Λ .
For the radius term, consider atoms with p x ≥ 8 ℓ / N p_x\ge8\ell/N p x ≥ 8 ℓ / N . There are at most N N N of them. Chernoff’s inequality and a union bound give N x ≥ N p x / 2 N_x\ge Np_x/2 N x ≥ N p x /2 simultaneously for these atoms, except with probability at most N e − ℓ ≤ δ / 100 Ne^{-\ell} \le\delta/100 N e − ℓ ≤ δ /100 . On this event,
∑ x o b s e r v e d p x > 0 p x 2 p x 2 ≤ ∑ p x ≥ 8 ℓ / N p x 2 2 ℓ N p x + ∑ 0 < p x < 8 ℓ / N p x 2 ≤ 2 ℓ N ∑ x p x + 8 ℓ N ∑ x p x ≤ 10 ℓ N . \begin{aligned}
\sum_{\substack{x\ \mathrm{observed}\\p_x>0}} p_x^2p_x^2 \le\sum_{p_x\ge8\ell/N}p_x^2\frac{2\ell}{Np_x}+\sum_{0<p_x<8\ell/N}p_x^2 \\
&\le\frac{2\ell}{N}\sum_x p_x+\frac{8\ell}{N}\sum_x p_x\le\frac{10\ell}{N}.
\end{aligned} x observed p x > 0 ∑ p x 2 p x 2 ≤ p x ≥ 8 ℓ / N ∑ p x 2 N p x 2 ℓ + 0 < p x < 8 ℓ / N ∑ p x 2 ≤ N 2 ℓ x ∑ p x + N 8 ℓ x ∑ p x ≤ N 10 ℓ .
For the gaps, write m U = P X ( U ) m_U=P_X(U) m U = P X ( U ) and introduce r r r fresh independent contexts only for the analysis. Conditional on the preprocessing sample, ∑ U m U r \sum_U m_U^r ∑ U m U r is the probability that all r r r lie in the same gap. Attach independent uniform [ 0 , 1 ] [0,1] [ 0 , 1 ] tie-breakers to all N + r N+r N + r contexts, sorting first by context and using these numbers only between equal contexts. If the fresh contexts lie in one unobserved gap, they occupy r r r consecutive positions. This also covers equal fresh contexts, since none of the preprocessing contexts can lie in that gap. Exchangeability makes their positions a uniform r r r -subset, and there are N + 1 N+1 N + 1 possible consecutive blocks. Thus
E ∑ U u n o b s e r v e d m U r ≤ N + 1 ( N + r r ) ≤ N ( r N ) r . \mathbb{E}\sum_{U\ \mathrm{unobserved}}m_U^r\le\frac{N+1}{\binom{N+r}{r}}\le N\left(\frac{r}{N}\right)^r. E U unobserved ∑ m U r ≤ ( r N + r ) N + 1 ≤ N ( N r ) r .
Consequently, Markov’s inequality applied to ∑ U m U r \sum_U m_U^r ∑ U m U r gives
P ( max U u n o b s e r v e d m U > e r N ) ≤ N e − r . \mathbb{P}\left(\max_{U\ \mathrm{unobserved}}m_U>\frac{er}{N}\right)\le Ne^{-r}. P ( U unobserved max m U > N er ) ≤ N e − r .
Take r = ⌈ log ( 100 N / δ ) ⌉ r=\lceil\log(100N/\delta)\rceil r = ⌈ log ( 100 N / δ )⌉ . The parameters in (27) ensure r = O ( ℓ ) r=O(\ell) r = O ( ℓ ) , so, with failure probability at most δ / 100 \delta/100 δ /100 ,
∑ U u n o b s e r v e d m U 2 ≤ max U m U ∑ U m U ≤ C ℓ N . \sum_{U\ \mathrm{unobserved}}m_U^2\le\max_U m_U\sum_Um_U\le\frac{C\ell}{N}. U unobserved ∑ m U 2 ≤ U max m U U ∑ m U ≤ N C ℓ .
The tie-breakers are not part of the algorithm.
Combining these events proves V U ≤ C ℓ / N ≤ C α 2 / L V_U\le C\ell/N\le C\alpha^2/L V U ≤ C ℓ / N ≤ C α 2 / L with failure probability at most δ / 10 \delta/10 δ /10 . The gap bound also gives
max U u n o b s e r v e d P X ( U ) ≤ C ℓ / N = O ( α 2 / L ) = O ( 1 / K ) . \max_{U\ \mathrm{unobserved}}P_X(U)\le C\ell/N=O(\alpha^2/L)=O(1/K). U unobserved max P X ( U ) ≤ C ℓ / N = O ( α 2 / L ) = O ( 1/ K ) .
An observed atom outside the fixed-score set has mass O ( 1 / K ) O(1/K) O ( 1/ K ) by the detection guarantee, and an observed non-atom has mass zero. This proves the assignment-cell mass bound.
The coverage and squared-mass arguments do not use the fixed-score threshold. For any N N N and ℓ ≥ C log ( N / δ ) \ell\ge C\log(N/\delta) ℓ ≥ C log ( N / δ ) , the same intervals, allowed grid values, and singleton-and-gap partition therefore give pointwise coverage and V U ≤ C ℓ / N V_U\le C\ell/N V U ≤ C ℓ / N with probability at least 1 − δ / 10 1-\delta/10 1 − δ /10 , without forming B ^ \widehat B B . We use this observation in the large-budget case.
Conditional on the event in Lemma 5.4 , the auxiliary class in (18) is fixed before the labeled score sample is drawn. Its log-cardinality is O ( K ) O(K) O ( K ) . Applying Lemma 5.5, with failure probability δ / 10 \delta/10 δ /10 , gives a deterministic S S S supported on Λ x \Lambda_x Λ x for which (19) –(20) hold. Indeed, their conditional bound is
C γ + C log ( 20 ∣ Φ K ∣ / δ ) N + C α 2 L log ( 20 ∣ Φ K ∣ / δ ) = O ( α ) . C\gamma+C\sqrt{\frac{\log(20|\Phi_K|/\delta)}{N}}+C\sqrt{\frac{\alpha^2}{L}\log(20|\Phi_K|/\delta)}=O(\alpha). C γ + C N log ( 20∣ Φ K ∣/ δ ) + C L α 2 log ( 20∣ Φ K ∣/ δ ) = O ( α ) .
Transferring empirical residuals to the true labels
Proof of Lemma 5.8 . We also establish the empirical mass bound (22) . Condition throughout on successful preprocessing and score learning. The partition, fixed-score set, and score are therefore fixed before the fresh context sample is drawn. Write Δ = P X − P ^ X \Delta= P_X - \widehat{P}_X Δ = P X − P X and μ ( x ) = E [ Y ∣ X = x ] \mu(x) = \mathbb{E}[Y \mid X = x] μ ( x ) = E [ Y ∣ X = x ] .
The proof first bounds, for each cell, the difference between population and sample averages of bounded functions supported on that cell. We then combine these bounds with the score residuals μ − S \mu- S μ − S to control the effect of fixing the independent assignment choices. The expected residual difference is an average over rules that use one tuple everywhere; score learning and a finite-class sample bound control each of those rules.
Squared cell discrepancies. Let m U = P X ( U ) m_U = P_X(U) m U = P X ( U ) , m ^ U = P ^ X ( U ) \widehat{m}_U = \widehat{P}_X(U) m U = P X ( U ) , and define
a U = { ∣ m U − m ^ U ∣ , U is an observed singleton , m U + m ^ U , U is an unobserved gap . a_U =
\begin{cases}
|m_U - \widehat{m}_U|, & U\text{ is an observed singleton},\\
m_U + \widehat{m}_U, & U\text{ is an unobserved gap}.
\end{cases} a U = { ∣ m U − m U ∣ , m U + m U , U is an observed singleton , U is an unobserved gap .
For every function f f f with ∣ f ∣ ≤ 1 |f| \le1 ∣ f ∣ ≤ 1 on U U U , ∣ Δ [ 1 U f ] ∣ ≤ a U |\Delta[1_U f]| \le a_U ∣Δ [ 1 U f ] ∣ ≤ a U . For a singleton U = { x } U = \{x\} U = { x } , the difference is ( m U − m ^ U ) f ( x ) (m_U - \widehat{m}_U)f(x) ( m U − m U ) f ( x ) ; for a gap, the population and empirical integrals have absolute values at most m U m_U m U and m ^ U \widehat{m}_U m U . Since ( m U + m ^ U ) 2 ≤ 8 m ^ U 2 + 2 ( m ^ U − m U ) 2 (m_U + \widehat{m}_U)^2 \le8\widehat{m}_U^2 + 2(\widehat{m}_U - m_U)^2 ( m U + m U ) 2 ≤ 8 m U 2 + 2 ( m U − m U ) 2 , we have
T Δ : = ∑ U a U 2 ≤ 2 ∥ m ^ − m ∥ 2 2 + 8 ∑ U u n o b s e r v e d m U 2 . T_\Delta:= \sum_U a_U^2 \le2\|\widehat{\mathbf{m}}-\mathbf{m}\|_2^2 + 8\sum_{U\ \mathrm{unobserved}}m_U^2. T Δ := U ∑ a U 2 ≤ 2∥ m − m ∥ 2 2 + 8 U unobserved ∑ m U 2 .
where m , m ^ \mathbf{m}, \widehat{\mathbf{m}} m , m are the vectors of cell masses. Conditional on the partition, and taking expectation over the fresh context sample, the empirical mass vector satisfies
E ∥ m ^ − m ∥ 2 2 = 1 − ∑ U m U 2 N ≤ 1 N . \mathbb{E}\|\widehat{\mathbf{m}}-\mathbf{m}\|_2^2 = \frac{1-\sum_U m_U^2}{N} \le\frac{1}{N}. E ∥ m − m ∥ 2 2 = N 1 − ∑ U m U 2 ≤ N 1 .
Changing one observation moves the empirical mass vector by at most 2 / N \sqrt{2}/N 2 / N in Euclidean norm, and hence changes ∥ m ^ − m ∥ 2 \|\widehat{\mathbf{m}}-\mathbf{m}\|_2 ∥ m − m ∥ 2 by at most the same amount. Jensen’s inequality and bounded differences therefore give, with failure probability at most δ / 20 \delta/20 δ /20 ,
∥ m ^ − m ∥ 2 ≤ 1 N + log ( 20 / δ ) N . \|\widehat{\mathbf{m}}-\mathbf{m}\|_2 \le\frac{1}{\sqrt{N}}+\sqrt{\frac{\log(20/\delta)}{N}}. ∥ m − m ∥ 2 ≤ N 1 + N log ( 20/ δ ) .
The preprocessing bound on squared gap masses now implies
T Δ ≤ C ℓ / N . (29) T_\Delta\le C\ell/N. \tag*{(29)} T Δ ≤ C ℓ / N . (29)
On the same event,
b ^ ≤ max U a s s i g n m e n t c e l l m U + ∥ m ^ − m ∥ 2 ≤ C / K + C ℓ / N = O ( 1 / K ) . \widehat{b} \le\max_{U\ \mathrm{assignment\ cell}} m_U + \|\widehat{\mathbf{m}}-\mathbf{m}\|_2 \le C/K + C\sqrt{\ell/N} = O(1/K). b ≤ U assignment cell max m U + ∥ m − m ∥ 2 ≤ C / K + C ℓ / N = O ( 1/ K ) .
The last step uses N ≥ C K 2 ℓ N \ge CK^2\ell N ≥ C K 2 ℓ , which follows from the parameter choices after taking C N C_N C N sufficiently large: N = Θ ( K 4 ℓ / A δ ) N = \Theta(K^4\ell/A_\delta) N = Θ ( K 4 ℓ / A δ ) and A δ ≤ K A_\delta\le K A δ ≤ K . This proves (22) .
Residual differences for global tuples. For any nominal prediction vector r ∈ [ 0 , 1 ] K + 1 r \in[0,1]^{K+1} r ∈ [ 0 , 1 ] K + 1 , let p ω , r p_{\omega,r} p ω , r predict r j r_j r j on nominal category j j j and retain S S S on private categories. Write p τ , r p_{\tau,r} p τ , r when the same tuple τ \tau τ is used in every assignment cell. Initially restrict to r ∈ { 0 , 1 } K + 1 r \in\{0,1\}^{K+1} r ∈ { 0 , 1 } K + 1 . For each global tuple, consider either a group test or a full category-sign test,
χ τ , v ( x ) = g ( x ) or χ τ , v ( x ) = σ J τ ( x , S ( x ) ) , σ ∈ { ± 1 } K + 1 + K p r i v , \chi_{\tau,v}(x) = g(x) \quad\text{or} \quad\chi_{\tau,v}(x) = \sigma_{J_\tau}(x,S(x)), \qquad\sigma\in\{\pm1\}^{K+1+K_{\mathrm{priv}}}, χ τ , v ( x ) = g ( x ) or χ τ , v ( x ) = σ J τ ( x , S ( x )) , σ ∈ { ± 1 } K + 1 + K priv ,
where v v v records the chosen test and prediction vector r r r . Put f τ , v = χ τ , v ( S − p τ , r ) f_{\tau,v}=\chi_{\tau,v}(S-p_{\tau,r}) f τ , v = χ τ , v ( S − p τ , r ) . The residual difference we must control is, by Lemma 2.1 ,
Z τ , v = E [ χ τ , v ( X ) ( Y − p τ , r ( X ) ) ] − P ^ X [ f τ , v ] = P X [ χ τ , v ( μ − S ) ] + Δ [ f τ , v ] . Z_{\tau,v}=\mathbb{E}[\chi_{\tau,v}(X)(Y-p_{\tau,r}(X))]-\widehat{P}_X[f_{\tau,v}]
= P_X[\chi_{\tau,v}(\mu-S)]+\Delta[f_{\tau,v}]. Z τ , v = E [ χ τ , v ( X ) ( Y − p τ , r ( X ))] − P X [ f τ , v ] = P X [ χ τ , v ( μ − S )] + Δ [ f τ , v ] .
The score residual P X [ χ τ , v ( μ − S ) ] P_X[\chi_{\tau,v}(\mu-S)] P X [ χ τ , v ( μ − S )] is at most C α C\alpha C α in absolute value by (19) –(20) . The functions f τ , v f_{\tau,v} f τ , v vanish on private categories and are bounded by one. Their number is at most
∣ H ∣ m s p ( ∣ G ∣ 2 K + 1 + 2 2 ( K + 1 ) + K p r i v ) , |\mathcal{H}|^{m_{\mathrm{sp}}}\left(|\mathcal{G}|2^{K+1}+2^{2(K+1)+K_{\mathrm{priv}}}\right), ∣ H ∣ m sp ( ∣ G ∣ 2 K + 1 + 2 2 ( K + 1 ) + K priv ) ,
whose logarithm is O ( A δ + K ) O(A_\delta+K) O ( A δ + K ) . This class is fixed before the context sample. Hoeffding’s inequality and a union bound give, with failure probability at most δ / 40 \delta/40 δ /40 ,
max τ , v ∣ Δ [ f τ , v ] ∣ ≤ C A δ + K N ≤ C α . \max_{\tau,v}|\Delta[f_{\tau,v}]|\le C\sqrt{\frac{A_\delta+K}{N}}\le C\alpha. τ , v max ∣Δ [ f τ , v ] ∣ ≤ C N A δ + K ≤ C α .
Consequently, on this event,
max τ , v ∣ Z τ , v ∣ ≤ C α . (30) \max_{\tau,v}|Z_{\tau,v}|\le C\alpha. \tag*{(30)} τ , v max ∣ Z τ , v ∣ ≤ C α . (30)
Independent cell assignments. Now fix a context sample satisfying this event and (29) , and let π ^ \widehat{\pi} π be its selected distribution. Define χ ω , v \chi_{\omega,v} χ ω , v and Z ω , v Z_{\omega,v} Z ω , v by replacing the global tuple with the realized cell tuples:
Z ω , v = P X [ χ ω , v ( μ − S ) ] + Δ [ χ ω , v ( S − p ω , r ) ] . Z_{\omega,v}=P_X[\chi_{\omega,v}(\mu-S)]+\Delta[\chi_{\omega,v}(S-p_{\omega,r})]. Z ω , v = P X [ χ ω , v ( μ − S )] + Δ [ χ ω , v ( S − p ω , r )] .
For an assignment cell U U U , put c U = P X [ 1 U ∣ μ − S ∣ ] c_U=P_X[\mathbf{1}_U|\mu-S|] c U = P X [ 1 U ∣ μ − S ∣ ] . Coverage and S ( x ) ∈ Λ x S(x)\in\Lambda_x S ( x ) ∈ Λ x imply c { x } ≤ p x ( 2 ρ x + γ ) c_{\{x\}}\le p_x(2\rho_x+\gamma) c { x } ≤ p x ( 2 ρ x + γ ) at observed singletons, while c U ≤ P X ( U ) c_U\le P_X(U) c U ≤ P X ( U ) on unobserved gaps. Let b = O ( 1 / K ) b=O(1/K) b = O ( 1/ K ) be the largest population assignment-cell mass. Then
∑ U a s s i g n m e n t c e l l c U 2 ≤ 8 V U + 2 γ 2 ∑ x o b s e r v e d , n o n p r i v a t e p x 2 ≤ 8 V U + 2 γ 2 b . \sum_{U\ \mathrm{assignment\ cell}}c_U^2\le8V_U+2\gamma^2
\qquad
\sum_{x\ \mathrm{observed,\ nonprivate}}p_x^2\le8V_U+2\gamma^2b. U assignment cell ∑ c U 2 ≤ 8 V U + 2 γ 2 x observed , nonprivate ∑ p x 2 ≤ 8 V U + 2 γ 2 b .
The contribution of U U U to Z ω , v Z_{\omega,v} Z ω , v has absolute value at most c U + a U c_U+a_U c U + a U . Therefore
∑ U a s s i g n m e n t c e l l ( c U + a U ) 2 ≤ C ( V U + γ 2 b + T Δ ) ≤ C α 2 A δ + K . \sum_{U\ \mathrm{assignment\ cell}}(c_U+a_U)^2\le C(V_U+\gamma^2b+T_\Delta)\le C\frac{\alpha^2}{A_\delta+K}. U assignment cell ∑ ( c U + a U ) 2 ≤ C ( V U + γ 2 b + T Δ ) ≤ C A δ + K α 2 .
Here V U , T Δ = O ( ℓ / N ) V_U,T_\Delta=O(\ell/N) V U , T Δ = O ( ℓ / N ) , γ = α / 64 \gamma=\alpha/64 γ = α /64 , and A δ ≤ K A_\delta\le K A δ ≤ K . Conditional on the sample, the assignment-cell contributions are independent. The private contribution is deterministic and disappears after centering. Hoeffding’s inequality and a union bound over v v v thus give, with conditional failure probability at most δ / 40 \delta/40 δ /40 ,
max v ∣ Z ω , v − E ω Z ω , v ∣ ≤ C α . \max_v|Z_{\omega,v}-\mathbb{E}_{\omega}Z_{\omega,v}|\le C\alpha. v max ∣ Z ω , v − E ω Z ω , v ∣ ≤ C α .
Every assignment cell has the same marginal tuple law; private categories are unchanged under every tuple. Hence
E ω Z ω , v = E τ ∼ π ^ m s p Z τ , v . \mathbb{E}_{\omega}Z_{\omega,v}=\mathbb{E}_{\tau\sim\widehat{\pi}^{m_{\mathrm{sp}}}}Z_{\tau,v}. E ω Z ω , v = E τ ∼ π m sp Z τ , v .
Equation (30) bounds this expectation even when π ^ \widehat{\pi} π depends on the sample. Combining the bounds gives max v ∣ Z ω , v ∣ ≤ C α \max_v|Z_{\omega,v}|\le C\alpha max v ∣ Z ω , v ∣ ≤ C α .
For a fixed assignment and test, Z ω , v Z_{\omega,v} Z ω , v is affine in r r r . Its absolute value on [ 0 , 1 ] K + 1 [0,1]^{K+1} [ 0 , 1 ] K + 1 is maximized at a vertex, so the same event covers every nominal prediction vector, including the empirical means computed from this sample and assignment, with zero for categories containing no sample points. For these means, Z ω , v Z_{\omega,v} Z ω , v is exactly the difference of population and empirical residuals in (24) . The three failure probabilities sum to δ / 10 \delta/10 δ /10 , completing the proof of Lemma 5.8 .
Fixing the category assignments
We first isolate the concentration estimate used for the multiaccuracy residuals.
Lemma A.1 (Concentration after category averaging). Suppose every assignment cell has mass at most b b b , and every category has score diameter at most D c a t D_{\mathrm{cat}} D cat . Then, for every h : X → [ − 1 , 1 ] h:\mathcal{X}\to[-1,1] h : X → [ − 1 , 1 ] and t ≥ 0 t\ge0 t ≥ 0 ,
P ω ( ∣ F h ( ω ) − E ω F h ( ω ) ∣ > C ( b E ω V ( ω ) t + b D c a t t ) ) ≤ 2 e − t . \mathbb{P}_{\omega}\left(\left|F_h(\omega)-\mathbb{E}_{\omega}F_h(\omega)\right|>C\left(\sqrt{b\mathbb{E}_{\omega}V(\omega)t}+bD_{\mathrm{cat}}t\right)\right)\le2e^{-t}. P ω ( ∣ F h ( ω ) − E ω F h ( ω ) ∣ > C ( b E ω V ( ω ) t + b D cat t ) ) ≤ 2 e − t .
The change caused by deleting an assignment cell is controlled by the integral of ( S − p ω ) 2 (S-p_{\omega})^2 ( S − p ω ) 2 over that cell. Summing over cells gives the two bounds needed for a moment form of the Efron–Stein inequality.
We use the following leave-one-coordinate-out form of the generalized Efron–Stein inequality [5 Corollary D.1, equation (D.4] ; see also [2 Theorem 15.5] for the coordinate-resampling form. If Z Z Z is a measurable function of independent coordinates and Z − i Z_{-i} Z − i is any measurable function of all coordinates except the i i i th, then, for every real q ≥ 2 q\ge2 q ≥ 2 , writing ∥ Z ∥ q = ( E ∣ Z ∣ q ) 1 / q \|Z\|_q=(\mathbb{E}|Z|^q)^{1/q} ∥ Z ∥ q = ( E ∣ Z ∣ q ) 1/ q ,
∥ Z − E Z ∥ q ≤ C q ∥ ( ∑ i ( Z − Z − i ) 2 ) 1 / 2 ∥ q . (31) \|Z-\mathbb{E}Z\|_q\le C\sqrt{q}\left\|\left(\sum_i(Z-Z_{-i})^2\right)^{1/2}\right\|_q. \tag*{(31)} ∥ Z − E Z ∥ q ≤ C q ( i ∑ ( Z − Z − i ) 2 ) 1/2 q . (31)
For a measurable set A A A of positive mass, write
S ‾ A = 1 P X ( A ) ∫ A S d P X , h ‾ A = 1 P X ( A ) ∫ A h d P X , \overline{S}_A=\frac{1}{P_X(A)}\int_A S\,dP_X,\qquad\overline{h}_A=\frac{1}{P_X(A)}\int_A h\,dP_X, S A = P X ( A ) 1 ∫ A S d P X , h A = P X ( A ) 1 ∫ A h d P X ,
and define the mass-weighted variance and covariance
V ( A ) = ∫ A ( S − S ‾ A ) 2 d P X , F h ( A ) = ∫ A h ( S − S ‾ A ) d P X . V(A)=\int_A(S-\overline{S}_A)^2\,dP_X,\qquad F_h(A)=\int_A h(S-\overline{S}_A)\,dP_X. V ( A ) = ∫ A ( S − S A ) 2 d P X , F h ( A ) = ∫ A h ( S − S A ) d P X .
These are P X ( A ) P_X(A) P X ( A ) times the conditional variance of S S S and the conditional covariance of h h h and S S S on A A A , respectively. Both are defined to be zero when P X ( A ) = 0 P_X(A)=0 P X ( A ) = 0 . The following identity controls the effect of deleting part of a positive-mass category C=A\mathbin{\mathaccent\cdot\cup}B :
F h ( C ) − F h ( B ) = ∫ A ( h − h ‾ B ) ( S − S ‾ C ) d P X . (32) F_h(C)-F_h(B)=\int_A(h-\overline{h}_B)(S-\overline{S}_C)\,dP_X. \tag*{(32)} F h ( C ) − F h ( B ) = ∫ A ( h − h B ) ( S − S C ) d P X . (32)
Indeed, integrating the product on the right over C C C gives F h ( C ) F_h(C) F h ( C ) , because S − S ‾ C S-\overline{S}_C S − S C has mean zero there. Integrating it over B B B gives F h ( B ) F_h(B) F h ( B ) , because h − h ‾ B h-\overline{h}_B h − h B has mean zero there. Subtracting proves the identity. If P X ( B ) = 0 P_X(B)=0 P X ( B ) = 0 , choose any h ‾ B ∈ [ − 1 , 1 ] \overline{h}_B\in[-1,1] h B ∈ [ − 1 , 1 ] .
Lemma A.2 (Squared changes from deleting assignment cells). Fix a realized assignment and a test h : X → [ − 1 , 1 ] h:\mathcal{X}\to[-1,1] h : X → [ − 1 , 1 ] . Let V t o t V_{\mathrm{tot}} V tot and F t o t F_{\mathrm{tot}} F tot be the sums of V ( C j ) V(C_j) V ( C j ) and F h ( C j ) F_h(C_j) F h ( C j ) over its nominal categories. Delete assignment cell U i U_i U i from every category, leaving the other assignments fixed and recomputing each category average on the remaining contexts. Denote the resulting totals by V − i V_{-i} V − i and F h , − i F_{h,-i} F h , − i . If every assignment cell has mass at most b b b and every category has score diameter at most D c a t D_{\mathrm{cat}} D cat , then
∑ i ( F t o t − F h , − i ) 2 ≤ 4 b V t o t , ∑ i ( V t o t − V − i ) 2 ≤ b D c a t 2 V t o t . (33) \sum_i(F_{\mathrm{tot}}-F_{h,-i})^2\le4bV_{\mathrm{tot}},\qquad\sum_i(V_{\mathrm{tot}}-V_{-i})^2\le bD_{\mathrm{cat}}^2V_{\mathrm{tot}}. \tag*{(33)} i ∑ ( F tot − F h , − i ) 2 ≤ 4 b V tot , i ∑ ( V tot − V − i ) 2 ≤ b D cat 2 V tot . (33)
Proof. Write p ω p_\omega p ω for the category-averaged score and set
c i = P X ( U i ) , E i = ∫ U i ( S − p ω ) 2 d P X . c_i=P_X(U_i),\qquad E_i=\int_{U_i}(S-p_\omega)^2\,dP_X. c i = P X ( U i ) , E i = ∫ U i ( S − p ω ) 2 d P X .
The assignment cells partition the nonprivate region, so ∑ i E i = V t o t \sum_i E_i=V_{\mathrm{tot}} ∑ i E i = V tot . Apply (32) to A = C j ∩ U i A=C_j\cap U_i A = C j ∩ U i , B = C j ∖ U i B=C_j\setminus U_i B = C j ∖ U i , and sum over positive-mass categories; zero-mass categories contribute zero. Since ∣ h − h ˉ B ∣ ≤ 2 |h-\bar h_B|\le2 ∣ h − h ˉ B ∣ ≤ 2 , Cauchy–Schwarz gives
∣ F t o t − F h , − i ∣ 2 ≤ 4 c i E i . |F_{\mathrm{tot}}-F_{h,-i}|^2\le4c_iE_i. ∣ F tot − F h , − i ∣ 2 ≤ 4 c i E i .
The same identity with h = S h=S h = S controls variance, because F S ( C ) = V ( C ) F_S(C)=V(C) F S ( C ) = V ( C ) . Both S S S and S ˉ B \bar S_B S ˉ B lie in the interval spanned by the scores in C j C_j C j ; when P X ( B ) = 0 P_X(B)=0 P X ( B ) = 0 , choose S ˉ B \bar S_B S ˉ B anywhere in that interval. This auxiliary choice does not affect the zero-mass covariance. Thus
∣ V t o t − V − i ∣ 2 ≤ D c a t 2 c i E i . |V_{\mathrm{tot}}-V_{-i}|^2\le D_{\mathrm{cat}}^2c_iE_i. ∣ V tot − V − i ∣ 2 ≤ D cat 2 c i E i .
Summing these inequalities and using c i ≤ b c_i\le b c i ≤ b proves the claim.
Proof of Lemma A.1. All objects in the lemma other than the assignment seeds are fixed. In the application, this means conditioning on the preprocessing transcript, the learned score S S S , the selection sample, and the selected distribution π ^ \hat\pi π ^ . Under this conditioning, the cell seeds are independent. All expectations and moment norms below are over these seeds. Write V t o t = V ( ω ) V_{\mathrm{tot}}=V(\omega) V tot = V ( ω ) , F t o t = F h ( ω ) F_{\mathrm{tot}}=F_h(\omega) F tot = F h ( ω ) , and V ‾ = E ω V t o t \overline V=\mathbb{E}_\omega V_{\mathrm{tot}} V = E ω V tot .
First control W = V t o t W=\sqrt{V_{\mathrm{tot}}} W = V tot , the root-mean-square change in the score. Taking the square root gives a deletion bound that no longer depends on the realized V t o t V_{\mathrm{tot}} V tot . Write W − i = V − i W_{-i}=\sqrt{V_{-i}} W − i = V − i . When V t o t > 0 V_{\mathrm{tot}}>0 V tot > 0 , (33) gives
∑ i ( W − W − i ) 2 = ∑ i ( V t o t − V − i ) 2 ( V t o t + V − i ) 2 ≤ b D c a t 2 . \sum_i(W-W_{-i})^2=\sum_i\frac{(V_{\mathrm{tot}}-V_{-i})^2}{(\sqrt{V_{\mathrm{tot}}}+\sqrt{V_{-i}})^2}\le bD_{\mathrm{cat}}^2. i ∑ ( W − W − i ) 2 = i ∑ ( V tot + V − i ) 2 ( V tot − V − i ) 2 ≤ b D cat 2 .
When V t o t = 0 V_{\mathrm{tot}}=0 V tot = 0 , the same deletion bound forces every V − i = 0 V_{-i}=0 V − i = 0 . Applying (31) to W W W , then using E W ≤ V ‾ \mathbb{E}W\le\sqrt{\overline V} E W ≤ V , shows that for q ≥ 2 q\ge2 q ≥ 2 ,
∥ W ∥ q ≤ V ‾ + C D c a t b q . \|W\|_q\le\sqrt{\overline V}+CD_{\mathrm{cat}}\sqrt{bq}. ∥ W ∥ q ≤ V + C D cat b q .
Now apply (31) to F t o t F_{\mathrm{tot}} F tot . The first bound in (33) gives
∥ F t o t − E F t o t ∥ q ≤ C b q ∥ W ∥ q ≤ C ( b V ‾ q + b D c a t q ) . \|F_{\mathrm{tot}}-\mathbb{E}F_{\mathrm{tot}}\|_q\le C\sqrt{bq}\,\|W\|_q\le C\left(\sqrt{b\overline Vq}+bD_{\mathrm{cat}}q\right). ∥ F tot − E F tot ∥ q ≤ C b q ∥ W ∥ q ≤ C ( b V q + b D cat q ) .
For t ≥ 2 t\ge2 t ≥ 2 , take q = t q=t q = t and apply Markov’s inequality at a sufficiently large constant multiple of the right side to obtain failure probability at most 2 e − t 2e^{-t} 2 e − t . When t ≤ log 2 t\le\log2 t ≤ log 2 , the asserted probability bound is trivial; for log 2 < t < 2 \log2<t<2 log 2 < t < 2 , the q = 2 q=2 q = 2 bound implies it after enlarging the same universal constant. This proves Lemma A.1.
Proof of Lemma 5.7. Condition on the preprocessing, score, and context sample satisfying (22) . Apply Lemma A.1 to the empirical distribution P ^ X \widehat P_X P X , with its category averages p ^ ω \hat p_\omega p ^ ω . Its assignment-cell mass bound is b ^ = O ( 1 / K ) \hat b=O(1/K) b ^ = O ( 1/ K ) , and Lemma 5.6 gives E ω V ^ ( ω ) = O ( K − 2 ) \mathbb{E}_\omega\widehat V(\omega)=O(K^{-2}) E ω V ( ω ) = O ( K − 2 ) and ∣ E ω F ^ g ( ω ) ∣ = O ( ξ ) |\mathbb{E}_\omega\widehat F_g(\omega)|=O(\xi) ∣ E ω F g ( ω ) ∣ = O ( ξ ) . Taking t = C A δ t=CA_\delta t = C A δ and union bounding over the signed class gives (23) with failure probability at most δ / 10 \delta/10 δ /10 , since
b ^ E ω V ^ t = O ( A δ K 3 ) , b ^ D c a t t = O ( A δ K 3 ) . \sqrt{\hat b\,\mathbb{E}_\omega\widehat V\,t}=O\left(\sqrt{\frac{A_\delta}{K^3}}\right),\qquad
\hat bD_{\mathrm{cat}}t=O\left(\sqrt{\frac{A_\delta}{K^3}}\right). b ^ E ω V t = O ( K 3 A δ ) , b ^ D cat t = O ( K 3 A δ ) .
Deferred proofs from the randomized lower bound
This appendix proves the shared recovery bound, followed by the two applications from § 6 .
Proof of Lemma 6.2 . Pair a hidden vector θ \theta θ with θ ( i ) \theta^{(i)} θ ( i ) , obtained by flipping only coordinate i i i . Write a = t i + η θ i a=t_i+\eta\theta_i a = t i + η θ i and b = t i + η θ i ( i ) b=t_i+\eta\theta_i^{(i)} b = t i + η θ i ( i ) for the two label means at that coordinate. They lie in [ 1 / 8 , 7 / 8 ] [1/8,7/8] [ 1/8 , 7/8 ] and satisfy ∣ a − b ∣ ≤ 2 η |a-b|\le2\eta ∣ a − b ∣ ≤ 2 η . For one sample, the likelihood ratio L 1 = d D θ / d D θ ( i ) L_1=dD_\theta/dD_{\theta^{(i)}} L 1 = d D θ / d D θ ( i ) is 1 unless the sampled context is i i i . Here E θ ( i ) \mathbb{E}_{\theta^{(i)}} E θ ( i ) denotes expectation over samples from D θ ( i ) D_{\theta^{(i)}} D θ ( i ) , with the hidden vector fixed. Consequently,
E θ ( i ) L 1 2 = 1 − 1 R + 1 R ( a 2 b + ( 1 − a ) 2 1 − b ) = 1 + ( a − b ) 2 R b ( 1 − b ) ≤ 1 + C η 2 R . \mathbb{E}_{\theta^{(i)}}L_1^2=1-\frac{1}{R}+\frac{1}{R}\left(\frac{a^2}{b}+\frac{(1-a)^2}{1-b}\right)=1+\frac{(a-b)^2}{Rb(1-b)}\le1+\frac{C\eta^2}{R}. E θ ( i ) L 1 2 = 1 − R 1 + R 1 ( b a 2 + 1 − b ( 1 − a ) 2 ) = 1 + R b ( 1 − b ) ( a − b ) 2 ≤ 1 + R C η 2 .
For n n n independent samples the likelihood ratio L n L_n L n is a product, so E θ ( i ) L n 2 ≤ exp ( C n η 2 / R ) \mathbb{E}_{\theta^{(i)}}L_n^2\le\exp(Cn\eta^2/R) E θ ( i ) L n 2 ≤ exp ( C n η 2 / R ) . Including the estimator’s independent seed does not change this ratio. If P θ P_\theta P θ denotes the law of this full transcript, Cauchy–Schwarz gives
TV ( P θ , P θ ( i ) ) = 1 2 E θ ( i ) ∣ L n − 1 ∣ ≤ 1 2 exp ( C n η 2 / R ) − 1 . \operatorname{TV}(P_\theta,P_{\theta^{(i)}})=\frac{1}{2}\mathbb{E}_{\theta^{(i)}}|L_n-1|\le\frac{1}{2}\sqrt{\exp(Cn\eta^2/R)-1}. TV ( P θ , P θ ( i ) ) = 2 1 E θ ( i ) ∣ L n − 1∣ ≤ 2 1 exp ( C n η 2 / R ) − 1 .
Here total variation is the supremum of the absolute difference in probabilities assigned to the same event. Thus, when n ≤ c i n f o R / η 2 n\le c_{\mathrm{info}}R/\eta^2 n ≤ c info R / η 2 for a sufficiently small universal constant c i n f o c_{\mathrm{info}} c info , it is at most 1 / 30 1/30 1/30 .
The two values of coordinate i i i are different. Applying the total-variation bound to the event { θ ^ i = θ i } \{\widehat{\theta}_i=\theta_i\} { θ i = θ i } therefore gives
P θ ( θ ^ i ≠ θ i ) + P θ ( i ) ( θ ^ i ≠ θ i ( i ) ) ≥ 1 − TV ( P θ , P θ ( i ) ) ≥ 29 30 . P_\theta(\widehat{\theta}_i\ne\theta_i)+P_{\theta^{(i)}}(\widehat{\theta}_i\ne\theta_i^{(i)})\ge1-\operatorname{TV}(P_\theta,P_{\theta^{(i)}})\ge\frac{29}{30}. P θ ( θ i = θ i ) + P θ ( i ) ( θ i = θ i ( i ) ) ≥ 1 − TV ( P θ , P θ ( i ) ) ≥ 30 29 .
Average over all pairs in B R B^R B R and sum over i i i . For uniform Θ ∈ B R \Theta\in B^R Θ ∈ B R , this implies E d H ( Θ ^ , Θ ) ≥ 29 R / 60 \mathbb{E}d_H(\widehat{\Theta},\Theta)\ge29R/60 E d H ( Θ , Θ ) ≥ 29 R /60 . On the other hand, the Hamming distance is at most R / 5 R/5 R /5 on success and at most R R R on failure, so the assumed recovery guarantee gives
E d H ( Θ ^ , Θ ) ≤ 2 3 R 5 + 1 3 R = 7 R 15 < 29 R 60 . \mathbb{E}d_H(\widehat{\Theta},\Theta)\le\frac{2}{3}\frac{R}{5}+\frac{1}{3}R=\frac{7R}{15}<\frac{29R}{60}. E d H ( Θ , Θ ) ≤ 3 2 5 R + 3 1 R = 15 7 R < 60 29 R .
This contradiction proves the sample lower bound.
Proof of Lemma 6.3 . Fix N G ≥ 2 N_G\ge2 N G ≥ 2 and let d = ⌊ log 2 N G ⌋ d=\lfloor\log_2 N_G\rfloor d = ⌊ log 2 N G ⌋ . Take X 0 = [ d ] \mathcal{X}_0=[d] X 0 = [ d ] with the uniform distribution and G 0 = { ± 1 } d \mathcal{G}_0=\{\pm1\}^d G 0 = { ± 1 } d . Then ∣ G 0 ∣ = 2 d ≤ N G |\mathcal{G}_0|=2^d\le N_G ∣ G 0 ∣ = 2 d ≤ N G , and for every z ∈ R d z\in\mathbb{R}^d z ∈ R d ,
max g ∈ G 0 ∣ ⟨ g , z ⟩ ∣ = ∥ z ∥ 1 . \max_{g\in\mathcal{G}_0}|\langle g,z\rangle|=\|z\|_1. g ∈ G 0 max ∣ ⟨ g , z ⟩ ∣ = ∥ z ∥ 1 .
For each θ ∈ { ± 1 } d \theta\in\{\pm1\}^d θ ∈ { ± 1 } d , let D θ D_\theta D θ have this uniform marginal and label means μ i θ = 1 / 2 + 4 ϵ θ i \mu_i^\theta=1/2+4\epsilon\theta_i μ i θ = 1/2 + 4 ϵ θ i , and let D 0 \mathcal{D}_0 D 0 consist of all these distributions. The means lie in [ 1 / 4 , 3 / 4 ] [1/4,3/4] [ 1/4 , 3/4 ] for ϵ ≤ 1 / 16 \epsilon\le1/16 ϵ ≤ 1/16 . Fix an output predictor Q Q Q , and write p ‾ i = E P ∼ Q i P \overline{p}_i=\mathbb{E}_{P\sim Q_i}P p i = E P ∼ Q i P . The sign-test identity gives
MAD D θ ( Q ; G 0 ) = 1 d ∑ i ∣ μ i θ − p ‾ i ∣ . \operatorname{MAD}_{D_\theta}(Q;\mathcal{G}_0)=\frac{1}{d}\sum_i|\mu_i^\theta-\overline{p}_i|. MAD D θ ( Q ; G 0 ) = d 1 i ∑ ∣ μ i θ − p i ∣.
Decode θ ^ i = sign ( p ‾ i − 1 / 2 ) \widehat{\theta}_i=\operatorname{sign}(\overline{p}_i-1/2) θ i = sign ( p i − 1/2 ) , breaking ties arbitrarily. Each mistake contributes at least 4 ϵ 4\epsilon 4 ϵ to the sum, so
1 d d H ( θ ^ , θ ) ≤ MAD D θ ( Q ; G 0 ) 4 ϵ . \frac{1}{d}d_H(\widehat{\theta},\theta)\le\frac{\operatorname{MAD}_{D_\theta}(Q;\mathcal{G}_0)}{4\epsilon}. d 1 d H ( θ , θ ) ≤ 4 ϵ MAD D θ ( Q ; G 0 ) .
Choose the accuracy constant c ≤ 4 / 5 c \le4/5 c ≤ 4/5 . Whenever the learning algorithm succeeds, this decoder recovers at least 0.8 d 0.8d 0.8 d signs. Lemma 6.2 , with η = 4 ε \eta= 4\varepsilon η = 4 ε , now gives n = Ω ( d / ε 2 ) = Ω ( log N G / ε 2 ) n = \Omega(d/\varepsilon^2) = \Omega(\log N_G/\varepsilon^2) n = Ω ( d / ε 2 ) = Ω ( log N G / ε 2 ) .
Proof of Lemma 6.5. Let a , c d e c > 0 a, c_{\mathrm{dec}} > 0 a , c dec > 0 be the constants in Lemma 6.4 . For sufficiently small ε \varepsilon ε , set
k = ⌊ ε − 1 / 2 ⌋ ≥ 2 , Δ = a / k 2 . k = \left\lfloor\varepsilon^{-1/2} \right\rfloor\ge2, \qquad\Delta= a/k^2. k = ⌊ ε − 1/2 ⌋ ≥ 2 , Δ = a / k 2 .
Use the hard family D θ D_\theta D θ , θ ∈ { 0 , 1 } k \theta\in\{0,1\}^k θ ∈ { 0 , 1 } k , defined in § 6 . Since a ≤ 1 / 4 a \le1/4 a ≤ 1/4 , all label means lie in [ 1 / 8 , 7 / 8 ] [1/8, 7/8] [ 1/8 , 7/8 ] . Choose c ≤ c d e c c \le c_{\mathrm{dec}} c ≤ c dec . On every successful training run,
CMA θ ( Q ) ≤ c ε ≤ c d e c / k 2 , \operatorname{CMA}_{\theta}(Q) \le c\varepsilon\le c_{\mathrm{dec}}/k^2, CMA θ ( Q ) ≤ c ε ≤ c dec / k 2 ,
so Lemma 6.4 returns a bit vector correct on at least 0.8 k 0.8k 0.8 k coordinates. This estimate is a function of the sample and the learning algorithm’s independent seed. Applying Lemma 6.2 with B = { 0 , 1 } \mathcal{B} = \{0,1\} B = { 0 , 1 } and η = Δ \eta= \Delta η = Δ yields
n ≥ c i n f o k Δ 2 = c i n f o a 2 k 5 = Ω ( ε − 5 / 2 ) , n \ge c_{\mathrm{info}} \frac{k}{\Delta^2} = \frac{c_{\mathrm{info}}}{a^2} k^5 = \Omega(\varepsilon^{-5/2}), n ≥ c info Δ 2 k = a 2 c info k 5 = Ω ( ε − 5/2 ) ,
where the last step uses $k \ge \varepsilon^{-1/2}/2.
Deferred proofs from the deterministic lower bound
Proof of Lemma 7.3. Partition [ N ] [N] [ N ] into k = ⌈ K t e s t ⌉ k = \lceil K_{\mathrm{test}}\rceil k = ⌈ K test ⌉ nonempty blocks B 1 , … , B k B_1,\ldots,B_k B 1 , … , B k , each of size at most s = ⌈ N / k ⌉ s = \lceil N/k\rceil s = ⌈ N / k ⌉ . The assumed parameter range, with suitable universal constants, ensures 1 ≤ k ≤ N 1 \le k \le N 1 ≤ k ≤ N . We construct a small family of sign patterns and then allow each block to flip its sign independently.
First, there is a distribution on sign vectors ζ ∈ { ± 1 } N \zeta\in\{\pm1\}^N ζ ∈ { ± 1 } N , supported on at most
D 4 = ∑ ℓ = 0 min { 4 , N } ( N ℓ ) = O ( N 4 ) D_4 = \sum_{\ell=0}^{\min\{4,N\}} \binom{N}{\ell} = O(N^4) D 4 = ℓ = 0 ∑ m i n { 4 , N } ( ℓ N ) = O ( N 4 )
vectors, whose moments of degree at most four agree with independent uniform signs. To see this, associate to each sign vector its vector of products ∏ i ∈ T ζ i \prod_{i\in T}\zeta_i ∏ i ∈ T ζ i with T ⊆ [ N ] T \subseteq[N] T ⊆ [ N ] and ∣ T ∣ ≤ 4 |T| \le4 ∣ T ∣ ≤ 4 , including the empty product 1 1 1 . Start with the uniform distribution on all sign vectors. If its support has more than D 4 D_4 D 4 points, the corresponding moment vectors are linearly dependent. Adjust the probabilities along a nonzero dependence until one becomes zero. The constant coordinate preserves total mass; all probabilities remain nonnegative, and all moments are unchanged. Repeating gives the claimed support bound.
For any v ∈ R N v \in\mathbb{R}^N v ∈ R N , put Z = ∑ i v i ζ i Z = \sum_i v_i\zeta_i Z = ∑ i v i ζ i . Since ζ i 2 = 1 \zeta_i^2 = 1 ζ i 2 = 1 , these moments imply
E Z 2 = ∥ v ∥ 2 2 , E Z 4 = 3 ∥ v ∥ 2 4 − 2 ∑ i v i 4 ≤ 3 ∥ v ∥ 2 4 . \mathbb{E}Z^2 = \lVert v\rVert_2^2, \qquad\mathbb{E}Z^4 = 3\lVert v\rVert_2^4 - 2\sum_i v_i^4 \le3\lVert v\rVert_2^4. E Z 2 = ∥ v ∥ 2 2 , E Z 4 = 3 ∥ v ∥ 2 4 − 2 i ∑ v i 4 ≤ 3 ∥ v ∥ 2 4 .
Hölder’s inequality in the form E Z 2 ≤ ( E ∣ Z ∣ ) 2 / 3 ( E Z 4 ) 1 / 3 \mathbb{E}Z^2 \le(\mathbb{E}|Z|)^{2/3}(\mathbb{E}Z^4)^{1/3} E Z 2 ≤ ( E ∣ Z ∣ ) 2/3 ( E Z 4 ) 1/3 therefore gives
E ∣ Z ∣ ≥ 1 3 ∥ v ∥ 2 , \mathbb{E}|Z| \ge\frac{1}{\sqrt{3}}\lVert v\rVert_2, E ∣ Z ∣ ≥ 3 1 ∥ v ∥ 2 ,
with the zero vector handled trivially.
Let S S S be the support of this distribution. For ζ ∈ S \zeta\in S ζ ∈ S and σ ∈ { ± 1 } k \sigma\in\{\pm1\}^{k} σ ∈ { ± 1 } k , include the test
g ζ , σ ( i ) = σ b ζ i for i ∈ B b g_{\zeta,\sigma}(i)=\sigma_b\zeta_i \quad\text{for } i\in B_b g ζ , σ ( i ) = σ b ζ i for i ∈ B b
in G \mathcal{G} G . For a fixed pattern ζ \zeta ζ , the block signs can make all block contributions nonnegative. Hence, for every d ∈ R N d\in\mathbb{R}^{N} d ∈ R N ,
max g ∈ G ∣ ⟨ g , d ⟩ ∣ = max ζ ∈ S ∑ b = 1 k ∣ ∑ i ∈ B b ζ i d i ∣ ≥ E ζ ∑ b = 1 k ∣ ∑ i ∈ B b ζ i d i ∣ ≥ 1 3 ∑ b = 1 k ∥ d B b ∥ 2 ≥ 1 3 s ∥ d ∥ 1 ≥ k 6 N ∥ d ∥ 1 . \begin{aligned}
\max_{g\in\mathcal{G}}|\langle g,d\rangle|
=\max_{\zeta\in S}\sum_{b=1}^{k}\left|\sum_{i\in B_b}\zeta_i d_i\right| \\
&\geq\mathbb{E}_{\zeta}\sum_{b=1}^{k}\left|\sum_{i\in B_b}\zeta_i d_i\right| \\
&\geq\frac{1}{\sqrt{3}}\sum_{b=1}^{k}\lVert d_{B_b}\rVert_2
\geq\frac{1}{\sqrt{3s}}\lVert d\rVert_1
\geq\sqrt{\frac{k}{6N}}\lVert d\rVert_1.
\end{aligned} g ∈ G max ∣ ⟨ g , d ⟩ ∣ = ζ ∈ S max b = 1 ∑ k i ∈ B b ∑ ζ i d i ≥ E ζ b = 1 ∑ k i ∈ B b ∑ ζ i d i ≥ 3 1 b = 1 ∑ k ∥ d B b ∥ 2 ≥ 3 s 1 ∥ d ∥ 1 ≥ 6 N k ∥ d ∥ 1 .
The last inequality uses s ≤ 2 N / k s\leq2N/k s ≤ 2 N / k . The family was fixed independently of d d d , so the guarantee holds simultaneously for every vector.
For any one pattern, the 2 k 2^k 2 k block flips are distinct. Thus
2 k ≤ ∣ G ∣ ≤ D 4 2 k , log ∣ G ∣ = Θ ( K t e s t ) , 2^k\leq|\mathcal{G}|\leq D_4 2^k,\qquad\log|\mathcal{G}|=\Theta(K_{\mathrm{test}}), 2 k ≤ ∣ G ∣ ≤ D 4 2 k , log ∣ G ∣ = Θ ( K test ) ,
where the upper bound uses K t e s t ≥ A ∗ log N K_{\mathrm{test}}\geq A_*\log N K test ≥ A ∗ log N . This proves both the cardinality and detection guarantees.
Proof of the finite-test online lemma
Proof of Lemma 3.1. We first describe the online prediction rule. Let
F = Φ × { − 1 , 1 } . \mathcal{F}=\Phi\times\{-1,1\}. F = Φ × { − 1 , 1 } .
For f = ( ϕ , σ ) f=(\phi,\sigma) f = ( ϕ , σ ) , define ψ f ( x , p ) = σ ϕ ( x , p ) \psi_f(x,p)=\sigma\phi(x,p) ψ f ( x , p ) = σ ϕ ( x , p ) . Let D = ∣ F ∣ = 2 ∣ Φ ∣ D=|\mathcal{F}|=2|\Phi| D = ∣ F ∣ = 2∣Φ∣ . On round t t t , before observing Y t Y_t Y t , maintain the residual sums
R t − 1 ( f ) = ∑ s < t ψ f ( X s , S s ) ( Y s − S s ) , f ∈ F . R_{t-1}(f)=\sum_{s<t}\psi_f(X_s,S_s)(Y_s-S_s),\qquad f\in\mathcal{F}. R t − 1 ( f ) = s < t ∑ ψ f ( X s , S s ) ( Y s − S s ) , f ∈ F .
Set
η = min { 1 , log D N } . \eta=\min\left\{1,\sqrt{\frac{\log D}{N}}\right\}. η = min { 1 , N log D } .
After observing X t = x X_t=x X t = x , put w f = exp ( η R t − 1 ( f ) ) w_f=\exp(\eta R_{t-1}(f)) w f = exp ( η R t − 1 ( f )) and consider
H t ( p ) = ∑ f ∈ F w f ψ f ( x , p ) . H_t(p)=\sum_{f\in\mathcal{F}}w_f\psi_f(x,p). H t ( p ) = f ∈ F ∑ w f ψ f ( x , p ) .
This is continuous in p p p . If H t H_t H t has a zero in [ 0 , 1 ] [0,1] [ 0 , 1 ] , choose its smallest zero as S t S_t S t . If H t ( p ) > 0 H_t(p)>0 H t ( p ) > 0 for all p p p , choose S t = 1 S_t=1 S t = 1 . If H t ( p ) < 0 H_t(p)<0 H t ( p ) < 0 for all p p p , choose S t = 0 S_t=0 S t = 0 . In all cases, for every label y ∈ [ 0 , 1 ] y\in[0,1] y ∈ [ 0 , 1 ] ,
( y − S t ) H t ( S t ) ≤ 0. (34) (y-S_t)H_t(S_t)\leq0. \tag*{(34)} ( y − S t ) H t ( S t ) ≤ 0. (34)
This is immediate at a zero. If H t H_t H t is everywhere positive then S t = 1 S_t = 1 S t = 1 , and if H t H_t H t is everywhere negative then S t = 0 S_t = 0 S t = 0 .
Let
z t ( f ) = ψ f ( X t , S t ) ( Y t − S t ) . z_t(f) = \psi_f(X_t, S_t)(Y_t - S_t). z t ( f ) = ψ f ( X t , S t ) ( Y t − S t ) .
Then ∣ z t ( f ) ∣ ≤ 1 |z_t(f)| \le1 ∣ z t ( f ) ∣ ≤ 1 . For the exponential potential
W t = ∑ f ∈ F exp ( η R t ( f ) ) , W_t = \sum_{f \in\mathcal{F}} \exp(\eta R_t(f)), W t = f ∈ F ∑ exp ( η R t ( f )) ,
the inequality e u ≤ 1 + u + u 2 e^u \le1 + u + u^2 e u ≤ 1 + u + u 2 for ∣ u ∣ ≤ 1 |u| \le1 ∣ u ∣ ≤ 1 gives
W t = ∑ f exp ( η R t − 1 ( f ) ) exp ( η z t ( f ) ) ≤ W t − 1 + η ∑ f w f z t ( f ) + η 2 ∑ f w f z t ( f ) 2 ≤ W t − 1 ( 1 + η 2 ) , \begin{aligned}
W_t &= \sum_f \exp(\eta R_{t-1}(f))\exp(\eta z_t(f)) \\
&\le W_{t-1} + \eta\sum_f w_f z_t(f) + \eta^2 \sum_f w_f z_t(f)^2 \\
&\le W_{t-1}(1+\eta^2),
\end{aligned} W t = f ∑ exp ( η R t − 1 ( f )) exp ( η z t ( f )) ≤ W t − 1 + η f ∑ w f z t ( f ) + η 2 f ∑ w f z t ( f ) 2 ≤ W t − 1 ( 1 + η 2 ) ,
because
∑ f w f z t ( f ) = ( Y t − S t ) H t ( S t ) ≤ 0 \sum_f w_f z_t(f) = (Y_t-S_t)H_t(S_t) \le0 f ∑ w f z t ( f ) = ( Y t − S t ) H t ( S t ) ≤ 0
by (34) . Therefore W N ≤ D exp ( η 2 N ) W_N \le D\exp(\eta^2N) W N ≤ D exp ( η 2 N ) . If log D ≤ N \log D \le N log D ≤ N , every coordinate satisfies
R N ( f ) ≤ log D η + η N ≤ C N log D . R_N(f) \le\frac{\log D}{\eta}+\eta N \le C\sqrt{N\log D}. R N ( f ) ≤ η log D + η N ≤ C N log D .
If log D > N \log D > N log D > N , the trivial bound ∣ R N ( f ) ∣ ≤ N |R_N(f)| \le N ∣ R N ( f ) ∣ ≤ N gives the same conclusion. Since both signs of every test are included,
sup ϕ ∈ F ∣ ∑ t = 1 N ϕ ( X t , S t ) ( Y t − S t ) ∣ ≤ C N log D . (35) \sup_{\phi\in\mathcal{F}}\left|\sum_{t=1}^{N}\phi(X_t,S_t)(Y_t-S_t)\right|\le C\sqrt{N\log D}. \tag*{(35)} ϕ ∈ F sup t = 1 ∑ N ϕ ( X t , S t ) ( Y t − S t ) ≤ C N log D . (35)
For each history, let s t ( x ) s_t(x) s t ( x ) be the prediction selected by the same rule after seeing a context x x x . Then S t = s t ( X t ) S_t=s_t(X_t) S t = s t ( X t ) , and (35) is the claimed bound. □ \square □
Polynomial-time implementation in the real-arithmetic model
The preceding appendix defines and analyzes the online score rules s t s_t s t . This section shows that these rules, and hence the full construction from Theorem 4.1 , can be implemented in polynomial time in an idealized real-arithmetic model. Throughout this section we assume that G \mathcal{G} G is given explicitly and that, on input x x x , each value g ( x ) g(x) g ( x ) can be evaluated in unit time. Arithmetic on real numbers, including exponentials, is also counted at unit cost.
There is one small bookkeeping point. For implementation it is cleaner to work with representations of piecewise-linear tests rather than distinct functions. Let A ~ M , ρ \widetilde{\mathcal{A}}_{M,\rho} A M , ρ be the set of tuples
( 0 = i 0 < i 1 < ⋯ < i L = N g r i d ; σ 0 , … , σ L ) , 1 ≤ L ≤ M , N g r i d = 1 / ρ , σ j ∈ { − 1 , 1 } , (0=i_0<i_1<\cdots<i_L=N_{\mathrm{grid}};\sigma_0,\ldots,\sigma_L),\qquad1\le L\le M,\qquad N_{\mathrm{grid}}=1/\rho,\qquad\sigma_j\in\{-1,1\}, ( 0 = i 0 < i 1 < ⋯ < i L = N grid ; σ 0 , … , σ L ) , 1 ≤ L ≤ M , N grid = 1/ ρ , σ j ∈ { − 1 , 1 } ,
interpreted as the linear interpolation through the selected grid points i j ρ i_j\rho i j ρ with values σ j \sigma_j σ j . Different tuples may represent the same function, but this causes no problem: the exponential-potential proof is valid for a finite multiset of represented tests, and every test in A M , ρ \mathcal{A}_{M,\rho} A M , ρ has at least one representation. Moreover
∣ A ~ M , ρ ∣ ≤ ∑ L ≤ M ( N g r i d − 1 L − 1 ) 2 L + 1 ≤ exp { C M log ( e N g r i d ) } . \lvert\widetilde{\mathcal{A}}_{M,\rho}\rvert\le\sum_{L\le M} \binom{N_{\mathrm{grid}}-1}{L-1}2^{L+1} \le\exp\{CM\log(eN_{\mathrm{grid}})\}. ∣ A M , ρ ∣ ≤ L ≤ M ∑ ( L − 1 N grid − 1 ) 2 L + 1 ≤ exp { C M log ( e N grid )} .
The running time in the next proposition depends polynomially on the fine grid size N g r i d = 1 / ρ N_{\mathrm{grid}}=1/\rho N grid = 1/ ρ ; with the parameter choice in Theorem 4.1 , this is N g r i d = m 2 = O ( n 2 / 5 ) N_{\mathrm{grid}}=m^2=O(n^{2/5}) N grid = m 2 = O ( n 2/5 ) .
Proposition E.1 (Unit-cost arithmetic implementation). Fix M M M and ρ \rho ρ with N g r i d = 1 / ρ N_{\mathrm{grid}}=1/\rho N grid = 1/ ρ an integer. If G G G is explicit, then the online intermediate-prediction algorithm from Lemma 3.1 , run with the represented test family A ~ M , ρ \widetilde{\mathcal{A}}_{M,\rho} A M , ρ , can be implemented using poly ( N , ∣ G ∣ , M , N g r i d ) \operatorname{poly}(N,\lvert G\rvert,M,N_{\mathrm{grid}}) poly ( N , ∣ G ∣ , M , N grid ) arithmetic operations. Consequently, with the parameter choice used in Theorem 4.1 , the full calibrated multiaccuracy algorithm can be implemented in time polynomial in n n n and ∣ G ∣ \lvert G\rvert ∣ G ∣ in this arithmetic model.
Proof. We describe how to implement one online prediction step from the stored history of earlier rounds. This suffices, because the batch predictor evaluates s J ( x ) s_J(x) s J ( x ) by applying the same rule to one of the stored online states. The grid-selection step uses the scores already recorded during training.
Let the previous predictions be S 1 , … , S t − 1 S_1,\ldots,S_{t-1} S 1 , … , S t − 1 and write e s = Y s − S s e_s=Y_s-S_s e s = Y s − S s . For grid indices 0 ≤ i < j ≤ N g r i d 0\le i<j\le N_{\mathrm{grid}} 0 ≤ i < j ≤ N grid , let z i = i ρ z_i=i\rho z i = i ρ and define the half-open interval
I i j = { [ z i , z j ) , j < N g r i d , [ z i , 1 ] , j = N g r i d . I_{ij}=
\begin{cases}
[z_i,z_j), & j<N_{\mathrm{grid}},\\
[z_i,1], & j=N_{\mathrm{grid}}.
\end{cases} I ij = { [ z i , z j ) , [ z i , 1 ] , j < N grid , j = N grid .
Define two edge residuals
A i j = ∑ s : S s ∈ I i j e s z j − S s z j − z i , B i j = ∑ s : S s ∈ I i j e s S s − z i z j − z i . A_{ij}=\sum_{s:S_s\in I_{ij}}e_s\frac{z_j-S_s}{z_j-z_i},\qquad B_{ij}=\sum_{s:S_s\in I_{ij}}e_s\frac{S_s-z_i}{z_j-z_i}. A ij = s : S s ∈ I ij ∑ e s z j − z i z j − S s , B ij = s : S s ∈ I ij ∑ e s z j − z i S s − z i .
These quantities can be computed for all i < j i<j i < j by direct summation in O ( t N g r i d 2 ) O(tN_{\mathrm{grid}}^2) O ( t N grid 2 ) arithmetic operations, or faster using sorted prefix sums. The direct bound is already polynomial. Consider a represented one-dimensional test
a = ( 0 = i 0 < i 1 < ⋯ < i L = N g r i d ; σ 0 , … , σ L ) . a=(0=i_0<i_1<\cdots<i_L=N_{\mathrm{grid}};\sigma_0,\ldots,\sigma_L). a = ( 0 = i 0 < i 1 < ⋯ < i L = N grid ; σ 0 , … , σ L ) .
With the half-open convention above, each previous prediction belongs to a unique selected edge. The cumulative residual of the test a a a is therefore the sum of its edge contributions:
R t − 1 ( a ) = ∑ ℓ = 1 L ( σ ℓ − 1 A i ℓ − 1 , i ℓ + σ ℓ B i ℓ − 1 , i ℓ ) . (36) R_{t-1}(a)=\sum_{\ell=1}^{L}\left(\sigma_{\ell-1}A_{i_{\ell-1},i_\ell}+\sigma_\ell B_{i_{\ell-1},i_\ell}\right). \tag*{(36)} R t − 1 ( a ) = ℓ = 1 ∑ L ( σ ℓ − 1 A i ℓ − 1 , i ℓ + σ ℓ B i ℓ − 1 , i ℓ ) . (36)
Thus the exponential weight of a represented test factors along a path in the directed acyclic graph whose vertices are pairs ( i , σ ) (i,\sigma) ( i , σ ) and whose edges go from ( i , σ ) (i,\sigma) ( i , σ ) to ( j , τ ) (j,\tau) ( j , τ ) for i < j i<j i < j . Fix θ ∈ { η , − η } \theta\in\{\eta,-\eta\} θ ∈ { η , − η } and set
T θ ( i , σ , j , τ ) = exp ( θ ( σ A i j + τ B i j ) ) . T_\theta(i,\sigma,j,\tau)=\exp\left(\theta(\sigma A_{ij}+\tau B_{ij})\right). T θ ( i , σ , j , τ ) = exp ( θ ( σ A ij + τ B ij ) ) .
For a candidate prediction p p p and an edge e = ( ( i , σ ) , ( j , τ ) ) e=((i,\sigma),(j,\tau)) e = (( i , σ ) , ( j , τ )) , define
c e ( p ) = 1 { p ∈ I i j } ( σ z j − p z j − z i + τ p − z i z j − z i ) . c_e(p)=\mathbf{1}\{p\in I_{ij}\}\left(\sigma\frac{z_j-p}{z_j-z_i}+\tau\frac{p-z_i}{z_j-z_i}\right). c e ( p ) = 1 { p ∈ I ij } ( σ z j − z i z j − p + τ z j − z i p − z i ) .
Every represented path contains exactly one edge whose interval contains p p p , so its test value is the sum of these edge contributions.
A forward recurrence can accumulate both path weights and test values. Let W ℓ θ ( v ) W_\ell^\theta(v) W ℓ θ ( v ) be the total weight of prefixes with ℓ \ell ℓ edges ending at vertex v v v , and let B ℓ θ ( v ; p ) B_\ell^\theta(v;p) B ℓ θ ( v ; p ) be their weighted sum of accumulated edge contributions at p p p . Initialize
W 0 θ ( ( 0 , σ ) ) = 1 , B 0 θ ( ( 0 , σ ) ; p ) = 0 , W_0^\theta((0,\sigma))=1,\qquad B_0^\theta((0,\sigma);p)=0, W 0 θ (( 0 , σ )) = 1 , B 0 θ (( 0 , σ ) ; p ) = 0 ,
and set both quantities to zero at every other vertex. Writing T θ ( e ) = T θ ( i , σ , j , τ ) T_\theta(e)=T_\theta(i,\sigma,j,\tau) T θ ( e ) = T θ ( i , σ , j , τ ) , extend the prefixes by
W ℓ + 1 θ ( v ) = ∑ e : u → v T θ ( e ) W ℓ θ ( u ) , W_{\ell+1}^\theta(v)=\sum_{e:u\to v}T_\theta(e)W_\ell^\theta(u), W ℓ + 1 θ ( v ) = e : u → v ∑ T θ ( e ) W ℓ θ ( u ) ,
B ℓ + 1 θ ( v ; p ) = ∑ e : u → v T θ ( e ) ( B ℓ θ ( u ; p ) + W ℓ θ ( u ) c e ( p ) ) . B_{\ell+1}^\theta(v;p)=\sum_{e:u\to v}T_\theta(e)\left(B_\ell^\theta(u;p)+W_\ell^\theta(u)c_e(p)\right). B ℓ + 1 θ ( v ; p ) = e : u → v ∑ T θ ( e ) ( B ℓ θ ( u ; p ) + W ℓ θ ( u ) c e ( p ) ) .
The first recurrence multiplies each prefix weight by its new edge weight; the second also adds the new edge contribution. Summing over complete paths gives
S θ ( p ) : = ∑ a ∈ A ~ M , ρ exp ( θ R t − 1 ( a ) ) a ( p ) = ∑ ℓ = 1 M ∑ σ ∈ { ± 1 } B ℓ θ ( ( N g r i d , σ ) ; p ) . (37) S_\theta(p):=\sum_{a\in\widetilde{\mathcal{A}}_{M,\rho}}\exp(\theta R_{t-1}(a))a(p)=\sum_{\ell=1}^{M}\sum_{\sigma\in\{\pm1\}}B_\ell^\theta((N_{\mathrm{grid}},\sigma);p). \tag*{(37)} S θ ( p ) := a ∈ A M , ρ ∑ exp ( θ R t − 1 ( a )) a ( p ) = ℓ = 1 ∑ M σ ∈ { ± 1 } ∑ B ℓ θ (( N grid , σ ) ; p ) . (37)
There are O ( N g r i d ) O(N_{\mathrm{grid}}) O ( N grid ) vertices and O ( N g r i d 2 ) O(N_{\mathrm{grid}}^2) O ( N grid 2 ) edges. Computing the tables for ℓ ≤ M \ell\le M ℓ ≤ M therefore takes O ( M N g r i d 2 ) O(MN_{\mathrm{grid}}^2) O ( M N grid 2 ) operations for each candidate p p p .
It remains to choose the online prediction. The group contribution is explicit:
G t ( x ) = ∑ g ∈ G ( exp ( η R t − 1 ( g ) ) − exp ( − η R t − 1 ( g ) ) ) g ( x ) , G_t(x)=\sum_{g\in\mathcal{G}}\left(\exp(\eta R_{t-1}(g))-\exp(-\eta R_{t-1}(g))\right)g(x), G t ( x ) = g ∈ G ∑ ( exp ( η R t − 1 ( g )) − exp ( − η R t − 1 ( g )) ) g ( x ) ,
where R t − 1 ( g ) = ∑ s < t g ( X s ) e s R_{t-1}(g)=\sum_{s<t}g(X_s)e_s R t − 1 ( g ) = ∑ s < t g ( X s ) e s is maintained directly. The function used to choose the next prediction for the represented test family is therefore
H t ( p ) = G t ( x ) + S η ( p ) − S − η ( p ) . H_t(p)=G_t(x)+S_\eta(p)-S_{-\eta}(p). H t ( p ) = G t ( x ) + S η ( p ) − S − η ( p ) .
Every represented one-dimensional test is linear on each fine grid interval [ z q , z q + 1 ] [z_q,z_{q+1}] [ z q , z q + 1 ] , and hence so is H t H_t H t . We evaluate H t ( z q ) H_t(z_q) H t ( z q ) for all q = 0 , … , N g r i d q=0,\ldots,N_{\mathrm{grid}} q = 0 , … , N grid using (37) . Zero-valued gridpoints and zeros interpolated between adjacent values of opposite signs are the candidates; choose the smallest candidate, if any. If all grid values are strictly positive, then H t H_t H t is positive on all of [ 0 , 1 ] [0,1] [ 0 , 1 ] and we choose S t = 1 S_t=1 S t = 1 ; if all are strictly negative, we choose S t = 0 S_t=0 S t = 0 . This exactly implements the prediction rule in Lemma 3.1 .
After Y t Y_t Y t is observed, the algorithm appends ( S t , e t ) (S_t,e_t) ( S t , e t ) to the history and updates the ∣ G ∣ |\mathcal{G}| ∣ G ∣ multiaccuracy residuals. Thus every online step, every later evaluation of a stored online state, and hence the full intermediate-prediction subroutine use only polynomially many arithmetic operations in N N N , ∣ G ∣ |\mathcal{G}| ∣ G ∣ , M M M , and N g r i d N_{\mathrm{grid}} N grid .
Finally, choose the grid from the recorded scores S 1 , … , S N S_1,\ldots,S_N S 1 , … , S N . After sorting, prefix sums of 1 1 1 , S i S_i S i , and S i 2 S_i^2 S i 2 evaluate the empirical interval contribution in Lemma 3.4 for every pair of fine-grid endpoints. Indeed, its numerator is ( S i − a ) ( b − S i ) = − S i 2 + ( a + b ) S i − a b (S_i-a)(b-S_i)=-S_i^2+(a+b)S_i-ab ( S i − a ) ( b − S i ) = − S i 2 + ( a + b ) S i − ab for a < S i < b a<S_i<b a < S i < b . There are O ( N g r i d 2 ) O(N_{\mathrm{grid}}^2) O ( N grid 2 ) candidate intervals, so grid selection is also polynomial.