Kernels: The Representer Theorem and the Curse of Dimensionality
The representer theorem guarantees that the solution to a regularised loss minimisation lies in the span of the training data's kernel evaluations. The curse of dimensionality explains why high-dimensional spaces require exponentially more data.
Kernels as Similarity Functions
A kernel function is a similarity function between two inputs. A kernelised classifier computes a weighted sum of similarities between a new input and the training points:
Instead of learning a weight vector in the input space, the classifier learns weights over training examples. The kernel handles the nonlinear transformation implicitly.
This is the basis of kernel methods: learning algorithms that compose non-trivial representations through pairwise similarity, rather than explicit feature engineering.
The Representer Theorem
For a regularised loss minimisation problem:
where , the representer theorem states that the optimal solution has the form:
The solution lies entirely in the span of the training data’s feature representations. This means we never need to compute explicitly. Substituting back:
The optimisation over (potentially infinite-dimensional) reduces to an optimisation over (finite, one per training point).
The Gaussian Distribution and Maximum Entropy
The -dimensional Gaussian is:
The Gaussian is the distribution that maximises entropy subject to fixed mean and covariance. This makes it the natural choice for Parzen window density estimation and Gaussian process kernels.
For Parzen window estimation (kernel density estimation), the density at a new point is estimated as:
where is a kernel function (often Gaussian). The bandwidth controls the smoothness of the estimate.
The Curse of Dimensionality
The curse of dimensionality refers to the phenomenon where the number of data points required to cover a space grows exponentially with dimensionality.
In dimensions:
- Volume grows as .
- To maintain constant data density, the number of points must grow as .
- For , covering the space requires times more points than in .
Consequences for machine learning:
- Distance metrics become less meaningful: all points become approximately equidistant in high dimensions.
- Kernel methods that rely on local similarity (Gaussian kernel) break down as the notion of “nearby” loses meaning.
- Models need exponentially more data to generalise.
This is not always a problem: data may lie on a low-dimensional manifold embedded in high-dimensional space. Methods that exploit this (dimensionality reduction, manifold learning) can recover useful structure.
Polynomial Kernel and Feature Spaces
The polynomial kernel corresponds to a feature space containing all monomials of degree up to . For two 2-dimensional inputs with :
expands to include terms like , and cross-terms. The feature space grows polynomially with degree, but the kernel evaluation remains .
The Gaussian kernel corresponds to an infinite-degree polynomial kernel, which is why it can represent arbitrarily complex boundaries.