Tutorials › Statistical Learning (Graduate) › Approximation, Estimation, And Optimization Error

Regularization and Oracle Inequalities · Tutorial 248 of 989

Approximation, Estimation, And Optimization Error

Learn to identify approximation, estimation, and optimization contributions in a penalized risk guarantee, and see exactly how the comparator penalty enters the bound.

Advanced 11 min read

What You'll Learn

  • Define finite best-in-class and approximation risks under explicit assumptions.
  • Decompose excess risk by comparing a fitted predictor with any class member.
  • Derive a penalized-ERM bound that displays the penalty and optimization tolerance.
  • Interpret uniform deviation bounds as controlling the estimation contribution.
  • Calculate all three contributions in finite-class and quadratic examples.

Why Separate the Sources of Excess Risk?

A fitted predictor can have risk above the best possible risk for several distinct reasons. The chosen candidate class may not contain a good approximation to the target; the observed sample may make empirical risk differ from population risk; and an algorithm may fail to minimize its penalized empirical objective exactly. A useful risk guarantee keeps these contributions visible rather than hiding them in one remainder term.

The separation is useful for diagnosis. A large approximation error calls for a richer candidate class. A large estimation contribution calls for better control of sample fluctuations or a less complex class. A large optimization tolerance calls for a more accurate computation. The penalty also matters: it influences which comparator is suitable and appears explicitly in the guarantee.

Risk, Comparator, and Approximation Error

Let \(Z_1,\ldots,Z_n\) be independent observations with common distribution \(P\), and let \(Z\) denote a generic observation from \(P\). For a predictor \(g\) and loss \(\ell(g,z)\), define its population risk and empirical risk by

$$ R(g)=E[\ell(g,Z)], \qquad R_n(g)=\frac{1}{n}\sum_{i=1}^n \ell(g,Z_i). $$

Let \(\mathcal F\) be the target class and \(\mathcal G\subseteq\mathcal F\) the candidate class used for fitting. We use nonnegative losses, assume \(\mathcal F\) and \(\mathcal G\) are nonempty, and assume each class contains at least one predictor with finite risk. These conditions ensure that

$$ 0\le R_*:=\inf_{g\in\mathcal F}R(g)<\infty, \qquad 0\le R_{\mathcal G}:=\inf_{g\in\mathcal G}R(g)<\infty. $$

In particular, the difference defining approximation error is well-defined and finite. Individual predictors with infinite risk may exist, but they do not make either infimum infinite under these assumptions.

Definition: The approximation error of \(\mathcal G\) relative to \(\mathcal F\) is \(A_{\mathcal G}=R_{\mathcal G}-R_*\). Since \(\mathcal G\subseteq\mathcal F\), \(A_{\mathcal G}\ge 0\). It measures the risk lost by restricting attention to \(\mathcal G\), not the error caused by sampling or computation.

An infimum need not be attained. Thus a comparator \(g\in\mathcal G\) can be chosen with risk arbitrarily close to \(R_{\mathcal G}\), even when there is no single best member of \(\mathcal G\). This distinction matters when deriving bounds: the argument should apply to every comparator, not assume that a minimizer exists.

Worked Example: Computing Approximation Error

Suppose \(\mathcal F\) has finite risks \(0.08, 0.12,\) and \(0.30\), while \(\mathcal G\) contains only the predictors with risks \(0.12\) and \(0.30\). Then \(R_*=0.08\) and \(R_{\mathcal G}=0.12\), so

$$ A_{\mathcal G}=0.12-0.08=0.04. $$

The candidate class cannot achieve the target-class best risk: even with unlimited data and exact optimization, its risk cannot be below \(0.12\). Its unavoidable excess over \(R_*\) is \(0.04\). The values also verify that both infima are finite, as required for this subtraction.

A Penalized Estimator and Its Error Decomposition

Let \(p:\mathcal G\to[0,\infty)\) be a finite-valued penalty, and let \(\hat g\in\mathcal G\) be a measurable fitted predictor. On the event considered below, suppose its empirical risks are finite and it satisfies the approximate penalized minimization condition

$$ R_n(\hat g)+p(\hat g) \le \inf_{g\in\mathcal G}\{R_n(g)+p(g)\}+\varepsilon, \qquad \varepsilon\ge 0. $$

The tolerance \(\varepsilon\) measures optimization error. Exact minimization corresponds to \(\varepsilon=0\). For random quantities, assume the risks of the selected predictor are measurable and that the deviation bounds used below hold on a measurable event. If a supremum over \(\mathcal G\) is not measurable, a measurable upper bound for it can be used instead.

