Tutorials › Statistical Learning (Graduate) › Turning Empirical Surrogate Bounds Into Regret Guarantees

Surrogate Losses and Calibration · Tutorial 537 of 989

Turning Empirical Surrogate Bounds Into Regret Guarantees

Translate a supplied surrogate-risk bound into a finite-sample classification-regret guarantee using the calibration function’s generalized inverse.

Advanced 10 min read

What You'll Learn

  • State the population calibration inequality that connects surrogate excess risk to classification regret.
  • Apply a generalized inverse of the calibration function, including when the function is not strictly increasing.
  • Preserve the probability level of a supplied finite-sample risk bound in the resulting regret guarantee.
  • Account for estimation, optimization, and approximation terms when they are included in a supplied bound.
  • Recognize why an empirical-risk bound alone is not yet a population regret guarantee.

From a Surrogate Bound to a Classification Guarantee

A finite-sample analysis may control how far a fitted score is from optimal under a surrogate loss. The practical question is what this says about its classification decisions. Calibration supplies the link: small population surrogate excess risk forces small classification regret. The conversion is made by applying the inverse of a calibration function to a bound that is already on the population surrogate excess risk.

This step does not itself establish a generalization bound. If the available result controls empirical risk, one first needs a valid argument that converts that result into a population bound. Once such a bound is supplied, calibration gives a direct regret guarantee, with the same confidence level.

Risks and the Calibration Inequality

Let \((X,Y)\) be a random pair, with \(Y\in\{-1,+1\}\), and define \(\eta(x)=P(Y=+1\mid X=x)\). A measurable score \(f\) predicts \(g_f(x)=+1\) when \(f(x)\geq 0\), and \(g_f(x)=-1\) otherwise. The Bayes classifier predicts a label with the larger conditional probability; when \(\eta(x)=1/2\), either label is Bayes-optimal.

Write \(R_{01}(g)=P(g(X)\ne Y)\) for classification risk. For a margin loss \(\phi\), define \(R_\phi(f)=E[\phi(Yf(X))]\). The conditional surrogate risk at \(x\) and score \(s\) is \(C_\phi(\eta(x),s)=\eta(x)\phi(s)+(1-\eta(x))\phi(-s)\). The pointwise optimal surrogate risk is \(C_\phi^*(\eta(x))=\inf_{s\in\mathbb R}C_\phi(\eta(x),s)\), and the population surrogate optimum is \(R_\phi^*=E[C_\phi^*(\eta(X))]\). These definitions allow an infimum that is not attained.

Definition: A function \(\psi:[0,1]\to[0,\infty)\) is a calibration lower bound for the score rule and surrogate if it is nondecreasing, convex, and satisfies \(\psi(0)=0\), and whenever the score decision at \(x\) is not Bayes-optimal, \(C_\phi(\eta(x),f(x))-C_\phi^*(\eta(x))\geq\psi(|2\eta(x)-1|)\). The tie convention for scores must be the same in this condition and in the definition of \(g_f\). The conversion below uses this pointwise inequality; it does not require the calibration function to be strictly increasing.

Define the classification regret of \(f\) by \(\mathcal E_{01}(f)=R_{01}(g_f)-\inf_g R_{01}(g)\), where the infimum ranges over measurable classifiers. If \(g_f(x)\) is not Bayes-optimal, its conditional classification excess is \(|2\eta(x)-1|\); otherwise it is zero. Thus, with \(\Delta_f(X)=|2\eta(X)-1|\,\mathbf 1\{g_f(X)\text{ is not Bayes-optimal}\}\), we have \(\mathcal E_{01}(f)=E[\Delta_f(X)]\).

The Population Conversion

Theorem: Suppose the pointwise calibration inequality above holds and \(\psi\) is convex and nondecreasing on \([0,1]\), with \(\psi(0)=0\). For any measurable score \(f\) with well-defined surrogate excess risk, \[ \psi\bigl(\mathcal E_{01}(f)\bigr)\leq R_\phi(f)-R_\phi^*. \]

