L054 · Under the hood · 2 min
Overfitting: learning the answers, missing the lesson
A model overfits when it memorises its training examples so closely that it fails on anything new.
01 · The idea
The goal of training is to learn general patterns. A model that spots cats should recognise a cat it has never seen, in a new pose, under new light.
Sometimes a model clings to details of its training set instead. Maybe every cat photo it saw was taken indoors, so it decides that sofas mean cat. It scores perfectly on those photos and stumbles on real ones.
Builders guard against this by testing on data the model never saw during training, adding more varied examples, and stopping training before the model starts memorising.
It also explains why a model can ace a well-known test and still struggle on your own tasks. Strong scores on familiar questions do not prove it will handle unfamiliar ones.
02 · Think of it like this
It is the student who memorises last year's exam answers. Same questions, full marks. Change the numbers and they are lost, because they never learned the method.
03 · Do it now
04 · Quick check
Words in this lesson
See also
L002How AI thinks · 2 min
How machines learn
A machine learns by guessing, checking how wrong it was, and adjusting itself a tiny bit, billions of times.
L001How AI thinks · 1 min
What is AI, really?
AI is software that learned patterns from examples instead of following rules a person wrote.
L042Under the hood · 2 min
Synthetic data: when AI makes its own practice material
Synthetic data is training material made by computers, often by other AI models, to fill gaps where real examples are rare, private or costly.
L039Under the hood · 3 min
How fine-tuning works
Fine-tuning takes a model that already knows language and trains it a bit more on your own examples, so it picks up a style or a task.