What is overfitting?

Overfitting is when a model fits the detail and noise in its training data too closely; it memorises examples instead of general patterns and then performs worse than expected on new data.

It differs from underfitting in direction: an underfitted model fails to learn even the basic patterns, while an overfitted one clings too tightly to its training data. High training accuracy does not mean a good model; what counts is performance on unseen data.

Topic
Machine learning, models and training
Also known as
Over-fitting, high variance

How overfitting works

  1. When model capacity is large relative to the data, data is scarce or training runs too long, the model starts learning individual examples.
  2. The sign shows in the loss curves: training loss keeps falling while validation loss stalls or rises.
  3. A validation set never used in training and cross-validation measure this gap.
  4. Regularisation, dropout, data augmentation, early stopping and more representative data reduce the risk.

In more detail

The bias and variance trade-off and double descent

In the classical view overfitting is variance winning in the bias and variance trade-off: without enough data or regularisation a high-capacity model fits noise specific to its training sample. Modern deep learning complicates this through double descent, where test error can fall again once the parameter count passes the point at which the model fits the training data exactly, so near-zero training loss in very large models does not by itself mean poor generalisation.

Commonly confused terms

TermHow it differs
Data leakageData leakage happens when information from held-out data or the future target unintentionally enters training features or splits, inflating offline test metrics without genuine generalisation; overfitting is the model fitting training data too tightly, which proper held-out test sets expose unless leakage hides it.
Catastrophic forgettingCatastrophic forgetting in LLM fine-tuning is the loss of broad pre-trained capabilities after narrow task training; while distinct, it frequently co-occurs with overfitting when fine-tuning runs for too many epochs on a small domain dataset.

Why overfitting matters for on-premises AI

Fine-tuning on small organisational datasets raises the risk, so a separate test set kept out of training is essential. An overfitted model can memorise personal data from its training set, creating extraction risk. It is brittle against unexpected production inputs, so monitoring should catch performance drops early. In regulated sectors, independent validation before production is part of model risk management.

ON-PREMISES EXAMPLE

An insurer tests a classification model trained on past claims against held-out records from a later period to measure its performance on new claim types.

Common questions

How can overfitting be spotted early in training?

Loss is tracked on a validation set kept out of training. When training loss falls while validation loss starts to rise, overfitting has begun; early stopping ends training there.

Is very high accuracy on training data a good sign?

Not by itself. It says nothing about live performance; clearly lower validation and test results point to overfitting.

Sources

In the glossary: Glossary, M to Q

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.