ES98A · Course contents

Week 10: Gaussian processes + well-posed Bayesian inversion in high/infinite dimensions

The output of Week 9 is a law, not just a fitted vector. That changes what a stable answer means. Two posterior means might agree while their uncertainty differs dramatically; conversely two point estimates may differ while the posterior predictions remain close.

We close the course by measuring distance between laws, connecting posterior modes to regularised optimisation, and conditioning Gaussian processes to predict unobserved values and integrals. The geometry of projection now acts on both predictions and uncertainty.

Route through this chapter


Recap

In a BIP with prior u∼μ0u \sim \mu_0 on HH, finite-dimensional data in YY with PDF proportional to exp⁡(−Φ(u;y))\exp(-\Phi(u;y)), the solution is the posterior distribution μy\mu^y satisfying Bayes' formula

μy(du)=exp⁡(−Φ(u;y))Zyμ0(du)\mu^y(du) = \frac{\exp(-\Phi(u;y))}{Z^y} \mu_0(du)

where

Zy=∫Hexp⁡(−Φ(u;y)) μ0(du)Z^y = \int_H \exp(-\Phi(u;y)) \, \mu_0(du)

In the special case where Φ(u;y)=12∥Γ−1/2(Au−y)∥22\Phi(u;y) = \frac{1}{2}\|\Gamma^{-1/2}(Au-y)\|_2^2 and μ0=N(m0,C0)\mu_0 = \mathcal{N}(m_0,C_0), the posterior is again Gaussian: μy=N(my,Cy)\mu^y = \mathcal{N}(m^y,C^y) (Kalman update).


Natural questions

  1. Beyond the linear Gaussian case, how will we practically realise and access μy\mu^y? Here we eventually use all the standard tools of numerical integration to approximate posterior expectations of quantities of interest.

    NB: MH-MCMC is well suited to this situation, since it can be implemented without knowing the normalising constant ZyZ^y, because it cancels out in the acceptance probability calculation.

  2. Does the Bayesian approach alleviate the ill-posedness of the inverse problem? The posterior μy\mu^y is well defined, but is it a stable function of the data yy?

  3. How are the Bayesian and optimisation viewpoints connected?


Well-posedness of BIPs

To make quantitative statements about the stability of μy\mu^y as a function of yy, we need a distance function on the set of probability measures on HH. There are many good ones, e.g. total variation distance, the Kullback–Leibler divergence, but we'll use the Hellinger distance.

Suppose we have μ1,μ2\mu_1, \mu_2 that both have densities with respect to ν\nu. The Hellinger distance between them is

dH(μ1,μ2)2=12∫H∣dμ1dν−dμ2dν∣2dνd_H(\mu_1,\mu_2)^2 = \frac{1}{2} \int_H \left| \sqrt{\frac{d\mu_1}{d\nu}} - \sqrt{\frac{d\mu_2}{d\nu}} \right|^2 d\nu

NB: We always have 0≤dH(μ1,μ2)≤10 \le d_H(\mu_1,\mu_2) \le 1.

To see why square roots appear, separate two Gaussian means while keeping their variances fixed. The shaded integrand in the square-root view accumulates to the squared Hellinger distance.

Distance between square roots measures changed belief

Two probability densities

-40700.6unknown udensity

Square roots and distance integrand

-40700.7unknown usquare-root density

m=0.000, dᴴ²=1−exp(−m²/8)=0.000

The amber area is half the squared difference, not the raw distance between the two curves. Coincident laws give zero; separated laws increase Hellinger distance.

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

Ready to explore.
Compare N(0,1) and N(m,1), m from 0 to 3. Hellinger distance squared is 1−exp(−m²/8). The shaded area in the right plot is half the squared difference between square-root densities, whose integral is this distance squared. ↗

One nice feature of dHd_H is that it controls expected values of quantities of interest.

Lemma. For any f∈L2(H,μ1)∩L2(H,μ2)f \in L^2(H,\mu_1) \cap L^2(H,\mu_2),

∣Eμ1[f]−Eμ2[f]∣≤2Eμ1[f2]+Eμ2[f2]⋅dH(μ1,μ2)\left| \mathbb{E}_{\mu_1}[f] - \mathbb{E}_{\mu_2}[f] \right| \le 2\sqrt{\mathbb{E}_{\mu_1}[f^2] + \mathbb{E}_{\mu_2}[f^2]} \cdot d_H(\mu_1,\mu_2)

