Tutorials › Statistical Learning (Graduate) › Winner’s Curse in Validation Risk Estimates

Validation and Data-Driven Tuning · Tutorial 273 of 989

Winner’s Curse in Validation Risk Estimates

See why selecting the smallest noisy validation estimate creates optimism, and learn how its size depends on the number of candidates and the dependence among their errors.

Advanced 11 min read

What You'll Learn

  • Define validation optimism conditional on the training data.
  • Distinguish optimism in the selected estimate from excess risk of the selected candidate.
  • Derive the exact two-candidate Gaussian formula, including the unequal-risk case.
  • Compute the winner’s curse for several equally good candidates.
  • Show that the Gaussian selection bias grows at the scale of the noise times the square root of twice the log candidate count.
  • Explain how shared validation observations and correlated errors change the calculation.

Why the Smallest Validation Estimate Is Optimistic

A validation set is used to compare candidate predictors, but the comparison itself is data-dependent: the selected candidate is the one with the smallest observed validation risk. Even if every estimate is unbiased before selection, the minimum is not generally unbiased for the risk of the selected candidate. Candidates with unusually favorable validation noise are more likely to win. This is the winner’s curse in validation risk estimation.

To isolate this effect, condition on the training data and regard the fitted candidate predictors as fixed. Let \(R_j\) be the conditional risk of candidate \(j\), and let \(\hat R_j\) be its validation-risk estimate. Assume for now that \(E[\hat R_j]=R_j\) for every \(j\), with expectations taken over the validation data. Define \(J\) to be an index attaining the smallest estimate; use any fixed rule to break ties.

Definition: The selection optimism is \(O=E[R_J-\hat R_J]\), conditional on the training data. It measures how much the selected candidate’s true risk exceeds its own reported validation estimate, on average. It is distinct from the excess risk \(E[R_J]-\min_j R_j\), which measures the cost of selecting a candidate other than the best one.

These two quantities answer different questions. A selection procedure can have positive optimism even when all candidates have identical true risks, in which case its excess risk is zero. Conversely, a selected candidate can have excess risk because it is genuinely worse than the best candidate, whether or not its validation estimate is optimistic.

For a finite set, unbiasedness alone already implies nonnegative expected optimism. Indeed, \(R_J\geq\min_j R_j\) for every outcome, while \(\min_j\hat R_j\leq\hat R_k\) for each fixed \(k\). Taking expectations and choosing \(k\) with the smallest risk gives \(E[R_J]\geq\min_j R_j\) and \(E[\hat R_J]=E[\min_j\hat R_j]\leq\min_j R_j\). Hence \(O\geq0\). This argument does not say how large the optimism is; for that, we need assumptions about the noise.

Two Candidates: An Exact Gaussian Calculation

Consider two validation estimates \(X=a+\varepsilon_1\) and \(Y=b+\varepsilon_2\), where \(a\leq b\) are the candidates’ true risks and \(\varepsilon_1,\varepsilon_2\) are independent \(N(0,\tau^2)\) errors. The selected estimate is \(\min(X,Y)\). Candidate 1 wins when \(X\leq Y\), an event with probability \(p=\Phi((b-a)/(\sqrt{2}\tau))\), where \(\Phi\) is the standard normal distribution function and \(\phi\) its density.

Result: Under these two-candidate assumptions,
$$ E[R_J]=ap+b(1-p),\qquad E[\hat R_J]=ap+b(1-p)-\sqrt{2}\tau\phi\!\left(\frac{b-a}{\sqrt{2}\tau}\right), $$ so the selection optimism is
$$ O=\sqrt{2}\tau\phi\!\left(\frac{b-a}{\sqrt{2}\tau}\right). $$

Derivation. Since \(X-Y\sim N(a-b,2\tau^2)\), \(P(X\leq Y)=p\). Thus the expected true risk of the selected candidate is \(ap+b(1-p)\). To obtain the selected estimate’s expectation, use \(\min(X,Y)=X\mathbf{1}_{\{X\leq Y\}}+Y\mathbf{1}_{\{Y<X\}}\). Equivalently, writing \(D=X-Y\), we have \(\min(X,Y)=Y+\min(D,0)\). For \(D\sim N(a-b,2\tau^2)\), direct integration of the normal density gives \(E[\min(D,0)]=(a-b)\Phi((b-a)/(\sqrt{2}\tau))-\sqrt{2}\tau\phi((b-a)/(\sqrt{2}\tau))\). Since \(E[Y]=b\), substitution yields the displayed formula for \(E[\min(X,Y)]\). Subtracting it from \(E[R_J]\) gives \(O\). \(\square\)

Worked Example: Two Candidates with Different Risks

