Foundations to Frontier
Tests
B. Statistical Learning Theory › B3 Kernel methods

The Representer Theorem

Optimizing over an infinite-dimensional RKHS sounds hopeless, but for any loss that depends on the data only through f(x₁), …, f(x_m), plus an increasing function of the RKHS norm, the minimizer is a finite combination f = Σ cᵢ k(xᵢ, ·). This topic proves the representer theorem by orthogonal decomposition, shows how it turns kernel ridge regression, SVMs and kernel logistic regression into m-dimensional problems, explains why the hinge loss gives sparse solutions (support vectors), and shows how the theorem fails for non-Hilbert penalties like L1. The research exercise solves a kernel SVM by dual coordinate ascent and compares its sparsity with kernel logistic regression.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Infinite choices, finite answer

You’re asked to draw the “best” smooth curve through some data points, choosing from infinitely many possible curves. The representer theorem says you don’t need to search that whole infinite space: the best curve is always built from one kernel bump centred on each data point, and all you choose is how tall each bump is. A thousand data points means a thousand numbers to find, never more.

Representer theorem: one coefficient per training point
loss:
12 of 80 coefficients non-zero (15%) · training accuracy 100.0%
The function lives in an infinite-dimensional RKHS, yet the optimum is always a combination of the 80 kernel bumps at the training points, so the problem shrinks to 80 unknowns. The loss decides how many are used: the hinge loss is flat beyond the margin, so well-classified points get exactly zero (only outlined support vectors remain, on or inside the pale margin band |f| < 1); squared and logistic losses are never flat, so every point keeps some weight.
Why engineers care

The theorem is why kernel methods are implementable at all, and it tells you their cost: one coefficient per training sample. That is great for 500 terrain samples and painful for 5 million. It also explains why SVMs only need to store support vectors, which keeps onboard classifiers small.

📝 Quick check (Level 0)
0/3 answered
  1. 1. The representer theorem says the best function is…
  2. 2. With 1000 training points, the number of coefficients is…
  3. 3. SVMs often store only…

Level 1: Beginner

★★☆☆☆ Basic⏱ 25 minSecondary-school mathematics: arithmetic and elementary algebra.

Statement

Let H\mathcal H be an RKHS with kernel k, let L be any loss of the values (f(x1),…,f(xm))(f(x_1), \dots, f(x_m)), and let Ω be strictly increasing. Then every minimizer of

L(f(x1),…,f(xm))+Ω(∥f∥H)L\big(f(x_1), \dots, f(x_m)\big) + \Omega(\|f\|_{\mathcal H})

has the form f⋆=∑i=1mcik(xi,⋅)f^\star = \sum_{i=1}^mc_ik(x_i, \cdot).

What it buys

Plug in f=∑cjk(xj,⋅)f = \sum c_jk(x_j, \cdot): then f(xi)=(Kc)if(x_i) = (Kc)_i and ∥f∥2=c⊤Kc\|f\|^2 = c^\top Kc, an m-dimensional problem.

  • Kernel ridge regression: 1m∥Kc−y∥2+λc⊤Kc\tfrac1m\|Kc - y\|^2 + \lambda c^\top Kc gives c=(K+λmI)−1yc = (K + \lambda mI)^{-1}y.
  • SVM: hinge loss gives a quadratic program in c (via its dual).
  • Kernel logistic regression: a smooth convex problem in c.
📝 Quick check (Level 1)
0/3 answered
  1. 1. In the reduced problem, f(xᵢ) equals…
  2. 2. Kernel ridge coefficients for K = I, λ = 0.5, m = 2, y = (1, 2):
  3. 3. The regularizer must be…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.

Proof

Let V=span{k(xi,⋅)}V = \mathrm{span}\{k(x_i, \cdot)\} and write f=fV+f⊥f = f_V + f_\perp. By the reproducing property, f⊥(xi)=⟨f⊥,k(xi,⋅)⟩=0f_\perp(x_i) = \langle f_\perp, k(x_i, \cdot)\rangle = 0, so the loss only sees fVf_V. Meanwhile ∥f∥2=∥fV∥2+∥f⊥∥2\|f\|^2 = \|f_V\|^2 + \|f_\perp\|^2, so dropping f⊥f_\perp never increases Ω and strictly decreases it if f⊥≠0f_\perp\ne0. ∎

Primal and dual views

With an explicit feature map Φ (m × D), ridge regression’s primal solution w=(Φ⊤Φ+λmI)−1Φ⊤yw = (\Phi^\top\Phi + \lambda mI)^{-1}\Phi^\top y equals Φ⊤(ΦΦ⊤+λmI)−1y\Phi^\top(\Phi\Phi^\top + \lambda mI)^{-1}y. That is a D×D solve versus an m×m one. Pick whichever dimension is smaller.

