Foundation reference

Reproducing Kernel Hilbert Spaces

A reproducing kernel Hilbert space is a space of functions in which evaluating a function at a point x is an inner product with the kernel centered at x. Support vector machines, kernel ridge regression and Gaussian-process regression all fit predictors that are finite combinations of kernels centered on the training points (for Gaussian-process regression, the posterior mean), plus any explicit intercept or prior mean. The coefficients are computed from the n × n matrix of kernel values on the training data (Schölkopf & Smola, 2002).

Concept 71 of 100TheoryStudy phase 10
Key equation
f(x)=⟨f,k(x,⋅)⟩Hf(x) = \langle f, k(x, \cdot) \rangle_{\mathcal{H}}
Reading map and next steps

Study guide

Where to start

Concept 71 of 100Reproducing KernelsTheory · Study phase 10: Mathematical foundations & information geometry
Question

How can the Gaussian kernel correspond to an infinite-dimensional feature space when every computation uses only a finite matrix of kernel values?

How to study this pagePredict · Check · Generalize · Continue
PredictSay what you expect.

Pick a concrete input and say what the equation should give before you read the math.

CheckCheck against the math and the papers.

Work through the math, then read the cited papers for the original argument.

GeneralizeName what stays the same.

Identify the part of the idea that survives a change of notation or model, so you can recognize it in another paper or system.

ContinueFollow the connections.

Use the prerequisites and related concepts at the end of the page to fill the next gap.

Why It Matters for Modern Models

  • A reproducing kernel Hilbert space is a space of functions in which evaluating a function at a point x is an inner product with the kernel centered at x. Support vector machines, kernel ridge regression and Gaussian-process regression all fit predictors that are finite combinations of kernels centered on the training points (for Gaussian-process regression, the posterior mean), plus any explicit intercept or prior mean. The coefficients are computed from the n × n matrix of kernel values on the training data (Schölkopf & Smola, 2002).
  • It explains why a similarity function used as a kernel must be symmetric and positive semidefinite: those are exactly the conditions under which it is an inner product in some feature space.
  • In the infinite-width limit, a network trained by gradient descent behaves like kernel regression with the neural tangent kernel, so RKHS tools describe that limit (Jacot, Gabriel & Hongler, 2018).

Questions to Think About

  • Why is positive semidefiniteness exactly the condition for a function k(x, x′) to be an inner product of some feature map?
  • Attention can be read as a kernel smoother over tokens, with weights proportional to exp(qᵀk/√d); why is that kernel generally not symmetric, and so not a reproducing kernel in the strict sense (Tsai et al., 2019)?

Core Math

Key Equation
f(x)=⟨f,k(x,⋅)⟩Hf(x) = \langle f, k(x, \cdot) \rangle_{\mathcal{H}}

A reproducing kernel Hilbert space H\mathcal{H} is a space of functions in which evaluating a function at a point is an inner product with a fixed function k(x,⋅)k(x, \cdot), the kernel centred at xx:

f(x)=⟨f,k(x,⋅)⟩Hfor all f∈Hf(x) = \langle f, k(x, \cdot) \rangle_{\mathcal{H}} \quad \text{for all } f \in \mathcal{H}

This is the reproducing property. Every symmetric, positive semidefinite kernel kk defines exactly one such space (the Moore–Aronszajn theorem; Aronszajn, 1950).

Kernel trick. The kernel is an inner product of feature vectors, k(x,x′)=⟨φ(x),φ(x′)⟩k(x, x') = \langle \varphi(x), \varphi(x') \rangle, so an algorithm that uses only inner products can work in a very high- or infinite-dimensional feature space while computing only kernel values.

Mercer decomposition. A continuous kernel on a compact domain has an expansion in eigenfunctions eme_m with non-negative eigenvalues λm\lambda_m:

k(x,x′)=∑m=1∞λmem(x)em(x′)k(x, x') = \sum_{m=1}^\infty \lambda_m e_m(x) e_m(x')

Representer theorem. If the training objective is a loss on the training points plus an increasing function of ∥f∥H\|f\|_{\mathcal{H}}, a minimizer is a combination of kernels centred at the nn training points (Schölkopf & Smola, 2002):

f∗(x)=∑i=1nαik(xi,x)f^*(x) = \sum_{i=1}^n \alpha_i k(x_i, x)

Key Papers and Books

Kernel Methods for Pattern Analysis

Shawe-Taylor & Cristianini2004Cambridge University Press
View book →

Neural Tangent Kernel: Convergence and Generalization in Neural Networks

Jacot, Gabriel & Hongler2018NeurIPS
Read paper →

Theory of Reproducing Kernels

Aronszajn1950Transactions of the American Mathematical Society
Read paper →

Learning with Kernels

Schölkopf & Smola2002MIT Press (textbook)
View book →

Transformer Dissection: A Unified Understanding of Transformer's Attention via the Lens of Kernel

Tsai et al.2019EMNLP
Read paper →

Connections

Prerequisites