Skip to content
← Generative AI
Q05

Generative vs discriminative models comparison table

Generative vs DiscriminativeComparison
Compare Generative and Discriminative Models based on learning objective, probability distribution, training process, decision boundary, data requirements, and applications. Give suitable algorithm examples.

What's actually being asked

A structured, point-by-point comparison of generative and discriminative models across six named dimensions, with algorithm examples.

Answer

Both paradigms are solving the same underlying classification/regression problem, but from opposite ends: one builds a full model of how the data could have been produced and reads a prediction off it, the other fits the prediction rule straight from data with no detour through "how was this data made."

DimensionGenerative ModelDiscriminative Model
Learning objectiveLearn how the data itself is produced — model P(x,y) (or P(x|y) and P(y)), then derive P(y|x) via Bayes' theoremLearn the decision rule directly — model P(y|x) (or just a direct mapping x → y) without modeling how x arises
Probability distribution modeledFull joint P(x,y), which implicitly also gives P(x) = Σ_y P(x|y)P(y) — so the model can generate new xOnly the conditional P(y|x); no model of P(x), so it cannot generate realistic new x
Training processEstimate class priors P(y) and class-conditional likelihoods P(x|y) from data (e.g., fit per-class Gaussians)Directly optimize a loss (e.g., cross-entropy, hinge loss) that penalizes wrong y predictions given x, via gradient descent
Decision boundaryImplicit — derived indirectly from comparing P(x|y)P(y) across classes; tends to be smoother, shaped by distributional assumptionsLearned explicitly and directly to separate classes; can be tightly fit to the actual class boundary in the training data
Data requirementsCan often work with less labeled data (also models P(x), so unlabeled data helps); more sensitive to distributional assumptions being wrongUsually needs more labeled data for comparable accuracy, but makes fewer assumptions about how the input data is distributed
ApplicationsGeneration tasks: image/text synthesis, data augmentation, outlier/anomaly detection via density estimationPure classification/regression tasks where only a label is needed: spam filtering, medical diagnosis prediction, risk scoring
Algorithm examplesNaïve Bayes, Gaussian Mixture Models, Hidden Markov Models, VAEs, GANsLogistic Regression, Support Vector Machines, standard feed-forward Neural Networks, Conditional Random Fields

The key one-liner

Generative models learn "how the data was made" and can therefore generate new samples; discriminative models learn "how to tell classes apart" and are usually more accurate at that narrow task when enough labeled data is available, but can't generate anything. Neither is universally "better" — the right choice depends on whether the end goal is classification accuracy alone or classification plus the ability to generate/explain the data.

Exam tip

This question is almost always graded against a table like this — don't write it as prose only. Mentioning that both are connected by P(x,y) = P(y|x)P(x) = P(x|y)P(y) in the "learning objective" row shows you understand why a generative model can derive a discriminative-style prediction but not vice versa.