liveBook · Manning

Early stopping

As explained in Transformers in Action

Early stopping is a training procedure that halts optimization when a validation measure stops improving for a specified interval.

Early stopping halts optimization when a validation metric fails to improve for a specified number of epochs. It limits training before the model memorizes data instead of learning patterns that generalize to unseen examples. section 8.1.1

Use early stopping to balance training progress and generalization:

  • Training for more epochs can improve learning up to a point; continued training may increase overfitting. section 8.1.1
  • Monitor a validation metric and interrupt optimization after its improvement stops for the chosen interval. section 8.1.1

Training with a validation limit

A model improves on training data while its validation performance stops improving. Early stopping ends training at that point rather than allowing additional epochs that could encourage memorization. section 8.1.1

How Transformers in Action covers it

How deep it goes
Defines the stopping rule and its generalization rationale without detailing implementation mechanics or metric selection.
Examples
Contrasts training performance with validation performance as additional epochs begin producing memorization.
What it assumes
Assumes familiarity with epochs, training, validation metrics, gradient descent, and overfitting.
What you can do after
Apply it by monitoring a validation metric and stopping training after improvement remains absent for a specified epoch interval.
How it connects
Connects epochs, validation metrics, overfitting, regularization, gradient descent, and generalization.

Also explained in

Compare how 9 books explain early stopping →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Transformers in Action. The section links point to the parts of the book it draws on.