Glossary

Overfitting

Overfitting happens when an AI model memorizes its training data instead of learning general rules. Learn how to spot it and how engineers prevent it.

Overfitting is when an AI model learns its training examples too closely, including their quirks and noise, and then performs poorly on anything new. The model looks brilliant in practice runs and disappoints in the real world.

How does overfitting happen?

Machine learning works by adjusting a model until its guesses match the examples in its training data. The goal is to learn general rules that carry over to new cases. But a model with lots of capacity and too little or too repetitive data can take a shortcut: it simply memorizes.

Training for too long makes things worse. Early on, the model picks up the broad patterns. Keep going, and it starts fitting random details that happen to appear in the examples, like a smudge that shows up in several photos of the same class.

The standard check is to split data into training, validation and test sets. If accuracy keeps rising on training data while falling on validation data, the model is overfitting.

What is an example of overfitting?

Imagine a hospital builds a model to flag pneumonia on chest X-rays. Many positive scans in its dataset came from one hospital whose machine stamps a small marker in the corner. The model learns to look for the marker, not the lungs. It aces internal tests and fails at a different hospital.

Common fixes include gathering more varied data, stopping training early, simplifying the model, and techniques such as "dropout" that randomly switch off parts of the network during training so it can't rely on any single shortcut.

Why does overfitting show up in the news?

It sits behind many stories about AI benchmarks. When test questions leak into the huge datasets used to train large models, a high score may reflect memory rather than skill. In early 2026, one major AI lab said it would stop reporting results on a popular coding benchmark partly for this reason.

Why It Matters

Think of overfitting as a lens for reading any AI success claim. A tool that dazzles in a vendor demo or on a benchmark may simply have seen similar material before. Before you trust a system with hiring, lending or medical decisions, ask how it was tested on data from outside its training set, ideally from settings like yours. The X-ray example shows the stakes: a model can be confidently wrong for reasons nobody notices until it moves somewhere new.

Frequently asked questions

What is the difference between overfitting and underfitting?

Overfitting means the model learned the training data too specifically. Underfitting means it didn't learn enough, so it does badly on both training and new data.

Do large language models overfit?

They can memorize parts of their training text, sometimes reproducing passages word for word. Because they train on such huge and varied data, the bigger practical worry is test contamination, where benchmark questions sneak into training.

Researched and written by The AI Telegraph staff and checked against primary sources. See our editorial policy. Spotted an error? Tell us.