The Irrelevant Feature Paradox: When Adding Noise Helps OLS
Suppose you are fitting a linear model with OLS on a fixed design matrix , where , to predict with .
Now consider adding pure noise features — columns drawn independently of everything else — so your new design matrix is , and you re-fit OLS on this expanded matrix.
Question: What happens to the expected in-sample (training) MSE as increases? Does it go up, go down, or stay the same? What about the expected out-of-sample (test) MSE on a new draw from the same distribution?
Give a crisp explanation of the paradox and what drives it.
Answer: The Irrelevant Feature Paradox: When Adding Noise Helps OLS
Key Idea / Intuition
OLS always fits the training data as well as possible given the degrees of freedom — adding more columns (even pure noise) can only decrease training error, because OLS is projecting onto a larger subspace, getting a tighter fit. But this comes at a cost: each noise column "uses up" a degree of freedom, inflating out-of-sample error. The gap between training MSE and test MSE grows with every noise column added. This is the optimism of training error made vivid.
Formal Proof / Solution
Setup
Let , and let be the OLS fit, where is the hat matrix (orthogonal projection onto the column space of ).
The hat matrix satisfies (the number of columns, assuming full rank).
Training MSE
The in-sample residual sum of squares is:
Since and lies in the column space of (since is a sub-block), we have , so:
Taking expectations:
So the expected training MSE is:
As increases, training MSE decreases — adding noise features always improves the apparent fit!
Test MSE (Out-of-Sample)
For a new observation , the expected prediction error decomposes as:
The OLS estimator on is unbiased for the true (with zeros for the noise columns), so Bias . The variance of depends on how many columns are estimated. For simplicity, look at expected in-sample prediction error on a new drawn from the same :
(This follows from the standard optimism formula: where .)
As increases, test MSE increases — each noise column costs exactly in optimism.
The Paradox Summarized
| Quantity | Formula | Direction as | |---|---|---| | Expected Training MSE | | Decreases ↓ | | Expected Test MSE | | Increases ↑ | | Optimism gap | | Widens ↑↑ |
The training error is a systematically biased estimator of true prediction error, and the bias grows linearly with the number of predictors — even useless ones. This is why model selection and regularization are essential: the model does not "know" its columns are noise.
Notably, at , the model would be exactly interpolating () — perfect training fit, terrible generalization. This is the classical overfitting catastrophe.
Source: The Elements of Statistical Learning, Hastie, Tibshirani, Friedman, Section 7.3–7.6