What is early stopping and how do you configure it?
easyAnswer
- Monitor a validation metric each epoch; stop training when it hasn't improved for 'patience' epochs.
- Restore the best-performing checkpoint.
- Prevents overfitting when training beyond the optimal point.
- Config: choose the right metric (accuracy for classification, F1 for imbalanced, loss for regression), patience ~5-20% of total epochs, and a small delta threshold to avoid stopping on noise.
Check yourself — multiple choice
- Stop training after N steps
- Stop when val metric hasn't improved for patience epochs; restore best checkpoint — prevents overfitting
- Same as gradient clipping
- Only for classification
Early stopping: patience + best-checkpoint restore → avoids overfitting.
#regularization#training
Practise Deep Learning
214 interview questions in this topic.
Related questions
- How does dropout work and when is it applied?
- What is stochastic depth / DropPath and where is it used?
- What is Stochastic Weight Averaging (SWA)?
- What is adversarial training (PGD, FGSM)?
- What is an EMA of weights and why do modern training recipes use it?
- Your validation loss is lower than your training loss. Is something broken?