What is a generative model?
A generative model learns the probability distribution of data (in classification, the joint probability of inputs and labels) and can produce new samples from it. Diffusion models, generative adversarial networks and autoregressive models belong to this family.
Unlike a discriminative model, which learns to predict the label directly from the input, a generative model models how the data itself arises and in classification predicts through Bayes' rule.
- Topic
- Core concepts
- Also known as
- Generative modelling
- Origin
- Probabilistic statistics and machine learning; 2013 and 2014 studies on deep generative models
How a generative model works
- The model is trained to maximise the likelihood of the training data or a lower bound on it.
- Autoregressive models produce a sequence piece by piece, using earlier outputs as additional input at each step.
- Adversarial networks train a generator against a discriminator that judges whether a sample came from the training data.
- Diffusion models learn to reverse a process that gradually adds noise to the data.
In more detail
How are generative models evaluated?
Generative models are evaluated through qualitative and quantitative examination of the samples they generate. Image models use metrics such as the Inception score and FID; the 2020 diffusion study, for example, reported an Inception score of 9.46 and an FID of 3.17 on the unconditional CIFAR10 dataset.
Commonly confused terms
| Term | How it differs |
|---|---|
| Generative AI | Generative AI is the umbrella term for systems and applications that create new content such as text, images, audio and code. A generative model is the technical name for a model that learns a data distribution; probabilistic classifiers used for classification rather than content creation also fit this definition. |
Why a generative model matters for on-premises AI
Generative models underpin generative AI. The 2014 adversarial study trained a generator and a discriminator as a two-player game; the 2020 diffusion study reported high quality image synthesis. A 2001 comparison found that a generative classifier, though higher in asymptotic error than discriminative learning, may approach that error much faster.
An insurer uses a generative model that learns the distribution of its tabular data to produce synthetic data for testing without moving real customer records. The team checks that synthetic records resemble real data statistically without copying them.
Common questions
Are large language models generative models?
Yes. They are autoregressive generative models that produce text token by token, using the tokens generated so far as additional input at each step.
Can generative models be used for classification?
Yes. A model of the joint probability of inputs and labels can pick the most likely label through Bayes' rule. Such classifiers can have an advantage when training data is scarce.
Related terms
- Generative AI
- Diffusion model
- Generative adversarial network
- Variational autoencoder
- Autoregressive model
Sources
- On Discriminative vs. Generative Classifiers: A comparison of logistic regression and naive Bayes, NeurIPS, 2001
- Auto-Encoding Variational Bayes, arXiv, 2013
- Generative Adversarial Networks, arXiv, 2014
- Denoising Diffusion Probabilistic Models, arXiv, 2020
In the glossary: Glossary, E to L