AI glossary · Basic · Data & evaluation
Overfitting
Overfitting is when an AI model fits its training data too closely, so it scores well on the data it learned from but performs much worse on data it has not seen before.
About this term
- Level
- Basic · Technical terms you often meet in AI news
- Category
- Foundations & applications
- Fields
- Data & evaluation
- Added
- 2026-10-08
How it works
A model is supposed to learn general rules from its training data, but if it trains for too long or in too much detail, it also memorizes noise and exceptions that happen to be in the data. When that happens, the error on the training data keeps going down while the error on unseen data actually goes up. It is especially likely when the model is too complex for the amount of data, or when the training data is small or skewed. The opposite case, where the model is too simple to learn even the basic patterns, is called "underfitting."
Why it matters
The purpose of building an AI is to handle new data that will come in later, not data it has already seen. An overfitted model often looks good during development and then falls short of expectations in a real service. So developers set aside data that is not used for training and check performance on it to see whether the model is overfitting. If the gap between the score on the training data and the score on the held-out data grows large, overfitting is suspected.
Things to know
Common remedies include collecting more and more varied data, stopping training early once performance stops improving, and "regularization," which constrains the model so it does not become too complex. "Dropout," which randomly switches off some connections during training, is also widely used in neural networks. Data contamination, where benchmark questions leak into the training data, creates a similar illusion: the model may have memorized the questions, so its score is high while its real ability is not as good.
Example
Suppose a company builds a model that classifies customer inquiries by type using its own inquiry data. It was almost perfect during development, but in real use it often got inquiries wrong when they mentioned new products or used unfamiliar wording. This is a case of overfitting: the model only memorized specific words and phrasing habits in the training data and did not generalize the meaning of the inquiries. In such cases, the team collects more varied inquiry data and keeps checking performance on data that was not used for training.