Discrete and continuous generative models. (a) This graphic shows a Markov decision process in factor graph form (Loeliger et al., 2007). Blue squares indicate probability distributions (factors of the generative distribution). Below, these factors are expressed in terms of probability matrices. “Cat” denotes a categorical distribution. The implicit mean-field factorization of the approximate distribution, , is shown. (b) This shows the equivalent structure for a continuous state-space model. Heuristically, we can think of these (generative) models as an algorithm that generates data. This would involve drawing variables from their prior distributions (e.g., , and using these variables to sample dependent variables (e.g., from conditional distributions. Finally, the data ( can then be generated from the likelihood. In short, a generative model is just a probabilistic specification of how data are caused. Note that the prior mean for is derived from the outcomes of the discrete model. See the main text and Figure 1 for an explanation of the variables.