Tutorials › Statistical Learning (Graduate) › Cross-Validation for Model Selection Under Misspecification

Validation and Data-Driven Tuning · Tutorial 286 of 989

Cross-Validation for Model Selection Under Misspecification

Learn how cross-validation can select a risk-optimal candidate among misspecified models, and why selecting the best risk need not mean identifying one exact model.

Advanced 12 min read

What You'll Learn

  • Define misspecification relative to a target and a candidate model class.
  • Distinguish risk consistency from exact model-selection consistency.
  • State conditions that let cross-validation select a risk-optimal candidate.
  • Prove risk consistency from uniform accuracy of candidate risk estimates.
  • Explain why a unique, separated risk minimizer is needed for exact selection.
  • Work through examples with unique and tied best risks.

What Does “Best Model” Mean Under Misspecification?

A candidate model can be useful without being a correct description of the data-generating process. If every candidate is misspecified, model selection cannot discover a correct model among them. It can still choose the candidate with the smallest prediction risk, which is often the practical objective.

The word best therefore needs care. It may mean that the selected procedure has risk close to the smallest available risk, or it may mean that the procedure selects one particular model with probability approaching one. These are different properties. The first concerns prediction performance; the second concerns identifying a model label.

Definition: Let \(P\) be the distribution of a new observation \((X,Y)\), let \(\ell(y,a)\) be a loss, and let \(f\) be a predictor. Its risk is \(R(f)=E[\ell(Y,f(X))]\), when this expectation exists. A candidate model class is misspecified relative to a stated target if it does not contain a predictor that represents that target. Under a chosen loss, a class can nevertheless have a well-defined risk-minimizing predictor, sometimes called its pseudo-true predictor.

For example, under squared-error prediction, the target is often the conditional mean \(E[Y\mid X]\). If that function is not in any candidate class, each class can still have a best approximation in mean squared error. Cross-validation compares the predictive risks of procedures trained from the data; it does not test whether a candidate model is literally true.

To state selection claims precisely, suppose there are a fixed, finite number \(J\) of candidate procedures. With a sample of size \(n\), let \(\hat R_{j,n}\) be the cross-validation estimate for candidate \(j\), and let \(R_{j,n}\) be its prediction risk when trained at the relevant full-sample size. The selected index is \(\hat j_n\in\operatorname*{arg\,min}_{1\leq j\leq J}\hat R_{j,n}\), with any ties resolved by a fixed rule. The best available risk is \(\min_j R_{j,n}\).

Definition: Selection is risk consistent if \(R_{\hat j_n,n}-\min_j R_{j,n}\xrightarrow{p}0\). It is exact model-selection consistent for a unique best index \(j^*\) if \(P(\hat j_n=j^*)\to1\). If several indices minimize the limiting risk, the natural exact-selection target is the set of minimizers: \(P(\hat j_n\in\operatorname*{arg\,min}_j R_j)\to1\).

Why Accuracy of Risk Estimates Is Enough for Risk Consistency

The key condition for a finite candidate set is that cross-validation estimates all candidate risks accurately enough at once. This is a condition on the maximum estimation error, not just on the error for a candidate fixed in advance. Write \(\delta_n=\max_{1\leq j\leq J}|\hat R_{j,n}-R_{j,n}|\).

Theorem: If \(\delta_n\xrightarrow{p}0\), then the cross-validation-selected procedure is risk consistent: \[ R_{\hat j_n,n}-\min_{1\leq j\leq J}R_{j,n}\xrightarrow{p}0. \]

Proof. Let \(j_n^*\) be any index minimizing \(R_{j,n}\). By the definition of \(\delta_n\), and because \(\hat j_n\) minimizes the cross-validation estimates,

$$ R_{\hat j_n,n} \leq \hat R_{\hat j_n,n}+\delta_n \leq \hat R_{j_n^*,n}+\delta_n \leq R_{j_n^*,n}+2\delta_n. $$

Subtracting the minimum risk gives a nonnegative excess risk bounded above by \(2\delta_n\). Since \(\delta_n\xrightarrow{p}0\), the excess risk converges in probability to zero. \(\square\)

This argument does not require any candidate to be correctly specified. It only requires the risk estimates to approximate the risks that matter for the comparison. In a fixed-\(K\) cross-validation design, the estimates evaluate fits trained on fold-specific samples, while deployment may use a fit trained on all \(n\) observations. Thus a condition used in practice is that the fold-trained and full-sample procedures have risks that become asymptotically equivalent. If that difference does not vanish, cross-validation may accurately rank the fold-trained procedures but target a different comparison from the full-sample one.

