Overfitting is a failure to generalize: a model fits details of its training data that do not reliably hold in the population where it will be used. These details can include random noise, unusual examples, or accidental correlations. A common warning sign is training error continuing to decrease while validation error increases. Strong training performance alone is therefore insufficient evidence that a model is ready for production.
Bias and variance help explain this behavior. Statistical bias is systematic error introduced by a model's assumptions; high bias often contributes to underfitting, where the model misses important relationships and performs poorly on both training and unseen data. Variance describes how much a learned model changes when its training sample changes. Overfitting is commonly associated with high variance: the model depends too heavily on the particular examples it encountered. These are useful tendencies, not universal rules about every model architecture.
Consider a cloud-hosted loan-risk model trained on historical applications. A highly flexible model might learn that an incidental combination of location, application date, and device type predicts repayment in the training sample. If that relationship does not persist, production accuracy falls. Applicants from a demographic group represented by few examples may experience especially unstable predictions. However, statistical bias is not the same as demographic bias, and reducing overfitting does not automatically make decisions fair. Historical discrimination, unrepresentative sampling, inappropriate labels, and proxy variables require separate investigation.
Engineers assess generalization by separating training, validation, and test data. Training data fits model parameters; validation data guides model selection and hyperparameter tuning; a held-out test set provides a final assessment after those choices. Split data according to the deployment problem. For example, forecasting requires time-aware evaluation, while applications involving repeated customers may require customer-level separation. Fit preprocessing transformations only on training data. Otherwise, information leakage can produce misleadingly strong evaluation results.
In cloud machine-learning workflows, teams run reproducible training jobs, record dataset versions, and compare training and validation metrics across experiments. Practical controls include regularization, limiting tree depth, reducing unnecessary features, collecting more representative data, and stopping training when validation performance stops improving. Cross-validation can provide a more stable estimate of generalization, although additional training runs increase compute cost and execution time. Repeatedly tuning against the same validation set can also overfit the selection process.
These controls have trade-offs. Excessive regularization or an overly simple model can cause underfitting. More data helps only when its quality and coverage are appropriate; duplicating existing records does not add independent evidence. Evaluate metrics suitable for the task, such as precision, recall, or prediction error, rather than relying only on aggregate accuracy. Compare relevant demographic groups and report uncertainty when subgroup samples are small.
After deployment, monitor prediction quality using observed outcomes when available and investigate performance differences across groups. Data drift can signal changed inputs, but it does not prove that a model is overfit; distribution shift can harm even a well-generalized model. For exam questions, the central distinction is that overfitting captures training-specific detail, whereas underfitting fails to capture enough useful structure.