All models

mixture_density_network

Bishop's Mixture Density Network: an MLP whose heads output mixture weights, means and scales instead of one value.

11 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (16 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
6.4K
Operations
11
Framework
PyTorch
Recurrent
No
Published
1994, Aston University, Neural Computing Research Group, Technical Report NCRG/94/004
Authors
Christopher M. Bishop
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m5918
Graph hash
756fcd10074a241fef9b865357051a84403a95ff89521a059b28e1ade3607cbf
Skeleton hash
226f5c35d0c27a430b7ff622808a54ebec0d1c7ac9291cacc668c1f5d421f9b4
Architecture hash
a2bf0c5f831822f10b8c2524825dd0494cb9bac73ae996a7d8cc8ac1e5253c7b
Diagram SHA-256
95cb27f2ccf7e05ee3b581d8f3ab2cc575d4a7c4667b4c4ca59fa1f67fdd9109
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

A torch.nn stand-in: a tanh MLP whose three heads return pi, mu and sigma for eight mixture components.

A Mixture Density Network, MDN, is Christopher Bishop's 1994 answer to a basic limit of regression networks: trained with a sum-of-squares loss, a network only learns the conditional average of its targets. For multi-valued mappings, such as inverse problems, that average can be a value that is not itself correct. The fix is to combine a conventional neural network with a mixture density model so the network outputs a full conditional probability distribution. Bishop argues the system can represent arbitrary conditional distributions much as an ordinary network represents arbitrary functions. The report demonstrates it on a toy problem and on robot inverse kinematics.

In code the MDN is a head placed after any trunk, returning three tensors: mixing coefficients pi, scales sigma and means mu. The pytorch-mdn reference wires a Linear and Tanh trunk ahead of the MDN layer. Once trained, new points are drawn by sampling from the predicted mixture. The member traced here returns the same three tensors for eight mixture components over a one-dimensional target.

Key idea. Replacing a network's single point output with the parameters of a mixture model, so it predicts a whole conditional distribution.

  • mixture density network
  • mdn
  • bishop 1994
  • conditional density
  • mixture of gaussians head
  • inverse problems
  • multi-valued regression
  • pytorch-mdn

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{mixturedensitynetwork1994,
  title = {Mixture Density Networks},
  author = {Christopher M. Bishop},
  year = {1994},
  journal = {Aston University, Neural Computing Research Group, Technical Report NCRG/94/004}
}