
When a machine learning model fails, most people assume it learned too much — that it memorized the training data instead of finding real patterns. But there’s an equally damaging failure mode at the other extreme: a model so simple it never learned anything useful in the first place.
This is underfitting. A model underfits when it’s too simple to capture the real relationship between inputs and outputs, performing poorly not just on new data but on the training data too.
Unlike overfitting, underfitting gives you no false confidence — the model is visibly wrong from the start. Yet many practitioners misdiagnose it or reach for the wrong fix. This tutorial covers what underfitting is, why it happens, how to recognize it, and how to correct it.
What Is Underfitting?
A model underfits when it lacks the capacity or information to represent the underlying pattern in the data. It makes oversimplified assumptions and misses structure that’s genuinely there.
Consider a model predicting a patient’s risk of developing heart disease based on age. If you model that relationship as a single flat horizontal line — predicting the same risk for a 25-year-old and a 75-year-old — you’ve built an underfitted model. The real relationship curves and steepens with age. No matter how much patient data you feed that flat line, it can’t capture the curve.
Here’s the key diagnostic feature: an overfitted model looks great on training data and falls apart on new data. An underfitted model looks poor on both. That’s the signature of underfitting, and it’s what makes it easy to miss.
Why Does Underfitting Happen?
1. The Model Is Too Simple for the Problem
Some relationships in data are genuinely non-linear, and a model that assumes linearity will systematically miss them regardless of how much data it sees.
Consider predicting house prices using a simple linear relationship between square footage and price. In reality, that relationship has diminishing returns at the high end. A 500 square foot increase from 1,000 to 1,500 square feet adds more value than the same increase from 4,000 to 4,500 square feet. A straight line can’t represent this, so the model will underfit no matter how large the training set becomes.
The fix is to increase model complexity or switch to a model class capable of capturing non-linear patterns.
2. Too Few Features
A model can only learn from the information it’s given. If the most important predictors are absent, no amount of architectural sophistication recovers them.
Imagine predicting hospital readmission rates using only a patient’s age. Diagnosis type, medication adherence, prior admissions, and discharge conditions are the real drivers of readmission. A more complex model trained on that same thin feature set would still underfit, because the problem isn’t architecture — it’s missing information.
The fix is feature engineering, domain expert input, or collecting additional variables that carry real signal.
3. Too Much Regularization
Regularization is designed to prevent overfitting by penalizing model complexity. But when the penalty is too strong, it overcorrects, stripping the model of the ability to learn even genuine patterns.
Consider a logistic regression model predicting loan default with heavy L2 regularization applied. The regularizer aggressively shrinks all coefficients toward zero, including the ones for credit score and debt-to-income ratio, which genuinely matter. The model becomes too constrained to tell high-risk and low-risk applicants apart.
This is a counterintuitive cause: a tool designed to help ends up causing the problem. The fix is to reduce regularization strength and use cross-validation to find the right balance rather than setting the penalty arbitrarily.
4. Insufficient Training
Iterative models — neural networks and gradient boosting in particular — learn through repeated passes over the data. Stopping too early leaves the model in an underfitted state.
Suppose you’re training a neural network to detect diabetic retinopathy in retinal images and stop after 5 epochs when the model needs 50 to learn meaningful visual features. It hasn’t finished learning what healthy versus damaged retinas look like. It simply hasn’t been given enough time to extract the signal from the data.
The fix is to train longer while monitoring a validation curve to find the point where performance plateaus, rather than choosing an arbitrary stopping point.
How to Spot Underfitting
High Training Error
The clearest signal: the model performs poorly on the very data it was trained on. This is what separates underfitting from overfitting. An overfitted model has suspiciously low training error — it has memorized the training set. An underfitted model can’t even get the training set right.
If your training accuracy or training R-squared is unacceptably low, suspect underfitting before anything else.
Similar Training and Test Error, Both Poor
With overfitting, there’s a large gap: training performance is strong, test performance collapses. With underfitting, both are poor and roughly equal.
If your learning curves show training error and validation error converging at a high value, the model is underfitting. The absence of a gap is what distinguishes this from overfitting, and why underfitting can be easy to overlook.
Flat or Near-Constant Predictions
A strongly underfitted model often produces nearly identical predictions for very different inputs. A model predicting customer churn that outputs “will not churn” for almost every customer — regardless of usage patterns, billing history, or engagement metrics — has effectively learned nothing. It’s defaulted to predicting the majority class and ignored all the signal in the features.
If your model’s predictions show almost no variation across very different inputs, it’s failed to learn the underlying structure.
How to Fix Underfitting
Increase Model Complexity
Give the model more capacity to learn — switching from linear regression to polynomial regression, from a shallow decision tree to a deeper one, or from logistic regression to a gradient boosting model.
One important caution: increasing complexity solves underfitting but risks introducing overfitting. Monitor test performance as you scale up rather than adding complexity indefinitely.
Add More Relevant Features
If the model doesn’t have access to the variables that actually drive the outcome, no model architecture will compensate.
Practical approaches include consulting domain experts, engineering new variables from existing ones such as ratios, time differences, and rolling averages, and exploring interaction terms between features that may carry predictive signal together but not individually.
Reduce Regularization
If regularization is the cause, dial it back. Think of it as a dial between “model free to learn” and “model constrained to be simple.” Turn it too far toward simplicity and the model can’t learn even what it should.
Use cross-validation to find the regularization strength that minimizes validation error rather than relying on default values. The right amount depends on the data, and there’s no universal setting.
Train Longer
For iterative models, allow more training time. These models improve incrementally with each pass through the data. Stopping early is like pulling bread from the oven before it’s done.
Monitor a validation loss curve and stop when validation performance plateaus, not at an arbitrary early point. This balances training time against the risk of eventually overfitting.
The Bigger Picture: Where Underfitting Fits
Underfitting and overfitting sit at opposite ends of a spectrum.
Underfitting is a high-bias problem. The model makes the same systematic errors no matter how much data it sees, because its assumptions are too rigid. Overfitting is a high-variance problem — the model is so sensitive to its training data that small changes produce wildly different predictions on new data.
The goal is the middle: expressive enough to learn real patterns, constrained enough to ignore noise. As you increase model complexity, training error falls, but at some point test error starts rising again. That U-shaped curve describes the tradeoff, with underfitting on the left, overfitting on the right, and the optimal zone at the bottom.
Finding that sweet spot is what the bias-variance tradeoff is all about. See the full guide to overfitting for a deeper treatment.
Closing
Underfitting means your model hasn’t learned enough. The fix is almost always to give it more capacity, more information, better features, or more training time.
Resist the urge to keep adding complexity indefinitely. The goal isn’t the most sophisticated model — it’s the right-sized model for your problem. A model that’s slightly too simple and knows it is far more useful than one that’s dramatically overfit and doesn’t.