(The proof is basically just an application of the triangle inequality and the Cauchy–Schwarz inequality.)

Example (finite-dim case). The Hellinger distance between Gaussians μ0=N(m0,C0)\mu_0 = \mathcal{N}(m_0,C_0) and μ1=N(m1,C1)\mu_1 = \mathcal{N}(m_1,C_1) involves a formula that hints at a problem for infinite dimensions: even if m0−m1m_0 - m_1 is small, it may lie outside certain ranges, making dH(μ0,μ1)=1d_H(\mu_0,\mu_1) = 1 no matter how small the mean difference is.

The posterior turns out to be stable in the Hellinger sense.

Lemma. Let μ1,μ2\mu_1, \mu_2 be of the form

μi(du)=1Ziexp⁡(−Φi(u)) ν(du)\mu_i(du) = \frac{1}{Z_i} \exp(-\Phi_i(u)) \, \nu(du)

where ν\nu is a probability measure, Φ1,Φ2\Phi_1, \Phi_2 are measurable and non-negative, 0<Zi≤10<Z_i\le1, and Φ1−Φ2∈L2(ν)\Phi_1-\Phi_2\in L^2(\nu). Then

dH(μ1,μ2)≤12min⁡(Z1,Z2)∥Φ1−Φ2∥L2(ν)d_H(\mu_1,\mu_2) \le \frac{1}{\sqrt{2} \min(Z_1,Z_2)} \|\Phi_1 - \Phi_2\|_{L^2(\nu)}

Derivation. Put ai=e−Φi/2a_i=e^{-\Phi_i/2} and ri=Zi=∥ai∥2r_i=\sqrt{Z_i}=\|a_i\|_2. Since t↦e−t/2t\mapsto e^{-t/2} is 1/21/2-Lipschitz on [0,∞)[0,\infty),

∥a1−a2∥2≤12∥Φ1−Φ2∥2,∣r1−r2∣≤∥a1−a2∥2.\|a_1-a_2\|_2\le\tfrac12\|\Phi_1-\Phi_2\|_2,\qquad |r_1-r_2|\le\|a_1-a_2\|_2.

Adding and subtracting a2/r1a_2/r_1 gives ∥a1/r1−a2/r2∥2≤2∥a1−a2∥2/min⁡ri\|a_1/r_1-a_2/r_2\|_2\le2\|a_1-a_2\|_2/\min r_i. Divide by 2\sqrt2 to bound Hellinger distance. Since Zi≥Zi\sqrt{Z_i}\ge Z_i, this proves the stated (weaker) bound.

Two related warnings:

  1. Since dH(μ1,μ2)≤1d_H(\mu_1,\mu_2) \le 1 under all circumstances, the inequality could be "true but useless" if the RHS is large.
  2. When Φi\Phi_i grows rapidly (e.g. it is a misfit function for very precisely observed data), ZiZ_i will be very small, and we end up in the situation of warning 1.

Applying the lemma to a specific BIP

Φ(u;y)=12∥Γ−1/2(y−G(u))∥2\Phi(u;y) = \frac{1}{2} \|\Gamma^{-1/2}(y - G(u))\|^2

Theorem (sufficient moment assumptions). Assume additionally ∫H∥G(u)∥2 μ0(du)<∞\int_H\|G(u)\|^2\,\mu_0(du)<\infty; for globally Lipschitz GG, a prior with finite second moment suffices. The posterior μy\mu^y is a locally Lipschitz continuous function of yy. That is, for each R>0R > 0, there exists KK such that for all y,y′y, y' with bounded norm,

