What is overfitting
Last updated: April 1, 2026
Key Facts
- Overfitting manifests as high training accuracy paired with significantly lower validation and test set accuracy, indicating poor generalization
- Common causes include excessive model complexity relative to available training data, insufficient regularization, and training for too many iterations
- Regularization techniques like L1/L2 penalties, dropout, and early stopping help prevent overfitting by constraining model complexity
- Cross-validation is essential for detecting overfitting early by evaluating model performance on multiple data splits
- The bias-variance tradeoff explains overfitting as excessive variance—models that are too flexible capture noise rather than true underlying patterns
Overview
Overfitting is a fundamental problem in machine learning where a model learns the training data too well, including its noise and irrelevant patterns. Rather than capturing the underlying relationship between input features and target outputs, an overfitted model essentially memorizes the training data. This leads to excellent performance on training data but poor performance on new, unseen data, making the model useless for real-world applications.
Causes of Overfitting
Several factors contribute to overfitting:
- Model Complexity: Models with too many parameters relative to training data size have excessive capacity to memorize
- Insufficient Data: Small datasets provide fewer examples to constrain model learning, making memorization easier
- Training Duration: Excessive training iterations allow models to progressively fit noise in the data
- Lack of Regularization: Without constraints on model weights and complexity, overfitting occurs unchecked
- Noisy Data: Training data containing measurement errors or mislabeling encourages models to fit this noise
Detecting Overfitting
Overfitting manifests clearly when comparing training and validation metrics. Training accuracy may reach 95% while validation accuracy stagnates at 70%. This divergence indicates the model has learned training-specific patterns rather than generalizable features. Plotting training and validation loss over epochs typically shows validation loss increasing while training loss continues decreasing—a clear overfitting signal.
Prevention Strategies
Regularization techniques constrain model complexity and prevent overfitting:
- L1/L2 Regularization: Penalizes large model weights, forcing simpler solutions
- Dropout: Randomly disables neurons during training, preventing co-adaptation
- Early Stopping: Terminates training when validation loss stops improving
- Data Augmentation: Artificially expands training data to provide more learning examples
- Cross-Validation: Evaluates models on multiple data splits to ensure generalization
Bias-Variance Tradeoff
Overfitting represents one extreme of the bias-variance tradeoff. High-complexity models exhibit low bias (accurate on training data) but high variance (sensitive to training data fluctuations). Conversely, overly simple models exhibit high bias (inaccurate everywhere) and low variance. Optimal models balance these extremes, achieving reasonable accuracy while maintaining generalization.
Practical Impact
In production environments, overfitted models fail when deployed on real data differing from training conditions. A fraud detection model overfitted to historical patterns won't detect novel fraud schemes. An image classifier overfitted to specific training images will misclassify similar images with different lighting or angles. Preventing overfitting ensures models provide reliable, consistent performance across diverse real-world scenarios.
Related Questions
What is underfitting in machine learning?
Underfitting occurs when a model is too simple to capture the underlying pattern in data, resulting in poor accuracy on both training and test sets. It represents the opposite extreme of overfitting on the bias-variance spectrum.
What is cross-validation?
Cross-validation is a technique that divides data into multiple subsets for training and validation, evaluating model performance across different data splits. This helps detect overfitting and provides more reliable performance estimates than single train-test splits.
What is regularization in machine learning?
Regularization modifies the learning algorithm by adding constraints or penalties that discourage overly complex models. Techniques like L1/L2 regularization, dropout, and early stopping reduce overfitting by limiting model flexibility and capacity to memorize data.
More What Is in Daily Life
- What Is a Credit ScoreA credit score is a three-digit number, typically ranging from 300 to 850, that represents your cred…
- What Is CD rates make no sense based on length of time invested. Explain like I'm 5CD (Certificate of Deposit) rates often don't increase with longer lock-up times the way people expe…
- What is a phdA PhD (Doctor of Philosophy) is a doctoral degree earned after completing advanced academic research…
- What is a polymathA polymath is a person with deep knowledge and expertise across multiple different fields or academi…
- What is aaveAAVE stands for African American Vernacular English, a dialect with distinct grammar, pronunciation,…
- What is aarch64ARMv8-A (commonly called ARM64 or AArch64) is a 64-bit processor architecture developed by ARM Holdi…
- What is about menTopics and discussions about men typically encompass masculinity, male identity, gender roles, men's…
- What is abiturAbitur is the German academic qualification awarded upon completion of secondary education, typicall…
- What is abrosexualAbrosexual is a sexual orientation identity where a person's sexual attraction changes or fluctuates…
- What is abgABG is an Indonesian acronym standing for 'Anak Baru Gede,' which refers to adolescent girls or teen…
- What is aaaAAA batteries are a standard cylindrical battery size measuring 10.5mm in diameter and 44.5mm in len…
- What is aacAAC (Advanced Audio Codec) is a digital audio compression format that provides better sound quality …
- What is aaa gameAAA games are high-budget video games developed by large studios with budgets typically exceeding $1…
- What is a proxyA proxy is a server that acts as an intermediary between your device and the internet, forwarding yo…
- What is ableismAbleism is discrimination and prejudice against people with disabilities based on the assumption tha…
- What is absAbs, short for abdominal muscles, are the muscles in your core that flex your spine and stabilize yo…
- What is abortionAbortion is a medical procedure that ends pregnancy by removing the fetus before viability. It can b…
- What is accutaneAccutane (isotretinoin) is a powerful prescription medication derived from vitamin A used to treat s…
- What is acetaminophenAcetaminophen, also known as paracetamol, is an over-the-counter pain reliever and fever reducer use…
- What is acidAcid is a chemical substance that donates protons (hydrogen ions) to other substances, characterized…
Also in Daily Life
- How To Save Money
- Why are so many white supremacist and right wings grifters not white
- Does "I'm 20 out" mean youre 20 minutes away from where you left, or youre 20 minutes away from your destination
- Why are so many men convinced that they are ugly
- What does awol mean
- What does asl mean
- What does ad mean
- What does asap mean
- What does apex mean
- What does asmr stand for
- What does atp mean
- What causes autism
- What does abg mean
- What does am and pm mean
- What does a fox sound like
More "What Is" Questions
Trending on WhatAnswer
Browse by Topic
Browse by Question Type
Sources
- Wikipedia - Overfitting CC-BY-SA-4.0
- Britannica - Machine Learning Proprietary