5.7.1 Posterior parameter distribution

Consider the problem of predicting $p(t|\bold x)$ for a single continuous target variable $t$ and a vector $\bold x$ of inputs (the extension to multiple targets is straightforward). We shall suppose that

  1. $p(t|\bold x,\bold w)$ is Gaussian, with a mean given by the output of a neural network model $y(\bold x,\bold w)$, and with precision $\beta$

    $$ p(t|\bold x,\bold w,\beta)=\mathcal N(t|y(\bold x,\bold w),\beta^{-1}) $$

  2. a prior distribution over the weights $\bold w$ that is Gaussian of the form

    $$ p(\bold w|\alpha)=\mathcal N(\bold w|\bm 0,\alpha^{-1}\bold I) $$

For an i.i.d. data set inputs $\bold x_1,\ldots,\bold x_N$, with a corresponding set of target values $\mathcal D=\{t_1,\ldots,t_N\}$, the likelihood function is given by

$$ p(\mathcal D|\bold w,\beta)=\prod_{n=1}^N\mathcal N(t_n|y(\bold x_n,\bold w),\beta^{-1}) $$

and so the resulting posterior distribution is then

$$ p(\bold w|\mathcal D,\alpha,\beta)\propto p(\bold w|\alpha)p(\mathcal D|\bold w,\beta) $$

The predictive distribution is obtained by

$$ p(t|\bold x,\mathcal D,\alpha,\beta)=\int p(t|\bold x,\bold w,\beta)p(\bold w|\mathcal D,\alpha,\beta)\ \text d\bold w $$

This integration is analytically intractable due to the nonlinearity of the network function $y(\bold x,\bold w)$ as a function of $\bold w$. So we shall find Gaussian approximations for the conditional distribution and the posterior distribution.

We can evaluate the marginal $p(t)$ given by

$$ p(t|\bold x,\mathcal D,\alpha,\beta)=\mathcal N(t|y(\bold x,\bold w_{\text{MAP}}),\sigma^2(\bold x)) $$

with $\sigma^2(\bold x)=\beta^{-1}+\bold g^{\text T}\bold A^{-1}\bold g$.

5.7.2 Hyperparameter optimization

The marginal likelihood for the hyperparameters $\alpha,\beta$ is obtained by

$$ p(\mathcal D|\alpha,\beta)=\int p(\mathcal D|\bold w,\beta)p(\bold w|\alpha)\ \text d\bold w $$

The Laplace approximation result gives