Skip to main content

generative model

  • Discriminative Model: Learn a probability distribution p(yx)p(y|\bold{x})
  • Generative Model: Learn a probability distribution p(x)p(\bold{x}). Sample to generate new data
  • Conditional Generative Model: Learn p(xy)p(\bold{x}|y). Generate new data conditioned on input labels
Example

x\bold{x} could be an image, yy is the image's class.

Notation

Probability density functions (PDFs) and probability mass functions (PMFs), also simply called probability distributions.

Taxonomy of Generative Models

taxonnomy

Variational Autoencoders

Let x\bold{x} be a random sample from an unknown distribution p(x)p(\bold{x}). We also call x\bold{x} ​ an observed variable. We assume that there exists an unobserved (latent) variable z\bold{z} that generates x\bold{x}.

How to generate new data

After training, sample new data like this:

  • Sample z(i)\bold{z}^{(i)} from prior pθ(z)p_{\boldsymbol{\theta}}(\bold{z}). e.g. Gaussian unconditoned on θ\boldsymbol{\theta}, pθ(z)=N(z;0,I)p_{\boldsymbol{\theta}}(\bold{z}) = \mathcal{N}(\bold{z};\bold{0}, \bold{I})
  • Sample x(i)\bold{x}^{(i)} from conditional p(xz(i))p_{}(\bold{x}|\bold{z}^{(i)})

How to train the model

Basic idea 1: maximize the likelihood of data

If we can observe z\bold{z} for each x\bold{x} during training, we can train this model by maxmizing the likelihood of each x\bold{x} conditioned on its observed z\bold{z}. In other words, we can train a conditional generative model p(xz)p_{}(\bold{x}|\bold{z}).

But we can't observe z\bold{z}, we need to maximize the marginal likelihood:

pθ(x).p_{\boldsymbol{\theta}}(\bold{x})\,.

Basic idea 2: