Common mathematics core; Probability course of the University of Oxford and Statistics course of the University of Oxford are compulsory. A12 simulation and statistical programming is optional.
SB1 applied and computational statistics is compulsory; students must also take at least two units from SB2 and SB3.
Compulsory double unit: SB1.1 applied statistics and SB1.2 computational statistics.
Part B option listed for 2026–27; applications of probability.
Part B option listed for 2026–27; a course in machine learning.
Statistics options and a compulsory statistics-project dissertation, with mathematics options available under the course rules.
Source: Oxford Trinity Term 2025, SC4, A16047H1, parent PDF pages 11–16. The six-page paper was examined on 11 June 2025. Solutions cover all three questions; question statements are omitted.
The marginal likelihood integrates the likelihood function against the prior density:
It is the normalizing constant in Bayes' theorem. For the subsequent posterior distribution and importance sampling calculations, assume a normalized prior density and .
Write . Choose an interior maximum a posteriori estimate, a globally maximizing posterior mode
Suppose is twice continuously differentiable near and its negative Hessian matrix is a positive-definite matrix. The second-order Taylor expansion is
Exponentiating and normalizing this local approximation gives the Laplace approximation
Thus the approximate mean is the posterior mode, and the approximate covariance matrix is the inverse local curvature. This normal approximation is useful when most posterior probability is concentrated around this mode. A boundary mode, singular curvature, or several substantial modes requires a modified approximation.
Evaluate Bayes' theorem at the posterior mode :
The multivariate normal density in the Laplace approximation has height at its mean. Therefore
Equivalently, the approximate log marginal likelihood is
The determinant factor accounts for the volume of the locally plausible parameter region, which the peak likelihood alone does not measure.
Put and . The support condition for importance sampling is essential: almost everywhere that . For one draw , the importance weight satisfies
By linearity of expectation,
This proves that it is an unbiased estimator. If the proposal omits a region of positive target mass, the expected value instead misses that region's contribution; the unconditional unbiasedness claim needs the stated support condition for importance sampling.
With , , and as above, independence of the draws gives the variance of a sample mean:
This formula allows infinite variance. To identify the optimum, write . Then
The last equality uses . Its nonnegative integrand proves
Indeed, all importance weights then equal . This is a formal optimum: evaluating the normalized posterior density generally already requires the unknown marginal likelihood.
Poor coverage of regions with substantial posterior mass produces large weights. In particular, excessively light proposal tails, a proposal that is too narrow, or a missed mode can make enormous or infinite. A proposal that is unnecessarily diffuse can also waste nearly all draws on negligible posterior probability. Omitting target support altogether violates unbiasedness, rather than merely increasing variance.
For reciprocal importance sampling, use the same and but draw from the posterior density . Here the support requirement is reversed: the normalized density must vanish almost everywhere that . Thus may be confined to a subset of the posterior distribution's support. For ,
Consequently,
It is the estimate of the reciprocal that is an unbiased estimator. Taking its reciprocal does not generally produce an unbiased estimator of : inversion is nonlinear. In fact, when the average is strictly positive and the relevant expectation exists, Jensen's inequality gives .
For under the posterior density ,
The independent-draw variance of a sample mean therefore yields
Since
we again obtain
The optimum is again generally unavailable as an evaluable normalized density without knowing .
A proposal with too much mass where the posterior density is tiny makes reciprocal weights unstable. In particular, proposal tails that are too heavy relative to the posterior distribution can make infinite. This contrasts with ordinary importance sampling, whose dangerous denominator is . Choosing a normalized restricted to a well-covered posterior region is allowed, although a very small region can make most draws contribute zero and increase variance. Taking gives the Harmonic mean estimator of Bayesian model evidence, illustrating why very small likelihood values can cause severe instability.
Use the factorization inside the evidence lower bound:
Hence
The marginal likelihood is independent of the variational parameter , so maximizing the evidence lower bound is equivalent to minimizing the Kullback-Leibler divergence. Nonnegativity of the Kullback-Leibler divergence also gives .
The independent coordinates make the logarithm of the probability density ratio a sum. For coordinate , its contribution to the Kullback-Leibler divergence is
because . Thus, retaining all constants,
Here and , so both normal densities are nondegenerate.
The printed minimization of the evidence lower bound has no solution. To distinguish that literal result from the usual variational inference optimum, put . The preceding Kullback-Leibler divergence satisfies
Its unique global minimum occurs at . Since , this is the unique global maximum of the evidence lower bound:
The optimal common variance is the harmonic mean of the two posterior variances. However, as either or . Therefore
The source PDF confirms the minimization wording; replacing it by maximization would give the finite value above, consistently with part (i).
In this setting a positive-semidefinite kernel is an inner-product similarity: there exist a real Hilbert space and a feature map such that
The feature map may be infinite-dimensional. Equivalently, is symmetric and every finite kernel matrix is a positive semidefinite matrix. The equivalence follows by forming the canonical feature space of a positive-semidefinite kernel and taking its Hilbert space completion.
For every , every choice , and every coefficient vector , the required condition is
Thus for the kernel matrix . For a feature map, this follows from
In kernel methods, the term positive-definite kernel commonly uses this non-strict inequality. Strict positive definiteness is the stronger requirement that the expression be positive for distinct inputs and every nonzero ; it is not required here.
The closure property of positive-semidefinite kernels gives three constructions, each seen directly from the feature maps .
Another useful consequence is pullback: if and is a positive-semidefinite kernel on , then has feature map .
Take the real L2 space and the feature map
Each indicator function belongs to because its squared L2 norm is . Their inner product is the length of the overlapping intervals:
This realizes as a positive-semidefinite kernel; it is also the Brownian covariance kernel.
Choose two inputs . Their proposed kernel matrix is
The coefficient vector gives
Thus is not a positive semidefinite matrix, and
Equivalently, its determinant is negative.
Reciprocation reverses the order of positive numbers, so
This is the pullback of the positive-semidefinite kernel from part (i) by . Explicitly, the feature map into the same L2 space is
Hence is a positive-semidefinite kernel, with for every allowed input.
Let be the Jacobian matrix with row . Differentiating the squared-error loss function gives
The parameter gradient flow is consequently . The chain rule then gives
where, explicitly,
It is a Gram matrix and therefore a positive semidefinite matrix: . These derivatives are understood wherever the network is differentiable; for piecewise differentiable activations the same calculation applies along differentiable portions of the trajectory.
Under the stated infinite-width scaling and freezing assumptions, the deterministic limiting kernel matrix has entries
For a sequence of finite-width networks, this expectation is interpreted in the stated width limit. The resulting neural tangent kernel is a positive-semidefinite kernel, since every finite coefficient vector gives .
The prediction gradient flow is linear:
The matrix exponential solves the constant-coefficient system because the residual satisfies . Each positive-eigenvalue component decays exponentially; a component in the null space of stays at its initial residual. Thus for every initial prediction if is a positive-definite matrix. The limiting kernel matrix being deterministic does not require to be deterministic.
For in the Reproducing kernel Hilbert space , take the directional derivative:
The reproducing property says . Hence
Each kernel section belongs to the Reproducing kernel Hilbert space, so this finite sum is an admissible element. Uniqueness of a vector with these inner products gives the functional gradient
Evaluating the negative functional gradient at yields
Thus the evaluation vector follows
This is exactly the limiting prediction dynamics in part (ii). If , subtracting the two systems gives with zero initial value, so for every .
An infinitely wide neural network in this regime follows the same training-prediction dynamics as kernel regression with its neural tangent kernel and matching initial predictions. For this squared-error loss function, the relevant algorithm is gradient flow in the Reproducing kernel Hilbert space. Matching predictions at arbitrary additional inputs also requires the corresponding cross-input neural tangent kernel to freeze and the initial predictions there to match. A finite-width neural network can change its feature map during training, so the equivalence depends on the assumptions rather than holding for every architecture and parameterization.
A transformer block has two principal sublayers: multi-head attention and a positionwise feedforward neural network. Each sublayer has a residual connection and layer normalization. To make the components explicit, let contain the representations of sequence positions. For head , learned projections form
The scaled dot-product attention output is
where the softmax function acts along each row and is an optional attention mask. For causal self-attention, disallowed future positions receive before the softmax function, giving zero attention weights. In self-attention, queries, keys, and values all come from the same input sequence. The multi-head attention output concatenates the heads and projects them:
A standard post-normalization transformer block can then be written
Here layer normalization normalizes the feature coordinates of each position separately, within each example, and applies learned scales and shifts. The positionwise feedforward neural network applies the same two affine maps and activation function at every position, for example
Thus attention mixes information between positions, while the feedforward sublayer transforms each position's features. The residual connections support propagation through a deep stack, and dropout is often used during training. Pre-normalization variants move layer normalization before the sublayer. A model's positional encoding supplies order information to the sequence representation or attention mechanism; a decoder in an encoder-decoder model also has a cross-attention sublayer between its self-attention and feedforward neural network sublayers.
A recurrent neural network processes positions through a recurrence such as . Computing requires , so the standard computation is sequential across sequence positions, although different examples in a batch can be processed in parallel. Information from position to must pass through recurrent steps, and backpropagated gradients involve products of that many step Jacobian matrices. This creates vanishing gradients or exploding gradients and can make long-range dependencies difficult to learn. Gating can mitigate these difficulties while retaining the recurrent dependence.
In a transformer block, all queries, keys, and values for an available input sequence can be formed in parallel. The self-attention weights are computed by matrix multiplication, so positions within one layer can be processed together; layers themselves remain sequential. With unrestricted self-attention, one position can directly receive information from any other position in one layer, giving a constant-length route across distant positions rather than one proportional to their separation. With causal self-attention, there is the same direct route to any permitted earlier position.
A transformer model supports parallel training across known sequence positions and short routes for long-range dependencies. Even a causal model can compute all training positions together when the entire training sequence is supplied and the attention mask excludes future positions. However, ordinary autoregressive generation still generates one new token at a time. Full self-attention also constructs pairwise scores, with quadratic time and storage in sequence length for the direct implementation; a standard recurrent neural network has linear sequential work in sequence length at fixed hidden width. Neither architecture guarantees that a useful long-range dependency will actually be learned.
With the same positive-semidefinite kernel and matching regularization, the Gaussian process regression posterior mean equals the kernel ridge regression prediction. Thus the main additional benefit is the explicit probability distribution of predictions, conditional on the chosen Gaussian process model and its hyperparameters, rather than an automatic improvement in point-prediction accuracy.
Condition throughout on the training inputs and . Interpret here as the fixed covariance function and noise hyperparameters. Assume observation errors are independent standard normal random variables, independent of the Gaussian process , and write
The independent-error assumption is the standard Gaussian process regression interpretation of the observation model; the single-observation marginal noise law alone would not specify cross-observation noise correlations. We take so that is a positive-definite matrix. More generally the inverse formulas below apply whenever the indicated noisy covariance matrices are invertible.
The Gaussian process prior makes a Gaussian random vector. Adding the independent Gaussian noise vector to preserves a multivariate normal distribution. Its mean is zero, its observation covariance matrix is , and because the noise is independent of . Therefore
A degenerate latent variance is allowed; the displayed multivariate normal distribution then denotes a Gaussian law even if it has no full-dimensional probability density.
The conditional multivariate normal distribution gives
where
For a direct justification, form . It is jointly Gaussian with , has zero mean, and satisfies
The independence of uncorrelated jointly normal variables therefore makes independent of . Conditional on , only the displayed affine shift remains, proving the result. This is the latent-function posterior variance; a new observation with fresh independent noise has predictive variance .
Use only the first observations to define
Thus the full noisy covariance matrix is and the full cross-covariance vector is . Set
The scalar is the Schur complement of . Substituting the block inverse into the Gaussian process regression posterior variance gives
Consequently,
and
For interpretation, after the first observations the remaining covariance between and is , while the conditional variance of the new noisy observation is . Thus the reduction is the squared remaining covariance divided by the remaining observation variance.
The Schur complement can be written
because the first term is a conditional variance and . Therefore and the squared term is nonnegative, so
Equality holds exactly when the remaining conditional covariance is zero. In particular, the reduction need not be strict even at a previously unseen input.
Additional observations weakly decrease the posterior variance at every fixed prediction input. Apply part (ii) repeatedly to add observations one at a time. An observation whose remaining conditional covariance with is nonzero strictly decreases that posterior variance; one with zero remaining conditional covariance leaves it unchanged. Large observation noise reduces the information gained through the denominator .
For fixed Gaussian process hyperparameters and a Gaussian likelihood, the posterior variance depends on the observation locations and noise level, but not on the observed numerical outputs. Hence the reduction holds for each possible new output, rather than only on average. The predictive variance of a future noisy observation also decreases by the same amount because its extra independent noise variance is fixed. Refitting the hyperparameters after adding data can change the covariance function; the monotonicity statement compares conditioning under one fixed model.
For , the notation of part (i) gives , , and . Write . The remaining covariance is then and the new observation's remaining variance is . Thus
Equivalently,
The expression is valid also when and . For , a noiseless observation, interpreted as the limit , removes all remaining variance at the observed target.
The source's assertion that the target input always gives the greatest reduction needs an additional hypothesis. The reduction formula above does not require that assertion. For a counterexample, use the linear kernel with and target . With no informative previous observations, . This can also be arranged with by observing first at , which has zero covariance with all latent values. Observing at the target gives reduction , whereas observing at gives
Indeed this Gaussian process is for a standard normal random variable , so the measurement at observes the same unknown coefficient with a larger signal relative to its noise.
One sufficient extra condition is that the existing latent posterior variance be maximal at among all candidate inputs. To prove it, let and . The Cauchy-Schwarz inequality gives . If , then
because is increasing. Thus target sampling is optimal under this extra condition, but it is not implied by the paper's arbitrary-covariance function assumptions.

Articles by others on the same topic (1)