Worked Example: Comparing Two Misspecified Regression Classes

Let \(X\sim\operatorname{Uniform}(-1,1)\) and \(Y=X^2+X+\varepsilon\), where \(\varepsilon\) is independent of \(X\), has mean zero, and has variance \(\sigma^2\). Compare an intercept-only predictor with an affine predictor \(b_0+b_1X\), using squared-error loss. The conditional mean \(X^2+X\) is not in either class, so both are misspecified.

For an intercept-only predictor, the risk is minimized by the mean of \(Y\). Since \(E[X^2]=1/3\) and \(E[X]=0\), this predictor is \(1/3\). Its risk is

$$ E[(Y-1/3)^2] =E[(X^2-1/3+X+\varepsilon)^2] =\frac{4}{45}+\frac{1}{3}+\sigma^2 =\frac{19}{45}+\sigma^2. $$

Here \(E[(X^2-1/3)^2]=E[X^4]-(E[X^2])^2=1/5-1/9=4/45\), \(E[X^2]=1/3\), and the cross terms vanish by symmetry and independence.

For the affine class, the least-squares slope is \(\operatorname{Cov}(X,Y)/\operatorname{Var}(X)=1\), and the intercept is \(E[Y]-E[X]=1/3\). Its predictor is \(1/3+X\), leaving residual \(X^2-1/3+\varepsilon\). Its risk is therefore \(4/45+\sigma^2\). The affine class has lower risk by \(1/3\), despite being misspecified. If the candidate risk estimates converge uniformly to these risks, the theorem implies that cross-validation selects a risk-consistent procedure.

When Does Risk Consistency Become Exact Selection?

Risk consistency alone does not guarantee that the selected model label converges to one particular index. Exact selection requires a unique best candidate separated from the others by a positive risk gap. A difference that shrinks toward zero may be too small for the validation estimates to distinguish reliably.

Theorem: Suppose \(J\) is fixed, \(R_{j,n}\to R_j\) for every candidate, and the limiting risks have a unique minimizer \(j^*\). Define the positive gap \(\Delta=\min_{j\ne j^*}(R_j-R_{j^*})>0\). If \(\max_j|\hat R_{j,n}-R_{j,n}|\xrightarrow{p}0\), then \(P(\hat j_n=j^*)\to1\).

Proof. Since the risks converge and there are finitely many candidates, for all sufficiently large \(n\), every \(j\ne j^*\) satisfies \(R_{j,n}-R_{j^*,n}\geq 2\Delta/3\). On the event \(\delta_n<\Delta/3\), for every such \(j\),

$$ \hat R_{j,n}-\hat R_{j^*,n} \geq R_{j,n}-R_{j^*,n}-2\delta_n >0. $$

Thus \(j^*\) is the unique minimizer of the estimated risks on that event. The probability of the event tends to one because \(\delta_n\xrightarrow{p}0\), proving the claim. \(\square\)

The gap condition explains why exact selection is stronger: it asks the estimated risk differences to preserve the identity of the winner, not merely to yield small excess risk. If limiting risks tie, there is no unique index to recover. A fixed tie-breaking rule can select one tied model consistently, but that result reflects the rule, not evidence that the tied model has better predictive risk.

Worked Example: Tied Misspecified Models

Let each outcome be \(Y\sim N(0.1,1)\), with no predictors, and compare two fixed constant predictors, \(f_1=0\) and \(f_2=0.2\). Under squared error, the true conditional mean is \(0.1\), so both constant models are misspecified. Their risks are equal:

$$ R(f_1)=1+(0.1-0)^2=1.01,\qquad R(f_2)=1+(0.2-0.1)^2=1.01. $$

For any partition into validation folds, each procedure predicts the same fixed constant regardless of the training data. The average cross-validation estimate is therefore the full-sample average loss. Writing \(\bar Y\) for the sample mean, the difference between the estimates is

$$ \hat R_2-\hat R_1 =\frac{1}{n}\sum_{i=1}^n\{(Y_i-0.2)^2-Y_i^2\} =0.04-0.4\bar Y. $$

Since \(\bar Y\sim N(0.1,1/n)\), this difference is negative with probability \(1/2\). The selected index does not converge to one fixed index. Yet either selected model has risk exactly equal to the best available risk, so risk consistency holds without exact model-selection consistency.

