# Early Stopping

> Stop the training when the score on new data stops going up.

**Field:** Artificial Intelligence  
**Category:** Machine Learning  
**Also known as:** Early Stop, Stop Training Early

## Think of it like

It is like taking cookies out of the oven when they look right. Wait more and they burn.

## Definition

Early stopping ends training once the model stops getting better on new data. While training, you check the loss on the validation set after each epoch. At first it falls along with the training loss. Then it flattens or starts to rise, which means overfitting has begun. You stop there and keep the best version. A patience setting waits a few epochs first, in case it is just a bump.

## Example

Jack plans 100 epochs. Validation loss is lowest at epoch 23 and rises for 5 more, so training stops at epoch 28 and keeps epoch 23.

## Why it matters

It guards against overfitting for free. It also saves hours of wasted training time.

## Common mistake

Stopping on the first bump. Loss jumps around a little, so wait a few epochs before you stop.

## Three principles

- **Watch new data.** Track validation loss each epoch.
- **Stop at the turn.** When it stops falling.
- **Keep the best.** Save the version from the low point.

## Related terms

- [Overfitting](https://learn.benibix.com/term/ai/overfitting)
- [Regularization](https://learn.benibix.com/term/ai/regularization)
- [Validation Set](https://learn.benibix.com/term/ai/validation-set)
- [Epoch](https://learn.benibix.com/term/ai/epoch)
- [Loss Function](https://learn.benibix.com/term/ai/loss-function)

## Taught in

- [Regularization and Dropout](https://learn.benibix.com/learn/ai-machine-learning/regularization-and-dropout): Machine Learning, 17/18

![A chart of loss over epochs. Training loss keeps falling. Validation loss falls, then turns up again. The point where it turns is marked stop here.](https://learn.benibix.com/diagrams/nn-overfit-curve.svg)

---

Source: https://learn.benibix.com/term/ai/early-stopping
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