Theorem: Under the stated conditions, for every \(g\in\mathcal G\),
$$ \begin{aligned} R(\hat g)-R_* \le{}& \underbrace{R(g)-R_*}_{\text{comparator excess}}\\ &+\underbrace{|R(\hat g)-R_n(\hat g)| +|R_n(g)-R(g)|}_{\text{estimation contribution}}\\ &+\underbrace{p(g)-p(\hat g)}_{\text{penalty difference}} +\underbrace{\varepsilon}_{\text{optimization error}}. \end{aligned} $$

The inequality holds on any event where the empirical risks are finite and the displayed quantities are defined. In particular, its left side is finite when \(R(\hat g)<\infty\); this holds, for example, if the selected predictor is known to have finite risk. If it does not, the statement can instead be read as a bound for finite-risk selections.

Proof. Approximate minimization implies, for every \(g\in\mathcal G\),

$$ R_n(\hat g)-R_n(g) \le p(g)-p(\hat g)+\varepsilon. $$

Now add and subtract the empirical risks of \(\hat g\) and \(g\):

$$ \begin{aligned} R(\hat g)-R_* ={}&R(g)-R_*\\ &+\{R(\hat g)-R_n(\hat g)\} +\{R_n(\hat g)-R_n(g)\} +\{R_n(g)-R(g)\}. \end{aligned} $$

Bound the middle empirical-risk difference by the preceding optimization inequality, and bound each of the other two differences by its absolute value. This gives the claimed result. \(\square\)

The comparator term is the excess risk of the chosen \(g\) over the target-class optimum. The two absolute deviations are the estimation contribution for this particular comparison. They are not automatically small; a separate argument must control them. The penalty difference can help or hurt: if the comparator is more heavily penalized than the fitted predictor, it increases the bound.

Uniform Deviation and a Three-Part Bound

A common way to control the estimation contribution is with a uniform deviation over the candidate class. Define

$$ \Delta_n(\mathcal G) =\sup_{g\in\mathcal G}|R_n(g)-R(g)|. $$

Assume this quantity is measurable (or replace it with a measurable upper bound) and finite on the event of interest. Then both deviations in the theorem are at most \(\Delta_n(\mathcal G)\).

Corollary: On an event where \(\Delta_n(\mathcal G)\le\delta\), for every \(g\in\mathcal G\) with finite risk,
$$ R(\hat g)-R_* \le R(g)-R_*+2\delta+p(g)-p(\hat g)+\varepsilon. $$

Proof. Apply the theorem and use \(|R(\hat g)-R_n(\hat g)|\le\delta\) and \(|R_n(g)-R(g)|\le\delta\). Adding the two bounds gives \(2\delta\). \(\square\)

Because \(p(\hat g)\ge0\), one may discard its negative contribution to obtain a simpler bound. Taking the infimum over comparators then gives

$$ R(\hat g)-R_* \le \inf_{g\in\mathcal G}\{R(g)-R_*+p(g)\} +2\delta+\varepsilon. $$

This form separates three main sources: comparator approximation, sample-based estimation, and optimization. The penalty adds a comparator charge. More explicitly, the infimum in the display equals \(A_{\mathcal G}+B_{\mathcal G}(p)\), where

$$ B_{\mathcal G}(p) = \inf_{g\in\mathcal G}\{R(g)-R_{\mathcal G}+p(g)\}. $$

Since \(R(g)\ge R_{\mathcal G}\) and \(p(g)\ge0\), this penalty charge is nonnegative. It allows the bound to use a comparator that may have slightly greater risk than the best-in-class risk in exchange for a more favorable penalty. When \(p\) is identically zero, the bound reduces to approximation error plus estimation error plus optimization error.

Worked Example: Reading a Finite-Class Bound

Suppose \(R_*=0.10\), and the candidate class contains \(g_1,g_2\) with risks \(0.18,0.12\). Their empirical risks are \(0.14,0.09\), and their penalties are \(0,0.04\), respectively. Let \(\hat g=g_1\), and suppose the optimization tolerance is \(\varepsilon=0.01\).

The penalized empirical objectives are \(0.14+0=0.14\) for \(g_1\) and \(0.09+0.04=0.13\) for \(g_2\). Thus \(g_1\) is within \(0.01\) of the minimum, as assumed. Using \(g=g_2\), the comparator excess is \(0.12-0.10=0.02\). The two deviations are \(|0.18-0.14|=0.04\) and \(|0.09-0.12|=0.03\), and the penalty difference is \(0.04-0=0.04\). The bound is therefore

$$ R(g_1)-R_* =0.18-0.10=0.08 \le 0.02+0.04+0.03+0.04+0.01=0.14. $$

