1 Definition and Conceptual Foundation
Underfitting is a modeling failure in machine learning and statistics where a model is too simplistic to capture the underlying patterns in the data. This results in poor performance on both the training set and unseen test data. The model exhibits high bias, meaning it makes strong assumptions about the data that are not justified, and fails to reach the desired accuracy or loss threshold.
1.1 Relationship to Bias–Variance Tradeoff
Underfitting is intimately linked to the bias–variance tradeoff. A model that underfits has high bias and low variance. High bias arises from overly restrictive assumptions (e.g., assuming linearity when the true relationship is nonlinear), leading to systematic errors. Low variance means the model’s predictions are consistent across different training samples, but they are consistently wrong. The tradeoff suggests that underfitting occurs when bias dominates, while overfitting occurs when variance dominates.
1.2 Contrast with Overfitting
Underfitting and overfitting are opposite failure modes. Overfitting occurs when a model is too complex—it memorizes noise and random fluctuations in the training data, performing well on training data but poorly on new data. Underfitting, by contrast, fails to learn even the training data well. Overfitting is characterized by low bias and high variance; underfitting by high bias and low variance. Diagnosing which is occurring often requires examining both training and validation performance.
1.3 Role in Model Capacity
Model capacity refers to the complexity of functions a model can represent. Underfitting arises when capacity is too low—the model cannot fit the training data regardless of training duration. Capacity is determined by factors such as the number of parameters, depth of a neural network, or degree of a polynomial. Increasing capacity reduces the risk of underfitting but raises the risk of overfitting, creating a delicate balance.
2 Causes of Underfitting
Several factors can lead to underfitting, often related to constraints that prevent the model from learning the data’s structure.
2.1 Insufficient Model Complexity
The most straightforward cause is using a model that is inherently too simple for the task. For example, fitting a linear model to data with a quadratic trend or using a shallow decision tree on a dataset requiring deep splits. The model lacks the necessary parameters or hierarchical structure to approximate the true function.
2.2 Inadequate Feature Representation
When the input features fail to capture the relevant information, underfitting occurs. This can happen if important predictors are omitted, if features are poorly scaled, or if only raw measurements are used without transformations (e.g., using only linear terms when interactions are crucial). Feature engineering is critical to provide the model with the right inputs.
2.3 Excessive Regularization
Regularization techniques (e.g., L1/L2 penalties, dropout) are designed to prevent overfitting by discouraging complex models. However, if the regularization strength is set too high, the model’s parameters are forced toward zero or simple values, effectively reducing capacity. This can cause underfitting even if the base model architecture is sufficiently complex.
2.4 Premature Stopping in Training
In iterative training algorithms (e.g., gradient descent), stopping too early can leave the model in a state where it has not yet learned the data’s patterns. This is particularly common in deep learning when training is halted based on a fixed number of epochs or a too-tight convergence criterion. Early stopping is a regularization technique, but an overly aggressive stop leads to underfitting.
3 Symptoms and Detection
Detecting underfitting requires monitoring performance metrics on training and validation data, along with visual tools like learning curves.
3.1 Training‑Set Performance Indicators
The most direct symptom is that the model’s performance on the training set is poor—high error, low accuracy, or high loss compared to expectations. For classification tasks, the training accuracy may barely exceed random guessing. For regression, the residual errors show systematic patterns rather than random noise.
3.2 Validation‑Set Performance Indicators
Underfitting usually shows similar poor performance on a held-out validation set. Because the model has not learned meaningful patterns, it cannot generalize. The validation error is typically close to the training error, both being high. This contrasts with overfitting, where validation error is much higher than training error.
3.3 Learning Curve Analysis
Plotting training and validation error as functions of training set size reveals underfitting when both curves plateau at a high error level with increasing data. Alternatively, plotting error versus training epochs shows that the model’s training error does not decrease significantly after early iterations. A flat curve at a high error is a classic sign.
3.4 Comparison with Overfitting Characteristics
Underfitting and overfitting can be distinguished by comparing training and validation performance. Underfitting: both errors are high and similar. Overfitting: training error is very low, validation error is much higher. A model that underfits may also show that increasing model complexity immediately reduces both errors, while overfitting would increase the gap.
4 Mitigation Strategies
Once underfitting is diagnosed, several strategies can help the model learn more effectively.
4.1 Increasing Model Complexity
The most direct remedy is to use a more expressive model.
4.1.1 Adding Layers or Neurons (Neural Networks)
In deep learning, underfitting is often addressed by increasing the number of layers (depth) or the number of neurons per layer (width). This gives the network more capacity to represent intricate functions. However, care must be taken to avoid overfitting.
4.1.2 Using Higher‑Degree Polynomials (Regression)
In regression, replacing a linear model with a polynomial model (e.g., quadratic, cubic) can capture curvature in the data. Higher-degree terms add flexibility, but choosing the degree requires balancing bias and variance.
4.2 Feature Engineering
Improving the input features can dramatically reduce underfitting.
4.2.1 Constructing Interaction Terms
If the relationship between features is multiplicative or non-additive, creating interaction terms (e.g., x1*x2) allows the model to capture those patterns. This is especially useful for linear models and tree-based models.
4.2.2 Incorporating Domain‑Specific Features
Domain knowledge can guide the creation of new features, such as ratios, aggregations, or time-lag features. For example, in time series forecasting, adding rolling averages or seasonality indicators can help underfit models.
4.3 Reducing Regularization Strength
If excessive regularization is the cause, lowering the regularization hyperparameter (e.g., λ in ridge regression, dropout rate) allows the model to fit more complex patterns. This should be done cautiously, monitoring validation performance to avoid swinging into overfitting.
4.4 Extending Training Duration
For iterative algorithms, increasing the number of epochs or iterations, or relaxing convergence criteria, gives the model more time to learn. Using learning rate schedules or adaptive optimizers can also help the model escape poor local minima that might mimic underfitting.
4.5 Ensemble Methods
Combining multiple simple models (e.g., bagging or boosting) can reduce bias. For example, a random forest of shallow trees often outperforms a single shallow tree. Boosting (e.g., AdaBoost, gradient boosting) sequentially corrects errors, effectively increasing model capacity without directly altering base model complexity.
5 Underfitting in Specific Algorithms
Different algorithms exhibit underfitting in characteristic ways.
5.1 Linear Regression
Linear regression assumes a linear relationship. If the true relationship is nonlinear, the model will underfit. Symptoms include residuals showing a clear pattern (e.g., U-shaped) and low R² on both training and test sets. Remedies include adding polynomial terms or using more flexible models like splines.
5.2 Decision Trees and Random Forests
A decision tree with insufficient depth (e.g., max_depth=1, a stump) will underfit because it can only split on one feature. In a random forest, using trees that are too shallow (high min_samples_leaf) can cause underfitting. Increasing max_depth or reducing regularization of individual trees helps, but in random forests, the ensemble itself reduces bias if trees are deep enough.
5.3 Support Vector Machines
SVMs with linear kernels underfit data that is not linearly separable. Using a kernel (e.g., RBF, polynomial) increases capacity. Additionally, the C parameter controls the trade-off between smooth decision boundary and classifying training points correctly; a low C can lead to underfitting by permitting many misclassifications.
5.4 Neural Networks and Deep Learning
Neural networks underfit when they are too shallow or too narrow, or when they are trained with too few epochs or overly aggressive dropout. Batch normalization and proper initialization can also affect underfitting. For deep networks, if the learning rate is too low, training may stall, mimicking underfitting.
6 Common Misconceptions
Several phenomena are often confused with underfitting.
6.1 Underfitting vs. Lack of Convergence
A model may not have finished training yet (lack of convergence) but would eventually fit if given more epochs. Underfitting refers to the model’s inherent inability to fit regardless of training time. Checking whether performance improves with more iterations distinguishes the two.
6.2 Underfitting vs. Irreducible Error
Irreducible error (also called Bayes error) is the inherent noise in the data that no model can reduce. Even a perfect model would have some error. Underfitting is characterized by high bias that adds on top of irreducible error. If the model’s performance is close to the theoretical minimum error given the noise, it is not underfitting.
7 Related Theoretical Concepts
7.1 Overfitting
Overfitting is the opposite problem: a model that is too complex and fits noise. While underfitting has high bias and low variance, overfitting has low bias and high variance. Both are central to understanding model selection and the bias–variance tradeoff.
7.2 Bias–Variance Tradeoff
This tradeoff formalizes the relationship between underfitting (bias-dominated) and overfitting (variance-dominated). The goal is to find a model complexity where total error (bias² + variance + irreducible error) is minimized.
7.3 Occam’s Razor in Machine Learning
Occam’s razor suggests simpler models are preferable unless a more complex model provides significantly better performance. Underfitting occurs when simplicity is chosen at the expense of accuracy. Thus, Occam’s razor must be applied with care: seek the simplest model that still fits the data adequately, avoiding both underfitting and overfitting.