Reproducing kernel Hilbert space
In functional analysis (a branch of mathematics), a reproducing kernel Hilbert space (RKHS) is a Hilbert space of functions in which point evaluation is a continuous linear functional. Roughly speaking, this means that if two functions [math]\displaystyle{ f }[/math] and [math]\displaystyle{ g }[/math] in the RKHS are close in norm, i.e., [math]\displaystyle{ \|f-g\| }[/math] is small, then [math]\displaystyle{ f }[/math] and [math]\displaystyle{ g }[/math] are also pointwise close, i.e., [math]\displaystyle{ |f(x)-g(x)| }[/math] is small for all [math]\displaystyle{ x }[/math]. The converse does not need to be true. Informally, this can be shown by looking at the supremum norm: the sequence of functions [math]\displaystyle{ \sin^n (x) }[/math] converges pointwise, but do not converge uniformly i.e. do not converge with respect to the supremum norm (this is not a counterexample because the supremum norm does not arise from any inner product due to not satisfying the parallelogram law).
It is not entirely straightforward to construct a Hilbert space of functions which is not an RKHS.[1] Some examples, however, have been found.[2][3]
L2 spaces are not Hilbert spaces of functions (and hence not RKHSs), but rather Hilbert spaces of equivalence classes of functions (for example, the functions [math]\displaystyle{ f }[/math] and [math]\displaystyle{ g }[/math] defined by [math]\displaystyle{ f(x)=0 }[/math] and [math]\displaystyle{ g(x)=1_{\mathbb{Q}} }[/math] are equivalent in L2). However, there are RKHSs in which the norm is an L2-norm, such as the space of band-limited functions (see the example below).
An RKHS is associated with a kernel that reproduces every function in the space in the sense that for every [math]\displaystyle{ x }[/math] in the set on which the functions are defined, "evaluation at [math]\displaystyle{ x }[/math]" can be performed by taking an inner product with a function determined by the kernel. Such a reproducing kernel exists if and only if every evaluation functional is continuous.
The reproducing kernel was first introduced in the 1907 work of Stanisław Zaremba concerning boundary value problems for harmonic and biharmonic functions. James Mercer simultaneously examined functions which satisfy the reproducing property in the theory of integral equations. The idea of the reproducing kernel remained untouched for nearly twenty years until it appeared in the dissertations of Gábor Szegő, Stefan Bergman, and Salomon Bochner. The subject was eventually systematically developed in the early 1950s by Nachman Aronszajn and Stefan Bergman.[4]
These spaces have wide applications, including complex analysis, harmonic analysis, and quantum mechanics. Reproducing kernel Hilbert spaces are particularly important in the field of statistical learning theory because of the celebrated representer theorem which states that every function in an RKHS that minimises an empirical risk functional can be written as a linear combination of the kernel function evaluated at the training points. This is a practically useful result as it effectively simplifies the empirical risk minimization problem from an infinite dimensional to a finite dimensional optimization problem.
For ease of understanding, we provide the framework for real-valued Hilbert spaces. The theory can be easily extended to spaces of complex-valued functions and hence include the many important examples of reproducing kernel Hilbert spaces that are spaces of analytic functions.[5]
Definition
Let [math]\displaystyle{ X }[/math] be an arbitrary set and [math]\displaystyle{ H }[/math] a Hilbert space of real-valued functions on [math]\displaystyle{ X }[/math], equipped with pointwise addition and pointwise scalar multiplication. The evaluation functional over the Hilbert space of functions [math]\displaystyle{ H }[/math] is a linear functional that evaluates each function at a point [math]\displaystyle{ x }[/math],
- [math]\displaystyle{ L_{x} : f \mapsto f(x) \text{ } \forall f \in H. }[/math]
We say that H is a reproducing kernel Hilbert space if, for all [math]\displaystyle{ x }[/math] in [math]\displaystyle{ X }[/math], [math]\displaystyle{ L_x }[/math] is continuous at every [math]\displaystyle{ f }[/math] in [math]\displaystyle{ H }[/math] or, equivalently, if [math]\displaystyle{ L_x }[/math] is a bounded operator on [math]\displaystyle{ H }[/math], i.e. there exists some [math]\displaystyle{ M_x\gt 0 }[/math] such that
-
[math]\displaystyle{ |L_x(f)| := |f(x)| \le M_x\, \|f\|_H \qquad \forall f \in H. \, }[/math]
(
)
Although [math]\displaystyle{ M_x\lt \infty }[/math] is assumed for all [math]\displaystyle{ x\in X }[/math], it might still be the case that [math]\displaystyle{ \sup_x M_x = \infty }[/math].
While property (1) is the weakest condition that ensures both the existence of an inner product and the evaluation of every function in [math]\displaystyle{ H }[/math] at every point in the domain, it does not lend itself to easy application in practice. A more intuitive definition of the RKHS can be obtained by observing that this property guarantees that the evaluation functional can be represented by taking the inner product of [math]\displaystyle{ f }[/math] with a function [math]\displaystyle{ K_x }[/math] in [math]\displaystyle{ H }[/math]. This function is the so-called reproducing kernel for the Hilbert space [math]\displaystyle{ H }[/math] from which the RKHS takes its name. More formally, the Riesz representation theorem implies that for all [math]\displaystyle{ x }[/math] in [math]\displaystyle{ X }[/math] there exists a unique element [math]\displaystyle{ K_x }[/math] of [math]\displaystyle{ H }[/math] with the reproducing property,
-
[math]\displaystyle{ f(x) = L_x(f) = \langle f,\ K_x \rangle_H \quad \forall f \in H. }[/math]
(
)
Since [math]\displaystyle{ K_x }[/math] is itself a function defined on [math]\displaystyle{ X }[/math] with values in the field [math]\displaystyle{ \mathbb{R} }[/math] (or [math]\displaystyle{ \mathbb{C} }[/math] in the case of complex Hilbert spaces) and as [math]\displaystyle{ K_x }[/math] is in [math]\displaystyle{ H }[/math] we have that
- [math]\displaystyle{ K_x(y) = L_y(K_x)= \langle K_x,\ K_y \rangle_H, }[/math]
where [math]\displaystyle{ K_y\in H }[/math] is the element in [math]\displaystyle{ H }[/math] associated to [math]\displaystyle{ L_y }[/math].
This allows us to define the reproducing kernel of [math]\displaystyle{ H }[/math] as a function [math]\displaystyle{ K: X \times X \to \mathbb{R} }[/math] by
- [math]\displaystyle{ K(x,y) = \langle K_x,\ K_y \rangle_H. }[/math]
From this definition it is easy to see that [math]\displaystyle{ K: X \times X \to \mathbb{R} }[/math] (or [math]\displaystyle{ \mathbb{C} }[/math] in the complex case) is both symmetric (resp. conjugate symmetric) and positive definite, i.e.
- [math]\displaystyle{ \sum_{i,j =1}^n c_i c_j K(x_i, x_j)= \sum_{i=1}^n c_i \left\langle K_{x_i} , \sum_{j=1}^n c_j K_{x_j} \right\rangle_{H} = \left\langle \sum_{i=1}^n c_i K_{x_i} , \sum_{j=1}^n c_j K_{x_j} \right\rangle_{H} = \left\|\sum_{i=1}^nc_iK_{x_i}\right\|_H^2 \ge 0 }[/math]
for every [math]\displaystyle{ n \in \mathbb{N}, x_1, \dots, x_n \in X, \text{ and } c_1, \dots, c_n \in \mathbb{R}. }[/math][6] The Moore–Aronszajn theorem (see below) is a sort of converse to this: if a function [math]\displaystyle{ K }[/math] satisfies these conditions then there is a Hilbert space of functions on [math]\displaystyle{ X }[/math] for which it is a reproducing kernel.
Example
The space of bandlimited continuous functions [math]\displaystyle{ H }[/math] is a RKHS, as we now show. Formally, fix some cutoff frequency [math]\displaystyle{ 0\lt a \lt \infty }[/math] and define the Hilbert space
- [math]\displaystyle{ H = \{ f \in C(\mathbb{R}) \mid \operatorname{supp}(F) \subset [-a,a] \} }[/math]
where [math]\displaystyle{ C(\mathbb{R}) }[/math] is the set of continuous square integrable functions, and [math]\displaystyle{ F(\omega) = \int_{-\infty}^\infty f(t) e^{-i\omega t} \, dt }[/math] is the Fourier transform of [math]\displaystyle{ f }[/math]. As the inner product of this Hilbert space, we use
- [math]\displaystyle{ \langle f, g\rangle_{L^2} = \int_{-\infty}^\infty f(x) \cdot \overline{g(x)} \, dx. }[/math]
From the Fourier inversion theorem, we have
- [math]\displaystyle{ f(x) = \frac{1}{2 \pi} \int_{-a}^a F(\omega) e^{ix \omega} \, d\omega . }[/math]
It then follows by the Cauchy–Schwarz inequality and Plancherel's theorem that, for all [math]\displaystyle{ x }[/math],
- [math]\displaystyle{ |f(x)| \le \frac{1}{2 \pi} \sqrt{ \int_{-a}^a 2a |F(\omega)|^2 \, d\omega} =\frac{1}{\pi}\sqrt{\frac{a}{2}\int_{-\infty}^\infty |F(\omega)|^2 \, d\omega} = \sqrt{\frac{a}{\pi}} \|f\|_{L^2}. }[/math]
This inequality shows that the evaluation functional is bounded, proving that [math]\displaystyle{ H }[/math] is indeed a RKHS.
The kernel function [math]\displaystyle{ K_x }[/math] in this case is given by
- [math]\displaystyle{ K_x(y) = \frac{a}{\pi} \operatorname{sinc}\left ( \frac{a}{\pi} (y-x) \right )=\frac{\sin(a(y-x))}{\pi(y-x)}. }[/math]
The Fourier transform of [math]\displaystyle{ K_x(y) }[/math] defined above is given by
- [math]\displaystyle{ \int_{-\infty}^\infty K_x(y)e^{-i \omega y} \, dy = \begin{cases} e^{-i \omega x} &\text{if } \omega \in [-a, a], \\ 0 &\textrm{otherwise}, \end{cases} }[/math]
which is a consequence of the time-shifting property of the Fourier transform. Consequently, using Plancherel's theorem, we have
- [math]\displaystyle{ \langle f, K_x\rangle_{L^2} = \int_{-\infty}^\infty f(y) \cdot \overline{K_x(y)} \, dy = \frac{1}{2\pi} \int_{-a}^a F(\omega) \cdot e^{i\omega x} \, d\omega = f(x) . }[/math]
Thus we obtain the reproducing property of the kernel.
[math]\displaystyle{ K_x }[/math] in this case is the "bandlimited version" of the Dirac delta function, and that [math]\displaystyle{ K_x(y) }[/math] converges to [math]\displaystyle{ \delta(y-x) }[/math] in the weak sense as the cutoff frequency [math]\displaystyle{ a }[/math] tends to infinity.
Moore–Aronszajn theorem
We have seen how a reproducing kernel Hilbert space defines a reproducing kernel function that is both symmetric and positive definite. The Moore–Aronszajn theorem goes in the other direction; it states that every symmetric, positive definite kernel defines a unique reproducing kernel Hilbert space. The theorem first appeared in Aronszajn's Theory of Reproducing Kernels, although he attributes it to E. H. Moore.
- Theorem. Suppose K is a symmetric, positive definite kernel on a set X. Then there is a unique Hilbert space of functions on X for which K is a reproducing kernel.
Proof. For all x in X, define Kx = K(x, ⋅ ). Let H0 be the linear span of {Kx : x ∈ X}. Define an inner product on H0 by
- [math]\displaystyle{ \left\langle \sum_{j=1}^n b_j K_{y_j}, \sum_{i=1}^m a_i K_{x_i} \right \rangle_{H_0} = \sum_{i=1}^m \sum_{j=1}^n {a_i} b_j K(y_j, x_i), }[/math]
which implies [math]\displaystyle{ K(x,y)=\left\langle K_{x}, K_{y} \right\rangle_{H_0} }[/math]. The symmetry of this inner product follows from the symmetry of K and the non-degeneracy follows from the fact that K is positive definite.
Let H be the completion of H0 with respect to this inner product. Then H consists of functions of the form
- [math]\displaystyle{ f(x) = \sum_{i=1}^\infty a_i K_{x_i} (x) \quad \text{where} \quad \lim_{n \to \infty}\sup_{p\geq0}\left\|\sum_{i=n}^{n+p} a_i K_{x_i}\right\|_{H_0} = 0. }[/math]
Now we can check the reproducing property (2):
- [math]\displaystyle{ \langle f, K_x \rangle_H = \sum_{i=1}^\infty a_i\left \langle K_{x_i}, K_x \right \rangle_{H_0}= \sum_{i=1}^\infty a_i K (x_i, x) = f(x). }[/math]
To prove uniqueness, let G be another Hilbert space of functions for which K is a reproducing kernel. For every x and y in X, (2) implies that
- [math]\displaystyle{ \langle K_x, K_y \rangle_H = K(x, y) = \langle K_x, K_y \rangle_G. }[/math]
By linearity, [math]\displaystyle{ \langle \cdot, \cdot \rangle_H = \langle \cdot, \cdot \rangle_G }[/math] on the span of [math]\displaystyle{ \{K_x : x \in X\} }[/math]. Then [math]\displaystyle{ H \subset G }[/math] because G is complete and contains H0 and hence contains its completion.
Now we need to prove that every element of G is in H. Let [math]\displaystyle{ f }[/math] be an element of G. Since H is a closed subspace of G, we can write [math]\displaystyle{ f=f_H + f_{H^\bot} }[/math] where [math]\displaystyle{ f_H \in H }[/math] and [math]\displaystyle{ f_{H^\bot} \in H^\bot }[/math]. Now if [math]\displaystyle{ x \in X }[/math] then, since K is a reproducing kernel of G and H:
- [math]\displaystyle{ f(x) = \langle K_x , f \rangle_G = \langle K_x, f_H \rangle_G + \langle K_x, f_{H^\bot} \rangle_G = \langle K_x , f_H \rangle_G = \langle K_x , f_H \rangle_H = f_H(x), }[/math]
where we have used the fact that [math]\displaystyle{ K_x }[/math] belongs to H so that its inner product with [math]\displaystyle{ f_{H^\bot} }[/math] in G is zero. This shows that [math]\displaystyle{ f = f_H }[/math] in G and concludes the proof.
Integral operators and Mercer's theorem
We may characterize a symmetric positive definite kernel [math]\displaystyle{ K }[/math] via the integral operator using Mercer's theorem and obtain an additional view of the RKHS. Let [math]\displaystyle{ X }[/math] be a compact space equipped with a strictly positive finite Borel measure [math]\displaystyle{ \mu }[/math] and [math]\displaystyle{ K: X \times X \to \R }[/math] a continuous, symmetric, and positive definite function. Define the integral operator [math]\displaystyle{ T_K: L_2(X) \to L_2(X) }[/math] as
- [math]\displaystyle{ [T_K f](\cdot) =\int_X K(\cdot,t) f(t)\, d\mu(t) }[/math]
where [math]\displaystyle{ L_2(X) }[/math] is the space of square integrable functions with respect to [math]\displaystyle{ \mu }[/math].
Mercer's theorem states that the spectral decomposition of the integral operator [math]\displaystyle{ T_K }[/math] of [math]\displaystyle{ K }[/math] yields a series representation of [math]\displaystyle{ K }[/math] in terms of the eigenvalues and eigenfunctions of [math]\displaystyle{ T_K }[/math]. This then implies that [math]\displaystyle{ K }[/math] is a reproducing kernel so that the corresponding RKHS can be defined in terms of these eigenvalues and eigenfunctions. We provide the details below.
Under these assumptions [math]\displaystyle{ T_K }[/math] is a compact, continuous, self-adjoint, and positive operator. The spectral theorem for self-adjoint operators implies that there is an at most countable decreasing sequence [math]\displaystyle{ (\sigma_i)_i \geq 0 }[/math] such that [math]\displaystyle{ \lim_{i \to \infty}\sigma_i = 0 }[/math] and [math]\displaystyle{ T_K\varphi_i(x) = \sigma_i\varphi_i(x) }[/math], where the [math]\displaystyle{ \{\varphi_i\} }[/math] form an orthonormal basis of [math]\displaystyle{ L_2(X) }[/math]. By the positivity of [math]\displaystyle{ T_K, \sigma_i \gt 0 }[/math] for all [math]\displaystyle{ i. }[/math] One can also show that [math]\displaystyle{ T_K }[/math] maps continuously into the space of continuous functions [math]\displaystyle{ C(X) }[/math] and therefore we may choose continuous functions as the eigenvectors, that is, [math]\displaystyle{ \varphi_i \in C(X) }[/math] for all [math]\displaystyle{ i. }[/math] Then by Mercer's theorem [math]\displaystyle{ K }[/math] may be written in terms of the eigenvalues and continuous eigenfunctions as
- [math]\displaystyle{ K(x,y) = \sum_{j=1}^\infty \sigma_j \, \varphi_j(x) \, \varphi_j(y) }[/math]
for all [math]\displaystyle{ x, y \in X }[/math] such that
- [math]\displaystyle{ \lim_{n \to \infty}\sup_{u,v} \left |K(u,v) - \sum_{j=1}^n \sigma_j \, \varphi_j(u) \, \varphi_j(v) \right | = 0. }[/math]
This above series representation is referred to as a Mercer kernel or Mercer representation of [math]\displaystyle{ K }[/math].
Furthermore, it can be shown that the RKHS [math]\displaystyle{ H }[/math] of [math]\displaystyle{ K }[/math] is given by
- [math]\displaystyle{ H = \left \{ f \in L_2(X) \,\Bigg\vert\, \sum_{i=1}^\infty \frac{\left\langle f,\varphi_i \right \rangle^2_{L_2}}{\sigma_i} \lt \infty \right\} }[/math]
where the inner product of [math]\displaystyle{ H }[/math] given by
- [math]\displaystyle{ \left\langle f,g \right\rangle_H = \sum_{i=1}^\infty \frac{\left\langle f,\varphi_i \right\rangle_{L_2}\left\langle g,\varphi_i \right\rangle_{L_2}}{\sigma_i}. }[/math]
This representation of the RKHS has application in probability and statistics, for example to the Karhunen-Loève representation for stochastic processes and kernel PCA.
Feature maps
A feature map is a map [math]\displaystyle{ \varphi\colon X \rightarrow F }[/math], where [math]\displaystyle{ F }[/math] is a Hilbert space which we will call the feature space. The first sections presented the connection between bounded/continuous evaluation functions, positive definite functions, and integral operators and in this section we provide another representation of the RKHS in terms of feature maps.
Every feature map defines a kernel via
-
[math]\displaystyle{ K(x,y) = \langle \varphi(x), \varphi(y) \rangle_F. }[/math]
(
)
Clearly [math]\displaystyle{ K }[/math] is symmetric and positive definiteness follows from the properties of inner product in [math]\displaystyle{ F }[/math]. Conversely, every positive definite function and corresponding reproducing kernel Hilbert space has infinitely many associated feature maps such that (3) holds.
For example, we can trivially take [math]\displaystyle{ F = H }[/math] and [math]\displaystyle{ \varphi(x) = K_x }[/math] for all [math]\displaystyle{ x \in X }[/math]. Then (3) is satisfied by the reproducing property. Another classical example of a feature map relates to the previous section regarding integral operators by taking [math]\displaystyle{ F = \ell^2 }[/math] and [math]\displaystyle{ \varphi(x) = (\sqrt{\sigma_i} \varphi_i(x))_i }[/math].
This connection between kernels and feature maps provides us with a new way to understand positive definite functions and hence reproducing kernels as inner products in [math]\displaystyle{ H }[/math]. Moreover, every feature map can naturally define a RKHS by means of the definition of a positive definite function.
Lastly, feature maps allow us to construct function spaces that reveal another perspective on the RKHS. Consider the linear space
- [math]\displaystyle{ H_\varphi = \{ f: X \to \mathbb{R} \mid \exists w \in F, f(x) = \langle w, \varphi(x) \rangle_{F}, \forall \text{ } x \in X \} . }[/math]
We can define a norm on [math]\displaystyle{ H_\varphi }[/math] by
- [math]\displaystyle{ \|f\|_\varphi = \inf \{\|w\|_F : w \in F, f(x) = \langle w, \varphi(x)\rangle_F, \forall \text{ } x \in X \} . }[/math]
It can be shown that [math]\displaystyle{ H_{\varphi} }[/math] is a RKHS with kernel defined by [math]\displaystyle{ K(x,y) = \langle\varphi(x), \varphi(y)\rangle_F }[/math]. This representation implies that the elements of the RKHS are inner products of elements in the feature space and can accordingly be seen as hyperplanes. This view of the RKHS is related to the kernel trick in machine learning.[7]
Properties
The following properties of RKHSs may be useful to readers.
- Let [math]\displaystyle{ (X_i)_{i=1}^p }[/math] be a sequence of sets and [math]\displaystyle{ (K_i)_{i=1}^p }[/math] be a collection of corresponding positive definite functions on [math]\displaystyle{ (X_i)_{i=1}^p. }[/math] It then follows that
- [math]\displaystyle{ K((x_1,\ldots ,x_p),(y_1,\ldots,y_p)) = K_1(x_1,y_1)\cdots K_p(x_p,y_p) }[/math]
- is a kernel on [math]\displaystyle{ X = X_1 \times \dots \times X_p. }[/math]
- Let [math]\displaystyle{ X_0 \subset X, }[/math] then the restriction of [math]\displaystyle{ K }[/math] to [math]\displaystyle{ X_0 \times X_0 }[/math] is also a reproducing kernel.
- Consider a normalized kernel [math]\displaystyle{ K }[/math] such that [math]\displaystyle{ K(x, x) = 1 }[/math] for all [math]\displaystyle{ x \in X }[/math]. Define a pseudo-metric on X as
- [math]\displaystyle{ d_K(x,y) = \|K_x - K_y\|_H^2 = 2(1-K(x,y)) \qquad \forall x \in X . }[/math]
- By the Cauchy–Schwarz inequality,
- [math]\displaystyle{ K(x,y)^2 \le K(x, x)K(y, y)=1 \qquad \forall x,y \in X. }[/math]
- This inequality allows us to view [math]\displaystyle{ K }[/math] as a measure of similarity between inputs. If [math]\displaystyle{ x, y \in X }[/math] are similar then [math]\displaystyle{ K(x,y) }[/math] will be closer to 1 while if [math]\displaystyle{ x,y \in X }[/math] are dissimilar then [math]\displaystyle{ K(x,y) }[/math] will be closer to 0.
- The closure of the span of [math]\displaystyle{ \{ K_x \mid x \in X \} }[/math] coincides with [math]\displaystyle{ H }[/math].[8]
Common examples
Bilinear kernels
- [math]\displaystyle{ K(x,y) = \langle x,y\rangle }[/math]
The RKHS [math]\displaystyle{ H }[/math] corresponding to this kernel is the dual space, consisting of functions [math]\displaystyle{ f(x) = \langle x,\beta\rangle }[/math] satisfying [math]\displaystyle{ \|f\|_H^2=\|\beta\|^2 }[/math].
Polynomial kernels
- [math]\displaystyle{ K(x,y) = (\alpha\langle x,y \rangle + 1)^d, \qquad \alpha \in \R, d \in \N }[/math]
Radial basis function kernels
These are another common class of kernels which satisfy [math]\displaystyle{ K(x,y) = K(\|x - y\|) }[/math]. Some examples include:
- Gaussian or squared exponential kernel:
- [math]\displaystyle{ K(x,y) = e^{-\frac{\|x - y\|^2}{2\sigma^2}}, \qquad \sigma \gt 0 }[/math]
- Laplacian kernel:
- [math]\displaystyle{ K(x,y) = e^{-\frac{\|x - y\|}{\sigma}}, \qquad \sigma \gt 0 }[/math]
- The squared norm of a function [math]\displaystyle{ f }[/math] in the RKHS [math]\displaystyle{ H }[/math] with this kernel is:[9]
- [math]\displaystyle{ \|f\|_H^2=\int_{\mathbb R}\Big( \frac1{\sigma} f(x)^2 + \sigma f'(x)^2\Big) \mathrm d x. }[/math]
Bergman kernels
We also provide examples of Bergman kernels. Let X be finite and let H consist of all complex-valued functions on X. Then an element of H can be represented as an array of complex numbers. If the usual inner product is used, then Kx is the function whose value is 1 at x and 0 everywhere else, and [math]\displaystyle{ K(x,y) }[/math] can be thought of as an identity matrix since
- [math]\displaystyle{ K(x,y)=\begin{cases} 1 & x=y \\ 0 & x \neq y \end{cases} }[/math]
In this case, H is isomorphic to [math]\displaystyle{ \Complex^n }[/math].
The case of [math]\displaystyle{ X= \mathbb{D} }[/math] (where [math]\displaystyle{ \mathbb{D} }[/math] denotes the unit disc) is more sophisticated. Here the Bergman space [math]\displaystyle{ H^2(\mathbb{D}) }[/math] is the space of square-integrable holomorphic functions on [math]\displaystyle{ \mathbb{D} }[/math]. It can be shown that the reproducing kernel for [math]\displaystyle{ H^2(\mathbb{D}) }[/math] is
- [math]\displaystyle{ K(x,y)=\frac{1}{\pi}\frac{1}{(1-x\overline{y})^2}. }[/math]
Lastly, the space of band limited functions in [math]\displaystyle{ L^2(\R) }[/math] with bandwidth [math]\displaystyle{ 2a }[/math] is a RKHS with reproducing kernel
- [math]\displaystyle{ K(x,y)=\frac{\sin a (x - y)}{\pi (x-y)}. }[/math]
Extension to vector-valued functions
In this section we extend the definition of the RKHS to spaces of vector-valued functions as this extension is particularly important in multi-task learning and manifold regularization. The main difference is that the reproducing kernel [math]\displaystyle{ \Gamma }[/math] is a symmetric function that is now a positive semi-definite matrix for every [math]\displaystyle{ x,y }[/math] in [math]\displaystyle{ X }[/math]. More formally, we define a vector-valued RKHS (vvRKHS) as a Hilbert space of functions [math]\displaystyle{ f: X \to \mathbb{R}^T }[/math] such that for all [math]\displaystyle{ c \in \mathbb{R}^T }[/math] and [math]\displaystyle{ x \in X }[/math]
- [math]\displaystyle{ \Gamma_xc(y) = \Gamma(x, y)c \in H \text{ for } y \in X }[/math]
and
- [math]\displaystyle{ \langle f, \Gamma_x c \rangle_H = f(x)^\intercal c. }[/math]
This second property parallels the reproducing property for the scalar-valued case. This definition can also be connected to integral operators, bounded evaluation functions, and feature maps as we saw for the scalar-valued RKHS. We can equivalently define the vvRKHS as a vector-valued Hilbert space with a bounded evaluation functional and show that this implies the existence of a unique reproducing kernel by the Riesz Representation theorem. Mercer's theorem can also be extended to address the vector-valued setting and we can therefore obtain a feature map view of the vvRKHS. Lastly, it can also be shown that the closure of the span of [math]\displaystyle{ \{ \Gamma_xc : x \in X, c \in \mathbb{R}^T \} }[/math] coincides with [math]\displaystyle{ H }[/math], another property similar to the scalar-valued case.
We can gain intuition for the vvRKHS by taking a component-wise perspective on these spaces. In particular, we find that every vvRKHS is isometrically isomorphic to a scalar-valued RKHS on a particular input space. Let [math]\displaystyle{ \Lambda = \{1, \dots, T \} }[/math]. Consider the space [math]\displaystyle{ X \times \Lambda }[/math] and the corresponding reproducing kernel
-
[math]\displaystyle{ \gamma: X \times \Lambda \times X \times \Lambda \to \mathbb{R}. }[/math]
(
)
As noted above, the RKHS associated to this reproducing kernel is given by the closure of the span of [math]\displaystyle{ \{ \gamma_{(x,t)} : x \in X, t \in \Lambda \} }[/math] where [math]\displaystyle{ \gamma_{(x,t)} (y,s) = \gamma( (x,t), (y,s)) }[/math] for every set of pairs [math]\displaystyle{ (x,t), (y,s) \in X \times \Lambda }[/math].
The connection to the scalar-valued RKHS can then be made by the fact that every matrix-valued kernel can be identified with a kernel of the form of (4) via
- [math]\displaystyle{ \Gamma(x,y)_{(t,s)} = \gamma((x,t), (y,s)). }[/math]
Moreover, every kernel with the form of (4) defines a matrix-valued kernel with the above expression. Now letting the map [math]\displaystyle{ D: H_\Gamma \to H_\gamma }[/math] be defined as
- [math]\displaystyle{ (Df)(x,t) = \langle f(x), e_t \rangle_{\mathbb{R}^T} }[/math]
where [math]\displaystyle{ e_t }[/math] is the [math]\displaystyle{ t^\text{th} }[/math] component of the canonical basis for [math]\displaystyle{ \mathbb{R}^T }[/math], one can show that [math]\displaystyle{ D }[/math] is bijective and an isometry between [math]\displaystyle{ H_\Gamma }[/math] and [math]\displaystyle{ H_\gamma }[/math].
While this view of the vvRKHS can be useful in multi-task learning, this isometry does not reduce the study of the vector-valued case to that of the scalar-valued case. In fact, this isometry procedure can make both the scalar-valued kernel and the input space too difficult to work with in practice as properties of the original kernels are often lost.[10][11][12]
An important class of matrix-valued reproducing kernels are separable kernels which can factorized as the product of a scalar valued kernel and a [math]\displaystyle{ T }[/math]-dimensional symmetric positive semi-definite matrix. In light of our previous discussion these kernels are of the form
- [math]\displaystyle{ \gamma((x,t),(y,s)) = K(x,y) K_T(t,s) }[/math]
for all [math]\displaystyle{ x,y }[/math] in [math]\displaystyle{ X }[/math] and [math]\displaystyle{ t,s }[/math] in [math]\displaystyle{ T }[/math]. As the scalar-valued kernel encodes dependencies between the inputs, we can observe that the matrix-valued kernel encodes dependencies among both the inputs and the outputs.
We lastly remark that the above theory can be further extended to spaces of functions with values in function spaces but obtaining kernels for these spaces is a more difficult task.[13]
Connection between RKHS with ReLU function
The ReLU function is commonly defined as [math]\displaystyle{ f(x)=\max \{0, x\} }[/math] and is a mainstay in the architecture of neural networks where it is used as an activation function. One can construct a ReLU-like nonlinear function using the theory of reproducing kernel Hilbert spaces. Below, we derive this construction and show how it implies the representation power of neural networks with ReLU activations.
We will work with the Hilbert space [math]\displaystyle{ \mathcal{H}=L^1_2(0)[0, \infty) }[/math] of absolutely continuous functions with [math]\displaystyle{ f(0) = 0 }[/math] and square integrable (i.e. [math]\displaystyle{ L_2 }[/math]) derivative. It has the inner product
- [math]\displaystyle{ \langle f,g \rangle_{\mathcal{H}} = \int_0^\infty f'(x)g'(x) \, dx . }[/math]
To construct the reproducing kernel it suffices to consider a dense subspace, so let [math]\displaystyle{ f\in C^1[0, \infty) }[/math] and [math]\displaystyle{ f(0)=0 }[/math]. The Fundamental Theorem of Calculus then gives
- [math]\displaystyle{ f(y)= \int_0^y f'(x) \, dx = \int_0^\infty G(x,y) f'(x) \, dx = \langle K_y,f \rangle }[/math]
where
- [math]\displaystyle{ G(x,y)= \begin{cases} 1, & x \lt y\\ 0, & \text{otherwise} \end{cases} }[/math]
and [math]\displaystyle{ K_y'(x)= G(x,y),\ K_y(0) = 0 }[/math] i.e.
- [math]\displaystyle{ K(x, y)=K_y(x)=\int_0^x G(z, y) \, dz= \begin{cases} x, & 0\leq x\lt y \\ y, & \text{otherwise.} \end{cases}=\min(x, y) }[/math]
This implies [math]\displaystyle{ K_y=K(\cdot, y) }[/math] reproduces [math]\displaystyle{ f }[/math].
Moreover the minimum function on [math]\displaystyle{ X\times X = [0,\infty)\times [0,\infty) }[/math] has the following representations with the ReLu function:
- [math]\displaystyle{ \min(x,y) = x -\operatorname{ReLU}(x-y) = y - \operatorname{ReLU}(y-x). }[/math]
Using this formulation, we can apply the representer theorem to the RKHS, letting one prove the optimality of using ReLU activations in neural network settings.[citation needed]
See also
- Positive definite kernel
- Mercer's theorem
- Kernel trick
- Kernel embedding of distributions
- Representer theorem
Notes
- ↑ Alpay, D., and T. M. Mills. "A family of Hilbert spaces which are not reproducing kernel Hilbert spaces." J. Anal. Appl. 1.2 (2003): 107–111.
- ↑ Z. Pasternak-Winiarski, "On weights which admit reproducing kernel of Bergman type", International Journal of Mathematics and Mathematical Sciences, vol. 15, Issue 1, 1992.
- ↑ T. Ł. Żynda, "On weights which admit reproducing kernel of Szeg¨o type", Journal of Contemporary Mathematical Analysis (Armenian Academy of Sciences), 55, 2020.
- ↑ Okutmustur
- ↑ Paulson
- ↑ Durrett
- ↑ Rosasco
- ↑ Rosasco
- ↑ Berlinet, Alain and Thomas, Christine. Reproducing kernel Hilbert spaces in Probability and Statistics, Kluwer Academic Publishers, 2004
- ↑ De Vito
- ↑ Zhang
- ↑ Alvarez
- ↑ Rosasco
References
- Alvarez, Mauricio, Rosasco, Lorenzo and Lawrence, Neil, “Kernels for Vector-Valued Functions: a Review,” https://arxiv.org/abs/1106.6251, June 2011.
- "Theory of Reproducing Kernels". Transactions of the American Mathematical Society 68 (3): 337–404. 1950. doi:10.1090/S0002-9947-1950-0051437-7.
- Berlinet, Alain and Thomas, Christine. Reproducing kernel Hilbert spaces in Probability and Statistics, Kluwer Academic Publishers, 2004.
- Cucker, Felipe; Smale, Steve (2002). "On the Mathematical Foundations of Learning". Bulletin of the American Mathematical Society 39 (1): 1–49. doi:10.1090/S0273-0979-01-00923-5.
- De Vito, Ernest, Umanita, Veronica, and Villa, Silvia. "An extension of Mercer theorem to vector-valued measurable kernels," arXiv:1110.4017, June 2013.
- Durrett, Greg. 9.520 Course Notes, Massachusetts Institute of Technology, https://www.mit.edu/~9.520/scribe-notes/class03_gdurett.pdf, February 2010.
- Kimeldorf, George (1971). "Some results on Tchebycheffian Spline Functions". Journal of Mathematical Analysis and Applications 33 (1): 82–95. doi:10.1016/0022-247X(71)90184-3. http://www.stat.wisc.edu/~wahba/ftp1/oldie/kw71.pdf.
- Okutmustur, Baver. “Reproducing Kernel Hilbert Spaces,” M.S. dissertation, Bilkent University, http://www.thesis.bilkent.edu.tr/0002953.pdf, August 2005.
- Paulsen, Vern. “An introduction to the theory of reproducing kernel Hilbert spaces,” http://www.math.uh.edu/~vern/rkhs.pdf.
- Steinwart, Ingo; Scovel, Clint (2012). "Mercer's theorem on general domains: On the interaction between measures, kernels, and RKHSs". Constr. Approx. 35 (3): 363–417. doi:10.1007/s00365-012-9153-3.
- Rosasco, Lorenzo and Poggio, Thomas. "A Regularization Tour of Machine Learning – MIT 9.520 Lecture Notes" Manuscript, Dec. 2014.
- Wahba, Grace, Spline Models for Observational Data, SIAM, 1990.
- Zhang, Haizhang; Xu, Yuesheng; Zhang, Qinghui (2012). "Refinement of Operator-valued Reproducing Kernels". Journal of Machine Learning Research 13: 91–136. http://www.jmlr.org/papers/volume13/zhang12a/zhang12a.pdf.