Where it fails

The proof needs a Hilbert-norm penalty. With an L1 penalty λ∥w∥1\lambda\|w\|_1 on explicit features, the solution is sparse in features, not in the span of the data, and the representer form is lost.

🐍 Exercise 1: the solution lives in the span of the data
With a 200-dimensional explicit feature map and 20 data points, check that primal ridge equals Φᵀα from the dual, that L2-regularized logistic regression converges into the 20-dimensional span even from a random start, and that an L1 penalty breaks this.
📝 Quick check (Level 2)
0/3 answered
  1. 1. In the proof, f⊥ is invisible to the loss because…
  2. 2. Primal ridge needs a D×D solve, dual needs…
  3. 3. An L1 penalty on features…

Level 3: Advanced

★★★★☆ Advanced⏱ 35 minGraduate level, with full derivations and proofs.

The SVM dual and sparsity

The (bias-free) kernel SVM 1m∑max⁡(0,1−yif(xi))+λ∥f∥2\tfrac1m\sum\max(0, 1 - y_if(x_i)) + \lambda\|f\|^2 has dual

max⁡0≤α≤C ∑iαi−12∑i,jαiαjyiyjKij,C=12λm,\max_{0\le\alpha\le C}\ \sum_i\alpha_i - \tfrac12\sum_{i,j}\alpha_i\alpha_jy_iy_jK_{ij},\qquad C = \tfrac1{2\lambda m},

with ci=αiyic_i = \alpha_iy_i. Complementary slackness forces αi=0\alpha_i = 0 whenever yif(xi)>1y_if(x_i)\gt1. Points outside the margin drop out, and the rest are support vectors. Smooth losses (squared, logistic) never vanish, so every cᵢ ≠ 0.

Generalized forms

  • Semi-parametric: f=g+∑jbjψjf = g + \sum_jb_j\psi_j with an unpenalized bias or trend term. Then g⋆g^\star is still in the span.
  • Multi-output and operator-valued kernels: the same argument with vector coefficients.
📝 Quick check (Level 3)
0/3 answered
  1. 1. SVM coefficients vanish for points with…
  2. 2. The relation between C and λ (bias-free form) is…
  3. 3. Kernel logistic regression's coefficients are…

Level 4: Expert

★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.

Representer theorem, measured

Exercise 1 (20 points, 200 random-cosine features). Primal ridge and Φᵀα agree to 2 × 10⁻¹⁴ (round-off, so it differs slightly by platform), so 20 numbers describe the 200-dimensional solution. Starting logistic regression (λ = 0.01) from a random w, 98% of whose norm lies outside the data span, gradient descent ends with only 3 × 10⁻¹³ outside. That is the minimizer, not an artefact of starting at zero. With an L1 penalty, 25% of the solution’s norm lies outside the span (101 of 200 weights non-zero).

Exercise 2 (moons, 200 points, RBF γ = 2). Dual coordinate ascent reaches KKT violation 6 × 10⁻⁷. The SVM keeps 55.5%, 19.5% and 9.5% of the points as support vectors for C = 0.1, 1 and 10 (test accuracy 0.967, 0.988, 0.987), while kernel logistic regression uses 100% of them (accuracy 0.986). Similar accuracy, very different model size.

🐍 Exercise 2 (research): sparse vs dense kernel machines
Solve the bias-free kernel SVM by dual coordinate ascent and check KKT, then compare the fraction of non-zero coefficients and test accuracy across C with kernel logistic regression solved by Newton's method in the representer coefficients.

The representer theorem in AI, robotics and aerospace

  • Onboard SVMs (terrain, fault classification): only support vectors are stored and evaluated.
  • GP posterior means are representer-form functions: the prediction is a weighted sum of kernels at the data.
  • Kernel-based system identification (stable spline kernels) for estimating impulse responses.
  • Scaling: Nyström and inducing points restrict the coefficients to a subset of centres.

References

  1. G. Kimeldorf, G. Wahba (1971). “Some results on Tchebycheffian spline functions.” Journal of Mathematical Analysis and Applications, 33.
  2. B. Schölkopf, R. Herbrich, A. J. Smola (2001). “A generalized representer theorem.” COLT.
  3. C. Cortes, V. Vapnik (1995). “Support-vector networks.” Machine Learning, 20.
  4. C.-J. Hsieh, K.-W. Chang, C.-J. Lin, S. S. Keerthi, S. Sundararajan (2008). “A dual coordinate descent method for large-scale linear SVM.” ICML.
  5. J. Zhu, T. Hastie (2005). “Kernel logistic regression and the import vector machine.” Journal of Computational and Graphical Statistics, 14.