Difference: Generative vs. Discriminative Models
To understand how Generative AI fits into the bigger picture of AI, it’s important to know the difference between generative models and discriminative models. These are two major types of machine learning models — and they do very different things.
🤖 What is a Discriminative Model?
A discriminative model learns how to distinguish between different things. It tries to predict a label or category based on input data.
Example:
Input: An image
Task: Is this a cat or a dog?
Output: “Cat” (classification)
Discriminative models learn the boundaries between classes, but they don’t understand how the input data was created. They are commonly used for:
Classification (e.g., spam or not spam)
Regression (e.g., predicting house prices)
Sentiment analysis
🧠 What is a Generative Model?
A generative model learns how to generate new data that looks like the training data. It tries to model the full distribution of the data — not just the labels, but how the data itself is structured.
Example:
Input: “Draw a cat riding a skateboard.”
Output: A completely new image that fits the description
Generative models are used for:
Text generation (e.g., ChatGPT)
Image generation (e.g., DALL·E)
Music, audio, video generation
Synthetic data creation
🧬 The Core Difference
Goal
Distinguish between categories
Generate new data like the input
Learns
(P(y
x)): Label given input
Output
Labels or scores
New content (text, image, etc.)
Example
Spam detection
Email text generation
Popular Models
Logistic Regression, BERT
GPT, DALL·E, GANs
🧭 When to Use What?
Use discriminative models when you need predictions or classifications.
Use generative models when you want the AI to create or simulate something new.
🧠 Fun Analogy:
A discriminative model is like a police officer who can identify whether something is legal or not. A generative model is like a writer or artist who can create new, original content.
Last updated