Explain the bias-variance tradeoff
Written by the mlprep team · Updated
Explain the bias-variance tradeoff. How does it manifest in practice and what do you do when a model has high bias vs high variance?
The decomposition#
For a regression model with squared error, the expected error decomposes as:
E[(y - ŷ)²] = Bias² + Variance + Irreducible Noise
Imagine training the same model architecture on many different datasets drawn from the same distribution:
-
Bias: how far is the average prediction from the true value? A model that consistently predicts the wrong thing across all datasets has high bias — systematic error due to wrong assumptions or insufficient capacity.
-
Variance: how much do predictions vary across those different training sets? A model whose predictions change dramatically depending on which training examples it saw has high variance — it's fitting noise.
-
Irreducible noise: inherent randomness in the data (measurement error, missing variables). No model can eliminate this.
High bias (underfitting)#
A linear model fit to data with a quadratic relationship. The model is systematically wrong in the same direction regardless of data. Symptoms:
- High training error AND high validation error
- Training and validation error are close together (small gap)
- Adding more data doesn't help much — the model can't represent the pattern
Fixes:
- Increase model capacity (more features, deeper network, less regularization)
- Use a more expressive model class (trees vs linear)
- Better features that capture the true relationship
High variance (overfitting)#
A 100-layer network fit on 100 examples. The model memorizes training data, including noise. Symptoms:
- Low training error, high validation error
- Large gap between train and val
- Model performance varies a lot depending on which examples happen to be in training
Fixes:
- More data (most reliable)
- Regularization (L1, L2, dropout)
- Simpler model / fewer parameters
- Early stopping
- Cross-validation to assess true generalization
The tradeoff#
Increasing model complexity typically decreases bias but increases variance. The optimal point is where the sum (bias² + variance) is minimized.
Total Error
↑
| \ <- Variance component
| \ /
| \/ <- Optimal complexity
| / \
| / <- Bias² component
|
+------------→ Model Complexity
In modern deep learning, this tradeoff is more nuanced#
The double descent phenomenon: as model size increases past the interpolation threshold (enough capacity to fit all training data exactly), test error can actually decrease again. Very large overparameterized models with implicit regularization (SGD, batch norm) can achieve low bias AND low variance. This breaks the classical picture.
Practical diagnosis#
| Symptom | Diagnosis | Fix | |---------|-----------|-----| | High train + high val error | High bias | More capacity, better features | | Low train + high val error | High variance | Regularize, more data, simpler model | | High train + high val, same error | High bias (not variance) | Capacity issue | | Low train + low val error | Well-fitted | Ship it |
In production systems — organizational tradeoffs#
The bias-variance framing extends beyond model selection to the full system. Senior engineers ask: "what is the cost of being wrong in each direction, and what does fixing it require?"
Data regime: low-data regimes favor high-bias models (simpler, more regularized). A logistic regression generalizes better than a 10-layer network on 500 labeled examples. As data grows, higher-capacity models become justified.
Annotation cost: reducing bias often requires better features or more expressive models — both can require more labeled data. At $5/label and needing 100K examples to train the next model, the "fix bias" decision is a budget decision.
Retraining cadence: a high-variance model that requires daily retraining on fresh data has infra and ops costs. If your pipeline can only retrain weekly, a higher-bias model that's more stable may be the right engineering tradeoff even if it's less accurate.
Latency constraints: reducing bias by increasing model complexity (deeper network, more features) increases serving latency. A 50ms budget rules out many high-capacity models regardless of their accuracy.
Experimentation velocity: high-variance models need more validation before deployment — they're more sensitive to data distribution, so you need larger holdout sets, more careful A/B testing. A high-bias model is more predictable and safer to ship quickly.
The right bias-variance operating point isn't just a model property — it's determined by your data budget, infra constraints, latency SLA, and how much variance you can tolerate in production behavior.
Interview red flags#
- Defining bias and variance only as "underfitting" and "overfitting" without the train/validation error pattern that diagnoses each.
- Prescribing more data for a high-bias model, when it needs more capacity or better features.
- Ignoring irreducible noise as the third term of expected error.
- Presenting the classical U-curve as universal without acknowledging double descent in overparameterized models.
The key takeaway unlocks after you reveal an expert answer.
Key Takeaway
Bias = systematic error from wrong assumptions; variance = sensitivity to training data fluctuations. Bias² + Variance + Noise = total expected error. High bias → underfit: train error high, gap small. High variance → overfit: train error low, gap large. Fix bias with more capacity/features; fix variance with more data/regularization. Deep learning's double descent complicates the classical tradeoff at scale.
Follow-up Questions to Test Yourself
Interviewers often pivot here once you cover the core concept.
- What is double descent and why does it challenge the classical bias-variance view?
- How does the choice of k in k-fold cross-validation relate to bias and variance in the estimator of generalization performance?
- Bagging reduces variance without increasing bias — why? And why does boosting primarily reduce bias?
How confident do you feel explaining this?
Track your understanding or flag it to revisit before your next loop.
Related Questions
What is regularization and how do the different techniques compare?
How does data augmentation improve generalization, and when can it hurt?
Why don't huge overparameterized models always overfit?
How do you handle domain shift and out-of-distribution inputs?