Support Vector Machines IV: The Representer Theorem for Empirical SVM SolutionsTextbook
Motivation
Support vector machines (SVMs) are trained by solving a regularized empirical risk minimization problem over a reproducing kernel Hilbert space (RKHS) — a space that is typically infinite-dimensional. On its face, this looks computationally hopeless: how can a computer search an infinite-dimensional space for a minimizer? The representer theorem is the result that makes SVM training tractable at all: it shows that no matter how large the RKHS is, the minimizer of the SVM objective for a sample of size always lies in the -dimensional subspace spanned by the kernel evaluated at the sample points. This turns an infinite- dimensional optimization problem into a finite-dimensional one before a single line of an optimization algorithm is written, and it is the reason every practical SVM solver (from the original sequential minimal optimization algorithm onward) searches only over coefficients rather than over an abstract function space.
The theorem in this mission — Theorem 5.5 of Steinwart and Christmann, Support Vector Machines (Springer, 2008) — is stated for general convex losses and general kernels, subsuming the classification-SVM and regression-SVM special cases that appear throughout the machine learning literature. Its lineage traces to Kimeldorf and Wahba's 1971 representer theorem for spline-smoothing problems; the book's own version (attributed to a 1971 result, generalized here to arbitrary convex losses and RKHSs) is the general form used throughout the rest of the book.
Setting
Fix a nonempty set (the input space) and a loss function : a measurable map where is the cost of predicting label by value when the input is . is convex if is convex for every fixed .
A reproducing kernel Hilbert space (RKHS) over is a real Hilbert space of real-valued functions on that carries a kernel with two properties: for every , and the reproducing property holds for every and . Intuitively, lets you evaluate any at a point by taking an inner product with the fixed function — this is what makes a space of genuine, pointwise-evaluable functions rather than an abstract Hilbert space.
Given a finite sample , the empirical -risk of is . For a regularization parameter , the SVM training problem asks for a minimizer of the regularized empirical risk
over all of . A minimizer of this objective is called an empirical SVM solution .
Formalization targets
Goal — Theorem 5.5 (Representer theorem)
The theorem asserts both halves at once: the regularized empirical risk has a unique minimizer over the (possibly infinite-dimensional) , and that unique minimizer is representable as a finite linear combination of the kernel functions at the sample points. Neither the coefficients nor the finite-dimensional subspace they live in are fixed in advance by the statement; only their existence is asserted, so a stronger claim (e.g. uniqueness or an explicit formula for the ) would be a different, harder theorem not proved here.
Supporting milestones (the general, population-level analogue)
The book develops the representer theorem's existence-and-uniqueness clause by first proving it for the corresponding population problem — minimizing over a distribution rather than a finite sample — and then adapting the same two arguments to the empirical case:
- Lemma 5.1 (uniqueness): for a convex loss and an RKHS with for some , the regularized population risk has at most one minimizer over , for every .
- Theorem 5.2 (existence): for a convex, -integrable Nemitski loss and the RKHS of a bounded kernel, the regularized population risk has at least one minimizer, for every .
- Theorem 5.6 (non-triviality): under the same hypotheses as Theorem 5.2, if can beat the risk of the zero function (), then every minimizer is nonzero, for every .
Significance
The representer theorem is the single fact that turns kernel-based learning from a theoretical curiosity into a practical algorithm family: every popular SVM solver (SMO, coordinate descent, interior-point methods for the dual) is, at bottom, a method for finding the coefficients the theorem guarantees exist, not for searching directly. The representation also underlies the "kernel trick": since the objective and the solution both depend on only through inner products , an SVM can be trained and evaluated without ever computing with elements of explicitly, using only the Gram matrix of kernel values.
Formalizing this theorem means formalizing the existence-and-uniqueness argument (Lemma 5.1's strict-convexity computation for the midpoint of two hypothetical minimizers, together with the weak-compactness argument used for existence) and the orthogonal-projection argument for the representation clause (projecting any candidate minimizer onto the finite-dimensional span of the kernel functions at the sample points strictly improves — or leaves unchanged — both the norm term and the risk term, so an optimal solution can always be chosen inside that span). No part of this argument has a machine-checked Lean proof in Mathlib or elsewhere at the time of writing; only the underlying general-purpose tools (Hilbert-space projections, convexity of norms) are already in Mathlib.
Difficulty
The natural first idea for the representation clause is to try to exhibit the coefficients directly, e.g. by writing down the dual optimization problem and reading off its KKT multipliers. This is exactly backwards: the book's proof (and any faithful one) derives the representation before knowing anything about a dual problem, purely from the orthogonal decomposition of into the span of the sample's kernel functions and its orthogonal complement. The key insight — one that a solver who reaches for duality first will miss — is that projecting any onto leaves the empirical risk exactly unchanged (since only sees 's values at the sample points, and the reproducing property shows those values are unaffected by throwing away the component) while weakly decreasing the norm term, so the infimum over all of is already attained inside the finite-dimensional .
For the existence-and-uniqueness clause, the difficulty is genuinely functional-analytic rather than algorithmic: existence needs a compactness argument in a space with no compact balls (Theorem 5.2 gets around this via lower semicontinuity and boundedness of the sublevel set, not via any finite-dimensional trick), and uniqueness needs the parallelogram-law strict convexity of the Hilbert norm, not merely convexity of the loss.
Formalization scope
is represented as an arbitrary real Hilbert space together with an injective linear
evaluation map into (so that is genuinely realized as a space of functions,
not an abstract Hilbert space with no relation to ), and a kernel satisfying the
reproducing property with respect to that evaluation map (IsRKHSOfKernel). This is an
equivalent, operative rendering of " is the RKHS of the kernel " (Definition 4.18 together
with Lemma 4.19 of the book), chosen because it is exactly the form the chapter's own proofs use;
it is restated inside this chunk's own InfiniteSample sub-namespace rather than imported from
the Kernels chapter's mission, since drafts in this series cannot import one another.
The population risk is formalized as a lower Lebesgue integral into
(ENNReal), which is always well-defined for a nonnegative integrand with no integrability
hypothesis — matching the book's own remark that "the integral always exists, although it is not
necessarily finite." The empirical risk , by contrast, is a manifestly finite average
over the sample points and is formalized as an ordinary real number. The sample size is
required positive (), matching the book's implicit convention that the empirical measure
presupposes a nonempty sample.
A trivializing formalization of the representer theorem would state only the representation
clause while assuming the existence of "the"
solution as a hypothesis; this begs the question, since the book's own proof
establishes existence and uniqueness as part of the theorem, not as a standing assumption. This
mission's goal keeps both clauses bundled into one ∃! statement for exactly this reason.
The infrastructure needed — a general convex loss, a Nemitski-loss integrability condition, and the RKHS/reproducing-kernel bundle — is restated locally here and is reusable, with the same caveat about not being importable across this series' independently drafted chapters, by any later mission (e.g. this book's own Chapters 6, 8 and 9) that needs the same objects. Contributed proofs are welcome for either the existence/uniqueness argument (Lemma 5.1/Theorem 5.2's techniques) or the orthogonal-projection representation argument; the two are largely independent and could be solved separately.
Selected references
- I. Steinwart and A. Christmann, Support Vector Machines, Springer Series in Information Science and Statistics, Springer, 2008. https://doi.org/10.1007/978-0-387-77242-4
- G. Kimeldorf and G. Wahba, "Some results on Tchebycheffian spline functions," Journal of Mathematical Analysis and Applications, 33(1):82–95, 1971. https://doi.org/10.1016/0022-247X(71)90184-3
- B. Schölkopf, R. Herbrich, and A. J. Smola, "A generalized representer theorem," in Computational Learning Theory (COLT 2001), Lecture Notes in Computer Science, vol. 2111, Springer, 2001, pp. 416–426. https://doi.org/10.1007/3-540-44581-1_27