Tutorials › Statistical Learning (Graduate) › The Slow-Rate Oracle Bound For Finite Selection

Finite-Class Aggregation · Tutorial 299 of 989

The Slow-Rate Oracle Bound For Finite Selection

See why bounded losses and a union bound control the excess risk of empirical risk selection, and work through both high-probability and expected guarantees.

Intermediate 10 min read

What You'll Learn

  • State the assumptions behind a finite-dictionary slow-rate oracle bound.
  • Derive a uniform concentration bound for empirical risks using Hoeffding’s inequality.
  • Convert uniform risk deviations into an excess-risk guarantee for an empirical risk minimizer.
  • Derive an expected excess-risk bound from a moment-generating-function argument.
  • Interpret the roles of sample size, dictionary size, and confidence level in the guarantee.
  • Recognize why selection requires controlling deviations across the whole dictionary.

Why Selection Needs a Uniform Risk Bound

An empirical risk selector compares several candidate predictors using the same observed sample, then chooses the one with the smallest empirical loss. Even if each candidate’s empirical risk is close to its population risk with high probability, the selected candidate is random: it depends on the sample. A guarantee for one fixed candidate alone therefore does not directly control the risk of the selected one.

For a finite dictionary, a union bound resolves this issue by controlling the empirical risks of all candidates at once. When the losses are bounded, the resulting excess-risk guarantee has a characteristic slow rate: its leading order is the square root of the logarithm of the dictionary size divided by the sample size.

Setup and Assumptions

Definition: Let \(Z_1,\ldots,Z_n\) be independent and identically distributed observations from a distribution \(P\). Let \(f_1,\ldots,f_M\) be a finite, fixed dictionary of predictors, and let \(\ell_j(z)\) be the loss of predictor \(f_j\) on observation \(z\). Assume each loss is measurable and \(0\leq \ell_j(Z)\leq 1\) with probability one. Define the population risk \(R_j=E[\ell_j(Z)]\) and empirical risk \(\widehat R_j=n^{-1}\sum_{i=1}^n\ell_j(Z_i)\). An empirical risk selector chooses an index \(\widehat j\in\arg\min_{1\leq j\leq M}\widehat R_j\); ties can, for example, be resolved by choosing the smallest index. An oracle index \(j^*\) minimizes \(R_j\) over the dictionary.

The dictionary is fixed independently of the observations. The result concerns comparison with the best member of this dictionary, not with an unrestricted ideal predictor. The bound \([0,1]\) is a normalization: if all losses lie in \([0,B]\) for a known \(B>0\), the bounds below are multiplied by \(B\).

Worked Example: A Five-Candidate Risk Comparison

Suppose \(Z\) is a vector of five independent Bernoulli loss coordinates, with respective success probabilities \(0.16,0.19,0.23,0.28,0.34\). Candidate \(j\) incurs loss equal to coordinate \(j\). Thus the five population risks are those probabilities, and the oracle risk is \(R_{j^*}=0.16\). With \(n=100\) observations, suppose the observed empirical risks are \(0.18,0.17,0.25,0.31,0.30\). These are possible empirical averages of 100 binary losses.

The selector chooses candidate 2, whose empirical risk \(0.17\) is smallest. Its true risk is \(0.19\), so its actual excess risk in this example is \(0.19-0.16=0.03\). For confidence level \(1-\delta=0.95\), the theorem below gives the bound \( \sqrt{2\log(2M/\delta)/n}=\sqrt{2\log(200)/100}\). Since \(\log(200)\approx5.2983\), this is \(\sqrt{0.105966}\approx0.3255\). With probability at least \(0.95\), the selected risk is therefore at most \(0.16+0.3255=0.4855\). The numerical guarantee is conservative, but it applies without knowing which candidate will be selected.

From Bounded Losses to Uniform Concentration

The needed concentration result is Hoeffding’s inequality. In the bounded case, it says that for an average of \(n\) independent observations, each lying in an interval of length one, the probability of a deviation of at least \(t>0\) from its expectation is at most \(2e^{-2nt^2}\). Applying this separately to every candidate and taking a union bound yields a simultaneous guarantee.

Theorem: Under the setup above, for every \(t>0\),
$$ P\!\left(\max_{1\leq j\leq M}|\widehat R_j-R_j|>t\right) \leq 2M e^{-2nt^2}. $$

