Why Exact Fit Does Not Mean Noise-Free Prediction
An interpolating estimator reproduces every training label exactly. If some labels contain random error, however, exact reproduction also means fitting that error. The resulting predictions can therefore vary with the training noise, even when the underlying regression function is fixed. How much this matters depends not just on the noise variance but also on the geometry of the estimator and the test covariates.
We study this effect for a fixed design and a linear estimator. The goal is to isolate the contribution of independent label noise to prediction risk, then calculate how that contribution changes when the label variances differ across observations.
Setup and Definition
Let \(X\) be an \(n\times p\) design matrix with full row rank, where \(p\geq n\). The training response vector follows the linear model
where \(\beta^*\in\mathbb{R}^p\) is fixed. Assume the training errors \(\varepsilon_1,\ldots,\varepsilon_n\) are independent, have mean zero, and have finite variances \(v_1,\ldots,v_n\). Thus \(\operatorname{Cov}(\varepsilon)=D=\operatorname{diag}(v_1,\ldots,v_n)\). The equal-variance case \(v_i=\sigma^2\) for all \(i\) is called homoskedastic; otherwise the errors are heteroskedastic.
A linear estimator has the form \(\hat\beta=By\), for a fixed \(p\times n\) matrix \(B\). Its fitted training values are \(X\hat\beta=XBy\).
For prediction, let \(x_0\in\mathbb{R}^p\) be an independent test covariate with mean zero and covariance matrix \(\Sigma=E[x_0x_0^T]\). We measure error against the clean regression function \(x_0^T\beta^*\), rather than against a noisy test response. For a vector \(u\), write \(\|u\|_\Sigma^2=u^T\Sigma u\). The conditional prediction risk averages over both training noise and the independent test covariate, with \(X\) held fixed.
The Exact Risk Decomposition
The estimator's error in coefficient space separates into a part that remains when the labels are noiseless and a part transmitted from the training errors:
The first term can be nonzero even when \(\varepsilon=0\). The second term is the effect of label noise. The next result gives the exact prediction-risk decomposition.
Proof. Set \(a=(BX-I_p)\beta^*\), a fixed vector conditional on \(X\). Then \(\hat\beta-\beta^*=a+B\varepsilon\). Conditional on \(\varepsilon\), the test-covariate expectation of the squared prediction error is
Taking expectation over \(\varepsilon\), the two cross terms vanish because \(E[\varepsilon]=0\). The remaining terms are
The trace identity \(\operatorname{tr}(B^T\Sigma BD)=\operatorname{tr}(\Sigma BDB^T)\) gives the stated expression. Setting \(\varepsilon=0\) leaves just \(a^T\Sigma a\), so the trace term is exactly the noise contribution. \(\square\)
Homoskedastic and Heteroskedastic Noise
Write \(b_i\) for column \(i\) of \(B\). Since \(BDB^T=\sum_{i=1}^n v_i b_i b_i^T\), the noise contribution has the equivalent form
Each observation's noise variance is multiplied by the test-prediction leverage of the corresponding column of the estimator. This makes the contrast between equal and unequal variances explicit.
- Homoskedastic: if \(D=\sigma^2 I_n\), it is \(\sigma^2\operatorname{tr}(\Sigma BB^T)\).
- Heteroskedastic: if \(D=\operatorname{diag}(v_1,\ldots,v_n)\), it is \(\sum_{i=1}^n v_i b_i^T\Sigma b_i\).
Derivation. In the homoskedastic case, substitute \(D=\sigma^2I_n\) into the theorem's trace term and factor out \(\sigma^2\). In the heteroskedastic case, expand the diagonal matrix as \(D=\sum_i v_i e_i e_i^T\), where \(e_i\) is coordinate vector \(i\). Then \(Be_i=b_i\), so
This proves both formulas. \(\square\)
The result does not require normally distributed errors. Independence, zero means, and finite variances suffice for this second-moment calculation. If errors are correlated, their covariance matrix is not diagonal and the general trace formula still applies, but the separate-observation sum no longer describes all contributions.
Minimum-Euclidean-Norm Interpolation
A standard interpolator when \(p\geq n\) and \(X\) has full row rank is the minimum-Euclidean-norm solution. Its matrix is
Indeed, \(XB_{\min}=I_n\). For any response vector \(y\), \(B_{\min}y\) is orthogonal to every vector \(z\) satisfying \(Xz=0\), because \((B_{\min}y)^Tz=y^T(XX^T)^{-1}Xz=0\). Every other solution to \(X\beta=y\) differs from \(B_{\min}y\) by such a vector \(z\). The Pythagorean identity then gives \(\|B_{\min}y+z\|_2^2=\|B_{\min}y\|_2^2+\|z\|_2^2\), proving the minimum-norm claim.
Derivation. Substitute \(B_{\min}=X^T(XX^T)^{-1}\) and \(B_{\min}^T=(XX^T)^{-1}X\) into \(\operatorname{tr}(\Sigma BDB^T)\). The matrix \(XX^T\) is invertible because \(X\) has full row rank, so all factors are defined. This gives the displayed formula. In particular, for homoskedastic noise it becomes
Worked Calculations
Worked Example: One Observation and Two Features
Take \(X=\begin{bmatrix}1&1\end{bmatrix}\), so \(n=1\) and \(p=2\). The minimum-norm interpolator has \(B=\begin{bmatrix}1/2\\1/2\end{bmatrix}\). Let \(\Sigma=I_2\), \(\beta^*=(1,0)^T\), and let the single training error have variance \(\sigma^2\).
First, \(BX=\begin{bmatrix}1/2&1/2\\1/2&1/2\end{bmatrix}\), so \((BX-I_2)\beta^*=(-1/2,1/2)^T\). The noiseless prediction risk is therefore \[ \|(-1/2,1/2)^T\|_{I_2}^2=1/4+1/4=1/2. \]
For the noise contribution, \(BB^T\) has trace \(1/4+1/4=1/2\), giving \(\sigma^2\operatorname{tr}(I_2BB^T)=\sigma^2/2\). Thus the total clean-function prediction risk is \(1/2+\sigma^2/2\). Exact fit to the one training label has not removed either the noiseless estimation error or the prediction variation due to label noise.
Worked Example: Unequal Variances and Unequal Design Scales
Let \(X=\begin{bmatrix}1&0&0\\0&2&0\end{bmatrix}\). Its minimum-norm interpolator is \(B=\begin{bmatrix}1&0\\0&1/2\\0&0\end{bmatrix}\), since \(XB=I_2\). Take \(\Sigma=\operatorname{diag}(1,4,9)\), and let \(D=\operatorname{diag}(1,4)\). Set \(\beta^*=0\), so the risk is entirely due to label noise.
The columns of \(B\) are \(b_1=(1,0,0)^T\) and \(b_2=(0,1/2,0)^T\). Their prediction contributions are \[ b_1^T\Sigma b_1=1,\qquad b_2^T\Sigma b_2=(1/2)^2\cdot4=1. \]
Weighting by the two noise variances gives risk \(1\cdot1+4\cdot1=5\). If instead both errors had the same variance \(3\), the risk would be \(3(1+1)=6\). The heteroskedastic calculation assigns each observation its own variance; replacing both variances by an unweighted average would generally give the wrong answer.
Worked Example: Two Exact-Fit Estimators, Different Noise Risk
Let \(X=\begin{bmatrix}1&0\end{bmatrix}\). For any real number \(a\), the vector \(B_a=(1,a)^T\) defines an interpolator because \(XB_a=1\). Suppose \(\beta^*=0\), the label-error variance is \(2\), and \(\Sigma=\operatorname{diag}(1,4)\).
There is one column of \(B_a\), so its squared prediction size is \[ B_a^T\Sigma B_a=1+4a^2. \] The noise contribution is consequently \(2(1+4a^2)\). For \(a=0\), the minimum-norm choice, this is \(2\). For \(a=1\), it is \(2(1+4)=10\).
Both estimators fit every possible training label exactly: their fitted value is \(y\). Yet they transmit the same label error into test predictions with very different strength. The prediction covariance \(\Sigma\) makes the second coefficient especially costly in this example.
Interpretation and Common Pitfalls
The trace formula separates two questions. The variances \(v_i\) describe how noisy the labels are; the quantities \(b_i^T\Sigma b_i\) describe how strongly the estimator converts each label into predictions in directions that matter for test covariates. A large variance need not dominate if its column has little test-prediction effect, while a moderate variance can matter substantially if its column is strongly amplified.
A common mistake is to reason, “The training residuals are zero, so the prediction error caused by training noise is zero.” The residuals are zero precisely because the estimator matches the noisy labels. In the model \(y=X\beta^*+\varepsilon\), the fitted coefficients contain \(B\varepsilon\); the theorem shows that its test-prediction contribution is \(\operatorname{tr}(\Sigma BDB^T)\), which is generally positive.
Another distinction is the target of prediction. The formulas above compare the fitted value with the clean conditional mean \(x_0^T\beta^*\). If the goal is instead to predict a future response \(Y_0=x_0^T\beta^*+\varepsilon_0\), and \(\varepsilon_0\) is independent, mean zero, and has variance \(\tau^2\), then response-prediction risk is the clean-function risk plus \(\tau^2\). That additional term is irreducible test-label noise; it is not amplification of the training labels.
Check Your Understanding
Use the fixed-design formulas to answer the following.
- For an interpolator \(B\), why does the noise contribution equal \(\operatorname{tr}(\Sigma BDB^T)\) even when the estimator has a nonzero noiseless bias?
- If \(D=\sigma^2I_n\), which factor in the noise-risk formula captures the test-covariate geometry?
- For independent errors with variances \(v_i\), express the risk contribution using the columns \(b_i\) of \(B\).
- In the second worked example, calculate the risk if the error variances are \(v_1=2\) and \(v_2=1\).
- Why can two estimators that interpolate the same design and responses have different prediction risks?