The goal of supervised learning is to model a conditional distribution $p(\bold t|\bold x)$. In pattern recognition, we typically have to solve an inverse problem which will have multiple solutions. Least squares corresponds to maximum likelihood under a Gaussian assumption. We see that this leads to a very poor model for the highly non-Gaussian inverse problem.

We can find a general framework for modelling conditional probability distributions by using a mixture model for $p(\bold t|\bold x)$ in which both the mixing coefficients as well as the component densities are flexible functions of the input vector $\bold x$, giving rise to the mixture density network. Provided we consider a sufficiently flexible network, we then have a framework for approximating arbitrary conditional distributions.

Here we shall develop the model explicitly for Gaussian components with the case of isotropic covariances, so that

$$ p(\bold t|\bold x)=\sum_{k=1}^K\pi_k(\bold x)\mathcal N(\bold t|\bm\mu_k(\bold x),\sigma_k^2(\bold x)) $$

Note that the mixture density can readily be extended to allow for general covariance matrices by using a Cholesky factorization. And we can use other distributions for the components, such as Bernoulli distributions if the target variables are binary rather than continuous.

We now take the variance parameters of the mixture model, namely the mixing coefficients $\pi_k(\bold x)$, the means $\bm\mu_k(\bold x)$, and the variances $\sigma_k^2(\bold x)$, to be governed by the outputs of a conventional neural network that takes $\bold x$ as its input.

If there are $K$ components in the mixture model, and if $\bold t$ has $L$ components, then the network will have

The total number of network outputs is given by $(L+2)K$, as compared with the user $L$ outputs for a network, which simply predicts the conditional means of the target variables.

Requirements and represent ways of the mixing coefficients, variances and means are

The adaptive parameters of the mixture density network comprise the vector $\bold w$ of weights and biases in the neural network, that can be set by minimizing an error function defined to be the negative logarithm of the likelihood. For independent data, this error function takes the form

$$ E(\bold w)=-\sum_{n=1}^N\ln\left\{\sum_{k=1}^K\pi_k(\bold x_n,\bold w)\mathcal N(\bold t_n|\mu_k(\bold x_n,\bold w),\ \sigma_k^2(\bold x_n,\bold w)\bold I)\right\} $$

In order to minimize the error function, we need to calculate the derivatives of the error $E(\bold x)$ with respect to the components of $\bold w$. These can be evaluated by using the standard backpropagation procedure, since we can evaluate the derivatives of the error with respect to the output-unit activations by

$$ \begin{aligned} \frac{\partial E_n}{\partial a_k^\pi}&=\pi_k-\gamma_{nk}\\ \frac{\partial E_n}{\partial a_{kl}^\mu}&=\gamma_{nk}\left\{\frac{\mu_{kl}-t_{nl}}{\sigma_k^2}\right\}\\ \frac{\partial E_n}{\partial a_k^\sigma}&=\gamma_{nk}\left\{L-\frac{\|\bold t_n-\bm\mu_k\|^2}{\sigma_k^2}\right\} \end{aligned} $$

where $\gamma_{nk}=\frac{\pi_k\mathcal N(\bold t_n|\bm\mu_k(\bold x_n),\sigma_k^2(\bold x_n))}{\sum_{l=1}^K\pi_l\mathcal N(\bold t_n|\bm\mu_l(\bold x_n),\sigma_l^2(\bold x_n))}$.