dH(μy,μy′)≤K∥y−y′∥d_H(\mu^y, \mu^{y'}) \le K \|y - y'\|

For bounded y,y′y,y', the difference of squared misfits is bounded by CR(1+∥G(u)∥)∥y−y′∥C_R(1+\|G(u)\|)\|y-y'\|. The moment assumption makes its L2(μ0)L^2(\mu_0) norm finite. Also choose a set of positive prior mass where ∥G(u)∥\|G(u)\| is bounded; the likelihood on that set gives a uniform positive lower bound on ZyZ^y for ∥y∥≤R\|y\|\le R. The perturbation lemma now gives the theorem. This is a sufficient route, not the weakest possible hypotheses; see Stuart (2010).

But remember that KK can easily be large when the noise covariance Γ\Gamma is small!


Maximum a posteriori (MAP) estimation

To build intuition, consider a BIP on H=RNH = \mathbb{R}^N, where the prior μ0\mu_0 has a PDF ρ0\rho_0. The posterior μy\mu^y also has a PDF ρy\rho^y:

ρy(u)=exp⁡(−Φ(u;y))Zyρ0(u)\rho^y(u) = \frac{\exp(-\Phi(u;y))}{Z^y} \rho_0(u)

Take negative logarithms:

−log⁡ρy(u)=Φ(u;y)−log⁡ρ0(u)+log⁡Zy-\log \rho^y(u) = \Phi(u;y) - \log \rho_0(u) + \log Z^y

Let's further specialise to a nondegenerate centred Gaussian prior (C0C_0 SPD), μ0=N(0,C0)\mu_0 = \mathcal{N}(0,C_0):

−log⁡ρy(u)=Φ(u;y)+12∥C0−1/2u∥2+log⁡Zy+12log⁡det⁡(2πC0)-\log \rho^y(u) = \Phi(u;y) + \frac{1}{2} \|C_0^{-1/2} u\|^2 + \log Z^y + \frac12\log\det(2\pi C_0)

This is exactly the Tikhonov regularisation of the misfit function Φ\Phi.

Thus, Tikhonov-regularised misfit minimisation was finding a maximiser of the Bayesian posterior density (at least for Gaussian prior), i.e. a mode of the posterior distribution, or a maximum a posteriori (MAP) point. A mode maximises density relative to the chosen coordinates/reference volume; every individual point still has probability zero in a nondegenerate continuous law. A nonlinear change of coordinates can change the density mode.

When dim⁡H=∞\dim H = \infty, we have no uniform reference measure and no PDFs. We have to directly examine the μy\mu^y-probabilities of small balls and seek a MAP point. It turns out that there are many ways to make this mathematically precise, and in infinite dimensions, MAP estimation must be handled with care.


Gaussian process regression and kernel interpolation

Suppose that u∼GP(m,k)u \sim \mathrm{GP}(m,k) on a set XX, and we observe the values

yj=u(zj)+ηjy_j = u(z_j) + \eta_j

at points z1,…,zJ∈Xz_1, \ldots, z_J \in X with i.i.d. observational errors ηj∼N(0,σ2)\eta_j \sim \mathcal{N}(0,\sigma^2).

We are interested in the posterior/conditional process u∣yu \mid y, where y∈RJy \in \mathbb{R}^J. As it turns out, u∣yu \mid y is a Gaussian process with mean function mym^y and covariance function kyk^y given by

my(z)=m(z)+k(z,z)(k(z,z)+σ2I)−1(y−m(z))m^y(z) = m(z) + k(z,\mathbf{z}) (k(\mathbf{z},\mathbf{z}) + \sigma^2 I)^{-1} (y - m(\mathbf{z})) ky(z,z′)=k(z,z′)−k(z,z)(k(z,z)+σ2I)−1k(z,z′)k^y(z,z') = k(z,z') - k(z,\mathbf{z}) (k(\mathbf{z},\mathbf{z}) + \sigma^2 I)^{-1} k(\mathbf{z},z')

where z\mathbf{z} denotes the vector of observation points and k(z,z)k(\mathbf{z},\mathbf{z}) is the J×JJ \times J Gram matrix.

When σ=0\sigma = 0 and the observation Gram matrix is invertible, i.e. for nonredundant noiseless data, u∣yu \mid y exactly interpolates the observations. In this case, mym^y is called the kernel interpolant of the data. In the noisy case σ>0\sigma > 0, we are performing regression.

We can (fairly easily) generalise the above to observations y=Hu+ηy = Hu + \eta with HH being a "nice" linear operator acting on sample paths of uu and η\eta being Gaussian; e.g. local averages.

We may also be interested not so much in u∣yu \mid y itself, but in the image of u∣yu \mid y under a nice operator TT, e.g.

Tu=∫01u(z) dzTu = \int_0^1 u(z) \, dz

TuTu is again Gaussian when TT is a well-defined Gaussian linear functional (for this integral, suitable integrability of the mean and covariance suffices). Its mean estimates the integral and its variance quantifies uncertainty under the specified model; it is not automatically a calibrated bound on an arbitrary unknown truth.

A single observation can affect a whole function. Where should its influence, and the reduction in uncertainty, be strongest?

Prior at each locationPrior at each locationlocation zlatent value-33-0.52.5solid: mean 0dashed: +1 standard deviation
After y = 2 at z = 0After y = 2 at z = 0location zlatent value-33-0.52.5solid: posterior meandashed: mean + std. deviation
Zero-mean squared-exponential prior k(z,z′)=exp(−(z−z′)²/2), unit marginal variance, one observation y=2 at zero and noise variance 0.25. Dashed curves show only the upper one-standard-deviation boundary, not sample paths or simultaneous confidence bands. ↗

At the sensor the posterior mean is 1.6 and variance 0.2. Far away, covariance with the sensor tends to zero, restoring the prior mean and variance. The observation changes the mean through correlation and leaves residual uncertainty because its noise is nonzero.

Condition on three observations in sequence. Within a stage, the next observation gradually gains precision, so the transition is itself a valid Gaussian update. Compare the posterior band with the covariance that remains between locations.

Each observation removes correlated uncertainty

Posterior function and uncertainty

-303-202location xlatent function

Remaining covariance

-303-303location xlocation x′

Observation precision stages: 0.000 / 3; Var[u(0)|data]=1.000

Dots on the right scale with the magnitude of covariance on a fixed 13×13 grid. As observations gain precision, correlated regions lose uncertainty; finite noise leaves nonzero posterior variance.

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

Ready to explore.
Zero-mean squared-exponential GP, unit length scale, observations at −1.2,0,1.2 with values 0.8,−0.7,1.1 and independent noise variance 0.09. Within each stage, gradually increase that observation's precision from zero to 1/0.09. Bands show pointwise latent mean ±1 standard deviation; they are not simultaneous confidence bands. ↗

Derive the prediction from the same conditioning theorem

At any test location zz, the joint vector (u(z),y)(u(z),y) is Gaussian with cross covariance k(z,z)k(z,\mathbf z) and data covariance K+σ2IK+\sigma^2I. Substitute those blocks into Week 3's theorem. For several test locations, do the same jointly: this establishes a posterior process, not merely separate marginal predictions.

For noiseless data, the row k(zi,z)k(z_i,\mathbf z) is row ii of KK, so my(zi)=yim^y(z_i)=y_i and ky(zi,zi)=0k^y(z_i,z_i)=0. For noisy data, the latent posterior variance stays nonnegative. Predicting a new noisy measurement adds σ2\sigma^2 to that latent variance.

For Tu=∫01u(z) dzTu=\int_0^1u(z)\,dz, define bj=∫01k(z,zj) dzb_j=\int_0^1 k(z,z_j)\,dz and v=∫01∫01k(z,z′) dz dz′v=\int_0^1\int_0^1k(z,z')\,dz\,dz'. Then

E[Tu∣y]=∫01m(z) dz+bT(K+σ2I)−1(y−m(z)),\mathbb E[Tu\mid y]=\int_0^1m(z)\,dz+b^T(K+\sigma^2I)^{-1}(y-m(\mathbf z)), Var⁡(Tu∣y)=v−bT(K+σ2I)−1b.\operatorname{Var}(Tu\mid y)=v-b^T(K+\sigma^2I)^{-1}b.

The same projection that corrected a material stiffness now corrects an integral, and the residual covariance reports what the observations leave unresolved.

Course synthesis and exercises

  1. Show the Hellinger expectation bound by writing p−q=(p−q)(p+q)p-q=(\sqrt p-\sqrt q)(\sqrt p+\sqrt q) and applying Cauchy–Schwarz.
  2. For prior u∼N(0,1)u\sim\mathcal N(0,1) and observation y=u+ηy=u+\eta, η∼N(0,σ2)\eta\sim\mathcal N(0,\sigma^2) independent, compute the posterior mean, variance and MAP. What happens as σ→0\sigma\to0?
  3. Explain why the GP mean can belong to the kernel RKHS even though typical prior draws do not.

The course has kept one question in view: what can imperfect measurements justify? Orthogonal coordinates separate information; compactness exposes its loss; probability describes uncertainty; regularisation and conditioning control how evidence changes a prediction. Computation must still respect the assumptions of the model and the convergence of its approximations.