liveBook · Manning

Early stopping

Also called EarlyStopping

Early stopping is a technique that terminates an iterative process before its planned completion when a specified condition indicates that further work is unnecessary or unlikely to improve the objective.

How 11 Manning books explain it

Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

Early stopping is an iterative-training termination criterion that halts optimization when validation performance fails to improve for a specified number of iterations.

How it is used
Controls overfitting and training cost while fitting gradient-boosted ensembles through validation-based termination.
How deep it goes
Explains the validation, metric, patience, and stopping workflow, then compares Scikit-learn, XGBoost, LightGBM, and TabNet settings.
Examples
Uses Airbnb NYC classification, GradientBoostingClassifier, XGBClassifier, LGBMClassifier, and TabNet training configurations.
What you can do after
Operate/configure it in Scikit-learn, XGBoost, LightGBM, and TabNet by selecting validation data, metrics, and patience.

Read how Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI explains early stopping →

Ensemble Methods for Machine Learning

Early stopping is a boosting technique that terminates training after enough base estimators have been added to achieve acceptable validation performance.

How it is used
Controls overfitting and training cost while choosing how many boosted base estimators to retain.
How deep it goes
Explains validation-based patience step by step and implements it in LightGBM and XGBoost, without deriving boosting internals.
Examples
Uses decision-stump ensemble searches, AUC-monitored LightGBM and XGBoost runs, and CatBoost evaluation curves on credit data.
What you can do after
Apply it via LightGBM, XGBoost, or CatBoost by providing an evaluation set, metric, maximum iterations, and patience window.

Read how Ensemble Methods for Machine Learning explains early stopping →

Natural Language Processing in Action, Second Edition

Early stopping is a training regularization technique that terminates optimization when validation performance stops improving.

How it is used
Controls fine-tuning duration by comparing validation results during training and retaining the best model.
How deep it goes
Explains evaluation cadence, patience, delta, and best-model saving, but does not detail the stopping algorithm internals.
Examples
Uses a toxic-comment dataset, multilabel BERT fine-tuning, periodic ROC-AUC evaluation, and separate evaluation of the saved best model.
What you can do after
Apply it via SimpleTransformers to stop fine-tuning after stalled validation improvement and evaluate the retained best checkpoint.

Read how Natural Language Processing in Action, Second Edition explains early stopping →

Build AI Drug Discovery Pipelines

Early stopping is a training-control technique that terminates iterative model fitting when additional updates no longer improve a selected evaluation criterion.

How it is used
Controls iterative fitting by terminating training when validation performance no longer improves.
How deep it goes
Explains validation checkpoints, epoch limits, and stalled-improvement stopping, but does not specify a universal patience value.
Examples
Uses molecular-solubility regression, graph neural networks for drug-target affinity, and XGBoost tree-count selection.
What you can do after
Operate/configure training with validation monitoring, best-checkpoint retention, and early termination.

Read how Build AI Drug Discovery Pipelines explains early stopping →

Deep Learning with Python, Third Edition

A training strategy that stops optimization when validation performance stops improving.

How it is used
Uses validation performance to stop optimization early and avoid unnecessary epochs or continued overfitting.
How deep it goes
Explains callback configuration, patience, validation monitoring, and best-weight restoration without detailing the callback implementation.
Examples
Uses a Keras bag-of-words sentiment classifier with validation monitoring, patience of two epochs, plots, and final test evaluation.
What you can do after
Apply it via Keras to stop training automatically and retain the weights associated with the best validation epoch.

Read how Deep Learning with Python, Third Edition explains early stopping →

Machine Learning Algorithms in Depth

Early stopping is a training procedure that terminates optimization when performance on a validation criterion stops improving.

How it is used
Uses validation loss to limit overfitting during neural-network training and reduce unnecessary computation.
How deep it goes
Defines the stopping signal and illustrates a several-epoch criterion, but does not derive a stopping rule mathematically.
Examples
Uses MNIST multilayer-perceptron and convolutional-network training, with training and validation loss curves.
What you can do after
Apply it via a Keras/TensorFlow EarlyStopping callback while monitoring validation loss and saving a model checkpoint.

