Reproducing kernel Hilbert space

From Wikipedia, the free encyclopedia
Revision as of 05:39, 15 June 2025 by imported>Roffaduft (redundant.)
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Short description

File:Different Views on RKHS.png
Figure illustrates related but varying approaches to viewing RKHS

In functional analysis, a reproducing kernel Hilbert space (RKHS) is a Hilbert space of functions in which point evaluation is a continuous linear functional. Specifically, a Hilbert space H of functions from a set X (to or ) is an RKHS if the point-evaluation functional Lx:H, Lx(f)=f(x), is continuous for every xX. Equivalently, H is an RKHS if there exists a function KxH such that, for all fH,f,Kx=f(x).The function Kx is then called the reproducing kernel, and it reproduces the value of f at x via the inner product.

An immediate consequence of this property is that convergence in norm implies uniform convergence on any subset of X on which Kx is bounded. However, the converse does not necessarily hold. Often the set X carries a topology, and Kx depends continuously on xX, in which case: convergence in norm implies uniform convergence on compact subsets of X.

It is not entirely straightforward to construct natural examples of a Hilbert space which are not an RKHS in a non-trivial fashion.[1] Some examples, however, have been found.[2][3]

While, formally, L2 spaces are defined as Hilbert spaces of equivalence classes of functions, this definition can trivially be extended to a Hilbert space of functions by choosing a (total) function as a representative for each equivalence class. However, no choice of representatives can make this space an RKHS (K0 would need to be the non-existent Dirac delta function). 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 x in the set on which the functions are defined, "evaluation at x" 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 ZarembaTemplate:Fact 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 X be an arbitrary set and H a Hilbert space of real-valued functions on X, equipped with pointwise addition and pointwise scalar multiplication. The evaluation functional over the Hilbert space of functions H is a linear functional that evaluates each function at a point x,

Lx:ff(x) fH.

We say that H is a reproducing kernel Hilbert space if, for all x in X, Lx is continuous at every f in H or, equivalently, if Lx is a bounded operator on H, i.e. there exists some Mx>0 such that

Template:NumBlk

Although Mx< is assumed for all xX, it might still be the case that supxMx=.

While property (Template:EquationNote) is the weakest condition that ensures both the existence of an inner product and the evaluation of every function in H 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 f with a function Kx in H. This function is the so-called reproducing kernelScript error: No such module "Unsubst". for the Hilbert space H from which the RKHS takes its name. More formally, the Riesz representation theorem implies that for all x in X there exists a unique element Kx of H with the reproducing property,

Template:NumBlk

Since Kx is itself a function defined on X with values in the field (or in the case of complex Hilbert spaces) and as Kx is in H we have that

Kx(y)=Ly(Kx)=Kx, KyH,

where KyH is the element in H associated to Ly.

This allows us to define the reproducing kernel of H as a function K:X×X (or in the complex case) by

K(x,y)=Kx, KyH.

From this definition it is easy to see that K:X×X (or in the complex case) is both symmetric (resp. conjugate symmetric) and positive definite, i.e.

i,j=1ncicjK(xi,xj)=i=1nciKxi,j=1ncjKxjH=i=1nciKxi,j=1ncjKxjH=i=1nciKxiH20

for every n,x1,,xnX, and c1,,cn.[6] The Moore–Aronszajn theorem (see below) is a sort of converse to this: if a function K satisfies these conditions then there is a Hilbert space of functions on X for which it is a reproducing kernel.

Examples

The simplest example of a reproducing kernel Hilbert space is the space L2(X,μ) where X is a set and μ is the counting measure on X. For xX, the reproducing kernel Kx is the indicator function of the one point set {x}X.

Nontrivial reproducing kernel Hilbert spaces often involve analytic functions, as we now illustrate by example. Consider the Hilbert space of bandlimited continuous functions H. Fix some cutoff frequency 0<a< and define the Hilbert space

H={fL2()supp(F)[a,a]}

where L2() is the set of square integrable functions, and F(ω)=f(t)eiωtdt is the Fourier transform of f. As the inner product, we use

f,gL2=f(x)g(x)dx.

Since this is a closed subspace of L2(), it is a Hilbert space. Moreover, the elements of H are smooth functions on that tend to zero at infinity, essentially by the Riemann-Lebesgue lemma. In fact, the elements of H are the restrictions to of entire holomorphic functions, by the Paley–Wiener theorem.

From the Fourier inversion theorem, we have

f(x)=12πaaF(ω)eixωdω.

It then follows by the Cauchy–Schwarz inequality and Plancherel's theorem that, for all x,

|f(x)|12π2aaa|F(ω)|2dω=2a2π|F(ω)|2dω=aπfL2.

This inequality shows that the evaluation functional is bounded, proving that H is indeed a RKHS.

The kernel function Kx in this case is given by

