ES98A · Course contents

Week 6: Kernels and RKHS: approximation geometry + random-function basics

A finite matrix stores all pairwise interactions between coordinates. Could a function k(x,y)k(x,y) do the same for a continuum of locations? An integral operator turns this idea into a linear map; an RKHS turns it into a geometry in which point measurements are continuous.

Keep Week 5's distinction between boundedness, compactness and invertibility in view. We now ask how much singular-value decay is needed to sum squared responses, sum variances, and evaluate a function at a point. These are different requirements.

Route through this chapter

Special classes of compact operators

Recall from last time: a linear operator A:H1→H2A:H_1\to H_2 is compact if and only if it has an SVD of the form

A=∑n∈Nσn ϕn⊗ψn,i.e.Au=∑nσn⟨ϕn,u⟩H1 ψn,A=\sum_{n\in\mathbb{N}}\sigma_n\,\phi_n\otimes\psi_n, \qquad\text{i.e.}\qquad Au=\sum_n \sigma_n\langle \phi_n,u\rangle_{H_1}\,\psi_n,

with

∥A−∑n=1Nσn ϕn⊗ψn∥op→0as N→∞.\left\|A-\sum_{n=1}^N \sigma_n\,\phi_n\otimes\psi_n\right\|_{\mathrm{op}}\to 0 \quad\text{as }N\to\infty.

The singular value sequence (σn)(\sigma_n) can be used to characterize even nicer classes of operators:

Hilbert–Schmidt operators

If

∑nσn2<∞,\sum_n \sigma_n^2<\infty,

then AA is called a Hilbert–Schmidt operator.

The space S2(H1,H2)S^2(H_1,H_2) of H–S operators from H1H_1 into H2H_2 actually forms a Hilbert space with inner product

⟨A,B⟩S2:=∑n⟨Aγn, Bγn⟩H2,\langle A,B\rangle_{S^2} :=\sum_n \langle A\gamma_n,\,B\gamma_n\rangle_{H_2},

for any choice of CONB (γn)n(\gamma_n)_n of H1H_1 (every choice gives the same value), and induced norm

∥A∥S2:=∑n∥Aγn∥H22.\|A\|_{S^2}:=\sqrt{\sum_n \|A\gamma_n\|_{H_2}^2}.

("∼\sim Frobenius norm")

As in Week 5, S2(H1,H2)S^2(H_1,H_2) identifies with H1⊗H2H_1\otimes H_2 over the reals and H1‾⊗H2\overline{H_1}\otimes H_2 over the complex numbers.

Trace-class (nuclear) operators

If

∑nσn<∞,\sum_n \sigma_n<\infty,

then AA is called trace class (or nuclear).

The norm on the class S1(H1,H2)S^1(H_1,H_2) of trace-class operators from H1H_1 into H2H_2 is

∥A∥S1:=∑n⟨(A∗A)1/2γn, γn⟩H1,\|A\|_{S^1} :=\sum_n \left\langle (A^*A)^{1/2}\gamma_n,\ \gamma_n\right\rangle_{H_1},

for any CONB (γn)n(\gamma_n)_n of H1H_1.

More practically, in the case that AA is self-adjoint with real eigenvalues (λn)n(\lambda_n)_n,

∥A∥S1=∑n∣λn∣.\|A\|_{S^1}=\sum_n |\lambda_n|.

In summary:

S1⊆S2⊆{all compact operators}⊆{all bounded linear operators}⊆{all linear operators}.S^1 \subseteq S^2 \subseteq \{\text{all compact operators}\} \subseteq \{\text{all bounded linear operators}\} \subseteq \{\text{all linear operators}\}.

A spectral comparison. If σn=n−p\sigma_n=n^{-p}, compactness requires p>0p>0, Hilbert–Schmidt summability requires p>1/2p>1/2, and trace-class summability requires p>1p>1. These thresholds follow from the pp-series test. Trace class is the strongest requirement: it will make total variance finite in Week 7.

Hilbert scales induced by compact operators

Similarly to the construction of the Sobolev scale (earlier in one variable): any compact SPD operator

A:H0→H0A:H^0\to H^0

defined on a Hilbert space H0H^0 induces a scale of new Hilbert spaces HsH^s, s∈Rs\in\mathbb{R}, via

⟨u,v⟩Hs:=⟨A−su, A−sv⟩H0,\langle u,v\rangle_{H^s} :=\langle A^{-s}u,\ A^{-s}v\rangle_{H^0},

for those u,vu,v for which this is finite.

More concretely, if

