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

Reproducing Kernel Hilbert Spaces (RKHS)

Every positive definite kernel defines a Hilbert space of functions, its RKHS, in which evaluating a function is an inner product with the kernel: f(x) = ⟨f, k(x, ·)⟩. The RKHS norm measures how 'rough' a function is relative to the kernel, and it is the regularizer behind SVMs, kernel ridge regression and Gaussian processes. This topic builds the RKHS from kernel sections, proves the reproducing property and the Moore–Aronszajn theorem, identifies concrete RKHSs (the Brownian kernel's RKHS is a Sobolev space with norm ∫f′²), and in the research exercise tests whether functions belong to an RKHS by watching their interpolants' norms grow.

Level 0: Foundation

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

A space of functions with a built-in ruler

A kernel doesn’t just compare points. It also defines a whole family of functions, built by placing little kernel bumps at points and adding them up, together with a way to measure each function’s size. In that family, the size is a “roughness score”: a function that wiggles in ways the kernel finds unnatural gets a big score. Learning algorithms then prefer functions that fit the data while keeping that score small, which is the mathematical version of Occam’s razor.

The RKHS norm measures roughness
kernel: target:
squared RKHS norm ‖f‖² = αᵀKα = 4.282 (∫f′² = 4.290 for the true sin 3x) · training MSE 6.5e-32
Dashed: the target; orange: f = Σαᵢk(xᵢ, ·). For the Brownian kernel the RKHS is the Sobolev space with f(0) = 0 and ‖f‖² = ∫f′², so the norm literally measures steepness. Increase m: for sin 3x the norm converges (the function is in the RKHS); for √x it creeps up like (ln m)/4; for a step it grows like m; for noisy data it explodes like m², because interpolating noise is infinitely rough. Raising λ trades fit for a small norm, which is kernel ridge regression.
Why engineers care

“Fit the data but keep the RKHS norm small” is what SVMs, kernel ridge regression, smoothing splines and Gaussian-process regression all do. Choosing the kernel is choosing what “smooth” means for your problem: smooth wind-field estimates for a drone, a smooth friction model for a rover wheel, a periodic model for orbital data.

📝 Quick check (Level 0)
0/3 answered
  1. 1. Functions in an RKHS are built from…
  2. 2. A large RKHS norm means the function is…
  3. 3. Kernel methods prefer functions that…

Level 1: Beginner

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

Building the space

Start with finite combinations f=∑iαik(xi,⋅)f = \sum_i\alpha_ik(x_i, \cdot) and define

⟨∑iαik(xi,⋅),∑jβjk(zj,⋅)⟩=∑i,jαiβjk(xi,zj)=α⊤Kβ.\Big\langle\sum_i\alpha_ik(x_i, \cdot), \sum_j\beta_jk(z_j, \cdot)\Big\rangle = \sum_{i,j}\alpha_i\beta_jk(x_i, z_j) = \alpha^\top K\beta.

Positive definiteness makes this a genuine inner product. Completing the space gives the RKHS Hk\mathcal H_k.

The reproducing property

f(x)=⟨f,k(x,⋅)⟩Handk(x,z)=⟨k(x,⋅),k(z,⋅)⟩.f(x) = \langle f, k(x, \cdot)\rangle_{\mathcal H}\quad\text{and}\quad k(x, z) = \langle k(x, \cdot), k(z, \cdot)\rangle.

So φ(x)=k(x,⋅)\varphi(x) = k(x, \cdot) is a canonical feature map.

Consequences

  • ∥f∥2=α⊤Kα\|f\|^2 = \alpha^\top K\alpha for finite combinations.
  • Evaluation is bounded: ∣f(x)∣≤∥f∥k(x,x)|f(x)|\le\|f\|\sqrt{k(x, x)}.
  • Continuity: ∣f(x)−f(z)∣≤∥f∥ ∥k(x,⋅)−k(z,⋅)∥|f(x) - f(z)|\le\|f\|\,\|k(x, \cdot) - k(z, \cdot)\|.

Functions with small norm can’t change fast where the kernel says points are similar.

📝 Quick check (Level 1)
0/3 answered
  1. 1. ‖Σαᵢk(xᵢ, ·)‖² equals…
  2. 2. With an RBF kernel (k(x, x) = 1) and ‖f‖ = 3, |f(x)| is at most…
  3. 3. The reproducing property says f(x) = …

Level 2: Intermediate

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

Concrete RKHSs

  • Linear kernel x⋅zx\cdot z: the linear functions f(x)=w⋅xf(x) = w\cdot x with ∥f∥=∥w∥\|f\| = \|w\|.
  • Brownian kernel min⁡(x,z)\min(x, z) on [0, 1]: the functions with f(0) = 0 and f′∈L2f'\in L^2, with ∥f∥2=∫01f′(t)2 dt\|f\|^2 = \int_0^1f'(t)^2\,dt (a Sobolev space). Check: ⟨f,min⁡(x,⋅)⟩=∫0xf′=f(x)\langle f, \min(x, \cdot)\rangle = \int_0^xf' = f(x).
  • Gaussian (RBF): very smooth (analytic) functions. Long length-scales make high-frequency functions extremely expensive.
  • Via Mercer: H={∑cjϕj:∑cj2/λj<∞}\mathcal H = \{\sum c_j\phi_j : \sum c_j^2/\lambda_j\lt\infty\}. Components along small-eigenvalue directions cost a lot.

The minimum-norm interpolant

Among all functions in H\mathcal H through (xi,yi)(x_i, y_i), the one with the smallest norm is f=∑αik(xi,⋅)f = \sum\alpha_ik(x_i, \cdot) with α=K−1y\alpha = K^{-1}y, and ∥f∥2=y⊤K−1y\|f\|^2 = y^\top K^{-1}y. For the Brownian kernel this is the piecewise-linear interpolant through (0, 0).

🐍 Exercise 1: computing in an RKHS
Implement RKHS functions as kernel combinations with their inner product, verify the reproducing property, the evaluation bound and the continuity bound, and compare the norm of a wiggly function's interpolant under RBF kernels with different length-scales.
📝 Quick check (Level 2)
0/3 answered
  1. 1. The Brownian kernel's RKHS norm is…
  2. 2. The minimum-norm interpolant's coefficients are…
  3. 3. In the Mercer view, a component along φⱼ costs…

Level 3: Advanced

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

Moore–Aronszajn

Theorem. Every PSD kernel k has a unique Hilbert space of functions in which k(x,⋅)∈Hk(x, \cdot)\in\mathcal H and the reproducing property holds. Conversely, every Hilbert space of functions with bounded evaluation functionals has a unique reproducing kernel.

Proof sketch. The converse: f↦f(x)f\mapsto f(x) is bounded, so by Riesz there is kxk_x with f(x)=⟨f,kx⟩f(x) = \langle f, k_x\rangle; set k(x,z)=⟨kx,kz⟩k(x, z) = \langle k_x, k_z\rangle, which is PSD. Existence: complete the pre-Hilbert space of finite combinations. Cauchy sequences converge pointwise, because ∣fn(x)−fm(x)∣≤∥fn−fm∥k(x,x)|f_n(x) - f_m(x)|\le\|f_n - f_m\|\sqrt{k(x, x)}, so the completion is a space of functions. ∎

Why L² is not an RKHS

Point evaluation isn’t even defined on L2L^2 (functions are equivalence classes), and no bounded evaluation functional exists. RKHSs are exactly the spaces where “the value at x” is a continuous operation, which is what learning from point samples needs.

Norm growth as a membership test

If f is in H\mathcal H, the minimum-norm interpolants of f on denser and denser data have norms increasing to ∥f∥2\|f\|^2. If f is not in H\mathcal H, they diverge.

📝 Quick check (Level 3)
0/3 answered
  1. 1. Moore–Aronszajn pairs PSD kernels with…
  2. 2. L² is not an RKHS because…
  3. 3. If f is in H, interpolant norms on denser data…

Level 4: Expert

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

RKHS norms, measured

Exercise 1. The reproducing property holds to 10⁻¹², and |f(x)| ≤ ‖f‖ for an RBF kernel. The worst continuity ratio is 0.50, within the bound of 1. Interpolating sin(6πx) at 25 points costs ‖f‖ = 2.5 with ℓ = 0.05, 3.9 with ℓ = 0.1 and 42 with ℓ = 0.2. A long-length-scale kernel considers fast oscillation very unnatural.

Exercise 2 (Brownian kernel, grid x = j/m). The kernel formula αᵀKα matches the closed form Σ(Δy)²/Δx to 10⁻⁸. As m goes from 10 to 640:

  • sin 3x: ‖f‖² rises from 4.255 to 4.2904, which equals ∫f′² = 4.2904. It is in the RKHS.
  • √x: 1.57 to 2.61, gaining ln 4 / 4 ≈ 0.347 each time m quadruples (∫1/(4x) diverges). It is not in the RKHS.
  • Step: ‖f‖² = m exactly.
  • sin 3x + noise (σ = 0.05): 4.0 to 1976 ≈ 2σ²m².
🐍 Exercise 2 (research): who lives in the Sobolev RKHS?
For the Brownian kernel min(x, y), verify that the interpolant's RKHS norm equals Σ(Δy)²/Δx, then track the norm of interpolants on denser grids for sin 3x, √x, a step and noisy data, and decide which belong to the RKHS.

RKHS in AI, robotics and aerospace

  • Smoothing splines and GP regression for trajectory and sensor-drift estimation: the cubic spline is the minimum-norm interpolant in a second-order Sobolev RKHS.
  • Kernel-based safety (GP-based control barrier functions): bounds use ‖f‖ to certify the worst-case model error.
  • Kernel mean embeddings and MMD for comparing distributions, for example sim-to-real gaps.
  • Koopman and kernel EDMD for learning dynamics of nonlinear systems.

References

  1. N. Aronszajn (1950). “Theory of reproducing kernels.” Transactions of the American Mathematical Society, 68.
  2. A. Berlinet, C. Thomas-Agnan (2004). Reproducing Kernel Hilbert Spaces in Probability and Statistics. Springer.
  3. G. Wahba (1990). Spline Models for Observational Data. SIAM.
  4. V. I. Paulsen, M. Raghupathi (2016). An Introduction to the Theory of Reproducing Kernel Hilbert Spaces. Cambridge University Press.
  5. F. Berkenkamp, M. Turchetta, A. P. Schoellig, A. Krause (2017). “Safe model-based reinforcement learning with stability guarantees.” NeurIPS.