Kx(y)=aπsinc(aπ(yx))=sin(a(yx))π(yx).

The Fourier transform of Kx(y) defined above is given by

Kx(y)eiωydy={eiωxif ω[a,a],0otherwise,

which is a consequence of the time-shifting property of the Fourier transform. Consequently, using Plancherel's theorem, we have

f,KxL2=f(y)Kx(y)dy=12πaaF(ω)eiωxdω=f(x).

Thus we obtain the reproducing property of the kernel.

Kx in this case is the "bandlimited version" of the Dirac delta function, and that Kx(y) converges to δ(yx) in the weak sense as the cutoff frequency a 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 : xX}. Define an inner product on H0 by

j=1nbjKyj,i=1maiKxiH0=i=1mj=1naibjK(yj,xi),

which implies K(x,y)=Kx,KyH0. 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

f(x)=i=1aiKxi(x)wherelimnsupp0i=nn+paiKxiH0=0.

Now we can check the reproducing property (Template:EquationNote):

f,KxH=i=1aiKxi,KxH0=i=1aiK(xi,x)=f(x).

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, (Template:EquationNote) implies that

Kx,KyH=K(x,y)=Kx,KyG.

By linearity, ,H=,G on the span of {Kx:xX}. Then HG 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 f be an element of G. Since H is a closed subspace of G, we can write f=fH+fH where fHH and fHH. Now if xX then, since K is a reproducing kernel of G and H:

f(x)=Kx,fG=Kx,fHG+Kx,fHG=Kx,fHG=Kx,fHH=fH(x),

where we have used the fact that Kx belongs to H so that its inner product with fH in G is zero. This shows that f=fH in G and concludes the proof.

Integral operators and Mercer's theorem

We may characterize a symmetric positive definite kernel K via the integral operator using Mercer's theorem and obtain an additional view of the RKHS. Let X be a compact space equipped with a strictly positive finite Borel measure μ and K:X×X a continuous, symmetric, and positive definite function. Define the integral operator TK:L2(X)L2(X) as

[TKf]()=XK(,t)f(t)dμ(t)

where L2(X) is the space of square integrable functions with respect to μ.

Mercer's theorem states that the spectral decomposition of the integral operator TK of K yields a series representation of K in terms of the eigenvalues and eigenfunctions of TK. This then implies that K 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 TK 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 (σi)i0 such that limiσi=0 and TKφi(x)=σiφi(x), where the {φi} form an orthonormal basis of L2(X). By the positivity of TK,σi>0 for all i. One can also show that TK maps continuously into the space of continuous functions C(X) and therefore we may choose continuous functions as the eigenvectors, that is, φiC(X) for all i. Then by Mercer's theorem K may be written in terms of the eigenvalues and continuous eigenfunctions as

K(x,y)=j=1σjφj(x)φj(y)

for all x,yX such that

limnsupu,v|K(u,v)j=1nσjφj(u)φj(v)|=0.

This above series representation is referred to as a Mercer kernel or Mercer representation of K.

Furthermore, it can be shown that the RKHS H of K is given by

H={fL2(X)|i=1f,φiL22σi<}

where the inner product of H given by

f,gH=i=1f,φiL2g,φiL2σi.

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 φ:XF, where F 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

Template:NumBlk

Clearly K is symmetric and positive definiteness follows from the properties of inner product in F. Conversely, every positive definite function and corresponding reproducing kernel Hilbert space has infinitely many associated feature maps such that (Template:EquationNote) holds.

For example, we can trivially take F=H and φ(x)=Kx for all xX. Then (Template:EquationNote) is satisfied by the reproducing property. Another classical example of a feature map relates to the previous section regarding integral operators by taking F=2 and φ(x)=(σiφi(x))i.

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 H. 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

Hφ={f:XwF,f(x)=w,φ(x)F, xX}.

We can define a norm on Hφ by

fφ=inf{wF:wF,f(x)=w,φ(x)F, xX}.

It can be shown that Hφ is a RKHS with kernel defined by K(x,y)=φ(x),φ(y)F. 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

Useful properties of RKHSs:

  • Let (Xi)i=1p be a sequence of sets and (Ki)i=1p be a collection of corresponding positive definite functions on (Xi)i=1p. It then follows that
    K((x1,,xp),(y1,,yp))=K1(x1,y1)Kp(xp,yp)
    is a kernel on X=X1××Xp.
  • Let X0X, then the restriction of K to X0×X0 is also a reproducing kernel.
  • Consider a normalized kernel K such that K(x,x)=1 for all xX. Define a pseudo-metric on X as
    dK(x,y)=KxKyH2=2(1K(x,y))xX.
    By the Cauchy–Schwarz inequality,
    K(x,y)2K(x,x)K(y,y)=1x,yX.
    This inequality allows us to view K as a measure of similarity between inputs. If x,yX are similar then K(x,y) will be closer to 1 while if x,yX are dissimilar then K(x,y) will be closer to 0.
  • The closure of the span of {KxxX} coincides with H.[8]