Suppose the candidates have risks \(a=0.50\) and \(b=0.70\), and their independent validation errors have standard deviation \(\tau=0.10\). We calculate the selection probability, the expected selected risk, the expected minimum estimate, and the optimism.

First, \(z=(b-a)/(\sqrt{2}\tau)=0.20/0.141421\approx1.4142\). Therefore \(p=\Phi(z)\approx0.92135\), so the higher-risk candidate is selected with probability \(1-p\approx0.07865\).

The expected true risk of the selected candidate is \(0.50(0.92135)+0.70(0.07865)=0.51573\). The normal density at \(z\) is \(\phi(1.4142)\approx0.14676\), giving \(\sqrt{2}\tau\phi(z)=0.141421(0.14676)\approx0.02076\). Hence the expected minimum validation estimate is \(0.51573-0.02076=0.49497\), and the optimism is approximately \(0.02076\), or \(0.0208\).

Notice that \(0.49497\) is below the best true risk, \(0.50\), while the selected candidate’s expected true risk, \(0.51573\), is above it. These comparisons describe different effects: the first reflects selection optimism; the second reflects the occasional selection of the worse candidate.

Equal-Risk Candidates and the Number of Choices

The winner’s curse is especially transparent when all \(M\) candidates have the same risk \(R\), and their validation errors are independent \(N(0,\tau^2)\). Write \(\hat R_j=R+\tau Z_j\), where \(Z_1,\ldots,Z_M\) are independent standard normal random variables. Because every candidate has true risk \(R\), the selected true risk is exactly \(R\), regardless of which candidate wins. Therefore \(O=R-E[\min_j\hat R_j]=\tau E[\max_j Z_j]\), using symmetry of the standard normal distribution.

Result: For \(M\) equally good candidates with independent Gaussian validation errors of standard deviation \(\tau\),
$$ O=\tau a_M,\qquad a_M=E\!\left[\max_{1\leq j\leq M}Z_j\right] =M\int_{-\infty}^{\infty}z\phi(z)\Phi(z)^{M-1}\,dz. $$
The integral follows because the maximum has distribution function \(\Phi(z)^M\) and density \(M\phi(z)\Phi(z)^{M-1}\).

Worked Example: Three Equally Good Candidates

Let \(M=3\), with common risk \(R=0.40\) and independent validation errors having \(\tau=0.10\). By symmetry, \(E[\min_j Z_j]=-E[\max_j Z_j]\). The density of the maximum is \(3\phi(z)\Phi(z)^2\), so \(E[\max_j Z_j]=3\int_{-\infty}^{\infty}z\phi(z)\Phi(z)^2\,dz\).