To see why the bound has this form, fix a candidate \(j\). Its losses \(\ell_j(Z_i)\) are independent, lie in \([0,1]\), and have expectation \(R_j\). Hoeffding’s inequality gives \(P(|\widehat R_j-R_j|>t)\leq2e^{-2nt^2}\). The event that at least one candidate deviates by more than \(t\) is the union of the \(M\) individual deviation events. The union bound adds their probabilities, giving \(2Me^{-2nt^2}\). No independence between different candidates’ empirical risks is needed.

Worked Example: Choosing the Deviation Threshold

Suppose there are \(M=2\) candidates, \(n=400\) observations, and the losses lie in \([0,1]\). To make the probability of any candidate’s deviation exceeding \(t\) at most \(0.05\), set \(2Me^{-2nt^2}=0.05\). Solving gives \(t=\sqrt{\log(2M/0.05)/(2n)}\).

Here \(2M/0.05=80\), \(\log(80)\approx4.3820\), and \(2n=800\). Thus \(t=\sqrt{4.3820/800}\approx\sqrt{0.0054775}\approx0.0740\). With probability at least \(0.95\), both candidates’ empirical risks are within about \(0.0740\) of their population risks. The same event controls whichever candidate the selector chooses.

The Slow-Rate Oracle Bound

Theorem: Under the stated bounded-loss assumptions, for every \(0<\delta<1\), an empirical risk selector satisfies
$$ P\!\left( R_{\widehat j}-\min_{1\leq j\leq M}R_j \leq \sqrt{\frac{2\log(2M/\delta)}{n}} \right)\geq 1-\delta. $$

Proof. Apply the uniform concentration result with \(t=\sqrt{\log(2M/\delta)/(2n)}\). Its failure probability is at most \(2M e^{-2nt^2}=2M e^{-\log(2M/\delta)}=\delta\). On the resulting event, every candidate satisfies \(|\widehat R_j-R_j|\leq t\). In particular, this holds for the oracle index \(j^*\) and for the selected index \(\widehat j\). Since \(\widehat j\) minimizes empirical risk, \(\widehat R_{\widehat j}\leq\widehat R_{j^*}\). Therefore,

$$ \begin{aligned} R_{\widehat j}-R_{j^*} &=(R_{\widehat j}-\widehat R_{\widehat j}) +(\widehat R_{\widehat j}-\widehat R_{j^*}) +(\widehat R_{j^*}-R_{j^*})\\ &\leq |R_{\widehat j}-\widehat R_{\widehat j}| +|\widehat R_{j^*}-R_{j^*}|\\ &\leq 2t =\sqrt{\frac{2\log(2M/\delta)}{n}}. \end{aligned} $$

The middle term in the first line is nonpositive because of the empirical minimization. The other two terms are each bounded by \(t\) on the simultaneous event. This proves the claim. \(\square\)

The bound is an oracle inequality because it compares the selected predictor’s risk with the minimum risk available in the finite dictionary. Its dependence on \(M\) is logarithmic, while its dependence on \(n\) is \(n^{-1/2}\). Thus adding candidates increases the bound slowly, but more observations shrink it. The confidence parameter enters through \(\log(1/\delta)\).

Worked Example: Interpreting a Two-Candidate Guarantee

Let the two candidate losses be independent Bernoulli coordinates with means \(0.10\) and \(0.15\), respectively. The risks are therefore \(0.10\) and \(0.15\), and the oracle risk is \(0.10\). For \(M=2\), \(n=400\), and \(\delta=0.05\), the excess-risk bound is \( \sqrt{2\log(2M/\delta)/n}=\sqrt{2\log(80)/400}\).

Using \(\log(80)\approx4.3820\), the expression is \(\sqrt{8.7640/400}=\sqrt{0.02191}\approx0.1480\). Consequently, with probability at least \(0.95\), the selected candidate’s risk is at most \(0.10+0.1480=0.2480\). The second candidate’s risk is only \(0.15\), so in this particular model the actual excess risk can never exceed \(0.05\); the general guarantee is valid but not sharp for every problem.

An Expected Excess-Risk Guarantee

The same bounded-loss assumption also yields a bound on the expected excess risk. This version follows by controlling the expected largest absolute empirical-risk deviation over the dictionary. A moment-generating-function argument makes the logarithmic dependence on \(M\) explicit.

Theorem: Under the stated assumptions,
$$ E[R_{\widehat j}-\min_{1\leq j\leq M}R_j] \leq \sqrt{\frac{2\log(2M)}{n}}. $$