Common examples

Bilinear kernels

K(x,y)=x,y

The RKHS H corresponding to this kernel is the dual space, consisting of functions f(x)=x,β satisfying fH2=β2.

Polynomial kernels

K(x,y)=(αx,y+1)d,α,d

Radial basis function kernels

These are another common class of kernels which satisfy K(x,y)=K(xy). Some examples include:

  • Gaussian or squared exponential kernel:
    K(x,y)=exy22σ2,σ>0
  • Laplacian kernel:
    K(x,y)=exyσ,σ>0
    The squared norm of a function f in the RKHS H with this kernel is:[9][10]
    fH2=(1σf(x)2+σf(x)2)dx.

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 K(x,y) can be thought of as an identity matrix since

K(x,y)={1x=y0xy

In this case, H is isomorphic to n.

The case of X=𝔻 (where 𝔻 denotes the unit disc) is more sophisticated. Here the Bergman space A2(𝔻) is the space of square-integrable holomorphic functions on 𝔻. It can be shown that the reproducing kernel for A2(𝔻) is

K(x,y)=1π1(1xy)2.

Lastly, the space of band limited functions in L2() with bandwidth 2a is a RKHS with reproducing kernel

K(x,y)=sina(xy)π(xy).

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 Γ is a symmetric function that is now a positive semi-definite matrix for every x,y in X. More formally, we define a vector-valued RKHS (vvRKHS) as a Hilbert space of functions f:XT such that for all cT and xX

Γxc(y)=Γ(x,y)cH for yX

and

f,ΓxcH=f(x)c.

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 {Γxc:xX,cT} coincides with H, 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 Λ={1,,T}. Consider the space X×Λ and the corresponding reproducing kernel

Template:NumBlk

As noted above, the RKHS associated to this reproducing kernel is given by the closure of the span of {γ(x,t):xX,tΛ} where γ(x,t)(y,s)=γ((x,t),(y,s)) for every set of pairs (x,t),(y,s)X×Λ.

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 (Template:EquationNote) via

Γ(x,y)(t,s)=γ((x,t),(y,s)).

Moreover, every kernel with the form of (Template:EquationNote) defines a matrix-valued kernel with the above expression. Now letting the map D:HΓHγ be defined as

(Df)(x,t)=f(x),etT

where et is the tth component of the canonical basis for T, one can show that D is bijective and an isometry between HΓ and Hγ.

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.[11][12][13]

An important class of matrix-valued reproducing kernels are separable kernels which can factorized as the product of a scalar valued kernel and a T-dimensional symmetric positive semi-definite matrix. In light of our previous discussion these kernels are of the form

γ((x,t),(y,s))=K(x,y)KT(t,s)

for all x,y in X and t,s in T. 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.[14]

Connection between RKHSs and the ReLU function

The ReLU function is commonly defined as f(x)=max{0,x} 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 =L21(0)[0,) of absolutely continuous functions with f(0)=0 and square integrable (i.e. L2) derivative. It has the inner product

f,g=0f(x)g(x)dx.

To construct the reproducing kernel it suffices to consider a dense subspace, so let fC1[0,) and f(0)=0. The Fundamental Theorem of Calculus then gives

f(y)=0yf(x)dx=0G(x,y)f(x)dx=Ky,f

where

G(x,y)={1,x<y0,otherwise

and Ky(x)=G(x,y), Ky(0)=0 i.e.

K(x,y)=Ky(x)=0xG(z,y)dz={x,0x<yy,otherwise.=min(x,y)

This implies Ky=K(,y) reproduces f.

Moreover the minimum function on X×X=[0,)×[0,) has the following representations with the ReLu function:

min(x,y)=xReLU(xy)=yReLU(yx).

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.Script error: No such module "Unsubst".

See also

Notes

Template:Reflist

References

  1. 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.
  2. Z. Pasternak-Winiarski, "On weights which admit reproducing kernel of Bergman type", International Journal of Mathematics and Mathematical Sciences, vol. 15, Issue 1, 1992.
  3. T. Ł. Żynda, "On weights which admit reproducing kernel of Szegő type", Journal of Contemporary Mathematical Analysis (Armenian Academy of Sciences), 55, 2020.
  4. Okutmustur
  5. Paulson
  6. Durrett
  7. Rosasco
  8. Rosasco
  9. Berlinet, Alain and Thomas, Christine. Reproducing kernel Hilbert spaces in Probability and Statistics, Kluwer Academic Publishers, 2004
  10. Thomas-Agnan C . Computing a family of reproducing kernels for statistical applications. Numerical Algorithms, 13, pp. 21-32 (1996)
  11. De Vito
  12. Zhang
  13. Alvarez
  14. Rosasco