Author: Eiko

Time: 2025-02-17 10:58:26 - 2025-02-17 10:58:26 (UTC)

In this course, we talk about how to use RKHS, reporducing kernel Hilbert space, to do machine learning.

Write down a positive definite kernel, and these kernels will be served as building blocks.

Positive definite Kernels

Definition(Positive Definite Kernels). Let X be any set, k:X×XR is called a positive definite kernel if

  • k is symmetric k(x,y)=k(y,x)

  • k is positive semi-definite, which means, for any nN, x1,,xnX, αiR, we have

    i,jαiαjk(xi,xj)0

    This is equivalent to say the matrix (k(xi,xj))i,j is positive semi-definite.

You can also think we have defined a symmetric positive definite bilinear form, an inner product on the vector space RX with distinguished basis X.

Main Example: Square-Exponential

k(x,y)=exp(xy22σ2)

is a positive definite kernel.

Remarks

  • Intuition: Solutions k(x,y) encode the similarity between x and y.

  • k(x,y)f(x)f(y)dxdy0.

  • k(x,y)0 does not mean k is positive definite.

Further Examples Of Positive Definite Kernels

k(x,y)=exp(|xy|pσp)

It is positive definite for p[1,2].

Polynomial kernels:

k(x,y)=(xTy+c)m,x,yRd,c>0,mN.

Sums And Products

Given two positive definite kernels k1,k2:X×XR, then also

(k1+k2)(x,y):=k1(x,y)+k2(x,y)k1k2(x,y):=k1(x,y)k2(x,y)

Scaling: f:XR and k:X×XR positive definite, then

kf(x,y):=f(x)f(y)k(x,y)

will also be positive definite.

Reproducing Kernel Hilbert Spaces (RKHS)

HK={limit of linear combinations of functions of the form k(,x)}

Construction

Step 1. Fix a positive definite kernel k:X×XR.

HK=R{k(x,):xX}=xXRk(x,)={f=i=1ncik(xi,):nN,ciR,xiX}

Step 2. Construct an inner product ,K on HK, demand that

f(x)=f,k(x,)K,fHK.

This is called the reproducing property. The point of this property is that it makes computing an inner product on an infinite dimensional space very easy, just a number.

Reproducing property determines inner product on HK.

f=aik(xi,),g=bjk(yj,)

f,gHK=i,jaibjk(xi,yj)

Define the RKHS norm as fHK=f,fHK.

Lemma. The pairing ,HK is indeed an inner product on HK.

aiajk(xi,xj)0,aiR,xiX.

f,fHK=0f=0.

Proof. For xX,

|f(x)|2=|f,k(x,)|2fHK2k(x,)HK2

This means if fHK=0, then f(x)=0 for all xX, RKHS norm controls function values.

Step 3. Taking Completion

Take HK=HK, the completion of HK with respect to the norm HK.

Remark. The function space inherent properties from the kernels.

  • k is bounded fHK, fHK<.

  • k is bounded continuous HK is bounded continuous.

Gaussian RKHS For Different Widths

Let σ2>σ1>0, consider the two spaces HKσ2HKσ1.

Remark.

  • Computing RKHS norm for any given function is difficult because you need to write them as linear combinations of k(x,).

  • This integral is not the RKHS norm, in general

    f(x)k(x,y)f(y)dxdyfHK2.

Function Evaluations, Interpretation Of RKHS Norm

If f,g are close in HK, then they are close point-wise.

|f(x)g(x)|CxfgHK.

In other words, δx:HKR,ff(x) is bounded continuous.

Let’s Look At A Counter Example

  • fL2(0,1)2=01f(x)2dx, this norm does not have the above property! Because you can move the function value at a local region without changing much of the norm. A practical example is to take qn=xn.

  • In any RKHS, function evaluations are continuous. Any Hilbert space with continuous function evaluations is an RKHS. For example Sobolev spaces where the derivatives are controlled by norm

    fW1=|f(x)|2+|f(x)|2dx

    are RKHS.