To see the connection, at a point where the score decision is correct, \(\Delta_f=0\) and \(\psi(\Delta_f)=0\). Where it is wrong, the calibration inequality gives conditional surrogate excess at least \(\psi(\Delta_f)\). Taking expectations therefore gives \(R_\phi(f)-R_\phi^*\geq E[\psi(\Delta_f)]\). The equality between expected conditional excess and population excess follows by conditioning on \(X\), since \(R_\phi(f)=E[C_\phi(\eta(X),f(X))]\) and \(R_\phi^*=E[C_\phi^*(\eta(X))]\). The latter subtraction is valid, for example, when the risks are finite; if the surrogate excess is infinite, the claimed inequality is immediate. Jensen’s inequality applies because \(\Delta_f\in[0,1]\) and \(\psi\) is convex: \[ E[\psi(\Delta_f)]\geq\psi(E[\Delta_f])=\psi(\mathcal E_{01}(f)). \] Combining the inequalities proves the result. \(\square\)

For inversion, define the upper generalized inverse \[ \psi^{\leftarrow}(u)=\sup\{t\in[0,1]:\psi(t)\leq u\},\qquad u\geq 0. \] The set is nonempty because \(\psi(0)=0\). If \(\psi(\mathcal E_{01}(f))\leq u\), then \(\mathcal E_{01}(f)\) belongs to this set and is no larger than its supremum. Consequently, \[ R_\phi(f)-R_\phi^*\leq u \quad\Longrightarrow\quad \mathcal E_{01}(f)\leq\psi^{\leftarrow}(u). \] When \(\psi\) is continuous and strictly increasing, this is its ordinary inverse for \(u\leq\psi(1)\); for larger \(u\), the regret bound is at most \(1\). The generalized inverse also handles flat portions without pretending that an ordinary inverse exists.

Theorem (finite-sample transfer): Let \(\hat f\) be a data-dependent score. If, for a deterministic \(B_n\geq0\) and \(0<\delta<1\), \[ P\{R_\phi(\hat f)-R_\phi^*\leq B_n\}\geq 1-\delta, \] then \[ P\{\mathcal E_{01}(\hat f)\leq\psi^{\leftarrow}(B_n)\}\geq 1-\delta. \]

On every data set where the assumed surrogate bound holds, the population conversion applies to the realized score \(\hat f\), giving \(\mathcal E_{01}(\hat f)\leq\psi^{\leftarrow}(B_n)\). The event for the regret guarantee therefore contains the event for the surrogate bound, so its probability is at least \(1-\delta\). No new probability calculation or confidence penalty is introduced in this conversion. \(\square\)

Worked Conversions

Worked Example: A Linear Calibration Function

Suppose a supplied result establishes, with probability at least \(0.95\), that a fitted classifier using a hinge surrogate satisfies \(R_\phi(\hat f)-R_\phi^*\leq 0.12\). Use the calibration lower bound \(\psi(t)=t\), and compute the regret guarantee.

For this function, \(\psi^{\leftarrow}(u)=\min\{u,1\}\): the set of \(t\in[0,1]\) with \(t\leq u\) has supremum \(u\) when \(u\leq1\), and \(1\) otherwise. Since \(0.12\leq1\), \[ \mathcal E_{01}(\hat f)\leq\psi^{\leftarrow}(0.12)=0.12 \] with probability at least \(0.95\). The conclusion is a bound on excess classification risk, not a claim that the classification risk itself is at most \(0.12\).

Worked Example: A Quadratic Calibration Bound

Suppose a population logistic-surrogate bound holds with probability at least \(0.99\): \(R_\phi(\hat f)-R_\phi^*\leq0.02\). Use the valid quadratic calibration lower bound \(\psi(t)=t^2/2\).

To invert, solve \(t^2/2\leq u\), which gives \(t\leq\sqrt{2u}\). Restricting to the possible regret range \([0,1]\), \[ \psi^{\leftarrow}(0.02)=\min\{1,\sqrt{2(0.02)}\} =\sqrt{0.04}=0.20. \] Thus the classification regret is at most \(0.20\) with probability at least \(0.99\). A surrogate excess bound of \(0.02\) does not imply classification regret of \(0.02\); the quadratic inverse is the square-root scale.

