A mixture density network (MDN) uses a neural network to predict the parameters of a conditional mixture probability distribution. In a Gaussian MDN, an MLP maps observations x to component means μk, variances σk, and mixture proportions πk, defining a Gaussian mixture model conditioned on x. section 11.2.1
Construct the model by enforcing valid distribution parameters and optimizing likelihood:
- Represent the conditional density with K Gaussian components whose parameters are produced by the neural network. section 11.2.1
- Use exponential activations for strictly positive variances and softmax activations for mixture weights that sum to one. section 11.2.1
- Train the multi-output network by maximizing log likelihood, equivalently minimizing negative log likelihood. section 11.2.1
- For isotropic covariance, express each multivariate Gaussian as a product across dimensions, simplifying the density calculation. section 11.2.1
Gaussian MDN implementation
Generate synthetic samples from a multivariate distribution with known means and covariances. Define the constrained multi-output architecture, compute negative log likelihood, train with Keras/TensorFlow, and inspect cluster centroids alongside training and validation loss. section 11.2.1
Figure 11.7 A multioutput neural network used to learn Gaussian parameters
Use the architecture diagram to trace how one neural network produces the Gaussian mixture parameters. section 11.2.1
