= Generative decoder
{title2=$p_\theta(x\mid z)$}
A \b[generative decoder] maps a <latent variable> to the parameters of a conditional observation <probability distribution>, commonly written $p_\theta(x\mid z)$. In a <variational autoencoder>, a <neural network> can supply those parameters. The conditional law, including its observation noise and support, is part of the model; the decoder need not return one deterministic reconstructed observation.<Stochastic Backpropagation and Approximate Inference in Deep Generative Models by Danilo Jimenez Rezende and others>[§2, visible-layer distribution and generative transformations]{ref}
For a concrete binary example, suppose a decoder specifies two conditionally independent <Bernoulli distributions> with probabilities $p_1(z)$ and $p_2(z)$. Then
$$
p_\theta(x\mid z)=\prod_{j=1}^2p_j(z)^{x_j}(1-p_j(z))^{1-x_j},\qquad x_j\in\{0,1\}.
$$
If a chosen latent value gives $(p_1,p_2)=(0.8,0.3)$, the conditional probability of $x=(1,0)$ is $0.8(1-0.3)=0.56$, and its negative log likelihood is approximately $0.5798$. The vector $(0.8,0.3)$ is a vector of probabilities, not itself a binary sample. A model for continuous observations would need a different conditional distribution.<Auto-Encoding Variational Bayes by Diederik P. Kingma and Max Welling>[Appendix C.1–C.2, Bernoulli and Gaussian observation models]{ref}
Generation draws a latent value from the prior and then draws from the decoder's conditional law. Averaging over latent values gives
$$
p_\theta(x)=\int p_\theta(x\mid z)p(z)\,dz.
$$
Conditional independence of output components at fixed $z$ need not imply independence after this marginalization, because the same latent variable can influence several components. The <recognition network> runs in the other direction for inference; it is not an algebraic inverse of the generative decoder.
Back to article page