A=∑nλn γn⊗γnA=\sum_n \lambda_n\,\gamma_n\otimes\gamma_n

with eigenvalues λn→0\lambda_n\to 0 and eigenvectors γn\gamma_n, then HsH^s consists of those

u=∑nunγnu=\sum_n u_n\gamma_n

for which

∥∑nunγn∥Hs2=∥A−s∑nunγn∥H02=∥∑nλn−sunγn∥H02=∑n∣un∣2λn2s<∞.\left\|\sum_n u_n\gamma_n\right\|_{H^s}^2 = \left\|A^{-s}\sum_n u_n\gamma_n\right\|_{H^0}^2 = \left\|\sum_n \lambda_n^{-s}u_n\gamma_n\right\|_{H^0}^2 = \sum_n \frac{|u_n|^2}{\lambda_n^{2s}}<\infty.

For s>0s>0, HsH^s is the domain of the generally unbounded A−sA^{-s}. For s<0s<0, take the completion of finite eigenvector expansions in this weaker norm: merely selecting vectors already in H0H^0 would leave the negative spaces incomplete. This scale uses weights λn−2s\lambda_n^{-2s}; if A=(−Δ)−1A=(-\Delta)^{-1}, its index ss corresponds to periodic Sobolev order 2s2s, not ss.

Being in HsH^s turns out to be important when trying to recover uu from a noisy observation of AuAu.

Example (inverse negative Laplacian). Let H0=L2([0,2π];C)H^0=L^2([0,2\pi];\mathbb{C}) be the space of square-integrable, mean-zero, 2π2\pi-periodic functions with Fourier CONB

γn(t):=12πeint,n∈Z∖{0}.\gamma_n(t):=\frac{1}{\sqrt{2\pi}}e^{int}, \qquad n\in\mathbb{Z}\setminus\{0\}.

These γn\gamma_n are eigenfunctions for the second derivative / Laplacian operator:

Δγn=γn′′=−n2γn.\Delta\gamma_n=\gamma_n''=-n^2\gamma_n.

Thus, Δ\Delta has eigenvalues −n2-n^2 with eigenfunctions γn\gamma_n, and (−Δ)−1(-\Delta)^{-1} has eigenvalues 1n2\frac{1}{n^2}.

Note that, since

∑n≠01n2=π23<∞,\sum_{n\ne 0}\frac{1}{n^2}=\frac{\pi^2}{3}<\infty,

(−Δ)−1(-\Delta)^{-1} is a trace-class operator.

Kernels and integral operators

Given a set XX, a kernel on XX is just a function

k:X×X→R.k:X\times X\to\mathbb{R}.

The kernel is called SPD/SPSD if, for any n∈Nn\in\mathbb{N} and distinct points x1,…,xn∈Xx_1,\ldots,x_n\in X, the matrix

(k(x1,x1)k(x1,x2)⋯k(x1,xn)⋮⋮⋱⋮k(xn,x1)k(xn,x2)⋯k(xn,xn))∈Rn×n\begin{pmatrix} k(x_1,x_1) & k(x_1,x_2) & \cdots & k(x_1,x_n)\\ \vdots & \vdots & \ddots & \vdots\\ k(x_n,x_1) & k(x_n,x_2) & \cdots & k(x_n,x_n) \end{pmatrix} \in\mathbb{R}^{n\times n}

is SPD/SPSD.

Now fix a (bounded, measurable) set X⊆RdX\subseteq\mathbb{R}^d and a kernel kk on XX. The induced integral operator IkI_k is

(Iku)(x):=∫Xk(x,y) u(y) dy,(I_k u)(x):=\int_X k(x,y)\,u(y)\,dy,

for x∈Xx\in X and u:X→Ru:X\to\mathbb{R}. Think of this IkI_k as a blurring operator that "thins" an input image uu to produce a new one IkuI_k u by averaging against kk.

Theorem. Let kk be a square-integrable kernel on XX, i.e.

∫X×X∣k(x,y)∣2 dx dy=∥k∥L2(X2)2<∞.\int_{X\times X} |k(x,y)|^2\,dx\,dy=\|k\|_{L^2(X^2)}^2<\infty.

Then

  1. IkI_k is a bounded linear operator from the Hilbert space L2(X)L^2(X) of square-integrable signals into L2(X)L^2(X) with
∥Ik∥op≤∥k∥L2(X2);\|I_k\|_{\mathrm{op}}\le \|k\|_{L^2(X^2)};
  1. IkI_k is compact;

  2. the adjoint of IkI_k is

(Ik∗u)(x)=∫Xk(y,x) u(y) dy;(I_k^*u)(x)=\int_X k(y,x)\,u(y)\,dy;