Worked Example: Including Approximation and Optimization Terms

Let \(\mathcal F\) be a score class. Suppose a supplied event, with probability at least \(0.95\), gives a uniform deviation bound \(\sup_{f\in\mathcal F}|R_\phi(f)-\widehat R_\phi(f)|\leq0.015\). Suppose also that \(\hat f\in\mathcal F\) satisfies \(\widehat R_\phi(\hat f)\leq\inf_{f\in\mathcal F}\widehat R_\phi(f)+0.005\), and the approximation gap \(\inf_{f\in\mathcal F}R_\phi(f)-R_\phi^*\) is at most \(0.020\). Find a population excess bound and then a regret bound using \(\psi(t)=t^2/2\).

On the stated event, write \(\epsilon=0.015\) and \(a=0.005\). Uniform deviation gives \(R_\phi(\hat f)\leq\widehat R_\phi(\hat f)+\epsilon\). Approximate empirical minimization gives \(\widehat R_\phi(\hat f)\leq\inf_{f\in\mathcal F}\widehat R_\phi(f)+a\). The same deviation bound implies \(\inf_{f\in\mathcal F}\widehat R_\phi(f)\leq\inf_{f\in\mathcal F}R_\phi(f)+\epsilon\). Combining these inequalities and subtracting \(R_\phi^*\), \[ R_\phi(\hat f)-R_\phi^* \leq 2\epsilon+a+\inf_{f\in\mathcal F}R_\phi(f)-R_\phi^* \leq 2(0.015)+0.005+0.020=0.055. \] Inverting the quadratic bound gives \[ \mathcal E_{01}(\hat f)\leq\sqrt{2(0.055)} =\sqrt{0.11}\approx0.332. \] The guarantee holds with probability at least \(0.95\), because all the inequalities used hold on the supplied event. The deviation bound was assumed, not derived here.

Interpreting the Bound and Avoiding a Common Error

The inverse function determines how much classification regret is compatible with a given surrogate excess. For example, if \(\psi(t)=ct^q\) with \(c>0\) and \(q\geq1\), then \(\psi^{\leftarrow}(u)=\min\{1,(u/c)^{1/q}\}\). A quadratic calibration bound therefore turns a surrogate excess rate of order \(n^{-1/2}\) into a regret bound of order \(n^{-1/4}\), unless other structure supplies a sharper route. The inversion is a mathematical consequence of the particular calibration bound; it is not an empirical-process calculation.

A common mistake is to take a bound on \(\widehat R_\phi(\hat f)\), or on empirical excess risk, and apply \(\psi^{\leftarrow}\) directly. Calibration concerns population excess \(R_\phi(\hat f)-R_\phi^*\). An empirical quantity cannot replace it without a justified generalization and optimization argument, and a restricted score class may also incur an approximation gap. The correction is to identify exactly what the supplied result bounds, add any required terms to obtain a population excess bound, and only then apply the generalized inverse.

Key takeaway: If a valid finite-sample result gives \(R_\phi(\hat f)-R_\phi^*\leq B_n\) with a stated probability, calibration gives \(\mathcal E_{01}(\hat f)\leq\psi^{\leftarrow}(B_n)\) with at least that probability. The population scale, calibration function, and inverse convention all matter.

Check Your Understanding

For each question, distinguish the supplied risk bound from the conclusion obtained by inversion.

  1. If \(\psi(t)=t^2/2\) and the population surrogate excess is at most \(0.08\), what regret bound follows?
  2. Why does the confidence level remain unchanged when a deterministic surrogate excess bound is converted through \(\psi^{\leftarrow}\)?
  3. What additional issue arises if the fitted score is restricted to a class whose best population surrogate risk exceeds \(R_\phi^*\)?
  4. Why is an empirical surrogate-risk bound not, by itself, sufficient for the population calibration conversion?
  5. What role does the generalized inverse play if \(\psi\) is not strictly increasing?
Clinical Biostats