Support Vector Machines I: Zhang's Inequality Relating the Hinge Risk and the Classification RiskTextbook
Motivation
Binary classification asks for a rule that predicts a label from an observation . The natural loss for this task, the classification loss , is a step function: minimizing its empirical average over a class of functions is generally NP-hard, because the objective is non-convex and discontinuous in . Every practical classification algorithm — logistic regression, boosting, and the support vector machine this book is about — sidesteps this by minimizing a convex surrogate loss instead, such as the hinge loss , and hoping that a small surrogate risk implies a small classification risk.
Zhang (2004) and Bartlett, Jordan & McAuliffe (2006) put this hope on a rigorous footing: for a wide class of convex surrogates, controlling the excess surrogate risk controls the excess classification risk, with an explicit quantitative relationship. Steinwart & Christmann, Support Vector Machines (Springer 2008, Information Science and Statistics), Chapter 2, develop the special case of the hinge loss in closed form as Theorem 2.31 ("Zhang's inequality"), the sharpest and most self-contained instance of this calibration phenomenon: an exact equality for bounded functions, not merely an inequality.
Setting
Fix a measurable space and a closed label set ; throughout this mission . A loss function is a measurable map , read as the cost of predicting by when is observed. Given a distribution on , the -risk of a measurable is the average cost , and the Bayes risk is the smallest risk any measurable function can achieve.
The classification loss is — it charges exactly when the sign of the prediction disagrees with the label — where is the sign function with the book's convention . The hinge loss is , a convex, piecewise-linear upper bound on up to a factor of . Writing for the conditional probability of the positive label given , the Bayes classification function is : it predicts the majority label at .
A loss can be clipped at if truncating every prediction to never increases the loss: for the clipped value of . Both and can be clipped at .
Formalization targets
Goal: Zhang's inequality (Theorem 2.31)
The first target is an exact identity for bounded predictors: the excess hinge risk equals a weighted distance to the Bayes classifier. The second, weaker but unrestricted, statement is what makes the hinge loss a valid classification surrogate for arbitrary real-valued scores: no matter how large grows, the excess classification risk it incurs is bounded by its excess hinge risk. Because the second statement is the one actually used downstream (Chapter 6's oracle inequality composes it with a bound on the excess hinge risk to bound the excess classification risk), it is the weakest stable form of the calibration claim and the natural target to keep in mind when judging whether a variant formalization is still faithful.
Significance
Zhang's inequality is the single fact that licenses every consistency and rate-of-convergence result for SVM classification in the rest of the book (flagged explicitly on p. 38: "we will show in Section 3.4 that the other margin-based losses ... are also reasonable surrogates," and reused directly, e.g., in Chapter 6's oracle inequality via its restatement as Theorem 6.24 in Chapter 6 of this series). Its role is entirely mechanical but load-bearing: every SVM consistency proof reduces to bounding an excess surrogate risk, and Theorem 2.31 is what converts that bound back into a statement about the classification error anyone actually cares about.
The result itself has been known since Zhang (2004) and Bartlett–Jordan–McAuliffe (2006) in more general form (arbitrary convex margin losses, with an explicit "-transform" relating excess risks); Theorem 2.31 is the closed-form hinge-loss instance, with the equality (not just an inequality) available because the hinge loss's clipped value is exactly linear in . No machine-checked proof of either the general or the hinge-specific statement is known to exist in a public Lean/Mathlib development at the time of writing (see prior-art search below); this mission asks for a formalization of the hinge-specific case exactly as the book states it.
Difficulty
The natural first attempt is to expand both risk differences directly as integrals over and compare integrands. This works for the equality (bounded ), because the hinge loss is piecewise linear in and the calculation collapses to the algebraic identity once is spelled out by cases on the sign of . It fails for the inequality on unbounded : neither risk difference has a closed algebraic form once is allowed to leave , and the excess classification risk itself is genuinely discontinuous in . The book's proof resolves this by clipping first (Lemma 2.23: clipping a convex loss at a minimizer's interval only decreases its risk) and observing the excess classification risk is invariant under clipping — this reduces the general case to the bounded case, at the cost of needing Lemma 2.23 as a genuine prerequisite rather than a routine remark. The remaining pointwise step (Lemma 2.30) is a case-by-case real-variable inequality with no probabilistic content of its own, but gets the boundary case (equivalently , where the book's sign convention is load-bearing) wrong if that convention is not tracked precisely.
Formalization scope
is an arbitrary measurable space; is fixed to throughout. A
loss is represented as a plain function Loss X := X → ℝ → ℝ → ℝ; nonnegativity and the
restriction of the middle argument to are supplied as explicit hypotheses at each use
site rather than built into the type, since only some lemmas of the chapter need them (Lemma 2.23
needs neither). risk/bayesRisk are ordinary real-valued Bochner integrals/infima, not
extended-real-valued as in the book; consequently every assertion that could otherwise degrade to
a vacuous 0 - 0 from a non-integrable loss carries an explicit Integrable hypothesis on the
relevant loss composed with — automatic in the book's own setting (bounded losses on a
probability space) but not implied by the Lean types alone. is
represented by its defining disintegration identity,
for every measurable , rather
than via a general regular-conditional-probability construction — a specific, checkable
representation of "the conditional probability of given " rather than a synonym for it.
A trivializing formalization would let or be an unconstrained hypothesis unconnected to and (making the goal a tautology about whatever function is supplied); this is ruled out here by deriving from by the book's own formula and constraining by the disintegration identity above, not taking either as a free unconstrained parameter.
Lemma 2.23, Lemma 2.30, L_class/L_hinge, risk/bayesRisk and CanBeClipped/clip are
reusable beyond this mission: Lemma 2.23 and the risk/Bayes-risk vocabulary recur throughout the
book (clippability is used again in Section 7.4 and, per this series' README, this chapter's
Theorem 2.31 itself is restated inside Chapter 6's oracle inequality). Contributions completing
the two milestone proofs and the goal's sorry are welcome; a from-scratch alternative proof
avoiding Lemma 2.23 (e.g. by a direct case analysis on outside ) would also be a
valid solution to the goal, since the milestones are the book's own attack path, not a required
lemma structure.
Selected references
- I. Steinwart & A. Christmann, Support Vector Machines, Springer, Information Science and Statistics, 2008. https://doi.org/10.1007/978-0-387-77242-4 (Chapter 2, pp. 21-47).
- T. Zhang, "Statistical behavior and consistency of classification methods based on convex risk minimization," Annals of Statistics 32(1), 2004, pp. 56-85. https://doi.org/10.1214/aos/1079120130
- P. L. Bartlett, M. I. Jordan & J. D. McAuliffe, "Convexity, classification, and risk bounds," Journal of the American Statistical Association 101(473), 2006, pp. 138-156. https://doi.org/10.1198/016214505000000907