Discriminative vs. Generative Models
You'll learn to
- -Understand the distinction between discriminative and generative models precisely
- -See that nearly everything covered in Phase 1 so far has been discriminative
Here is a fact worth sitting with. Almost every model this course has discussed so far, the spam classifiers, the price predictors, the fraud detectors, shares one thing in common. They are all discriminative models. Generative AI, the subject of this course's entire second phase, is a genuinely different kind of task, and this chapter is where that difference gets named precisely.
Discriminative Models: Telling Things Apart
A discriminative model learns to distinguish between categories, or to predict a value, given an input. It draws a boundary or a mapping, and its whole job is telling you which side of that boundary a new example falls on, or what value it maps to. Is this email spam? What will this house sell for? Does this image contain a cat? Every one of these is a discriminative task: given an input, produce a judgment about it.
Generative Models: Creating New Examples
A generative model learns something different: not how to judge an existing example, but how to produce entirely new examples that plausibly could have come from the same underlying distribution as its training data. Instead of asking "is this a picture of a cat," a generative model learns what pictures of cats generally look like, well enough to produce a brand new image of a cat that never existed before. Instead of asking "is this sentence grammatical," a generative model learns what plausible language generally looks like, well enough to write an entirely new sentence.
A large language model, asked to answer a question, is doing something generative underneath: producing new text, one piece at a time, that plausibly continues the conversation, even though the end result feels like it is answering in a judgment-like way. The mechanism is generation. The useful behavior on top of it is what makes it feel discriminative in everyday use.
Interview Signal is part of Pro
See a real weak answer next to a real strong one for this exact topic.
Quiz is part of Pro
Test what you just read with a short quiz, and bank the XP.