GenAIWiki
Modeling

Generative Model

A generative model learns a data distribution so it can create new samples such as text, images, audio, code, or structured records.

Expanded definition

A generative model learns patterns in observed data and uses those patterns to produce new samples. Depending on the architecture, it may model a probability distribution explicitly, learn a latent representation, generate one token or pixel at a time, or reverse a noising process. The main families used by practitioners are autoregressive models, variational autoencoders (VAEs), generative adversarial networks (GANs), and diffusion models. Large language models are usually autoregressive: they predict the next token conditioned on prior context. Diffusion models are widely used for image generation. VAEs are useful when a structured latent space matters, while GANs remain important for understanding adversarial training and image synthesis. A generative model is not the same as a discriminative model. A discriminative model is optimized to predict a label or output from an input, such as whether an email is spam. A generative model can produce a new sample, such as a draft email, an image, or a synthetic training record.

Generative model taxonomy

The families differ in how they represent and sample from learned data patterns. The right choice depends on the output modality, controllability requirements, latency budget, and evaluation method.

FamilyHow it worksExamplesCommon outputs
Autoregressive modelsGenerate a sequence one step at a time, conditioning each prediction on prior context.GPT-style language models, PixelCNNText, code, audio, images
Variational autoencoders (VAEs)Encode inputs into a probabilistic latent space and decode sampled latent vectors into new outputs.Vanilla VAE, conditional VAEImages, structured latent representations, synthetic records
Generative adversarial networks (GANs)Train a generator against a discriminator so generated samples become harder to distinguish from training data.StyleGAN, CycleGANImages, image-to-image translations
Diffusion modelsLearn to reverse a gradual noising process and sample new outputs through iterative denoising.DDPM, Stable DiffusionImages, video, audio

Generative vs discriminative models

DimensionGenerative modelDiscriminative model
Primary goalLearn data patterns well enough to generate new samples.Predict a label, score, or output from an input.
Typical outputNew text, image, audio, code, or synthetic record.Class label, probability, ranking score, or regression value.
Example taskDraft a support response or create an image from a prompt.Classify a support ticket or detect whether an image contains a defect.
Evaluation focusQuality, diversity, factuality, controllability, and safety.Accuracy, precision, recall, calibration, and task-specific error costs.

Use a generative model when the application must create or transform content. Use a discriminative model when the application primarily needs a prediction. Many production systems combine both: a discriminative classifier can route or validate output from a generative model.

Related terms

Explore adjacent ideas in the knowledge graph.

Related

Comparisons, tools, and models that connect to this idea.