ES98A · Course contents

Week 5: From MCMC convergence to infinite-dimensional structure: Hilbert spaces & operators

The alternating chain at the end of Week 4 preserves its target yet refuses to mix. Its problem becomes transparent when we follow what the transition does to functions of the state. That change of viewpoint introduces this week's larger theme: functions themselves can be vectors, and transformations of functions can be studied with the geometry of Week 1.

Finite coordinates never raised a convergence question. Infinite coordinates do. We develop completeness, Fourier expansions and compact operators to distinguish a meaningful limit from an infinite formal expression.

Route through this chapter

Convergence behaviour of MCMC

Recall in MCMC we generate a sequence (zt)t=1,2,…(z_t)_{t=1,2,\ldots} of random states in X=RdX=\mathbb{R}^d, with the goal that

∫Xf(x) μ(dx)=∫Xf(x) ρ(x) dx≈1T∑t=1Tf(zt).\int_X f(x)\,\mu(dx) = \int_X f(x)\,\rho(x)\,dx \approx \frac{1}{T}\sum_{t=1}^T f(z_t).

The MH scheme gives a recipe for generating zt+1z_{t+1} from ztz_t using an accept-reject comparison against the target density ρ\rho. How good are such approximations?

The full answer to this question is highly technical! In brief, one must examine the Markov operator / transition operator / Koopman operator PP, which is a linear op. that acts on functions f:X=Rd→Rf:X=\mathbb{R}^d\to\mathbb{R} to produce new functions Pf:X→RPf:X\to\mathbb{R} via

(Pf)(x):=E ⁣[f(zt+1)∣zt=x].(Pf)(x) := \mathbb{E}\!\left[f(z_{t+1})\mid z_t=x\right].

Assume μ\mu is invariant and work on L2(μ)L^2(\mu). Conditional Jensen and invariance give ∥Pf∥22≤∫P(∣f∣2) dμ=∥f∥22\|Pf\|_2^2\le\int P(|f|^2)\,d\mu=\|f\|_2^2, so PP is a contraction. Constants satisfy P1=1P1=1. Detailed balance makes PP self-adjoint.

On the mean-zero subspace L02(μ)L^2_0(\mu), assume the absolute spectral gap condition

∥P∥L02→L02≤1−g,0<g≤1.\|P\|_{L^2_0\to L^2_0}\le1-g,\qquad 0<g\le1.

In a finite reversible chain this bounds every nonconstant eigenvalue in modulus. In infinite dimension it must control the whole spectrum, including continuous spectrum. The alternating two-state chain has eigenvalue −1-1 and no absolute gap.

The spectral gap controls the constant in the MCMC error estimate. Consider, for some integrand f:X→Rf:X\to\mathbb{R}, the MCMC quadrature error

ET(f)2:=E ⁣[∣E[f(x)]−1T∑t=1Tf(zt)∣2],E[f(x)]=∫Xf dμ.E_T(f)^2 := \mathbb{E}\!\left[\left|\mathbb{E}[f(x)]-\frac{1}{T}\sum_{t=1}^T f(z_t)\right|^2\right], \qquad \mathbb{E}[f(x)] = \int_X f\,d\mu.

Expectation against both the initial state z1z_1 and the transition mechanism giving z2,z3,…z_2,z_3,\ldots

For a stationary chain and f0=f−∫f dμf_0=f-\int f\,d\mu, we have

∣γk∣=∣⟨f0,Pkf0⟩∣≤(1−g)k∥f0∥22.|\gamma_k|=|\langle f_0,P^kf_0\rangle|\le(1-g)^k\|f_0\|_2^2.

Insert this into Week 4's covariance sum and sum the geometric series:

ET(f)2≤∥f0∥22T(1+2∑k≥1(1−g)k)=2−gTg∥f0∥22.E_T(f)^2\le\frac{\|f_0\|_2^2}{T}\left(1+2\sum_{k\ge1}(1-g)^k\right) =\frac{2-g}{Tg}\|f_0\|_2^2.

This also implies the source's weaker ET≤2∥f0∥2/(T g)E_T\le\sqrt2\|f_0\|_2/(\sqrt T\,g). Nonstationary initialisation requires a separate bias/control argument; the same formula is not asserted for arbitrary initial laws. A small gap makes many transitions worth much less than the same number of independent samples.

For a two-state chain the nonconstant eigenvalue can be followed exactly. Watch the law relax from a point mass to equilibrium. A slow eigenmode keeps memory of the starting state long after the fast chain has mixed.

A spectral gap sets the relaxation time

Probability of state 0

03001time (integer steps at ticks)probability

Current two-state laws

