Module 18 · Learned It or Memorized It?

If you ace the practice test, will you ace the real one?

Lesson 18.1 · The Practice Test Problem

Owen · Rosa

Owen: 100% on the practice test, six times. Real test: we’ll see.

Owen has taken the same practice test six times.

He gets every question right now.

Rosa watches him answer “Paris” before the question finishes loading and asks whether he learned geography or learned the practice test.

Owen says there’s no difference. There is.

The short answer

Only if you learned the idea, not the questions. Owen knew Paris. He did not know capitals. The real test found that out in one question, which is exactly what a held-out test does to a model.

Try it yourself

Take the practice test twice. Then take the real one. Notice what changed.

Practice test: What’s the capital of France?

What you just did has a name

Generalization

Generalization is doing well on questions you haven’t seen, because you learned the underlying idea instead of the specific examples.

It’s the whole point of learning, for kids and for models.

A model that only gets its training examples right hasn’t learned anything useful.

A few more things

Practice score isn’t the goal

Nobody cares whether a model gets its training data right. It’s seen the answers. The score that matters is on data it hasn’t seen, because that’s the only data it will ever meet once it’s launched.

The two scores can disagree wildly

A model can be 100 percent on training data and 50 percent on new data. That gap is the tell. A small gap means it learned. A big gap means it memorized.

Rosa’s essay

The detector was trained on some pile of AI text and human text. Her essay didn’t look like the human text it had seen. That doesn’t make it AI. It makes the detector’s practice test too narrow.

Go deeper

The longer version, if you want it.

Why models memorize

A model with enough flexibility can fit any set of examples perfectly, including the noise: the typos, the coincidences, the one weird video. Fitting the noise makes the training score go up and the real-world score go down, because the noise doesn’t repeat. Training only rewards the training score, so left alone, models drift toward memorizing.

The defenses are all versions of one idea: hold some examples back, grade on those, and stop or simplify when the held-out score stops improving. The next two lessons are exactly that.

Quick check

Two spam filters trained on the same emails. Filter A: 99 percent on those emails, 71 percent on new ones. Filter B: 94 percent on those emails, 92 percent on new ones. Which one generalized?

Let’s take it slower

Here’s a quick test. Change the question a little and see if the answer survives. A kid who learned long division can do a problem they’ve never seen. A kid who memorized the worksheet can only do the worksheet. Models are the same. If a model’s score stays about as good on fresh data as on the data it practiced on, it picked up the idea. If the score collapses the moment the examples change, it picked up the examples. Generalizing just means the learning travels.

More examples

1

Learning a song by ear

A kid who learns a song by ear can play it in any key. A kid who memorized where their fingers went on one recording is lost when the band starts on a different note. Both sounded perfect in practice. Only one of them learned the song.

2

The driving test route

Some students practice driving on the exact streets the examiner uses, and they nail those turns. Put them on an unfamiliar road and the hesitation shows. Passing the route is not the same as knowing how to drive, and a real road finds that out fast.

Back to the question

So does acing the practice test mean acing the real one?

Show the answer

Only if you learned the idea, not the questions. Owen knew Paris. He did not know capitals. The real test found that out in one question, which is exactly what a held-out test does to a model.

One last question

A model scores 100 percent on its training data. What do you know?

Talk Card

Talk Card · 18.1

Acing the practice test only counts if you learned the idea and not the questions. The same goes for a model: the only score that matters is on data it has never seen.

Data to AI · pettigrewlab.com/learn

Next lesson