Skip to content

Uniform convergence of empirical risk

Uniform risk bounds cover every rule in a fixed class at once, allowing data-dependent selection. Derive a finite-class bound and its ERM consequence.

Uniform convergence of empirical risk means that sample-average loss approaches population-average loss simultaneously over a hypothesis class. It is what lets a researcher justify selecting a prediction rule after comparing rules on the same sample: a guarantee covering the whole class also covers the chosen member.

For a fixed class H\mathcal H, loss ℓ\ell and observations Z1,…,ZnZ_1,\ldots,Z_n drawn independently from the same distribution DD, define

R(h)=EZ∼D[ℓ(h,Z)],R^n(h)=1n∑i=1nℓ(h,Zi).R(h)=\mathbb E_{Z\sim D}[\ell(h,Z)], \qquad \widehat R_n(h)=\frac1n\sum_{i=1}^n\ell(h,Z_i).

The quantity to control is

Δn=sup⁡h∈H∣R^n(h)−R(h)∣.\Delta_n=\sup_{h\in\mathcal H}\lvert\widehat R_n(h)-R(h)\rvert.
Convergence in probability means P(Δn>ϵ)→0\mathbb P(\Delta_n>\epsilon)\to0 for every ϵ>0\epsilon>0. The distribution-free learning-theory property is stronger: for each accuracy ϵ\epsilon and failure level δ\delta, a sufficient sample size works for every admissible DD. “Uniform” here concerns the class of rules; uniform convergence in calculus treats deterministic function sequences. MIT’s learning-theory notes formalize representative samples and this distribution-free property.

One rule, then all rules

Assume H\mathcal H is fixed before the sample is drawn, finite, and 0≤ℓ(h,Z)≤10\le\ell(h,Z)\le1. For one preselected hh, Hoeffding’s inequality gives

P ⁣(∣R^n(h)−R(h)∣>ϵ)≤2e−2nϵ2.\mathbb P\!\left(\lvert\widehat R_n(h)-R(h)\rvert>\epsilon\right) \le2e^{-2n\epsilon^2}.

That statement alone cannot be applied unchanged to a rule chosen by minimizing the same sample’s loss. Apply the union bound to all candidate failure events instead:

P(Δn>ϵ)≤2∣H∣e−2nϵ2.\mathbb P(\Delta_n>\epsilon) \le2\lvert\mathcal H\rvert e^{-2n\epsilon^2}.
The rules’ errors need not be independent of one another; they share observations. The union bound needs no independence between events. IID is used for each rule’s average loss. These are the concentration and union-bound steps in Understanding Machine Learning, §4.2, with the union-bound statement also given in Cornell’s Fact 2.3.

Solving for the radius makes the guarantee readable. With probability at least 1−δ1-\delta,

Δn≤ϵn,ϵn=ln⁡(2∣H∣/δ)2n.\Delta_n\le\epsilon_n, \qquad \epsilon_n=\sqrt{\frac{\ln(2\lvert\mathcal H\rvert/\delta)}{2n}}.
For 10 fixed rules, 1,000 IID observations and δ=0.05\delta=0.05, the radius is
ϵn=ln⁡4002000≈0.05473328.\epsilon_n=\sqrt{\frac{\ln400}{2000}} \approx0.05473328.

Thus every rule’s empirical and population mean losses differ by at most about 0.05473 on one event with probability at least 95%. This is a bound, not an exact coverage rate or a promise that 95% of individual predictions are correct.

Illustrative simultaneous risk bands for ten fixed rules, with n equal to 1,000 and loss in [0, 1]. The common half-width is 0.05473 at confidence at least 95%. Rule 3 minimizes empirical risk at 0.18 but has population risk 0.225; rule 7 has the lowest population risk, 0.19. The excess risk 0.035 is below the theoretical bound 0.10947.
Illustrative simultaneous risk bands for ten fixed rules, with n equal to 1,000 and loss in [0, 1]. The common half-width is 0.05473 at confidence at least 95%. Rule 3 minimizes empirical risk at 0.18 but has population risk 0.225; rule 7 has the lowest population risk, 0.19. The excess risk 0.035 is below the theoretical bound 0.10947.
Original illustrative values on a simultaneous-coverage event, not a simulation or market experiment. The intervals are empirical risk plus or minus 0.05473; diamonds show hypothetical population risks, which are normally unknown. Coverage permits a ranking reversal.

Why ERM pays for two deviations

Let h^\widehat h minimize empirical risk exactly over this class, and let h∗h^* minimize population risk within it. On the same simultaneous event,
R(h^)≤R^n(h^)+ϵn≤R^n(h∗)+ϵn≤R(h∗)+2ϵn.\begin{aligned} R(\widehat h) &\le\widehat R_n(\widehat h)+\epsilon_n\\ &\le\widehat R_n(h^*)+\epsilon_n\\ &\le R(h^*)+2\epsilon_n. \end{aligned}
One deviation moves from the selected rule’s population risk to its empirical risk; the other moves from the comparator’s empirical risk to its population risk. ERM supplies the middle inequality. No second confidence penalty is needed. Here the excess-risk bound is 2ϵn≈0.109466572\epsilon_n\approx0.10946657; the figure’s illustrative excess risk is only 0.225−0.190=0.0350.225-0.190=0.035. MIT’s ERM argument gives this connection to agnostic PAC learning.
The comparator is best in H\mathcal H. To compare with Bayes risk RBR_{\mathrm B}, add the approximation gap R(h∗)−RBR(h^*)-R_{\mathrm B}. Increasing data does not remove that gap while the class stays fixed.

Where a quant application needs more work

Searching within the declared class is covered; inventing extra rules after inspecting results is not covered by counting only the ten survivors. The class must encompass the search being justified. Infinite classes need complexity control, such as VC dimension, rather than substitution of infinity into the finite-class bound.

Serially dependent returns, overlapping labels and distribution changes require arguments beyond this IID result. Unbounded squared losses also fall outside its stated loss range. Even a valid guarantee concerns expected loss under DD; it does not establish profitability after costs or performance under a new market regime.

Uniform convergence is a statistical property, not an efficient optimization algorithm. Finding the empirical minimizer may still be difficult; Cornell’s Definition 1.1 treats computational efficiency separately.
For the finite-class derivation and the ERM comparison, continue with Sample Complexity Bounds: Finite and Infinite Hypothesis Classes (membership required for the full lesson; public preview available).

Sources

Last updated
  • learning theory
  • uniform convergence
  • empirical risk
  • generalisation
  • sample complexity
← Back to the glossaryBack to top ↑