0101state (0 or 1)probability

Time=0.000, eigenvalues 0.50 (teal) and 0.92 (amber)

Integer times are genuine chain iterates. Between them the curves interpolate the exponential relaxation. The smaller absolute gap relaxes more slowly.

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

Ready to explore.
Two-state chains have P=[[1−a,a],[a,1−a]], invariant law (1/2,1/2), and nonconstant eigenvalue 1−2a. Start in state 0. Compare a=0.25 with a=0.04. Curves concern distributions, not individual sample trajectories. ↗

Linear functional analysis

Hilbert spaces (of functions)

A norm on a vector space VV over K=R\mathbb{K}=\mathbb{R} or C\mathbb{C} is a function ∥⋅∥:V→[0,∞)⊆R\|\cdot\|:V\to[0,\infty)\subseteq\mathbb{R} s.t.

A space VV equipped with a norm is called a normed space.

If every sequence in VV that is Cauchy w.r.t. ∥⋅∥\|\cdot\| is also convergent, then VV is called a Banach space. (Completeness!)

E.g. V=C0([a,b];R)={f:[a,b]→R∣f is continuous everywhere}V=C^0([a,b];\mathbb{R})=\{f:[a,b]\to\mathbb{R}\mid f\text{ is continuous everywhere}\}

∥f∥∞:=max⁡t∈[a,b]∣f(t)∣.\|f\|_\infty := \max_{t\in[a,b]} |f(t)|.

A norm supplies distance but need not supply angles or perpendicular projection. An inner product adds that geometry; completeness ensures that successive approximations converge inside the space.

An inner product on VV is a function ⟨⋅,⋅⟩:V×V→K\langle\cdot,\cdot\rangle:V\times V\to\mathbb{K} s.t.

Every inner product induces a norm via

∥v∥:=⟨v,v⟩.\|v\|:=\sqrt{\langle v,v\rangle}.

An inner product space that is complete (every Cauchy seq. converges) is called a Hilbert space.

E.g. Rn\mathbb{R}^n is a Hilbert space with respect to the usual Euclidean dot product.

Another e.g. The space of square-summable sequences

ℓ2:={u=(un)n∈N | ∥u∥ℓ2:=(∑n∈N∣un∣2)1/2<∞},\ell^2 := \left\{u=(u_n)_{n\in\mathbb{N}}\ \middle|\ \|u\|_{\ell^2}:=\left(\sum_{n\in\mathbb{N}}|u_n|^2\right)^{1/2}<\infty\right\},

(each term un∈Ku_n\in\mathbb{K}) is a Hilbert space w.r.t. the inner product

⟨u,v⟩ℓ2:=∑n∈Nun‾ vn.\langle u,v\rangle_{\ell^2} := \sum_{n\in\mathbb{N}} \overline{u_n}\,v_n.

This is basically Euclidean space except with (countably!) infinitely many coordinates.

In a Hilbert space HH, elements/vectors u,v∈Hu,v\in H are called orthogonal if ⟨u,v⟩=0\langle u,v\rangle=0, often denoted u⊥vu\perp v. They are orthonormal if both u⊥vu\perp v and ∥u∥=∥v∥=1\|u\|=\|v\|=1.

A complete orthonormal basis (CONB) for HH is a collection of vectors ψi∈H\psi_i\in H, indexed by i∈Ii\in I, s.t.