Read how Machine Learning Algorithms in Depth explains early stopping →

Evolutionary Deep Learning: Genetic algorithms and neural networks

Early stopping is the termination of an iterative optimization or training process before its configured iteration limit when a stopping condition is met.

How it is used
Uses target-based termination to reduce unnecessary generations or training epochs during genetic optimization and deep-learning training.
How deep it goes
Explains the stopping check and configuration, but does not develop a general theory for selecting thresholds.
Examples
Demonstrates early stopping with an N-Queens genetic algorithm and an MLP genetic optimizer solving a circles classification problem.
What you can do after
Apply early stopping by comparing evaluated fitness, accuracy, or loss with a configured target inside an optimization loop.

Read how Evolutionary Deep Learning: Genetic algorithms and neural networks explains early stopping →

Learn Generative AI with PyTorch

A training control method that stops fitting when validation or other monitored performance no longer improves.

How it is used
Controls when classifier or GAN training ends by monitoring validation performance or a task-specific generation metric.
How deep it goes
Defines a patience-based class and embeds it in training loops, without developing a broader theory of stopping criteria.
Examples
Uses Fashion MNIST classification and GAN-generated curves or multiples of five as monitored training tasks.
What you can do after
Apply it via a patience-based Python class inside PyTorch training loops.

Read how Learn Generative AI with PyTorch explains early stopping →

Building LLM Applications with DSPy

Early stopping is a technique that halts an evaluation or training process before its planned completion when further work is unnecessary or unproductive.

How it is used
Reduces prompt-optimization evaluation cost by screening weak candidates before full validation.
How deep it goes
Implements a 50-example, 80% cutoff and discusses staged checks and score-based pruning without specifying their algorithms.
Examples
Uses a 50-of-300 validation subset with an 80% cutoff and suggests checkpoints at 25, 100, 150, and 200 examples.
What you can do after
Apply manual evaluation code to skip full tests of weak candidate prompts and save time and cost.

Read how Building LLM Applications with DSPy explains early stopping →

Timeless Algorithms, The Foundational Ideas

Early stopping is a regularization technique that halts training when further learning is likely to harm performance on held-out data.

How it is used
Constrains continued parameter adjustment as a regularization method for improving generalization.
How deep it goes
Defines a validation-based stopping condition and its overfitting rationale, without specifying an implementation rule.
Examples
Contrasts improving validation performance with declining training loss as the signal to stop.
What you can do after
Understand when continued training may harm generalization and why validation performance, not training loss alone, guides stopping.

Read how Timeless Algorithms, The Foundational Ideas explains early stopping →

Transformers in Action

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

How it is used
Uses validation performance to limit optimization and reduce overfitting during model training.
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 you can do after
Apply it by monitoring a validation metric and stopping training after improvement remains absent for a specified epoch interval.

Read how Transformers in Action explains early stopping →

Also covered in

What to know first

Related concepts

Questions about early stopping

What is early stopping?

Early stopping is a technique that terminates an iterative process before its planned completion when a specified condition indicates that further work is unnecessary or unlikely to improve the objective.

Which Manning books explain early stopping?

Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI, Ensemble Methods for Machine Learning, Natural Language Processing in Action, Second Edition, Build AI Drug Discovery Pipelines, Deep Learning with Python, Third Edition, Machine Learning Algorithms in Depth, Evolutionary Deep Learning: Genetic algorithms and neural networks, Learn Generative AI with PyTorch and 3 more.

What should I know before learning early stopping?

Manning books that teach early stopping usually introduce objective function, accuracy, overfitting and epoch first.

What is early stopping a kind of?

Early stopping is a kind of p-hacking. P-hacking is manipulating data collection, analysis, or reporting choices to obtain or present an apparently statistically significant result.

What is early stopping also called?

Early stopping is also called EarlyStopping.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.