Tech

Overfitting

It's a lot like a student who memorized only the answers to past exam questions, then falls apart in front of a brand-new test.

  • 3 min read
  • 1 figures
  • Verified 2026-10-17

Definition

An AI learns rules by looking at lots of examples. But if it memorizes even the small quirks of its practice data, it actually does worse when it sees new data. When an AI is fitted too closely to the data it learned from, and can't perform well on new data, we call that overfitting.

The Friend Who Memorized the Past Exams

Have you ever seen a friend cram before finals by memorizing every answer in a past-exam workbook? Ask them to redo that workbook, and they score close to perfect. But in the real exam room, their score drops sharply.

What this friend stored in their head wasn't how to solve the problems. It was closer to memorizing the position of the answers, like 'question three is B.' So if the order of the questions changes, or the numbers are just slightly different, they can't even get started.

An AI can study this way too. Instead of looking at the data and finding the rules they share, it memorizes every single example whole.

Then its score on the practice data is dazzling. But when it meets new data, it wobbles, just like the friend who only memorized past exams. This state is called overfitting.

Why Memorize Instead of Understand?

For people, too, understanding the rules is hard and memorizing the answers is easy. When the exam covers only a small area and there are few questions, the temptation to memorize gets stronger. If there are only five questions, why bother working out the principle?

An AI is in a similar spot. When there is little data to learn from but plenty of room to remember things, storing the data whole becomes the easier path than searching for rules.

The same thing happens when it looks at the same data over and over. For the first few rounds, its skill shoots up. Then, at some point, it starts memorizing even the random flecks of noise that happened to be mixed into the data.

That's why developers set some test sheets aside. They keep data that was never used in practice, and grade with it at the very end. It's like measuring your skill with a brand-new mock exam, not the past-exam workbook.

A Little More Precisely

A high practice score isn't a flaw in itself. What to watch is the gap between the practice score and the score on data the AI has never seen. If both are high, it learned well. If only the first is high, it's closer to having memorized.

There's a mistake in the opposite direction, too. That's when the workbook was skimmed so carelessly that even the practice score is low. In that case, it needs to study longer and more carefully. Finding the right spot between these two mistakes is the heart of learning.

The way to find that spot also resembles what good students do. Use several workbooks instead of one, have them look at the solving process instead of the answer, and close the book when the score stops going up. Then what stays in their head is not where the answers are, but the rules for solving the problems.

Common misconceptions

Myth

If an AI scores close to perfect on the data it learned from, it's a high-performing AI.

Fact

A score on the practice data is like grading a test after peeking at the answers. You can only tell its real skill by testing it on data it never used for learning.

Myth

Overfitting is a problem caused by not training the AI for long enough.

Fact

It actually tends to happen when the AI looks at the same data over and over for too long. Past a certain point, it starts memorizing even the random flecks of noise mixed into the data.

Where you meet it

  1. A program that tells dogs from cats memorizes even the grassy background in its training photos, so it calls a cat sitting on grass a dog.

  2. A forecasting program built to fit the last few months of sales data perfectly misses badly on next month's sales.

In one sentence

It's when an AI memorizes its practice data whole, so it scores close to perfect on that data but can't perform well on data it hasn't seen.

Created 2026-04-26 Updated 2026-10-17 Verified 2026-10-17