Worked Example: A Fixed Gap Makes Selection Reliable

Now let \(Y\sim N(0,1)\), and compare constant predictors \(f_1=0.1\) and \(f_2=0.3\), again using squared error. Both are misspecified because the conditional mean is zero. Their risks are \(R(f_1)=1.01\) and \(R(f_2)=1.09\), so the first predictor is better by \(0.08\).

As above, the difference of the cross-validation estimates is \(0.08-0.4\bar Y\). The second predictor is selected exactly when \(\bar Y>0.2\). Since \(\bar Y\sim N(0,1/n)\), the probability of selecting it is \(1-\Phi(0.2\sqrt n)\), where \(\Phi\) is the standard normal distribution function. At \(n=100\), this is \(1-\Phi(2)\), approximately \(0.0228\); as \(n\to\infty\), it tends to zero. The positive risk gap allows exact selection to become reliable even though neither candidate is correct.

A Useful Sufficient Condition for Cross-Validation

The uniform risk-accuracy condition above is a direct route to the selection conclusions. One transparent sufficient setting is when each candidate procedure approaches a fixed limiting predictor, and the loss is not too sensitive to small prediction changes. Here is a precise version for fixed \(K\)-fold cross-validation.

Sufficient condition: Suppose the observations are independent and identically distributed, \(J\) and \(K\) are fixed, and \(\ell\) is bounded. For each candidate \(j\), suppose there is a fixed predictor \(f_j\) such that the average absolute difference between the fold-trained validation losses and the losses from \(f_j\) converges to zero in probability. Suppose also that the full-sample procedure’s risk converges to \(R_j=E[\ell(Y,f_j(X))]\). Then \(\max_j|\hat R_{j,n}-R_{j,n}|\xrightarrow{p}0\).

Justification. For candidate \(j\), compare its cross-validation estimate with the full-sample average \(n^{-1}\sum_{i=1}^n\ell(Y_i,f_j(X_i))\). Their absolute difference is bounded by the assumed average fold-loss discrepancy, which converges to zero in probability. Because the observations are identically distributed and the fixed-predictor loss is bounded, the law of large numbers gives \(n^{-1}\sum_i\ell(Y_i,f_j(X_i))\xrightarrow{p}R_j\). The full-sample risk also converges to \(R_j\) by assumption, so \(|\hat R_{j,n}-R_{j,n}|\xrightarrow{p}0\) for each \(j\). There are only finitely many candidates, hence the maximum of these errors converges to zero in probability. The preceding theorems then give risk consistency, and exact selection as well if the limiting risk minimizer is unique and separated. \(\square\)

This is a sufficient condition, not a claim that every cross-validation scheme or every learner satisfies it. Unstable fitting procedures, changing candidate sets, or a mismatch between fold-training and full-training risks may require different arguments. For the finite, fixed candidate setting, the essential points are that the estimates compare the intended risks and that their errors vanish uniformly across candidates.

Common Mistake and Practical Interpretation

A common mistake is to interpret a risk-consistent selection as proof that cross-validation has identified the true model. That conclusion does not follow. Risk consistency says the selected candidate’s risk approaches the smallest risk available in the candidate set. When all candidates are misspecified, that smallest risk is still an approximation risk, not the risk of a correctly specified model.

A second mistake is to infer exact selection from accurate risk estimates without checking for a gap. If two candidate risks tie, or their difference becomes negligible relative to estimation error, model labels can remain uncertain even while the selected risk is near-optimal. In reporting results, distinguish the claim about predictive risk from the stronger claim about recovering a particular model.

Key takeaway: Cross-validation can select a risk-optimal candidate even when every candidate is misspecified. Uniformly accurate risk estimates yield risk consistency for a finite candidate set; exact model-selection consistency additionally requires a unique minimizer separated by a positive limiting risk gap.

Check Your Understanding

Use the definitions and arguments above to answer the following questions.

  1. What does risk consistency say that exact model-selection consistency does not?
  2. Why can a uniquely selected model label fail to converge when two misspecified candidates have equal risk?
  3. In the fixed finite candidate theorem, why is uniform accuracy across candidates more useful than accuracy for just one prespecified candidate?
  4. What positive-gap condition allows risk-estimate accuracy to imply exact selection?
  5. Under squared-error loss, can every candidate be misspecified while one candidate still has strictly smaller risk than the others? Explain.
Clinical Biostats