Course 4, lesson 36 of 100, Ages 10+

Remembering vs understanding

Why memorising isn’t learning

Like I’m 5

If you memorise the answers to last year's quiz, you'll ace that quiz. But a new quiz will trip you up. AI can make the same mistake. It's called overfitting.

The big idea

A model overfits when it learns its training examples too exactly, including random quirks, instead of the general pattern. It scores brilliantly in practice and poorly on new data.

To prevent this, builders use more and more varied data, keep models from becoming too complicated, and watch the test score. The goal is understanding that works on examples the model has never seen.

Examples

  • Quiz memoriser: Perfect on old questions, lost on new ones.
  • Tank photos: A story told in AI classes: a model learned the weather in the photos, not the tanks.
  • Weather words: A model that links 'sunny' only to Mondays because of a fluke in its data.

How it works

  1. Train the model on the training examples.
  2. Check its score on separate test examples.
  3. If the test score is much worse, simplify the model or add more varied data.

Check your understanding

What is overfitting?
Options: Learning the training examples too exactly to handle new ones; Training a model for too short a time; Using too little electricity.
Answer: Learning the training examples too exactly to handle new ones. An overfit model memorises quirks instead of the real pattern.
What's a good sign a model is overfitting?
Options: Great training score, much worse test score; Equal scores on both; It runs faster.
Answer: Great training score, much worse test score. A big gap between practice and test scores means memorising, not understanding.

Remember

Overfitting means memorising instead of understanding. Fresh test data reveals it.

Talk about it

When have you memorised something without really understanding it?

Go deeper

Remedies include regularisation (penalising large weights), dropout, early stopping, data augmentation and cross-validation. The bias-variance trade-off describes the balance between underfitting and overfitting.