Underfitting
Underfitting is when a model is too simple, or trained too little, to learn the real pattern, so it does badly even on its own training data.
A machine learning model is useful only if it makes good predictions on examples it has never seen. Underfitting is the failure that comes before that test, because the model never captures the real pattern in its training data. Its predictions are weak on the training set and on new data alike. Google’s crash course compares an overfit model to a gadget that shines in the lab and flops in real use; an underfit one flops in the lab as well.
A scikit-learn example makes this concrete with 30 noisy points taken from part of a cosine wave. It fits three polynomial curves to those points, with degrees 1, 4 and 15. The degree-1 curve is just a straight line, and it cannot bend to match even the training points. The degree-4 curve lands almost exactly on the hidden function. The degree-15 curve chases the random noise in the sample instead, which is overfitting.
Loss is a number that measures how far a prediction is from the correct answer, and training tries to push it down. A loss curve plots that number as training goes on. An epoch is one complete pass through the training set. Draw one curve for the training set and one for a validation set, which is data held back to check the model during development. Together the two curves tell you which problem you have. With underfitting, both curves flatten early at a high loss. Stanford’s CS231n course notes add that when validation results track training results closely, the model probably lacks capacity. In a good fit, both curves fall to a low value and keep similar shapes. A small gap between them is normal. With overfitting, training loss keeps falling or holds steady while validation loss turns and climbs.
Google’s glossary lists the usual suspects. They are the wrong input features, too few epochs, a learning rate set too low, regularization that is too strong, and a neural network with too few hidden layers. Regularization is any technique that reduces overfitting, often by penalizing complex models. Each cause has a matching remedy. Grow the model by adding layers or parameters. Deep learning practitioners often call the count of learnable parameters a model’s capacity. Feed it features that carry the signal, let training run longer, or turn the regularization rate down. A lower regularization rate weakens the pull toward simple models.
Statisticians call this kind of error high bias. The scikit-learn guide defines an estimator’s bias as its average error across different training sets. A learning curve is a related plot: it shows training and validation scores against the number of training examples, not epochs. If both scores level off at a poor value as the training set grows, the model itself is the bottleneck.
Every fix can overshoot. Complex models usually beat simple ones on training data, yet simple ones often do better on the test set. The TensorFlow guide suggests starting with a small network and growing it until the validation loss stops improving much. Early stopping halts a run before the loss has fully settled, which fights overfitting. It usually leaves training loss higher, so stopping far too soon can leave a model underfit. The overfitting explainer covers that opposite failure in detail.
A model that never picked up the pattern cannot use it anywhere, not even on examples it has already seen.
Read the training and validation loss curves side by side.
- 1 · trainTrain the model and record its loss on the training set after each epoch.
- 2 · validateRecord the loss on a held-out validation set at the same moments, so you get a second curve.
- 3 · compareIf both curves level off at a high loss and sit close together, the model is underfitting.
- 4 · adjustAdd capacity or better features, train for longer, or ease off regularization, then retrain and compare again.
Underfitting means high loss on both curves, not a gap between them.
| Who | What they ask | What it works with |
|---|---|---|
| Student project | “Why is my straight-line model wrong on its own training rows?” | Training and validation loss per epoch |
| Vision team | “Is this small network big enough for all our image classes?” | Training and validation accuracy curves |
| Forecasting team | “Did the model miss the weekly rhythm in sales?” | Training errors grouped by weekday |
| Training engineer | “Did we stop the run before the loss had finished falling?” | Slope of the loss curve at the last epoch |
- It names a failure you can see on the training data itself, before any new data arrives.
- Plotting training and validation results together separates underfitting from overfitting.
- It points to concrete fixes, such as a more powerful model, lighter regularization or longer training.
- The curves show that a model underfits, not which of several possible causes is to blame.
- Once both scores have levelled off low, extra training data of the same kind will probably not help much.
- Adding capacity too freely can tip the model over into overfitting.
- Raising regularization to fight overfitting can cost predictive power and push a model toward underfitting.
Sources used
This explainer is written in original language. The links below support its factual claims.
- docsOverfitting, Google for Developers · read 1 Oct 2026
- docsMachine Learning Glossary: ML Fundamentals, Google for Developers · read 1 Oct 2026
- docsOverfit and underfit, TensorFlow · read 1 Oct 2026
- docsUnderfitting vs. Overfitting, scikit-learn · read 1 Oct 2026
- docs3.5. Validation curves: plotting scores to evaluate models, scikit-learn · read 1 Oct 2026
- docsCS231n: Neural Networks Part 3, Learning and Evaluation, Stanford University CS231n · read 1 Oct 2026
- docsOverfitting: Model complexity, Google for Developers · read 1 Oct 2026
- docsOverfitting: L2 regularization, Google for Developers · read 1 Oct 2026