Proof. Hoeffding’s lemma states that if a random variable \(W\) lies in an interval of length \(b-a\), then \(E[e^{\lambda(W-E[W])}]\leq e^{\lambda^2(b-a)^2/8}\) for every real \(\lambda\). For completeness, when \(W\in[0,1]\), convexity gives \(e^{\lambda W}\leq 1-W+We^\lambda\). Writing \(q=E[W]\), it follows that \(E[e^{\lambda(W-q)}]\leq e^{-\lambda q}(1-q+qe^\lambda)\). The logarithm of the right-hand side has value and first derivative zero at \(\lambda=0\); its second derivative is \(r(1-r)\leq1/4\), where \(r=qe^\lambda/(1-q+qe^\lambda)\). Integrating this second-derivative bound gives a logarithm no greater than \(\lambda^2/8\), for positive or negative \(\lambda\). The endpoint cases \(q=0\) and \(q=1\) are immediate. Rescaling proves the stated interval-length form.

Set \(D_j=\widehat R_j-R_j\). Independence across observations and Hoeffding’s lemma imply \(E[e^{\lambda D_j}]\leq e^{\lambda^2/(8n)}\); the same holds for \(-D_j\). For any \(\lambda>0\), Jensen’s inequality and the sum of the \(2M\) exponentials give

$$ \begin{aligned} E\!\left[\max_j|D_j|\right] &\leq \frac{1}{\lambda} \log E\!\left[\sum_{j=1}^M(e^{\lambda D_j}+e^{-\lambda D_j})\right]\\ &\leq \frac{\log(2M)}{\lambda}+\frac{\lambda}{8n}. \end{aligned} $$

Choosing \(\lambda=\sqrt{8n\log(2M)}\) makes the right-hand side \(\sqrt{\log(2M)/(2n)}\). The oracle comparison used in the high-probability proof holds pointwise, so \(R_{\widehat j}-R_{j^*}\leq2\max_j|D_j|\). Taking expectations proves the result. \(\square\)

Worked Example: Expected Risk With Sixteen Candidates

Let \(Z\) consist of 16 independent Bernoulli coordinates with means \(j/100\), for \(j=1,\ldots,16\), and let candidate \(j\) incur loss equal to coordinate \(j\). With \(n=1000\), the expected excess risk of empirical risk selection is bounded by \( \sqrt{2\log(2M)/n}=\sqrt{2\log(32)/1000}\).

Since \(\log(32)\approx3.4657\), the bound is \(\sqrt{6.9314/1000}=\sqrt{0.0069314}\approx0.0833\). Thus the expected risk gap from the best of these 16 candidates is at most about \(0.0833\). This is an upper bound, not a prediction that the actual gap equals this value.

What the Slow Rate Does—and Does Not—Say

The square-root rate arises because the argument controls estimation error uniformly and then pays for two deviations: one for the selected candidate and one for the oracle candidate. Bounded losses provide concentration, and the union bound accounts for searching across the dictionary. No assumption about a special relationship between the candidates’ losses is required.

A common mistake is to apply a concentration bound to the selected predictor as though its index had been fixed before observing the data. The selector’s index is data-dependent, so that single-candidate argument does not justify a guarantee for the selected risk. The correction is to establish a simultaneous deviation bound for every candidate, as above. A different mistake is to infer a bound proportional to \(\log(M)/n\) from boundedness alone. The argument here gives a square-root rate; a faster rate requires additional assumptions and a different analysis.

Key takeaway: For a fixed finite dictionary with losses in \([0,1]\), empirical risk selection has excess risk at most \(\sqrt{2\log(2M/\delta)/n}\) with probability at least \(1-\delta\). The finite search is handled by a union bound, and the oracle is the best candidate in the dictionary.

Check Your Understanding

Use the assumptions and arguments in this tutorial to answer the following questions.

  1. Why is concentration for one fixed candidate not, by itself, enough to control the risk of an empirical risk selector?
  2. For \(M=10\), \(n=500\), and \(\delta=0.05\), write the high-probability excess-risk bound before evaluating it numerically.
  3. In the oracle comparison proof, why is the term \(\widehat R_{\widehat j}-\widehat R_{j^*}\) nonpositive?
  4. How does the bound change if all losses lie in \([0,B]\) rather than \([0,1]\)?
  5. What additional feature of the problem is not captured by the finite-dictionary oracle risk?
Clinical Biostats