Early stopping is a method for preventing overfitting so that a model in training achieves better generalization performance. Specifically, it is a technique that ends training when the loss on the validation dataset has not improved for a certain number of epochs. Early stopping prevents a model from fitting the training data excessively. Overfitting is a phenomenon in which a model learns too much of the noise and idiosyncratic patterns in the training data, so its performance on test data drops. With this method, the loss on the validation data is monitored during training in addition to the training data, and a number of epochs without improvement in the validation loss is specified. If the validation loss does not improve over that number of epochs, training is terminated early.
A detailed discussion of how to choose the stopping criterion, patience, and the relationship with L2 regularization can be found in the article on Early Stopping as a regularization method.

