Skip to content

Underfitting

Why a model can miss useful structure even in training data, and how to distinguish limited capacity, excessive regularisation and failed optimisation.

Underfitting occurs when a fitted model is too restrictive to capture useful structure in the relationship it is meant to learn. A transaction-cost forecast that predicts the same cost for every trade may miss a genuine dependence on trade size or liquidity. If that dependence is stable and available at decision time, the missed structure can lead a trading system to size orders badly even with a long training history.

Underfitting concerns what the model learns relative to the task. It is not a synonym for any disappointing forecast, and it does not mean that the most complicated alternative is best.

A constant that cannot learn a trend

Consider three synthetic, noiseless training observations, in arbitrary units. The stipulated generating relationship is y=1+2xy=1+2x.
Input xxObserved yyBest constant predictionFitted-line prediction
0131
1333
2535
For a model restricted to one constant cc, least squares chooses the sample mean, c=3c=3. Its training mean squared error is
MSE⁡constant=(1−3)2+(3−3)2+(5−3)23=83.\operatorname{MSE}_{\mathrm{constant}} =\frac{(1-3)^2+(3-3)^2+(5-3)^2}{3} =\frac{8}{3}.

This is the best possible constant, not an unlucky optimisation result. In fact, the training MSE for any constant satisfies

MSE⁡(c)=83+(c−3)2.\operatorname{MSE}(c)=\frac{8}{3}+(c-3)^2.
No choice of cc can remove the trend in the residuals: the model overpredicts the low-input observation and underpredicts the high-input observation. A linear regression with an intercept and slope can represent the stipulated relationship and has training MSE zero.
Synthetic observations (0,1), (1,3), (2,5); constant 3 has residuals minus 2, zero, plus 2 and training MSE 8/3, while line 1 plus 2x has training MSE zero.
Synthetic observations (0,1), (1,3), (2,5); constant 3 has residuals minus 2, zero, plus 2 and training MSE 8/3, while line 1 plus 2x has training MSE zero.
Original noiseless illustration in arbitrary units. Filled points are observations; the solid line is the fitted trend, the dashed line is the constant fit, and dotted verticals show its residuals. The comparison measures training fit, not future performance.

The example isolates a model-class limitation because the true relationship is known. Actual return and cost data contain noise, and their conditional means are unknown. A flat forecast can be an entirely sensible baseline when the available features contain little reliable predictive information. Zero training error is neither a realistic requirement nor proof of useful generalisation.

Diagnose the restriction before adding complexity

Several mechanisms can produce an apparently underfit result, but their repairs differ.

Possible causeWhat to investigateTargeted response
Model class or feature representation is too restrictiveResidual patterns linked to inputs; omitted curvature or interactions that have an economic rationaleCompare a modestly richer representation on validation data
Regularisation is too strongUseful coefficients are heavily shrunk; excessive dropout or very early stopping suppresses learningRelax the relevant constraint within a declared tuning budget
Optimisation has not fitted the chosen class adequatelyLoss is still falling, gradients fail, scaling is broken or updates divergeRepair the training process before changing the model class
The last row is an important distinction: a flexible model with a broken optimiser has not demonstrated that its class is inadequate. Calling every high training loss “high bias” hides that distinction. Reading Loss Curves develops this diagnostic workflow for neural networks, including error slices and training telemetry. It has a public preview; the full lesson requires membership.

Compare training and validation losses using the same outcome definition and comparable prediction settings. A training objective that includes a penalty, or a training pass with dropout active, is not directly comparable to an unpenalised inference-mode validation loss. Large errors on both sets are a clue, not a verdict: noisy targets, label errors or an unsuitable loss can also explain them. Structured residuals are more informative than a large scalar error alone.

A richer model still has to earn its place

Underfitting is often associated with the bias side of the bias–variance trade-off: restrictions can systematically pull forecasts away from the true conditional mean. More flexibility may reduce that error while increasing sensitivity to the sample. The resulting test-error curve need not have a universal U shape.
For financial forecasting, compare plausible repairs on later validation periods, preserving feature availability, label completion and the intended refitting schedule. Time-Ordered Train, Validation and Test Design explains those boundaries; it offers a public preview, with membership required for the full lesson. Freeze the selected procedure before final assessment. Repeatedly repairing a model against the same test period turns that period into development evidence and invites overfitting.

More data can reduce estimation uncertainty, but it cannot make a constant function express a slope. More complexity can express a slope, but it cannot create an economic signal that is absent from the information set. The useful repair is the smallest justified change that improves a properly assessed forecasting or trading decision, with uncertainty and implementation costs considered.

Sources

  • Hastie, T., Tibshirani, R. and Friedman, J., The Elements of Statistical Learning, 2nd ed., corrected 12th printing, January 2017, §2.9, pp. 37–38. Local grounding copy consulted: model complexity, irreducible error and underfitting.
  • scikit-learn developers, Underfitting vs. Overfitting. Official worked example illustrating insufficient model flexibility and validation-based comparison. Its synthetic example is distinct from the exact constant-versus-line illustration here.
Last updated
  • model diagnostics
  • model capacity
  • regularisation
  • validation
← Back to the glossaryBack to top ↑