in particular, if kk is a symmetric kernel, then IkI_k is a self-adjoint operator;

  1. IkI_k is Hilbert–Schmidt with
∥Ik∥S2=∥k∥L2(X2);\|I_k\|_{S^2}=\|k\|_{L^2(X^2)};
  1. every H–S operator T:L2(X)→L2(X)T:L^2(X)\to L^2(X) is of this form, i.e. there exists kk s.t. T=IkT=I_k;

  2. A diagonal trace formula needs stronger assumptions than square integrability. For a continuous symmetric SPSD kernel on a compact set XX, with finite full-support reference measure,

tr⁡(Ik)=∥Ik∥S1=∫Xk(x,x) dx.\operatorname{tr}(I_k)=\|I_k\|_{S^1}=\int_X k(x,x)\,dx.

For a merely L2(X2)L^2(X^2) kernel, values on the diagonal may be changed arbitrarily without changing the operator. Thus diagonal integrability alone cannot imply trace class or determine its trace. For a signed finite-rank continuous kernel, trace and trace norm can already differ: eigenvalues 1,−11,-1 have trace zero but trace norm two.

Positivity, Mercer representation

There is an elegant connection between positivity of the kernel and the operator:

Mercer theorem (positive case). Let XX be compact and let its finite reference measure have full support (for Lebesgue measure this excludes isolated or measure-invisible parts of XX). For continuous symmetric kk, positivity of every Gram matrix is equivalent to positivity of IkI_k. In the SPSD case, continuous eigenfunctions with λn>0\lambda_n>0 give

k(x,y)=∑nλnϕn(x)ϕn(y),k(x,y)=\sum_n\lambda_n\phi_n(x)\phi_n(y),

with absolute uniform convergence on X×XX\times X. Integrating the diagonal gives the preceding trace formula. Nonzero eigenfunctions are continuous because ϕn=Ikϕn/λn\phi_n=I_k\phi_n/\lambda_n. For general signed continuous symmetric kernels one has an L2L^2 spectral expansion; the pointwise Mercer conclusion is not asserted without additional hypotheses. The positive theorem is what covariance kernels need.

Reproducing kernel Hilbert spaces

Why is an L2L^2 error not enough for a sensor reading? A narrow triangular spike of height one and width 1/n1/n has L2L^2 norm tending to zero but keeps value one at its centre. Point evaluation is therefore not continuous in L2L^2. We need a stronger norm whose smallness controls the measurements we intend to make.

Keep the centre value fixed while narrowing a spike. Can its area-based norm detect what a point sensor sees?

Triangular spikesTriangular spikeslocation theight-1101solid: width 1dashed: width 0.2
Norm tends to zeroNorm tends to zerohalf-width hsquared norm0101solid: squared L² norm = 2h/3
Spike fₕ(t) = max(1 − |t|/h, 0), h positive. Every spike has fₕ(0)=1, but squared L² norm 2h/3 tends to zero. ↗

An L²-small perturbation need not be small at the sensor. An RKHS repairs this by making evaluation a bounded linear functional in its own norm.

Animate the shrinking support rather than changing the height. The point reading remains fixed even while the integral of the squared spike vanishes. The discrepancy tells us which measurement the L² norm cannot control.

Small in L² can remain large at a point

Same point value, narrower support

-1.201.201.2location xspike height

L² energy versus width

0101.2half-width hsquared L² norm

h=1.000, fₕ(0)=1, ‖fₕ‖²₂=2h/3=0.667

Teal energy tends to zero as the support narrows. The amber point reading stays one, so L² convergence cannot control this sensor.

Play once, pause, or scrub to inspect an intermediate state.

Ready to explore.
fₕ(x)=max(1−|x|/h,0), h decreases from 1 to 0.05. Its centre value remains one while squared L² norm equals 2h/3. The animation illustrates unbounded point evaluation on L², with a positive finite width at every frame. ↗

A Hilbert space H\mathcal{H} of real-valued functions defined on a set XX is called a RKHS if one/all of these equivalent conditions hold:

  1. for every x∈Xx\in X, the point evaluation functional δx:H→R\delta_x:\mathcal{H}\to\mathbb{R},
δxu:=u(x),\delta_x u := u(x),

is a bounded linear functional, i.e. there is a constant C(x)C(x) s.t.

∣u(x)∣≤C(x)∥u∥H;|u(x)|\le C(x)\|u\|_{\mathcal{H}};
  1. there is a canonical feature map φ:X→H\varphi:X\to\mathcal{H} s.t.
