1. Home
  2. Glossary
  3. Overfitting
AI glossary · Models & training

Overfitting

Overfitting: Overfitting happens when a machine learning model learns its training data too closely, memorizing quirks and noise instead of general patterns, so it performs well on the examples it saw and poorly on new ones.

A student who memorizes last year's exam answers instead of learning the subject aces the practice test and fails the real one. That is overfitting. The model fits the training examples so precisely that it captures accidents in the data, like the fact that every fraudulent invoice in the sample happened to come from one vendor, and treats them as rules. When it meets new data that does not share those accidents, its accuracy drops.

Overfitting is most likely when training data is small, the model is large relative to the data, or training runs too long. The standard defense is to hold back a portion of the data the model never sees, then check performance on that held-out set. If the model scores far better on the training data than on the held-out data, it has overfit. In language models the same idea shows up when a fine-tuned model parrots the phrasing of its examples instead of adapting to the request.

The concept matters beyond model building. A lead-scoring model tuned on last year's customers, a demand forecast trained on one unusual season, or a hiring screen trained on your current employees can all overfit to the past and fail quietly when conditions change.

Example at work

A sales operations analyst builds a model to predict which deals will close, trained on two years of CRM history. It reports impressive accuracy. When she checks it against last quarter's deals, which it never saw, the accuracy collapses. The model had learned that deals carrying one particular rep's name almost always closed, and that rep left the company in the spring.

Why it matters

If you ever buy, sponsor, or rely on a predictive model, overfitting is the first failure mode to ask about. A strong score on training data means nothing on its own; ask how the model performed on data it had never seen and how recently that was checked.

Related terms