Skip to content
ContentLora

    Tip: press / anywhere to search.

    Explainer

    Overfitting and generalization: why AI models fail on new data

    A model overfits when it memorises its training data so closely that it fails on new data; generalization, the ability to predict well on unseen examples, is the real goal.[1][2] Practitioners catch overfitting by holding back separate validation and test sets, and fight it with regularisation such as weight penalties, early stopping and dropout.[3][4][5] Deep learning complicates the classical picture: huge networks can memorise random labels yet generalize well on real data, and test error can fall again as models grow, a pattern called double descent.[6][7]

    Editor reviewedUpdated Explainer20 claims · 15% primaryMachine learning foundations, Artificial intelligence
    Reading level: 1 passage differs; the rest is the same for everyone.

    This page is part of our machine learning foundations series. It builds on how machine learning works and loss functions. After it, read how embeddings work.

    A model that scores perfectly on the examples it trained on has not necessarily learned anything useful. It might have memorised them. Overfitting means a model matches its training data so closely that it fails to make correct predictions on new data, and Google calls it a common problem in machine learning.[1] The goal is generalization: correct predictions on new, previously unseen data.[2]

    Too loose, too tight

    Think of a student who memorises last year’s exam answers. They ace the practice paper and fail the real exam. That is overfitting. The opposite failure is underfitting: a model that never captured the patterns in its training data at all, for example because it trained for too few rounds or used the wrong information.[8]

    Google’s course names two broad causes of overfitting: training data that doesn’t represent real life well, and a model that is too complex.[9]

    Underfitting is poor predictive ability because the model has not captured the complexity of the training data, caused for example by the wrong features, too few epochs or too low a learning rate.[8] Overfitting is broadly caused by an unrepresentative training set, an overly complex model, or both.[9] Generalization also rests on assumptions about the data: examples should be independently and identically distributed, and the dataset stationary, not shifting significantly over time.[10]

    Training, validation and test sets

    To see whether a model generalizes, you have to test it on data it did not train on.[11] Datasets are traditionally split three ways. The training set is what the model learns from, the validation set is used for initial evaluation during development, and the test set is reserved for the final check. Each example belongs to only one set.[3]

    Overfitting shows up when the loss on the training set and the loss on the validation set behave similarly at first and then diverge.[12]

    Test sets have their own pitfalls. If developers keep using the same test set to guide changes, the model can end up fitting that test set, like a teacher teaching to the test, so test and validation sets “wear out” and need refreshing with new data.[13] Duplicates also distort results, so Google recommends deleting any validation or test examples that copy training examples.[14] The same problems matter when reading AI benchmark results, covered in how to read an AI research paper.

    Fighting overfitting: regularisation

    Three common regularisation methods are:

    • Weight penalties. Training minimises a combination of loss and complexity.[15] L2 regularisation penalises large weights, pushing them toward zero without reaching it, which usually lowers the model’s overall complexity.[4]
    • Early stopping. Training is halted when the loss on the validation set starts to rise, the point where generalization begins to worsen.[5]
    • Dropout. In neural networks, a random selection of units in a layer is switched off for each training step.[5]

    The deep-learning puzzle

    The classical view, as Belkin and colleagues summarised it in PNAS in 2019, is a trade-off: control a model’s capacity to balance underfitting against overfitting. Its textbook corollary is that a model with zero training error is overfit and will typically generalize poorly.[16]

    Modern deep learning does not fit that picture neatly.

    • Memorising noise. A 2016 study, published at ICLR 2017, found that state-of-the-art image classifiers could easily fit completely random labels on their training data. They could even fit images replaced by pure noise, and explicit regularisation made little difference.[6] The authors concluded that traditional explanations fail to explain why large neural networks generalize well in practice.[17]
    • Double descent. Belkin and colleagues proposed a “double-descent” curve. As a model grows, test error first follows the classical U shape and peaks around the point where the model can fit its training data exactly. Then, as capacity grows further, the error falls again. They reported evidence for it across a wide range of models and datasets.[7]
    • More data can hurt. A 2019 follow-up, published at ICLR 2020, found double descent in a variety of modern deep-learning tasks, both as models grow and as they train for longer. It also identified settings where adding training samples, even quadrupling them, made test performance worse.[18]

    What is known and what is open

    The practical toolkit is well established: hold out data the model never sees, watch training and validation loss, and regularise.[3][12][4] The theory is not. The PNAS authors wrote that breakthroughs in machine learning are changing science and society while fundamental understanding of the technology has lagged far behind.[19] The papers above left open why very large networks generalize as well as they do.[17] AI scaling laws covers a related empirical finding: a 2017 study found that generalization error falls as a power law as training sets grow.[20]

    Next in the crash course

    Questions readers ask

    What is overfitting in machine learning?

    Building a model that matches, or memorises, its training data so closely that it fails to make correct predictions on new data. Google calls it a common problem in machine learning.[1]

    What is the difference between overfitting and underfitting?

    An overfit model has learned its training data too closely and does badly on new data. An underfit model has not captured the patterns in the training data at all, for example because it was trained too briefly or with the wrong features.[1][8]

    Why split data into training, validation and test sets?

    So the model is judged on examples it never trained on. The validation set guides development and the test set gives the final check; each example belongs to only one set, and duplicates of training examples should be removed from the other two.[3][14]

    How do you prevent overfitting?

    Common methods include better and more representative data, simpler models, L2 regularisation, which penalises large weights, early stopping when validation loss starts to rise, and dropout in neural networks.[9][4][5]

    What is double descent?

    A pattern described in a 2019 PNAS paper in which test error first rises as a model becomes big enough to fit its training data exactly, then falls again as the model keeps growing. A later paper found it in many deep-learning tasks.[7][18]

    Sources

    · 20 claims from 5 publishers

    Each numbered claim is a statement we checked against the sources listed with it. Tap a number in the text to see its sources in place.

    1. [1]

      Overfitting means building a model that matches, or memorizes, its training data so closely that it fails to make correct predictions on new data; Google calls it a common problem in machine learning. reportedas of 2026-11-07

    2. [2]

      Generalization is a model's ability to make correct predictions on new, previously unseen data, the opposite of overfitting. reportedas of 2026-11-22

    3. [3]

      Datasets are traditionally divided into three distinct subsets, a training set, a validation set used for initial evaluation during development, and a test set reserved for testing the trained model, with each example in only one subset. reportedas of 2026-11-22

    4. [4]

      L2 regularisation penalises large weights, encouraging them toward zero without pushing them all the way to zero, which usually lowers a model's overall complexity. reportedas of 2026-11-22

    5. [5]

      Early stopping is a regularisation method that ends training when loss on a validation set starts to rise, and dropout regularisation removes a random selection of units in a neural-network layer for each gradient step. reportedas of 2026-11-22

      • Machine Learning Glossary · Google for Developers · Secondary source · Glossary, early stopping (retrieved 2026-11-07)
      • Machine Learning Glossary · Google for Developers · Secondary source · Glossary, dropout regularization (retrieved 2026-11-07)
    6. [6]

      A 2016 paper published at ICLR 2017 found that state-of-the-art image-classification networks trained with stochastic gradient methods easily fit a random labelling of their training data, even with explicit regularisation and even when the images were replaced by random noise. reportedas of 2026-11-22

    7. [7]

      The 2019 PNAS paper proposed a "double-descent" curve, in which test error rises toward the point where a model can fit its training data exactly (the interpolation threshold) and then falls again as capacity increases further, and reported evidence for it across a wide range of models and datasets. confirmedas of 2026-11-22

    8. [8]

      Underfitting is producing a model with poor predictive ability because it hasn't captured the complexity of the training data, for example because of the wrong features, too few epochs or too low a learning rate. reportedas of 2026-11-22

    9. [9]

      Google's course says overfitting is broadly caused by a training set that doesn't adequately represent real-life data, a model that is too complex, or both. reportedas of 2026-11-22

    10. [10]

      Google's course says training a model that generalizes well assumes the examples are independently and identically distributed, so they can't influence each other, and that the dataset is stationary, not changing significantly over time. reportedas of 2026-11-22

    11. [11]

      Models should be tested on different examples from those used to train them; datasets are traditionally split, and Google's course recommends separate training, validation and test sets. reportedas of 2026-11-07

    12. [12]

      Overfitting shows up when the loss curves for the training set and the validation set behave similarly at first and then diverge. reportedas of 2026-11-22

    13. [13]

      Google's course warns that reusing the same test set to guide changes can make a model implicitly fit that test set, like a teacher teaching to the test, and that test and validation sets "wear out" with repeated use and need refreshing with new data. reportedas of 2026-11-22

    14. [14]

      Google's course recommends deleting any validation or test examples that duplicate training examples, because duplicates distort evaluation. reportedas of 2026-11-22

    15. [15]

      With regularisation, training minimises a combination of loss and model complexity, with a regularisation rate (lambda) setting how much the complexity term counts. reportedas of 2026-11-22

    16. [16]

      Belkin and colleagues, writing in PNAS in 2019, described the classical view: model capacity is controlled through the bias-variance trade-off, balancing underfitting and overfitting, and the textbook corollary is that a model with zero training error is overfit and will typically generalize poorly. confirmedas of 2026-11-22

    17. [17]

      The authors of that paper wrote that conventional explanations, properties of the model family or regularisation, fail to explain why large neural networks generalize well in practice. reportedas of 2026-11-22

    18. [18]

      A 2019 paper published at ICLR 2020 reported double descent in a variety of modern deep-learning tasks, as a function of both model size and training epochs, and identified regimes where adding training samples, even quadrupling them, hurt test performance. reportedas of 2026-11-22

    19. [19]

      The PNAS authors wrote that breakthroughs in machine learning are rapidly changing science and society while fundamental understanding of the technology has lagged far behind. confirmedas of 2026-11-22

    20. [20]

      A 2017 empirical study across machine translation, language modelling, image processing and speech recognition found that generalisation error falls as a power law as training sets grow. reportedas of 2017-12-01

    Revision history (1)
    1. Page created.

    Created Nov 22, 2026. Last reviewed by an editor on Nov 22, 2026. Next scheduled review: Jul 5, 2027.

    Cite this page

    "Overfitting and generalization: why AI models fail on new data." ContentLora, updated Nov 22, 2026. https://contentlora.com/explain/overfitting-and-generalization-explained

    Spotted an error? Suggest a correction or emailcorrections@contentlora.com.