Simple Algorithm
Machine Learning · Convergence · 28 min

GP Regression in Depth

Posterior equations, the marginal likelihood and Cholesky.

The GP posterior fits on one line, but using it well takes more: a proof of where it comes from, a numerically stable algorithm, gradients for the hyperparameters, a way past the cubic cost, and a precise meaning for the error bars. This lesson supplies all five, and ends with a result from 1996 that still shapes deep learning theory: infinitely wide neural networks are Gaussian processes.

What you’ll learn

  • Prove the Gaussian conditioning formula with a Schur complement, and show that the weight-space view (Bayesian linear regression) gives the same posterior.
  • Implement GP regression with a Cholesky factorization (Rasmussen & Williams' Algorithm 2.1), and explain its costs and numerical pitfalls.
  • Derive the gradient of the log marginal likelihood, and prove that the posterior standard deviation is a worst-case error over the RKHS unit ball.
  • Explain sparse variational GPs with inducing points, and derive the Gaussian-process limit of infinitely wide neural networks.

Conditioning, proved two ways

DerivationProof by decorrelation
  1. r=b−C⊤A−1a,Cov⁡(r,a)=C⊤−C⊤A−1A=0\mathbf r=\mathbf b-C^\top A^{-1}\mathbf a,\qquad\Cov(\mathbf r,\mathbf a)=C^\top-C^\top A^{-1}A=0

    Subtract from b\mathbf b its best linear predictor from a\mathbf a. The remainder r\mathbf r is uncorrelated with a\mathbf a:

  2. Er=μb−C⊤A−1μa,Cov⁡(r)=B−2C⊤A−1C+C⊤A−1AA−1C=B−C⊤A−1C\E\mathbf r=\boldsymbol\mu_b-C^\top A^{-1}\boldsymbol\mu_a,\qquad\Cov(\mathbf r)=B-2C^\top A^{-1}C+C^\top A^{-1}AA^{-1}C=B-C^\top A^{-1}C

    (r,a)(\mathbf r,\mathbf a) is a linear image of a Gaussian vector, hence jointly Gaussian, and for jointly Gaussian vectors uncorrelated means independent. So observing a\mathbf a leaves the distribution of r\mathbf r unchanged, with

  3. f∗∣y∼N(k∗⊤(K+σn2I)−1y,  k(x∗,x∗)−k∗⊤(K+σn2I)−1k∗)f_*\mid\mathbf y\sim\mathcal N\Big(\mathbf k_*^\top(K+\sigma_n^2I)^{-1}\mathbf y,\ \ k(\mathbf x_*,\mathbf x_*)-\mathbf k_*^\top(K+\sigma_n^2I)^{-1}\mathbf k_*\Big)

    Given a\mathbf a, b=r+C⊤A−1a\mathbf b=\mathbf r+C^\top A^{-1}\mathbf a is r\mathbf r shifted by a known vector, which proves the theorem. With a=y\mathbf a=\mathbf y, A=K+σn2IA=K+\sigma_n^2I, C=k∗C=\mathbf k_* and zero means, it gives the GP posterior:

The same answer comes from parameters instead of functions. Take f(x)=φ(x)⊤wf(\mathbf x)=\varphi(\mathbf x)^\top\mathbf w with prior w∼N(0,Σp)\mathbf w\sim\mathcal N(\mathbf 0,\Sigma_p); then ff is a GP with kernel k(x,x′)=φ(x)⊤Σpφ(x′)k(\mathbf x,\mathbf x')=\varphi(\mathbf x)^\top\Sigma_p\varphi(\mathbf x'). Bayesian linear regression (Bayesian Linear Regression) gives the weight posterior N(σn−2A−1Φ⊤y, A−1)\mathcal N(\sigma_n^{-2}A^{-1}\Phi^\top\mathbf y,\ A^{-1}) with A=σn−2Φ⊤Φ+Σp−1A=\sigma_n^{-2}\Phi^\top\Phi+\Sigma_p^{-1}, and two matrix identities turn it into the function-space formulas:

DerivationWeight space equals function space
  1. σn−2A−1Φ⊤=ΣpΦ⊤(ΦΣpΦ⊤+σn2I)−1⟹φ(x∗)⊤wˉ=k∗⊤(K+σn2I)−1y\sigma_n^{-2}A^{-1}\Phi^\top=\Sigma_p\Phi^\top\big(\Phi\Sigma_p\Phi^\top+\sigma_n^2I\big)^{-1}\quad\Longrightarrow\quad\varphi(\mathbf x_*)^\top\bar{\mathbf w}=\mathbf k_*^\top(K+\sigma_n^2I)^{-1}\mathbf y

    Push-through (multiply both sides by AA on the left and by ΦΣpΦ⊤+σn2I\Phi\Sigma_p\Phi^\top+\sigma_n^2I on the right to check it). With K=ΦΣpΦ⊤K=\Phi\Sigma_p\Phi^\top and k∗=ΦΣpφ(x∗)\mathbf k_*=\Phi\Sigma_p\varphi(\mathbf x_*) the predictive mean φ(x∗)⊤wˉ\varphi(\mathbf x_*)^\top\bar{\mathbf w} becomes:

  2. A−1=Σp−ΣpΦ⊤(ΦΣpΦ⊤+σn2I)−1ΦΣp⟹φ(x∗)⊤A−1φ(x∗)=k(x∗,x∗)−k∗⊤(K+σn2I)−1k∗A^{-1}=\Sigma_p-\Sigma_p\Phi^\top\big(\Phi\Sigma_p\Phi^\top+\sigma_n^2I\big)^{-1}\Phi\Sigma_p\quad\Longrightarrow\quad\varphi(\mathbf x_*)^\top A^{-1}\varphi(\mathbf x_*)=k(\mathbf x_*,\mathbf x_*)-\mathbf k_*^\top(K+\sigma_n^2I)^{-1}\mathbf k_*

    Woodbury's identity turns the weight covariance into the function-space variance:

  3. O(nD2+D3)⏟weight spacevsO(n2d+n3)⏟function space\underbrace{\order{nD^2+D^3}}_{\text{weight space}}\quad\text{vs}\quad\underbrace{\order{n^2d+n^3}}_{\text{function space}}

    Weight space costs O(D3)\order{D^3} for DD features, function space O(n3)\order{n^3} for nn data points: the same trade as primal against dual in The Kernel Trick. Function space is the only option when D=∞D=\infty.

Cholesky in practice

text
GP-REGRESSION(X, y, kernel k, noise variance sn2, test input x*)   # Rasmussen & Williams, Algorithm 2.1
  L     = cholesky(K + sn2 * I)              # K = k(X, X); n^3/6 multiply-adds
  alpha = L^T \ (L \ y)                       # two triangular solves, O(n^2)
  mean  = k*^T alpha                          # k* = k(X, x*); O(n) per test input
  v     = L \ k*                              # O(n^2) per test input
  var   = k(x*, x*) - v^T v                   # posterior variance of f(x*)
  logp  = -0.5 * y^T alpha - sum_i log L[i,i] - (n/2) log(2 pi)
  return mean, var, logp

The last line uses log⁡det⁡(K+σn2I)=2∑ilog⁡Lii\log\det(K+\sigma_n^2I)=2\sum_i\log L_{ii}, so the factorization pays for the marginal likelihood too.

Practical rules:

  • Never form (K+σn2I)−1(K+\sigma_n^2I)^{-1}. Triangular solves with LL are cheaper and far more stable.
  • Add jitter. With little or no noise, or a long length scale, KK is numerically singular: the RBF Gram matrix of nearby points has eigenvalues that decay faster than any power. Adding 10−6σf210^{-6}\sigma_f^2 to the diagonal (the widget's choice) keeps the factorization alive.
  • Optimize in log space. ℓ\ell, σf\sigma_f and σn\sigma_n are positive and range over orders of magnitude.
  • Sample by updating prior samples. Exact posterior samples follow from prior samples by Matheron's rule: fpost(⋅)=f(⋅)+k(⋅,X)(K+σn2I)−1(y−f(X)−ε)f_{\text{post}}(\cdot)=f(\cdot)+k(\cdot,X)(K+\sigma_n^2I)^{-1}\big(\mathbf y-f(X)-\boldsymbol\varepsilon\big) with ε∼N(0,σn2I)\boldsymbol\varepsilon\sim\mathcal N(\mathbf 0,\sigma_n^2I), which lets prior samples be drawn cheaply, for instance from random features, and then conditioned on the data (Wilson et al., 2020).
Predict before you look

Factorizing the 5,000×5,0005{,}000\times5{,}000 matrix K+σn2IK+\sigma_n^2I takes 1 second on some machine. About how many seconds does the same step take for 20,00020{,}000 points?

Show the answer

64 s

Cholesky costs about n3/6n^3/6 operations, so four times the data costs 43=644^3=64 times the time, while memory grows sixteenfold, to about 3.2 GB in double precision. Every hyperparameter step repeats it, which is why exact GPs stall in the tens of thousands of points without the methods of Scaling Kernel Methods.

Gradients, and what the error bar means

DerivationThe gradient of the log marginal likelihood
  1. ∂Ky−1∂θj=−Ky−1∂Ky∂θjKy−1,∂∂θjlog⁡det⁡Ky=tr⁡(Ky−1∂Ky∂θj)\frac{\partial K_y^{-1}}{\partial\theta_j}=-K_y^{-1}\frac{\partial K_y}{\partial\theta_j}K_y^{-1},\qquad\frac{\partial}{\partial\theta_j}\log\det K_y=\operatorname{tr}\Big(K_y^{-1}\frac{\partial K_y}{\partial\theta_j}\Big)

    Write Ky=K+σn2IK_y=K+\sigma_n^2I, which depends on each hyperparameter θj\theta_j. Two facts from matrix calculus:

  2. ∂log⁡p(y∣X,θ)∂θj=12 α⊤∂Ky∂θjα−12tr⁡(Ky−1∂Ky∂θj)=12tr⁡((αα⊤−Ky−1)∂Ky∂θj)\frac{\partial\log p(\mathbf y\mid X,\boldsymbol\theta)}{\partial\theta_j}=\tfrac12\,\boldsymbol\alpha^\top\frac{\partial K_y}{\partial\theta_j}\boldsymbol\alpha-\tfrac12\operatorname{tr}\Big(K_y^{-1}\frac{\partial K_y}{\partial\theta_j}\Big)=\tfrac12\operatorname{tr}\Big(\big(\boldsymbol\alpha\boldsymbol\alpha^\top-K_y^{-1}\big)\frac{\partial K_y}{\partial\theta_j}\Big)

    Differentiate log⁡p=−12y⊤Ky−1y−12log⁡det⁡Ky−n2log⁡2π\log p=-\tfrac12\mathbf y^\top K_y^{-1}\mathbf y-\tfrac12\log\det K_y-\tfrac n2\log2\pi and collect both terms in one trace, with α=Ky−1y\boldsymbol\alpha=K_y^{-1}\mathbf y (Rasmussen & Williams, eq. 5.9):

  3. ∂k(x,x′)∂ℓ=k(x,x′) ∥x−x′∥2ℓ3\frac{\partial k(\mathbf x,\mathbf x')}{\partial\ell}=k(\mathbf x,\mathbf x')\,\frac{\norm{\mathbf x-\mathbf x'}^2}{\ell^3}

    For the RBF length scale the matrix derivative is explicit. Computing Ky−1K_y^{-1} from the Cholesky factor costs O(n3)\order{n^3} once; each hyperparameter then costs O(n2)\order{n^2}, since the trace of a product needs only the elementwise products of the two matrices.

Predict before you look

With the 8 starting points at the defaults, the widget reports data fit −3.61-3.61 and complexity 1.961.96. What is log⁡p(y∣X)\log p(\mathbf y\mid X)?

Show the answer

-9

−3.61+1.96−82log⁡2π=−3.61+1.96−7.35=−9.00-3.61+1.96-\tfrac82\log2\pi=-3.61+1.96-7.35=-9.00, the value the widget shows. The constant −n2log⁡2π-\tfrac n2\log2\pi never changes with the hyperparameters, so the fit trades only the first two terms.

DerivationProof
  1. g(x)−∑iwig(xi)=⟨g, k(x,⋅)−∑iwik(xi,⋅)⏟hx⟩Hg(\mathbf x)-\sum_iw_ig(\mathbf x_i)=\Big\langle g,\ \underbrace{k(\mathbf x,\cdot)-\sum_iw_ik(\mathbf x_i,\cdot)}_{h_{\mathbf x}}\Big\rangle_{\mathcal H}

    By the reproducing property the error is an inner product with a fixed function hxh_{\mathbf x}, so by Cauchy–Schwarz the supremum over the unit ball is ∥hx∥H\norm{h_{\mathbf x}}_{\mathcal H}:

  2. ∥hx∥2=k(x,x)−2 w⊤k(x)+w⊤Kw=k(x,x)−k(x)⊤K−1k(x)=σ2(x)\norm{h_{\mathbf x}}^2=k(\mathbf x,\mathbf x)-2\,\mathbf w^\top\mathbf k(\mathbf x)+\mathbf w^\top K\mathbf w=k(\mathbf x,\mathbf x)-\mathbf k(\mathbf x)^\top K^{-1}\mathbf k(\mathbf x)=\sigma^2(\mathbf x)

    Expand the squared norm and insert w=K−1k(x)\mathbf w=K^{-1}\mathbf k(\mathbf x):

  3. ∣f(x)−μ(x)∣≤∥f∥H σ(x)\abs{f(\mathbf x)-\mu(\mathbf x)}\le\norm f_{\mathcal H}\,\sigma(\mathbf x)

    Consequence: if the true function has ∥f∥H≤B\norm f_{\mathcal H}\le B, the noise-free posterior mean is within B σ(x)B\,\sigma(\mathbf x) of it everywhere, with no probability involved. Noisy versions of this bound drive the regret analysis of GP-UCB in Bayesian Optimization.

Beyond the cubic cost: inducing points

Choose m≪nm\ll n inducing inputs ZZ and let u=f(Z)\mathbf u=f(Z) summarize the function. Early approximations (subset of regressors, FITC; Snelson & Ghahramani, 2006) changed the prior so that the training and test values of ff interact only through u\mathbf u, and Quiñonero-Candela & Rasmussen (2005) unified them as different such modifications. Titsias (2009) kept the exact prior and approximated the posterior instead, with q(f,u)=p(f∣u) q(u)q(\mathbf f,\mathbf u)=p(\mathbf f\mid\mathbf u)\,q(\mathbf u). Optimizing q(u)q(\mathbf u) analytically leaves a collapsed lower bound on the log marginal likelihood:

log⁡p(y) ≥ log⁡N(y; 0, Qnn+σn2I)−12σn2tr⁡(Knn−Qnn),Qnn=KnmKmm−1Kmn\log p(\mathbf y)\ \ge\ \log\mathcal N\big(\mathbf y;\ \mathbf 0,\ Q_{nn}+\sigma_n^2I\big)-\frac1{2\sigma_n^2}\operatorname{tr}\big(K_{nn}-Q_{nn}\big),\qquad Q_{nn}=K_{nm}K_{mm}^{-1}K_{mn}
The first term is the marginal likelihood of a Nyström-approximated GP and costs O(nm2)\order{nm^2}. The trace is the total prior variance of ff at the data that u\mathbf u fails to explain, so it penalizes poorly placed inducing points. The inducing inputs are variational parameters: optimizing them can only tighten the bound, bringing the approximation closer to the exact posterior, so they cannot overfit the way extra model hyperparameters can.

Hensman, Fusi & Lawrence (2013) went further and kept q(u)=N(m,S)q(\mathbf u)=\mathcal N(\mathbf m,S) explicit. The bound then becomes a sum over data points,

L=∑i=1nEq(fi)[log⁡p(yi∣fi)]−DKL(q(u) ∥ p(u)),\mathcal L=\sum_{i=1}^n\E_{q(f_i)}\big[\log p(y_i\mid f_i)\big]-\KL\big(q(\mathbf u)\,\|\,p(\mathbf u)\big),

which mini-batch stochastic optimization handles at O(m3)\order{m^3} per step: GPs on millions of points, and with non-Gaussian likelihoods (classification, counts) as a bonus, since only one-dimensional expectations of log⁡p(yi∣fi)\log p(y_i\mid f_i) are needed.

Infinitely wide networks are Gaussian processes

Take a network with one hidden layer of HH units, f(x)=b+1H∑j=1Hvj ϕ(uj⊤x+aj)f(\mathbf x)=b+\frac1{\sqrt H}\sum_{j=1}^Hv_j\,\phi(\mathbf u_j^\top\mathbf x+a_j), and put independent priors on all the weights, with Evj=0\E v_j=0, Var⁡vj=σv2\Var v_j=\sigma_v^2 and b∼N(0,σb2)b\sim\mathcal N(0,\sigma_b^2). Neal (1996) asked what this prior over functions becomes as H→∞H\to\infty.

DerivationThe kernel of an infinitely wide layer
  1. Cov⁡(f(x),f(x′))=σb2+σv2 Eu,a[ϕ(u⊤x+a) ϕ(u⊤x′+a)]=:k(x,x′)\Cov\big(f(\mathbf x),f(\mathbf x')\big)=\sigma_b^2+\sigma_v^2\,\E_{\mathbf u,a}\big[\phi(\mathbf u^\top\mathbf x+a)\,\phi(\mathbf u^\top\mathbf x'+a)\big]=:k(\mathbf x,\mathbf x')

    At any input the hidden terms vj ϕ(uj⊤x+aj)v_j\,\phi(\mathbf u_j^\top\mathbf x+a_j) are i.i.d. across jj with mean zero. The covariance between two inputs does not depend on HH:

  2. f → H→∞  GP(0,k)f\ \xrightarrow{\ H\to\infty\ }\ \mathcal{GP}(0,k)

    For any finite set of inputs, (f(x1),…,f(xm))(f(\mathbf x_1),\dots,f(\mathbf x_m)) is bb plus a normalized sum of HH i.i.d. random vectors, so the multivariate central limit theorem makes it Gaussian as H→∞H\to\infty: the prior becomes GP(0,k)\mathcal{GP}(0,k).

  3. K(l+1)(x,x′)=σb2+σw2 E(z,z′)∼N(0,Λ(l))[ϕ(z) ϕ(z′)],Λ(l)=(K(l)(x,x)K(l)(x,x′)K(l)(x′,x)K(l)(x′,x′))K^{(l+1)}(\mathbf x,\mathbf x')=\sigma_b^2+\sigma_w^2\,\E_{(z,z')\sim\mathcal N(\mathbf 0,\Lambda^{(l)})}\big[\phi(z)\,\phi(z')\big],\qquad\Lambda^{(l)}=\begin{pmatrix}K^{(l)}(\mathbf x,\mathbf x)&K^{(l)}(\mathbf x,\mathbf x')\\K^{(l)}(\mathbf x',\mathbf x)&K^{(l)}(\mathbf x',\mathbf x')\end{pmatrix}

    Deep networks compose the argument layer by layer (Lee et al., 2018; Matthews et al., 2018): with weight variance σw2/(width)\sigma_w^2/(\text{width}), the kernel of layer l+1l+1 is an expectation over the Gaussian pre-activations of layer ll. For ReLU and erf activations the expectation has a closed form.

Exact Bayesian inference in an infinitely wide network is therefore GP regression with this kernel. The limit has a price: no single hidden unit matters, so the data cannot reshape the hidden layer, and the infinitely wide network learns no features. Training a wide network by gradient descent leads to a different kernel, the neural tangent kernel (Jacot, Gabriel & Hongler, 2018); both limits, and the feature-learning regimes beyond them, are the subject of Infinite Width: NTK & Mean-Field Limits.

Key takeaways

  • Conditioning a Gaussian subtracts the best linear predictor: b∣a\mathbf b\mid\mathbf a has mean μb+C⊤A−1(a−μa)\boldsymbol\mu_b+C^\top A^{-1}(\mathbf a-\boldsymbol\mu_a) and Schur-complement covariance B−C⊤A−1CB-C^\top A^{-1}C. The weight-space view of Bayesian linear regression gives the same posterior through the push-through and Woodbury identities.
  • In practice: one Cholesky factorization (n3/6n^3/6), two triangular solves, log⁡det⁡=2∑ilog⁡Lii\log\det=2\sum_i\log L_{ii}, a little jitter, hyperparameters in log space.
  • ∂log⁡p/∂θj=12tr⁡((αα⊤−Ky−1) ∂Ky/∂θj)\partial\log p/\partial\theta_j=\tfrac12\operatorname{tr}\big((\boldsymbol\alpha\boldsymbol\alpha^\top-K_y^{-1})\,\partial K_y/\partial\theta_j\big). Noise-free, the posterior standard deviation is the worst-case interpolation error over the RKHS unit ball, so ∣f−μ∣≤∥f∥H σ\abs{f-\mu}\le\norm f_{\mathcal H}\,\sigma.
  • Sparse variational GPs replace O(n3)\order{n^3} by O(nm2)\order{nm^2} (Titsias) or O(m3)\order{m^3} per mini-batch step (Hensman et al.); for the squared-exponential kernel with Gaussian inputs, O((log⁡n)d)\order{(\log n)^d} inducing points suffice. Infinitely wide Bayesian networks are GPs whose kernel is computed layer by layer.

Check yourself

In the interactive lesson these are scored with your confidence, and what you miss comes back for review.

Question 1

In the proof of the conditioning formula, why is r=b−C⊤A−1a\mathbf r=\mathbf b-C^\top A^{-1}\mathbf a independent of a\mathbf a?

  1. Because a\mathbf a and b\mathbf b are independent
  2. Because r\mathbf r and a\mathbf a are uncorrelated and jointly Gaussian, and for jointly Gaussian vectors that implies independence
  3. Because AA is invertible
  4. Because r\mathbf r has mean zero
Show the answer

B. Because r\mathbf r and a\mathbf a are uncorrelated and jointly Gaussian, and for jointly Gaussian vectors that implies independence

Cov⁡(r,a)=C⊤−C⊤A−1A=0\Cov(\mathbf r,\mathbf a)=C^\top-C^\top A^{-1}A=0, and (r,a)(\mathbf r,\mathbf a) is a linear transformation of a Gaussian vector. Zero correlation implies independence only in this jointly Gaussian case, which is why the posterior of a GP is again Gaussian.

Question 2

After the Cholesky factor LL and the weights α\boldsymbol\alpha are computed, what does each additional test input cost?

  1. O(n3)\order{n^3} for the mean and the variance, since the factorization must be redone
  2. O(1)\order{1} for both
  3. O(n2)\order{n^2} for the mean and O(n3)\order{n^3} for the variance
  4. O(n)\order{n} for the mean (k∗⊤α\mathbf k_*^\top\boldsymbol\alpha) and O(n2)\order{n^2} for the variance (the solve L\k∗L\backslash\mathbf k_*)
Show the answer

D. O(n)\order{n} for the mean (k∗⊤α\mathbf k_*^\top\boldsymbol\alpha) and O(n2)\order{n^2} for the variance (the solve L\k∗L\backslash\mathbf k_*)

The mean is a dot product of k∗\mathbf k_* with the precomputed α\boldsymbol\alpha. The variance needs v=L\k∗\mathbf v=L\backslash\mathbf k_*, a triangular solve costing O(n2)\order{n^2}. The O(n3)\order{n^3} factorization is shared by all test inputs.

Question 3

A function has RKHS norm at most 2 for some kernel. A noise-free GP with that kernel, conditioned on its values at some points, has posterior standard deviation 0.1 at x\mathbf x. What can you guarantee?

  1. ∣f(x)−μ(x)∣≤0.2\abs{f(\mathbf x)-\mu(\mathbf x)}\le0.2, with certainty
  2. ∣f(x)−μ(x)∣≤0.2\abs{f(\mathbf x)-\mu(\mathbf x)}\le0.2 with probability about 95%
  3. ∣f(x)−μ(x)∣≤0.1\abs{f(\mathbf x)-\mu(\mathbf x)}\le0.1, with certainty
  4. Nothing, since ff was not drawn from the GP
Show the answer

A. ∣f(x)−μ(x)∣≤0.2\abs{f(\mathbf x)-\mu(\mathbf x)}\le0.2, with certainty

∣f(x)−μ(x)∣=∣⟨f,hx⟩∣≤∥f∥H ∥hx∥H=2×0.1\abs{f(\mathbf x)-\mu(\mathbf x)}=\abs{\langle f,h_{\mathbf x}\rangle}\le\norm f_{\mathcal H}\,\norm{h_{\mathbf x}}_{\mathcal H}=2\times0.1. The worst-case reading of the posterior standard deviation needs no probabilistic assumption about ff at all.

Question 4

Why can the inducing inputs ZZ of a sparse variational GP be optimized freely without overfitting?

  1. Because there are fewer of them than data points
  2. Because they are variational parameters: improving them tightens a lower bound on the marginal likelihood and moves the approximation toward the exact posterior, rather than changing the model
  3. Because they are fixed at a random subset of the inputs
  4. They do overfit, so they must be chosen on held-out data
Show the answer

B. Because they are variational parameters: improving them tightens a lower bound on the marginal likelihood and moves the approximation toward the exact posterior, rather than changing the model

In Titsias's formulation the prior is the exact GP; ZZ only parameterizes the approximating posterior. Maximizing the bound minimizes the KL divergence to the true posterior, so a better ZZ means a better approximation of a fixed model, not a more flexible model.

Further reading

  • C. E. Rasmussen & C. K. I. Williams, Gaussian Processes for Machine Learning (MIT Press, 2006), chapters 2, 5 and 8.
  • M. K. Titsias, "Variational learning of inducing variables in sparse Gaussian processes," Proceedings of AISTATS, PMLR 5, 567–574 (2009).
  • J. Hensman, N. Fusi & N. D. Lawrence, "Gaussian processes for big data," Proceedings of the Conference on Uncertainty in Artificial Intelligence (UAI) (2013).
  • R. M. Neal, Bayesian Learning for Neural Networks (Springer, 1996).
  • J. Lee, Y. Bahri, R. Novak, S. S. Schoenholz, J. Pennington & J. Sohl-Dickstein, "Deep neural networks as Gaussian processes," ICLR (2018).