To evaluate the integral, use \(\phi'(z)=-z\phi(z)\) and integrate by parts: \(E[\max_j Z_j]=6\int_{-\infty}^{\infty}\Phi(z)\phi(z)^2\,dz\). Since \(\phi(z)^2\) is even and \(\Phi(z)+\Phi(-z)=1\), this last integral is half of \(\int_{-\infty}^{\infty}\phi(z)^2\,dz=1/(2\sqrt{\pi})\). Thus \(E[\max_j Z_j]=3/(2\sqrt{\pi})\approx0.84628\).

The optimism is \(0.10(0.84628)=0.08463\). The expected minimum validation estimate is therefore \(0.40-0.08463=0.31537\), even though the expected true risk of the selected candidate remains \(0.40\).

How the Bias Grows with the Candidate Count

The exact integral for \(a_M\) can be evaluated numerically for any finite \(M\). Its leading growth has a simple form: \(a_M\) is asymptotic to \(\sqrt{2\log M}\). Thus, under the independent equal-risk Gaussian model, optimism is on the scale \(\tau\sqrt{2\log M}\). More candidates provide more opportunities for a very favorable noise realization.

Result: If \(Z_1,\ldots,Z_M\) are independent standard normal variables, then
$$ \frac{E[\max_{1\leq j\leq M}Z_j]}{\sqrt{2\log M}}\longrightarrow 1 \quad\text{as }M\longrightarrow\infty. $$

Proof. For any \(t>0\), the pointwise inequality \(\exp(t\max_j Z_j)\leq\sum_{j=1}^M\exp(tZ_j)\) holds. Applying Jensen’s inequality to the logarithm, and using \(E[\exp(tZ_j)]=\exp(t^2/2)\), gives \(E[\max_j Z_j]\leq(\log M)/t+t/2\). Taking \(t=\sqrt{2\log M}\) yields the upper bound \(E[\max_j Z_j]\leq\sqrt{2\log M}\).

For the lower bound, fix \(0<\epsilon<1\) and let \(x_M=(1-\epsilon)\sqrt{2\log M}\). For \(x\geq1\), the standard normal upper tail satisfies \(1-\Phi(x)\geq c\phi(x)/x\) for some constant \(c>0\); for example, integrate the density over \([x,x+1/x]\) to obtain such a bound. Consequently, \(M\{1-\Phi(x_M)\}\to\infty\), since \(\phi(x_M)\) is proportional to \(M^{-(1-\epsilon)^2}\), up to a constant factor, while \(x_M\) grows only as \(\sqrt{\log M}\).

Independence now gives \(P(\max_j Z_j\geq x_M)=1-\Phi(x_M)^M\to1\). The negative part of \(\max_j Z_j\) has expectation tending to zero: on the event that all \(Z_j<0\), its absolute value is at most \(|Z_1|\), and \(E[|Z_1|\mathbf{1}_{\{Z_1<0\}}]\cdot 2^{-(M-1)}\to0\). It follows that \(\liminf_M E[\max_j Z_j]/\sqrt{2\log M]\geq1-\epsilon\). Since \(\epsilon\) can be arbitrarily small, combining this with the upper bound proves the limit. \(\square\)

Worked Example: Comparing Candidate-Set Sizes

Suppose all candidates have the same risk and independent validation errors with \(\tau=0.05\). With two candidates, \(a_2=1/\sqrt{\pi}\approx0.56419\), so the optimism is \(0.05(0.56419)\approx0.02821\).

With three candidates, the exact value from the previous calculation is \(a_3=3/(2\sqrt{\pi})\approx0.84628\), giving optimism \(0.04231\). The increase from two to three candidates is about \(0.01410\). For larger \(M\), the leading-scale approximation is \(0.05\sqrt{2\log M}\); it describes the growth rate, not an exact finite-\(M\) formula.

Dependence and Interpretation

Validation errors for different predictors are usually dependent because every candidate is evaluated on the same validation observations. The independent Gaussian calculation is therefore a benchmark, not a universal formula. For example, suppose the standardized errors have an equicorrelated Gaussian representation \(Z_j=\sqrt{\rho}\,Z_0+\sqrt{1-\rho}\,Z'_j\), where \(0\leq\rho\leq1\) and \(Z_0,Z'_1,\ldots,Z'_M\) are independent standard normals. The shared term has expectation zero and does not affect which candidate is smallest. The expected minimum error is consequently \(-\tau\sqrt{1-\rho}\,a_M\), so optimism is \(\tau\sqrt{1-\rho}\,a_M\). As the common correlation approaches one, candidates move together and the selection advantage from comparing them vanishes.

In practice, validation losses need not be Gaussian, and their errors need not have equal variances. The exact formulas above require the stated distributional assumptions. The underlying selection mechanism is more general: choosing the smallest among unbiased estimates makes the reported minimum tend downward. The size of that effect depends on the noise distribution, its dependence across candidates, and how many candidates are compared.

A common mistake is to call \(E[\min_j\hat R_j]-\min_jR_j\) the optimism of the selected candidate. That quantity compares the minimum estimate with the best fixed risk; it is not generally \(E[R_J-\hat R_J]\), because the selected candidate itself can have risk above the minimum. In the two-candidate example, the expected minimum estimate is \(0.49497\), so its difference from the best risk \(0.50\) is about \(-0.00503\). But the selection optimism is \(0.02076\), calculated by comparing the selected candidate’s expected true risk \(0.51573\) with its expected estimate \(0.49497\). Keeping these targets separate is essential when interpreting validation results.

Key takeaway: Selecting the smallest validation estimate creates optimism because favorable noise helps a candidate win. With independent Gaussian errors and equally good candidates, its expected size is \(\tau E[\max_{j\leq M}Z_j]\), growing at the scale \(\tau\sqrt{2\log M}\). This is a selection effect, not automatically a statement that the selected predictor has high true risk.

Check Your Understanding

Use the definitions and assumptions stated above to answer these questions.

  1. Explain why selection optimism and excess risk are different quantities. Which one is zero when all candidates have identical true risks?
  2. For two candidates with independent equal-variance Gaussian errors, what happens to the selection optimism as the risk gap \(b-a\) grows while \(\tau\) stays fixed?
  3. With \(M\) equally good candidates and independent Gaussian errors, express the expected minimum validation estimate in terms of \(R\), \(\tau\), and \(a_M\).
  4. Why does a shared Gaussian error component not affect which candidate wins in the equicorrelated model?
  5. Which assumptions are needed for the exact formula \(O=\tau a_M\), and which qualitative selection issue remains when those assumptions fail?
Clinical Biostats