⟨ψi,ψj⟩={1if i=j,0if i≠j,andH=span{ψi, i∈I}‾.\langle \psi_i,\psi_j\rangle= \begin{cases} 1 & \text{if } i=j,\\ 0 & \text{if } i\ne j, \end{cases} \qquad \text{and}\qquad H=\overline{\mathrm{span}\{\psi_i,\ i\in I\}}.

We will focus only on the case that II is (finite or) countable, in which case (ψn)n∈N(\psi_n)_{n\in\mathbb{N}} is a CONB if they are mutually orthonormal and every u∈Hu\in H admits an expansion

u=∑n∈Nunψn (⋆)u=\sum_{n\in\mathbb{N}} u_n\psi_n \ (\star)

for suitable coefficients un∈Ku_n\in\mathbb{K}, in the sense that

lim⁡N→∞∥u−∑n=1Nunψn∥H=0.\lim_{N\to\infty}\left\|u-\sum_{n=1}^N u_n\psi_n\right\|_H = 0.

In fact, the coefficients unu_n in (⋆)(\star) have to be

un=⟨ψn,u⟩H.u_n=\langle \psi_n,u\rangle_H.

Furthermore, Parseval's identity states that

∥u∥H2=∥∑n∈Nunψn∥H2=∑n∈N∣un∣2=∥(un)n∥ℓ22.\|u\|_H^2 =\left\|\sum_{n\in\mathbb{N}}u_n\psi_n\right\|_H^2 =\sum_{n\in\mathbb{N}}|u_n|^2 =\|(u_n)_n\|_{\ell^2}^2.

So a Hilbert space HH with a choice of CONB ψ\psi is (up to isometric isomorphism) just the space ℓ2\ell^2 of square-summable coefficient sequences.

Another e.g. The space L2([0,2π];C)L^2([0,2\pi];\mathbb{C}) of square-integrable functions:

L2([0,2π];C):={f:[0,2π]→C | ∥f∥L2<∞},L^2([0,2\pi];\mathbb{C}) :=\left\{f:[0,2\pi]\to\mathbb{C}\ \middle|\ \|f\|_{L^2}<\infty\right\}, ∥f∥L2:=∫02π∣f(t)∣2 dt,⟨f,g⟩L2:=∫02πf(t)‾ g(t) dt.\|f\|_{L^2}:=\sqrt{\int_0^{2\pi}|f(t)|^2\,dt}, \qquad \langle f,g\rangle_{L^2}:=\int_0^{2\pi}\overline{f(t)}\,g(t)\,dt.

Elements of L2L^2 are measurable functions identified when equal almost everywhere. Otherwise a function supported at a single point would have norm zero without being the zero vector. Consequently f(t)f(t) at a specified point is not defined for a general L2L^2 element. This matters when we introduce point observations and RKHSs in Week 6.

This has a famous CONB given by the Fourier basis functions ψn:[0,2π]→C\psi_n:[0,2\pi]\to\mathbb{C} indexed by n∈Zn\in\mathbb{Z}:

ψn(t):=12πexp⁡(int).\psi_n(t):=\frac{1}{\sqrt{2\pi}}\exp(i n t).

In this setting, Parseval tells us that ∥f∥L22\|f\|_{L^2}^2 is exactly the sum of squares of the sequence (fn)n∈Z(f_n)_{n\in\mathbb{Z}} of Fourier coefficients of ff, where

fn:=⟨ψn,f⟩L2=12π∫02πf(t)e−int dt.f_n := \langle \psi_n,f\rangle_{L^2} = \frac{1}{\sqrt{2\pi}}\int_0^{2\pi} f(t)e^{-int}\,dt.

An infinite expansion needs more than small individual coefficients. Compare the coefficient size with the squared tail remaining after truncation.

Coefficients uₙ = 1/nCoefficients uₙ = 1/nmode ncoefficient12001solid: |uₙ|
Squared tail boundsSquared tail boundscutoff Nsquared norm error12001solid: upper bound 1/Ndashed: lower bound 1/(N+1)
For an ONB and coefficients 1/n, Parseval gives squared truncation error Σ above N of 1/n². Integral comparison bounds it between 1/(N+1) and 1/N. ↗

The coefficients go to zero like 1/n, while norm error is of order 1/√N. Differentiation multiplies Fourier coefficients by n; square summability can then disappear. This motivates a norm that measures smoothness.

Build the square wave from successive odd Fourier modes. Notice that the broad shape settles before the sharp edges do. The remaining overshoot is a warning to specify the sense in which an infinite series converges.

Build a function one frequency at a time

The next frequency

−π0π-1.601.6periodic position xmode amplitude

Partial Fourier reconstruction

−π0π-1.601.6periodic position xfunction value

Completed odd modes: 1; the next coefficient grows continuously

Away from a jump the sum settles towards ±1. Watch near zero: finer oscillations do not remove the persistent Gibbs overshoot.

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

Ready to explore.
Partial sums (4/π)Σ sin((2j+1)x)/(2j+1) approximate a periodic square wave in L². During each transition only the next coefficient grows from zero. Overshoot near jumps persists; convergence is not uniform and the limit at a jump is the midpoint. ↗

Sobolev spaces

Parseval tells us that u:[0,2π]→Cu:[0,2\pi]\to\mathbb{C} is square integrable if its Fourier coeff. seq. satisfies ∑n∈Z∣un∣2<∞\sum_{n\in\mathbb{Z}}|u_n|^2<\infty.

Take a smooth periodic uu, so u(0)=u(2π)u(0)=u(2\pi). Integration by parts gives

(u′)n=[u(t)e−int]02π2π+in2π∫02πu(t)e−int dt=inun.(u')_n=\frac{[u(t)e^{-int}]_0^{2\pi}}{\sqrt{2\pi}}+ \frac{in}{\sqrt{2\pi}}\int_0^{2\pi}u(t)e^{-int}\,dt=in u_n.

The boundary term vanishes because of periodicity. All Fourier-defined Sobolev spaces below are periodic spaces, denoted HpersH^s_{\rm per}; they are not the unrestricted interval Sobolev spaces.

This observation motivates us to define the Sobolev space of weakly differentiable functions (with square-integrable weak deriv.) by

Hper1([0,2π];C):={u:[0,2π]→C | (un)∈ℓ2 and (nun)∈ℓ2}H^1_{\rm per}([0,2\pi];\mathbb{C}) :=\left\{u:[0,2\pi]\to\mathbb{C}\ \middle|\ (u_n)\in\ell^2 \text{ and } (n u_n)\in\ell^2\right\}

The weighted coefficient condition requires the weak derivative u′u' to lie in L2L^2.

={u | ∥u∥H12:=∑n∈Z(1+∣n∣2) ∣un∣2<∞}.=\left\{u\ \middle|\ \|u\|_{H^1}^2:=\sum_{n\in\mathbb{Z}}(1+|n|^2)\,|u_n|^2<\infty\right\}.

We can take this idea further:

Hpers([0,2π];C):={u | ∥u∥Hs2:=∑n∈Z(1+∣n∣2)s ∣un∣2<∞}.H^s_{\rm per}([0,2\pi];\mathbb{C}) :=\left\{u\ \middle|\ \|u\|_{H^s}^2:=\sum_{n\in\mathbb{Z}}(1+|n|^2)^s\,|u_n|^2<\infty\right\}.

For negative ss, interpret elements as periodic distributions, obtained by completion, rather than necessarily ordinary functions. This definition allows non-integer or negative smoothness s∈Rs\in\mathbb{R} just by examining weighted summability of Fourier coefficients.

The Sobolev embedding theorem on the periodic dd-dimensional domain states

Hpers([0,2π]d)↪Cr([0,2π]d)for integers r≥0 with s>r+d/2.H^s_{\rm per}([0,2\pi]^d)\hookrightarrow C^r([0,2\pi]^d) \quad\text{for integers }r\ge0\text{ with }s>r+d/2.

For d=1d=1 this requires s>r+1/2s>r+1/2. The inequality is strict: the endpoint is not included. A weighted coefficient condition has become a statement about ordinary derivatives of the continuous representative.

Linear operators between Hilbert spaces

Consider two Hilbert spaces H1H_1 and H2H_2 and linear map A:H1→H2A:H_1\to H_2.

The kernel ker(A)\mathrm{ker}(A) and range ran(A)\mathrm{ran}(A) are

ker(A):={u∈H1∣Au=0∈H2}⊆H1,ran(A):={Au∈H2∣u∈H1}⊆H2.\mathrm{ker}(A) := \{u\in H_1\mid Au=0\in H_2\}\subseteq H_1, \qquad \mathrm{ran}(A) := \{Au\in H_2\mid u\in H_1\}\subseteq H_2.

The map AA is called a bounded linear operator if its operator norm

∥A∥op:=sup⁡u∈H1∥u∥H1=1∥Au∥H2=sup⁡u∈H1u≠0∥Au∥H2∥u∥H1\|A\|_{\mathrm{op}} := \sup_{\substack{u\in H_1\\ \|u\|_{H_1}=1}}\|Au\|_{H_2} = \sup_{\substack{u\in H_1\\ u\ne 0}}\frac{\|Au\|_{H_2}}{\|u\|_{H_1}}

is finite.

NB there are many practical examples of unbounded operators, e.g. differential operators. The space of bounded linear operators is Banach in operator norm. In general this norm does not come from an inner product (there are exceptions, such as scalar-valued operators).

Every bounded op. A:H1→H2A:H_1\to H_2 has a bounded adjoint operator A∗:H2→H1A^*:H_2\to H_1 characterized by

⟨A∗v,u⟩H1=⟨v,Au⟩H2(v∈H2, u∈H1).\langle A^*v,u\rangle_{H_1}=\langle v,Au\rangle_{H_2} \qquad (v\in H_2,\ u\in H_1).

A∗A^* is the analogue of the conjugate transpose of a rectangular matrix.

If A:H→HA:H\to H and A=A∗A=A^* then AA is said to be self-adjoint. Just as in the matrix case, we call AA self-adjoint and positive semi-definite (SPSD) if A=A∗A=A^* and

⟨Au,u⟩H≥0for all u∈H,\langle Au,u\rangle_H\ge 0\qquad\text{for all }u\in H,

and SPD if also

⟨Au,u⟩H=0  ⟺  u=0.\langle Au,u\rangle_H=0 \iff u=0.

Given ϕ∈H1\phi\in H_1 and ψ∈H2\psi\in H_2, we define the rank-one operator / outer product / tensor product ϕ⊗ψ:H1→H2\phi\otimes\psi:H_1\to H_2 by

(ϕ⊗ψ)u:=⟨ϕ,u⟩H1 ψ.(\phi\otimes\psi)u := \langle \phi,u\rangle_{H_1}\,\psi.

As a special case, if ϕ∈H1\phi\in H_1 has ∥ϕ∥H1=1\|\phi\|_{H_1}=1, then ϕ⊗ϕ\phi\otimes\phi is the orthogonal projection operator onto the line spanned by ϕ\phi.

We write H1⊗H2H_1\otimes H_2 for the Hilbert space generated by all linear combinations of operators ϕi⊗ψi\phi_i\otimes\psi_i of this form, with inner product given by

⟨ϕ1⊗ψ1, ϕ2⊗ψ2⟩H1⊗H2:=⟨ϕ2,ϕ1⟩H1 ⟨ψ1,ψ2⟩H2.\langle \phi_1\otimes\psi_1,\ \phi_2\otimes\psi_2\rangle_{H_1\otimes H_2} := \langle \phi_2,\phi_1\rangle_{H_1}\,\langle \psi_1,\psi_2\rangle_{H_2}.

Over real spaces this is the Hilbert tensor product H1⊗H2H_1\otimes H_2. Over complex spaces our operator convention is conjugate-linear in ϕ\phi, so the precise identification is H1‾⊗H2≅S2(H1,H2)\overline{H_1}\otimes H_2\cong S^2(H_1,H_2). The reversed first inner product above follows directly by computing the Hilbert–Schmidt inner product; it corrects the source convention.

An infinite-dimensional SPD operator need not have a bounded inverse: Aen=n−1enAe_n=n^{-1}e_n is strictly positive, but A−1en=nenA^{-1}e_n=ne_n. Strict positivity is different from a uniform bound ⟨Au,u⟩≥c∥u∥2\langle Au,u\rangle\ge c\|u\|^2 with c>0c>0. Regularisation will restore such a bound.

Compact operators

Bounded operators are certainly better than unbounded ones, but it is often necessary to consider yet more special classes of operators.

Theorem For a bounded op. A:H1→H2A:H_1\to H_2, the following are equivalent, and if one (and hence all) holds, then AA is a compact operator:

  1. (compactness) whenever (un)n∈N(u_n)_{n\in\mathbb{N}} in H1H_1 is a bounded sequence, the image sequence (Aun)n(Au_n)_n in H2H_2 has at least one convergent subsequence.

  2. (compactness again) the image under AA of any bounded set in H1H_1 is relatively compact in H2H_2: its closure is compact.

  3. (finite-rank approximation) there exists a sequence of operators An:H1→H2A_n:H_1\to H_2, each having finite rank (i.e. finite-dimensional range), such that

∥An−A∥op→0as n→∞.\|A_n-A\|_{\mathrm{op}}\to 0 \quad\text{as }n\to\infty.
  1. (singular value decomposition) there exist orthonormal sequences (ϕn)(\phi_n) in H1H_1 and (ψn)(\psi_n) in H2H_2 and a decreasing null sequence (σn)(\sigma_n) in [0,∞)[0,\infty) s.t. AA has the SVD
A=∑nσn ϕn⊗ψnA=\sum_n \sigma_n\,\phi_n\otimes\psi_n

in the sense that

EN:=∥A−∑n=1Nσn ϕn⊗ψn∥op→0as N→∞.E_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.

(Equivalently: Au=∑nσn⟨ϕn,u⟩H1ψnAu=\sum_n \sigma_n\langle \phi_n,u\rangle_{H_1}\psi_n.)

Basic example of a non-compact bounded operator: the identity op. on an infinite-dimensional space, for which σn=1\sigma_n=1 for all nn, so σn↛0\sigma_n\not\to 0, and EN=1E_N=1 for all NN.

What compactness buys and costs

Truncating after NN singular modes leaves operator error σN+1\sigma_{N+1} (with zero beyond finite rank). Thus compactness says that every fixed accuracy admits a finite-dimensional approximation. But recovering the discarded small modes requires division by numbers tending to zero. The same property that makes forward approximation convenient makes inversion unstable.

Exercise. For Aen=n−1enAe_n=n^{-1}e_n, compute the norm error of the NN-mode truncation and the norm of its pseudoinverse. Explain why one decreases while the other increases. Week 6 asks which spectral decay rates support kernels and pointwise prediction.