⟨φ(x),u⟩H=u(x)for all x∈X, u∈H;\langle \varphi(x),u\rangle_{\mathcal{H}}=u(x) \qquad\text{for all }x\in X,\ u\in\mathcal{H};
  1. there is a function k:X×X→Rk:X\times X\to\mathbb{R}, a reproducing kernel, s.t. k(x,⋅)∈Hk(x,\cdot)\in\mathcal{H} for all x∈Xx\in X and
⟨k(x,⋅),u⟩H=u(x)for all x∈X, u∈H.\langle k(x,\cdot),u\rangle_{\mathcal{H}}=u(x) \qquad\text{for all }x\in X,\ u\in\mathcal{H}.

(Note: k(x,⋅)k(x,\cdot) is φ(x)\varphi(x).)

Once evaluation is bounded, its representer can be moved along the domain. Here the function is a finite combination of kernel sections, so its value and its RKHS inner product can be checked by exactly the same two kernel evaluations.

A kernel section is a measuring direction

Move the representer

-2.502.5-0.501.1location xu(x) and k(z,x)

Two exact kernel contributions

-2.502.5-0.701.1evaluation point zinner product contributions

⟨k(z,·),u⟩ᴴ = u(z) = 0.475, z=-2.000

The two dashed contributions add to the solid function. Moving z changes which bounded evaluation functional is applied, not the function u.

Play once, pause, or scrub to inspect an intermediate state.

Ready to explore.
Gaussian kernel k(x,z)=exp(−(x−z)²/2) and the RKHS element u(x)=k(x,−0.8)−0.6k(x,0.8). The moving representer k(z,·) measures u(z) through the RKHS inner product. The right plot shows the two exact kernel contributions; this is not an L² inner product. ↗

The Moore–Aronszajn theorem states that, for every SPSD kk, there is a unique RKHS H=Hk\mathcal{H}=\mathcal{H}_k satisfying the above; we call it the native space of the kernel.

Construct the native space by quotienting zero-norm combinations and completing the span of all the feature vectors φ(xi)\varphi(x_i), xi∈Xx_i\in X, with inner product

⟨∑mαmφ(xm), ∑nβnφ(yn)⟩Hk=∑m,nαmβn k(xm,yn).\left\langle \sum_m \alpha_m\varphi(x_m),\ \sum_n \beta_n\varphi(y_n)\right\rangle_{\mathcal{H}_k} = \sum_{m,n}\alpha_m\beta_n\,k(x_m,y_n).

("The kernel trick": using ⟨φ(x),φ(y)⟩=k(x,y)\langle \varphi(x),\varphi(y)\rangle = k(x,y).)

Theorem. Let XX be closed and bounded in Rd\mathbb{R}^d and let kk be continuous and SPD. Let IkI_k have eigenvalues λn>0\lambda_n>0 and orthonormal eigenfunctions γn\gamma_n. Then

Hk={u=∑nunγn | ∑n∣un∣2λn<∞},\mathcal{H}_k = \left\{u=\sum_n u_n\gamma_n\ \middle|\ \sum_n \frac{|u_n|^2}{\lambda_n}<\infty\right\},

with

⟨∑nunγn, ∑nvnγn⟩Hk=∑nunvnλn.\left\langle \sum_n u_n\gamma_n,\ \sum_n v_n\gamma_n\right\rangle_{\mathcal{H}_k} = \sum_n \frac{u_n v_n}{\lambda_n}.

Here sums run over positive eigenvalues; any null-space coordinates are excluded. On the closure of that positive spectral subspace, Hk\mathcal H_k is H1/2H^{1/2} in the scale induced by IkI_k. Strict positivity of finite Gram matrices alone does not justify ignoring possible null directions of the integral operator.

Orthogonality and closest-point approximation in Hilbert spaces

Recall that u,v∈Hu,v\in\mathcal{H} are orthogonal, denoted u⊥vu\perp v, if

⟨u,v⟩H=0;\langle u,v\rangle_{\mathcal{H}}=0;

they are orthonormal if they are orthogonal and have unit norm.

The orthogonal complement of S⊆HS\subseteq\mathcal{H} is

S⊥:={u∈H∣u⊥s for all s∈S}.S^\perp := \{u\in\mathcal{H}\mid u\perp s\ \text{for all }s\in S\}.

Nice properties:

(ran A)⊥=ker⁡A∗,(ran A∗)⊥=ker⁡A,(\mathrm{ran}\,A)^\perp=\ker A^*, \qquad (\mathrm{ran}\,A^*)^\perp=\ker A, (ker⁡A∗)⊥=ran A‾,(ker⁡A)⊥=ran A∗‾.(\ker A^*)^\perp=\overline{\mathrm{ran}\,A}, \qquad (\ker A)^\perp=\overline{\mathrm{ran}\,A^*}.

