Why Finite Classes Can Learn Faster Under Low Noise
For a finite predictor class, a basic uniform-convergence argument gives an excess-risk rate of order \(\sqrt{\log M/n}\), where \(M\) is the number of predictors. That rate treats every empirical comparison as if its variability remained large even when two predictors have nearly the same risk. Under a low-noise condition, this is unnecessarily pessimistic: predictors with small excess risk disagree with the optimal classifier on relatively little probability mass, so their empirical risk differences fluctuate less.
This tutorial turns that idea into a high-probability guarantee for empirical risk minimization (ERM). The central steps are to bound the variance of each excess-loss difference by a power of its mean, then apply Bernstein’s inequality and a union bound over the finite class. Under Tsybakov’s margin condition, the resulting rate is faster than the general square-root rate when the margin exponent is positive.
Setup and the Tsybakov Margin Condition
Let \((X,Y)\) be a random pair with \(Y\in\{-1,+1\}\), and let \((X_1,Y_1),\ldots,(X_n,Y_n)\) be independent observations with the same distribution. A classifier \(h\) maps the feature space to \(\{-1,+1\}\). Its zero-one risk is \(R(h)=P(h(X)\ne Y)\), and its empirical risk is \(R_n(h)=n^{-1}\sum_{i=1}^n\mathbf{1}\{h(X_i)\ne Y_i\}\). Write \(\eta(x)=P(Y=+1\mid X=x)\) and \(\Delta(x)=|2\eta(x)-1|\). A Bayes classifier \(h_B\) predicts the more probable label given \(X\); ties may be resolved by either label.
For a classifier \(h\), define its Bayes excess risk \(r(h)=R(h)-R(h_B)\). Conditioning on \(X\) gives the useful identity \(r(h)=E[\Delta(X)\mathbf{1}\{h(X)\ne h_B(X)\}]\). It says that a disagreement in a region with a large conditional class-probability gap costs more risk than one near the boundary.
Worked Example: From a Margin Exponent to a Variance Exponent
Suppose \(q=2\) and \(C=4\), and consider a classifier with Bayes excess risk \(r=0.01\). For any \(t>0\), split its disagreement event according to whether the margin is at most \(t\): \(P(h(X)\ne h_B(X))\le P(\Delta(X)\le t)+P(h(X)\ne h_B(X),\Delta(X)>t)\).
The first term is at most \(4t^2\). On the second event, \(\Delta(X)>t\), so the excess-risk identity implies \(r\ge tP(h(X)\ne h_B(X),\Delta(X)>t)\). Therefore \(P(h(X)\ne h_B(X))\le 4t^2+r/t\).
Choose \(t=(r/C)^{1/(q+1)}=(0.01/4)^{1/3}\), approximately \(0.136\). The two terms are equal at this choice, and the bound becomes \(2C^{1/(q+1)}r^{q/(q+1)}=2\cdot4^{1/3}\cdot0.01^{2/3}\), approximately \(0.147\). Thus disagreement probability is controlled by a constant times \(r^{2/3}\); the variance exponent supplied by this margin condition is \(\beta=2/3\).
From Margin Mass to a Bernstein Condition
For a fixed classifier \(h\), let \(Z_h=\mathbf{1}\{h(X)\ne Y\}-\mathbf{1}\{h_B(X)\ne Y\}\) be its single-observation loss difference from the Bayes classifier. It takes values in \(\{-1,0,+1\}\). Its expectation is \(r(h)\), and its square is one exactly when \(h(X)\ne h_B(X)\). Consequently, \(\operatorname{Var}(Z_h)\le E[Z_h^2]=P(h(X)\ne h_B(X))\). The margin condition controls this last probability as follows.
To verify the bound, write \(r=r(h)>0\). For every \(t>0\), the margin condition and the excess-risk identity give \[ P(h(X)\ne h_B(X)) \le Ct^q+\frac{r}{t}. \] Taking \(t=(r/C)^{1/(q+1)}\) makes both terms equal to \(C^{1/(q+1)}r^{q/(q+1)}\). Thus disagreement probability is at most \(2C^{1/(q+1)}r^\beta\), which also bounds the variance. If \(r=0\), then \(\Delta(X)\mathbf{1}\{h(X)\ne h_B(X)\}=0\) almost surely. The margin condition with \(q>0\) implies \(P(\Delta(X)=0)=0\), by taking \(t\) down to zero, so disagreement has probability zero and the variance bound holds in this case too. \(\square\)
More generally, the finite-class argument below only needs the Bernstein condition \(\operatorname{Var}(Z_h)\le B r(h)^\beta\) for every \(h\) in the class, with \(0\le\beta\le1\). The margin calculation is one way to obtain it; the condition itself is what drives the concentration step.
A High-Probability Bound for Finite-Class ERM
Let \(\mathcal{H}\) be a nonempty finite class of size \(M\), containing a Bayes classifier, and define \(\hat h\) to minimize \(R_n(h)\) over \(h\in\mathcal{H}\). If there are ties, choose any empirical minimizer. For each \(h\), write \(r(h)=R(h)-R(h_B)\) and let \(Z_h\) be its loss difference from \(h_B\) as above. Assume \(\operatorname{Var}(Z_h)\le B r(h)^\beta\) for all \(h\in\mathcal{H}\), where \(B>0\) and \(0\le\beta\le1\).
The bound is a high-probability guarantee for the excess risk of ERM. Its proof compares each class member to the Bayes classifier, controls the probability that a worse classifier achieves no greater empirical risk, and then takes a union bound.
Fix \(h\in\mathcal{H}\) with \(r=r(h)>0\). The observations \(Z_{h,i}\) are independent copies of \(Z_h\), with mean \(r\) and variance at most \(Br^\beta\). Since \(Z_{h,i}\in[-1,1]\), the centered variables have absolute value at most \(2\). The lower-tail Bernstein inequality therefore gives \(P(R_n(h)\le R_n(h_B))\le \exp\{-nr^2/[2(Br^\beta+2r/3)]\}\).
Since \(0<r\le1\) and \(\beta\le1\), \(r\le r^\beta\). Hence \(Br^\beta+2r/3\le(B+2/3)r^\beta\), and \(P(R_n(h)\le R_n(h_B))\le\exp\{-nr^{2-\beta}/[2(B+2/3)]\}\).
For any \(\varepsilon>0\), the probability that some \(h\in\mathcal{H}\) with \(r(h)\ge\varepsilon\) satisfies \(R_n(h)\le R_n(h_B)\) is at most \(M\exp\{-n\varepsilon^{2-\beta}/[2(B+2/3)]\}\).
Because \(h_B\in\mathcal{H}\), ERM satisfies \(R_n(\hat h)\le R_n(h_B)\). If \(r(\hat h)\ge\varepsilon\), one of the events in Step 3 must occur. Set \(\varepsilon=[2(B+2/3)\log(M/\delta)/n]^{1/(2-\beta)}\); the probability in Step 3 is then at most \(\delta\). Finally, excess risk is at most \(1\), so the minimum with \(1\) is valid. \(\square\)
All concentration here is for bounded zero-one loss differences, and the only class-size cost is the union bound’s \(\log M\). No independence among the different classifiers’ empirical risks is needed.
Worked Example: Calculating the High-Probability Rate
Suppose a class has \(M=16\) predictors, \(n=100{,}000\), and the margin condition has \(q=1\), \(C=2\). Then \(\beta=1/2\) and \(B=2\sqrt{2}\), so \(2(B+2/3)\) is approximately \(6.99\). For confidence level \(1-\delta=0.95\), \(\log(M/\delta)=\log(320)\), approximately \(5.77\).
The theorem gives \[ R(\hat h)-R(h_B) \le \left(\frac{6.99\cdot5.77}{100{,}000}\right)^{2/3} \approx 0.0055 \] with probability at least \(0.95\). The exponent is \(1/(2-\beta)=2/3\), rather than the square-root exponent \(1/2\). The displayed constant is conservative; the calculation illustrates how to apply the guarantee, not a claim that this numerical bound is sharp.
Holding the other quantities fixed, doubling \(n\) multiplies this rate by \(2^{-2/3}\), approximately \(0.63\). Increasing \(M\) affects the bound through \(\log M\), not linearly through \(M\).
Worked Example: Checking Risks in a Two-Point Model
Let \(X\) take values \(a\) and \(b\), each with probability \(1/2\), and suppose \(\eta(a)=0.9\) and \(\eta(b)=0.6\). The Bayes classifier predicts \(+1\) at both points. Consider the class of all four classifiers that assign either label independently at \(a\) and \(b\).
The Bayes risk is \(0.5(0.1)+0.5(0.4)=0.25\). The classifier \(h_{++}\), which predicts \(+1\) at both points, has risk \(0.25\). The classifier \(h_{-+}\) has risk \(0.5(0.9)+0.5(0.4)=0.65\), so its excess risk is \(0.40\). The classifier \(h_{+-}\) has risk \(0.5(0.1)+0.5(0.6)=0.35\), so its excess risk is \(0.10\). Finally, \(h_{--}\) has risk \(0.5(0.9)+0.5(0.6)=0.75\), with excess risk \(0.50\). Thus \(h_{++}\) is the population risk minimizer in the class.
The margins are \(\Delta(a)=0.8\) and \(\Delta(b)=0.2\). The condition holds with \(q=1,C=5\): below \(0.2\) the small-margin probability is zero; from \(0.2\) up to but not including \(0.8\) it is \(0.5\le5t\); and at or above \(0.8\) it is \(1\le5t\). The resulting Bernstein parameters are \(\beta=1/2\) and \(B=2\sqrt{5}\).
For \(h_{+-}\), disagreement with the Bayes classifier occurs only at \(b\), with probability \(0.5\). Its loss-difference variance is at most \(0.5\), while the Bernstein upper bound is \(2\sqrt{5}(0.10)^{1/2}\), approximately \(1.41\). This verifies the variance comparison in this example; it is an upper bound, not an equality.
Interpretation and a Common Pitfall
Under the margin condition, \(\beta=q/(q+1)\), so the sample-size exponent in the finite-class rate is \((q+1)/(q+2)\). When \(q\) is close to zero, this approaches the general square-root rate. As \(q\) grows, the exponent approaches one, giving a rate closer to \(\log(M/\delta)/n\). The logarithm records the cost of searching among \(M\) candidates; the noise condition controls how effectively their empirical risks can be distinguished.
Common mistake: applying this conclusion to any finite class without checking the comparator. The proof uses that the Bayes classifier belongs to \(\mathcal{H}\), so ERM can be compared directly with it and its excess-loss variance is controlled by the Bayes margin condition. If the Bayes classifier is outside the class, the best-in-class predictor may disagree with it even when the class predictor is optimal within \(\mathcal{H}\). Tsybakov’s condition alone does not then establish the same Bernstein bound in terms of excess risk over the best-in-class predictor. The correction is to verify a Bernstein condition for that comparator, or to use an analysis that explicitly accounts for approximation error; do not silently substitute the best-in-class risk into the theorem.
Check Your Understanding
Use the definitions and proof above to answer these questions.
- Why does the variance of the loss difference from the Bayes classifier not exceed the probability that the two classifiers disagree?
- For a margin exponent \(q=3\), what are the Bernstein exponent \(\beta\) and the sample-size exponent in the finite-class rate?
- Where does the factor \(\log M\) enter the proof, and which inequality introduces it?
- Why is it important that the Bayes classifier belongs to the finite class in the stated theorem?
- If \(q=0\), what rate exponent results from the theorem’s general Bernstein form, and how does it compare with the square-root rate?