The inequality is valid but loose. It still makes the accounting explicit: the comparator is close to optimal, while the sample deviations and the penalty difference dominate this particular upper bound.

Three Worked Perspectives on the Contributions

Worked Example: A Uniform Bound Across Candidate Classes

Suppose a target class has \(R_*=0.05\), and three candidate classes have best risks \(0.25,0.11,0.07\). Their approximation errors are \(0.20,0.06,0.02\). Suppose the corresponding available uniform deviation bounds \(2\delta\) are \(0.02,0.08,0.16\), and take zero penalty and exact optimization.

The resulting bounds, using a best-risk comparator or a sequence approaching the infimum, are \(0.20+0.02=0.22\), \(0.06+0.08=0.14\), and \(0.02+0.16=0.18\). The richest class has the smallest approximation error, but its larger estimation bound makes its total guarantee worse than that of the middle class. The calculation illustrates why minimizing approximation error alone need not minimize the excess-risk bound.

Worked Example: A Quadratic Objective With Optimization Error

Let \(Y\) equal \(0\) or \(2\), each with probability \(1/2\), and predict a constant \(\theta\in\mathbb R\) using squared loss \((Y-\theta)^2\). Then

$$ R(\theta)=\tfrac12\theta^2+\tfrac12(2-\theta)^2 =1+(\theta-1)^2. $$

Take \(\mathcal F=\mathcal G=\mathbb R\), so \(R_*=1\) and the approximation error is zero. Consider the sample \(Y_1=0,Y_2=2\). Its empirical risk is also \(R_n(\theta)=1+(\theta-1)^2\) for every \(\theta\), so the uniform estimation deviation is zero. Use penalty \(p(\theta)=\tfrac12\theta^2\). The penalized objective is

$$ R_n(\theta)+p(\theta)=2-2\theta+\tfrac32\theta^2. $$

Differentiating gives \(-2+3\theta=0\), so its minimizer is \(\theta_0=2/3\). Let the computed value be \(\hat\theta=0.7\). The objective gap is

$$ \{R_n(0.7)+p(0.7)\} -\{R_n(2/3)+p(2/3)\} =\tfrac32(0.7-2/3)^2 =\tfrac32(1/30)^2 =\tfrac1{600}<0.002. $$

Thus \(\varepsilon=0.002\) is valid. Using comparator \(\theta=1\), whose risk is \(1\) and penalty is \(0.5\), the bound gives

$$ R(0.7)-R_*=0.09 \le 0+0+0.5-0.245+0.002=0.257. $$

Here \(R(0.7)=1+(0.7-1)^2=1.09\) and \(p(0.7)=0.5(0.7)^2=0.245\). The bound is loose, but the calculation verifies separately that approximation and estimation are zero, while the penalty difference and optimization tolerance remain visible.

Common Pitfall and Practical Interpretation

A common mistake is to call every gap between fitted and optimal risk “estimation error.” That description can conceal two different sources: the best member of \(\mathcal G\) may already be worse than the best member of \(\mathcal F\), and the algorithm may not have minimized its empirical objective accurately. The comparator inequality keeps these distinct.

  • Approximation: \(R_{\mathcal G}-R_*\) is a population-level limitation of the candidate class.
  • Estimation: deviations between empirical and population risk reflect sampling and require a separate control.
  • Optimization: \(\varepsilon\) records how far the computed fit may be from minimizing the penalized empirical objective.
  • Penalty: \(p(g)-p(\hat g)\) records how the comparator's penalty affects the comparison; dropping \(-p(\hat g)\) is valid only because the penalty is nonnegative.

Another error is subtracting two risk infima without checking they are finite. Nonnegative losses and at least one finite-risk member in each relevant class ensure the infima here are finite. Without such conditions, even individually defined risks need not make a difference of infima well-defined. State the assumptions before interpreting the decomposition.

Key takeaway: Compare the fitted predictor to an arbitrary finite-risk comparator. The resulting bound displays comparator excess, two estimation deviations, a penalty difference, and optimization tolerance. Uniform deviation control turns the estimation terms into a single explicit contribution.

Check Your Understanding

Use the assumptions and decomposition above to answer the following questions.

  1. Why do nonnegative losses and a finite-risk member of \(\mathcal F\) ensure that \(R_*\) is finite?
  2. In the theorem, which two terms form the estimation contribution, and how does a uniform deviation bound control them?
  3. If the penalty is identically zero, what three principal sources remain in the excess-risk bound?
  4. In the finite-class example, verify that the chosen predictor is within the stated optimization tolerance of the minimum penalized empirical objective.
  5. Why can the best-risk comparator in \(\mathcal G\) be replaced by a sequence of comparators when the infimum is not attained?
Clinical Biostats