Skip to content

Classification-calibrated surrogate loss

A surrogate loss is classification-calibrated when its population optimum recovers the Bayes decision boundary. See why log loss and hinge loss qualify, while only the former identifies the class probability.

A classification-calibrated surrogate loss is a training loss function whose best population risk is strictly better than any score on the wrong side of the optimal classification boundary. It justifies replacing the discontinuous 0–1 classification loss with a more tractable objective. For a quant predicting a binary event, this connects the training target to classification error; it does not establish profitable trades or trustworthy sizing probabilities.

What must the population optimum get right?

Take labels Y∈{−1,+1}Y\in\{-1,+1\}, a real score a=f(x)a=f(x) and equal costs for the two kinds of classification error. Write η=P(Y=+1∣X=x)\eta=\mathbb{P}(Y=+1\mid X=x). The Bayes decision predicts +1+1 when η>1/2\eta>1/2 and −1-1 when η<1/2\eta<1/2. At η=1/2\eta=1/2, either label has the same error.

For a nonnegative margin loss ϕ(Ya)\phi(Ya), define its conditional risk and two infima:

Cη(a)=ηϕ(a)+(1−η)ϕ(−a),H(η)=inf⁡a∈RCη(a),C_\eta(a)=\eta\phi(a)+(1-\eta)\phi(-a),\qquad H(\eta)=\inf_{a\in\mathbb{R}}C_\eta(a), H−(η)=inf⁡a: a(2η−1)≤0Cη(a).H^-(\eta)=\inf_{a:\,a(2\eta-1)\leq0}C_\eta(a).
Classification calibration requires H−(η)>H(η)H^-(\eta)>H(\eta) whenever η≠1/2\eta\ne1/2. The constrained infimum includes a zero score, so the condition rules out approaching the optimum by sitting on the boundary as well as choosing the wrong sign. Infima also cover losses whose optimum is approached only at an infinite score. This is the definition in Bartlett, Jordan and McAuliffe, §2.2.

Log loss: the correct sign comes with a probability target

Consider a specified population, not a fitted backtest: at one feature value, η=0.7\eta=0.7. Predicting +1+1 has conditional error 0.30.3; predicting −1-1 has error 0.70.7. Choosing the wrong class costs an extra 0.40.4 in expected 0–1 loss.

Let q∈(0,1)q\in(0,1) be the predicted positive-label probability. With natural logarithms, expected log loss is

Cη(q)=−ηlog⁡q−(1−η)log⁡(1−q),∂Cη(q)∂q=q−ηq(1−q).C_\eta(q)=-\eta\log q-(1-\eta)\log(1-q),\qquad \frac{\partial C_\eta(q)}{\partial q}=\frac{q-\eta}{q(1-q)}.

The derivative changes from negative to positive at q=ηq=\eta. Thus the unique minimum is q∗=0.7q^*=0.7:

Probability predictionExpected log lossClassification implication
q=0.7q=0.70.610864Correct side and population optimum
q=0.5q=0.50.693147Decision boundary; tie rule needed
q=0.4q=0.40.794651Wrong side

The best prediction constrained to q≤0.5q\leq0.5 is the boundary, leaving a strictly positive loss gap of 0.0822830.082283. Under the logit score a=log⁡(q/(1−q))a=\log(q/(1-q)), this is exactly the constraint a≤0a\leq0. The unconstrained optimum is a∗=log⁡(0.7/0.3)≈0.847298a^*=\log(0.7/0.3)\approx0.847298, which has the Bayes sign.

At a specified positive-label probability of 0.7, log loss is minimised at q equal to 0.7 with loss 0.610864. At q equal to 0.5 loss is 0.693147; at q equal to 0.4 it is 0.794651. Hinge risk is minimised at score 1 with loss 0.6; the best nonpositive score has loss 1.0.
At a specified positive-label probability of 0.7, log loss is minimised at q equal to 0.7 with loss 0.610864. At q equal to 0.5 loss is 0.693147; at q equal to 0.4 it is 0.794651. Hinge risk is minimised at score 1 with loss 0.6; the best nonpositive score has loss 1.0.

Original population-risk illustration, with separate probability and score axes. Both losses favour the correct class; the hinge optimum does not identify the positive-label probability.

Hinge: enough information for a class, less than a probability

The support vector machine uses hinge loss ϕ(Ya)=max⁡(0,1−Ya)\phi(Ya)=\max(0,1-Ya). At η=0.7\eta=0.7, its conditional risk is
C0.7(a)=0.7max⁡(0,1−a)+0.3max⁡(0,1+a).C_{0.7}(a)=0.7\max(0,1-a)+0.3\max(0,1+a).
On −1≤a≤1-1\leq a\leq1, this becomes 1−0.4a1-0.4a. It decreases until a=1a=1 and increases thereafter. Its minimum is 0.60.6; the best nonpositive score is a=0a=0, with loss 11. Hinge is classification-calibrated, as Bartlett and co-authors show in Example 4.

But η=0.6\eta=0.6 and η=0.9\eta=0.9 also produce the same optimal hinge score a∗=1a^*=1. That score cannot tell those probabilities apart. Simply rescaling it or applying a sigmoid cannot recover information the optimum has discarded.

Three meanings that must stay separate

Classification calibration targets the Bayes class at the stated decision threshold. Strict properness targets the true probability as the unique conditional-risk minimiser: log loss has this property. Hinge, a score loss, is not a proper probability loss under the simple probability encoding a=2q−1a=2q-1: for η=0.7\eta=0.7, it prefers q=1q=1 to q=0.7q=0.7. Reid and Williamson, §§3.1 and 5, distinguish these loss properties.
Probability calibration asks whether forecast probabilities match outcome frequencies conditional on the forecast. Classification calibration alone does not imply that reliability; neither does fitting a finite sample with a strictly proper loss.
For a calibrated margin loss, convergence of population surrogate risk to its infimum over all measurable scores implies convergence to Bayes 0–1 risk (Bartlett et al., Theorem 1). A low training loss does not establish that premise: finite data, optimisation error, regularisation and a misspecified function class can leave population excess risk. Changing the deployment distribution introduces another gap. Unequal error costs require a different decision threshold; equal-cost classification calibration does not certify an economic trading objective.
For the fitting mechanism, continue with Soft-Margin SVMs and the SMO Algorithm. For the separate reliability question, read Probability calibration. Both have public previews; full lessons require membership.

Sources

Last updated
  • classification
  • surrogate loss
  • statistical learning
  • hinge loss
  • log loss
  • calibration
← Back to the glossaryBack to top ↑