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 n always lies in the n-dimensional
subspace spanned by the kernel evaluated at the n 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 n 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 X (the input space) and a loss function L:X×R×R→[0,∞): a measurable map where L(x,y,t) is the cost of predicting label y
by value t when the input is x. L is convex if L(x,y,⋅) is convex for every fixed
x,y.
A reproducing kernel Hilbert space (RKHS) over X is a real Hilbert space H of
real-valued functions on X that carries a kernel k:X×X→R with two
properties: k(⋅,x)∈H for every x∈X, and the reproducing property
f(x)=⟨f,k(⋅,x)⟩H holds for every f∈H and x∈X. Intuitively, k
lets you evaluate any f∈H at a point x by taking an inner product with the fixed function
k(⋅,x) — this is what makes H a space of genuine, pointwise-evaluable functions rather
than an abstract Hilbert space.
Given a finite sample D:=((x1,y1),…,(xn,yn))∈(X×R)n, the
empirical L-risk of f:X→R is RL,D(f):=n1∑i=1nL(xi,yi,f(xi)). For a regularization parameter λ>0, the SVM training problem asks
for a minimizer of the regularized empirical risk
f↦λ∥f∥H2+RL,D(f)
over all of H. A minimizer of this objective is called an empirical SVM solution
fD,λ.
Formalization targets
Goal — Theorem 5.5 (Representer theorem)
∃!fD,λ∈H:λ∥fD,λ∥H2+RL,D(fD,λ)=f∈Hmin(λ∥f∥H2+RL,D(f)),fD,λ(x)=i=1∑nαik(x,xi) for some α1,…,αn∈R.
The theorem asserts both halves at once: the regularized empirical risk has a unique minimizer
over the (possibly infinite-dimensional) H, and that unique minimizer is representable as a
finite linear combination of the kernel functions at the sample points. Neither the coefficients
αi 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 αi) 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 f↦λ∥f∥H2+RL,P(f) over a distribution P 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 H with RL,P(f)<∞ for
some f∈H, the regularized population risk has at most one minimizer over H, for every
λ>0.
- Theorem 5.2 (existence): for a convex, P-integrable Nemitski loss and the RKHS of a
bounded kernel, the regularized population risk has at least one minimizer, for every
λ>0.
- Theorem 5.6 (non-triviality): under the same hypotheses as Theorem 5.2, if H can beat the
risk of the zero function (inff∈HRL,P(f)<RL,P(0)), then every minimizer is
nonzero, for every λ>0.
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 n coefficients
α1,…,αn the theorem guarantees exist, not for searching H directly. The
representation also underlies the "kernel trick": since the objective and the solution both
depend on H only through inner products ⟨k(⋅,xi),k(⋅,xj)⟩H=k(xi,xj), an SVM can be trained and evaluated without ever computing with elements of H
explicitly, using only the n×n 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
αi 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 H=H∣X′⊕H∣X′⊥ of H into the span H∣X′ 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 f∈H onto H∣X′ leaves the
empirical risk exactly unchanged (since RL,D only sees f's values at the sample points,
and the reproducing property shows those values are unaffected by throwing away the
H∣X′⊥ component) while weakly decreasing the norm term, so the infimum over all of H
is already attained inside the finite-dimensional H∣X′.
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
H is represented as an arbitrary real Hilbert space together with an injective linear
evaluation map into X→R (so that H is genuinely realized as a space of functions,
not an abstract Hilbert space with no relation to X), and a kernel k satisfying the
reproducing property with respect to that evaluation map (IsRKHSOfKernel). This is an
equivalent, operative rendering of "H is the RKHS of the kernel k" (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 RL,P is formalized as a lower Lebesgue integral into [0,∞]
(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 RL,D, by contrast, is a manifestly finite average
over the n sample points and is formalized as an ordinary real number. The sample size n is
required positive (n≥1), matching the book's implicit convention that the empirical measure
Dˉ:=n1∑iδ(xi,yi) presupposes a nonempty sample.
A trivializing formalization of the representer theorem would state only the representation
clause fD,λ(x)=∑iαik(x,xi) while assuming the existence of "the"
solution fD,λ 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