A very nice property of Hilbert spaces is that, given any closed subspace SS of H\mathcal{H}, every u∈Hu\in\mathcal{H} can be decomposed uniquely as

u=s′+s⊥u=s' + s^\perp

with s′∈Ss'\in S and s⊥∈S⊥s^\perp\in S^\perp. (Note that S∩S⊥={0}S\cap S^\perp=\{0\}.)

We say that H\mathcal{H} is the orthogonal direct sum of SS and S⊥S^\perp, denoted

H=S⊕S⊥.\mathcal{H}=S\oplus S^\perp.

Orthogonal projection theorem

Closedness is essential. In ℓ2\ell^2, finite-support sequences approximate u=(1/n)nu=(1/n)_n arbitrarily well, but none equals it. Projection onto that nonclosed subspace would require a closest point at distance zero outside the subspace.

For a closed subspace, a minimising sequence is Cauchy by the parallelogram identity; completeness and closedness give its limit in the subspace. Varying this limit in any subspace direction forces a perpendicular residual. Pythagoras then gives uniqueness and optimality, exactly as in Week 1.

The operation PS:u↦s′P_S:u\mapsto s' is

∥PSu1−PSu2∥≤∥u1−u2∥and so∥PS∥op≤1;\|P_Su_1-P_Su_2\|\le \|u_1-u_2\| \quad\text{and so}\quad \|P_S\|_{\mathrm{op}}\le 1; ∥u−PSu∥=min⁡s∈S∥u−s∥;\|u-P_Su\|=\min_{s\in S}\|u-s\|;

An important consequence of the optimal approximation property is that the optimal approximation of u∈Hu\in\mathcal{H} given as

u=∑n=1∞unψnu=\sum_{n=1}^\infty u_n\psi_n

in terms of a CONB within

S:=span{ψ1,…,ψN}S:=\mathrm{span}\{\psi_1,\ldots,\psi_N\}

is just truncating the expansion to NN terms:

arg⁡min⁡s=∑n=1Nanψn∈S∥u−s∥=∑n=1Nunψn.\arg\min_{s=\sum_{n=1}^N a_n\psi_n\in S}\|u-s\| = \sum_{n=1}^N u_n\psi_n.

A "teaser" for least-squares inverse problems

Suppose that A:H1→H2A:H_1\to H_2 with closed range and y∈H2y\in H_2 are given. Suppose that we seek u∈H1u\in H_1 to solve

Au=y.Au=y.

This is impossible if y∉ran Ay\notin\mathrm{ran}\,A, so we relax the problem and seek u∈H1u\in H_1 to minimize

∥Au−y∥H2,\|Au-y\|_{H_2},

i.e. find the closest point of ran A\mathrm{ran}\,A to yy.

Equivalently, minimize

Φ(u):=12∥Au−y∥H22.\Phi(u):=\frac{1}{2}\|Au-y\|_{H_2}^2.

Just as in the finite-dimensional case,

u minimizes Φ  ⟺  ∇Φ(u)=0  ⟺  A∗Au−A∗y=0,u\ \text{minimizes }\Phi \iff \nabla\Phi(u)=0 \iff A^*Au - A^*y = 0,

i.e. we need to solve the normal equations

A∗Au=A∗y.A^*Au=A^*y.

If AA has finite rank, dim⁡(ran A)=r\dim(\mathrm{ran}\,A)=r say, then ran A\mathrm{ran}\,A is closed. If AA has SVD

A=∑i=1rσi ϕi⊗ψi,A=\sum_{i=1}^r \sigma_i\,\phi_i\otimes\psi_i,

then the normal equations are solved by

u=A†y=∑i=1rσi−1 ψi⊗ϕi y=∑i=1r⟨ψi,y⟩H2σi ϕi.u=A^\dagger y =\sum_{i=1}^r \sigma_i^{-1}\,\psi_i\otimes\phi_i\,y =\sum_{i=1}^r \frac{\langle \psi_i,y\rangle_{H_2}}{\sigma_i}\,\phi_i.

Many physical forward operators, including infinite-rank compact integral operators, have nonclosed range. The closest-point argument alone then supplies neither existence of a least-squares minimiser for every datum nor a stable inverse. We need a way to control the weakly observed modes.

Week 7 first gives these spectral coefficients random amplitudes; Week 8 returns to the inverse and controls its unstable modes.