Tutorials › High-Dimensional Genomic Data Analysis › Prediction and Variable Selection as Different Goals

Penalized Regression for p Much Larger Than n · Tutorial 535 of 795

Prediction and Variable Selection as Different Goals

Distinguish accurate prediction from exact identification of active genomic features, and learn what each goal requires and how to assess it.

Advanced 10 min read

What You'll Learn

  • Define population predictive risk and excess prediction risk for a high-dimensional linear model.
  • Define the true active set and the exact-support-recovery goal.
  • Derive how prediction risk depends on coefficient error and the predictor covariance matrix.
  • Explain why ridge can predict well while retaining many inactive features.
  • Analyze how correlated predictors can yield an accurate prediction but an incorrect selected set.
  • Identify signal-strength and design conditions that matter for support recovery.

Two goals that answer different questions

A genomic prediction model can estimate a phenotype accurately without identifying which genes truly contribute to its conditional mean. Conversely, a procedure can return a plausible set of active genes without producing the smallest prediction error on new samples. These are different statistical goals: one concerns the performance of predictions, and the other concerns whether the selected variables match a specified underlying set.

This distinction matters in a \(p\)-much-larger-than-\(n\) setting, where many coefficient vectors may fit the observed data similarly, and correlated genes can make their individual contributions difficult to separate. Penalization controls fitted coefficients, but the resulting fit should be judged against the goal of the analysis rather than treated as an automatic answer to both questions.

Definition: Suppose the conditional mean of an outcome \(Y\) given a predictor vector \(X\in\mathbb{R}^p\) is \(E(Y\mid X)=X^\mathsf{T}\beta^*\), where \(\beta^*\) is the target coefficient vector. The true active set is \(S^*=\{j:\beta_j^*\ne 0\}\). For a fitted coefficient vector \(\hat{\beta}\), the selected set is \(\hat{S}=\{j:\hat{\beta}_j\ne 0\}\). Exact support recovery occurs when \(\hat{S}=S^*\).

For clarity, assume predictors are centered or that an intercept is included and handled separately. Assume the linear conditional-mean model is appropriate, and write \(Y=X^\mathsf{T}\beta^*+\varepsilon\), with \(E(\varepsilon\mid X)=0\) and \(E(\varepsilon^2\mid X)=\sigma^2\). A new observation \((X_{\mathrm{new}},Y_{\mathrm{new}})\) is drawn from the target population, independently of the training data. These assumptions let us separate error in predicting the conditional mean from irreducible outcome noise. The central distinction remains useful when a linear model is an approximation, but then the prediction target and the interpretation of \(\beta^*\) must be stated carefully.

Prediction risk and its connection to coefficient error

The population predictive risk of a fitted vector, conditional on the training data, is the expected squared error on a new observation. Its excess prediction risk is the amount above the irreducible noise variance. With \(\Sigma=E(X_{\mathrm{new}}X_{\mathrm{new}}^\mathsf{T})\), the following identity holds under the model assumptions just stated.

$$ R(\hat{\beta})=E\!\left[(Y_{\mathrm{new}}-X_{\mathrm{new}}^\mathsf{T}\hat{\beta})^2\mid \text{training data}\right] =\sigma^2+(\hat{\beta}-\beta^*)^\mathsf{T}\Sigma(\hat{\beta}-\beta^*). $$

To justify it, let \(d=\hat{\beta}-\beta^*\). The prediction error is \(\varepsilon_{\mathrm{new}}-X_{\mathrm{new}}^\mathsf{T}d\). Squaring and taking the expectation gives the noise term, the quadratic coefficient-error term, and a cross term. The cross term is zero because \(E(\varepsilon_{\mathrm{new}}\mid X_{\mathrm{new}})=0\); the quadratic term is \(d^\mathsf{T}\Sigma d\). Thus prediction risk measures coefficient error in directions represented by the predictor distribution. If \(\Sigma\) has small eigenvalues, large coefficient errors in its low-variance directions can have little impact on predictions.

By contrast, support recovery asks whether every zero and nonzero coordinate has been classified correctly. It does not weight errors by how often a predictor varies in the population or how strongly it predicts the outcome. A tiny nonzero estimate for a truly inactive gene counts as a false positive under exact support recovery, even if it changes predictions negligibly.

Worked Example: A Dense Ridge Fit With Low Prediction Error

Consider a hypothetical model with \(p=1{,}000\) standardized, uncorrelated predictors, so \(\Sigma=I\). Suppose the true coefficient vector has four nonzero entries, each equal to \(0.50\), and the other 996 entries are zero. A ridge fit has estimated the four active coefficients as \(0.45\) each and all 996 other coefficients as \(0.001\). This is an illustrative fitted vector; ridge generally does not set coefficients exactly to zero.

The coefficient-error vector has four entries equal to \(0.45-0.50=-0.05\) and 996 entries equal to \(0.001-0=0.001\). Therefore the excess prediction risk is

$$ (\hat{\beta}-\beta^*)^\mathsf{T}I(\hat{\beta}-\beta^*) =4(-0.05)^2+996(0.001)^2 =4(0.0025)+996(0.000001) =0.010996. $$

If the outcome noise variance is \(\sigma^2=1\), the total population prediction risk is \(1.010996\), in squared outcome units. Yet the fitted support contains all 1,000 predictors, while the true support contains four. Exact support recovery fails; the support has four true positives and 996 false positives. The example shows how small coefficient errors can coexist with poor exact set recovery, particularly for a non-sparse estimator.

Why correlation complicates selection

If two predictors are strongly correlated, they can carry nearly the same predictive information. A selected model may use one where the underlying data-generating description assigns a nonzero coefficient to the other. This can preserve predictions while changing the selected set. When predictors are exactly or nearly redundant, the data may provide little information for deciding which variable should receive the coefficient.

Worked Example: A Wrong Gene Can Give Nearly the Same Predictions

Suppose two standardized genes have correlation \(0.99\), with covariance matrix

$$ \Sigma= \begin{pmatrix} 1 & 0.99\\ 0.99 & 1 \end{pmatrix}. $$

For this hypothetical example, let the true coefficient vector be \(\beta^*=(1,0)^\mathsf{T}\), so \(S^*=\{1\}\), but suppose a fitted sparse model returns \(\hat{\beta}=(0,1)^\mathsf{T}\), so \(\hat{S}=\{2\}\). The coefficient difference is \(d=(-1,1)^\mathsf{T}\). Its excess prediction risk is

$$ d^\mathsf{T}\Sigma d =(-1)^2+2(-1)(1)(0.99)+(1)^2 =1-1.98+1 =0.02. $$

The selected set is entirely wrong under the exact-support criterion, but the excess prediction risk is only \(0.02\) in squared outcome units. The predictors’ high correlation explains why substituting one for the other changes predictions little. This calculation does not establish that either gene is biologically responsible; it only compares prediction under the stated model and predictor distribution.

An important implication is that exact recovery needs more than good prediction. Under a positive-definite \(\Sigma\), excess risk is at least \(\lambda_{\min}(\Sigma)\|\hat{\beta}-\beta^*\|_2^2\), where \(\lambda_{\min}(\Sigma)\) is its smallest eigenvalue. When predictors are highly correlated, this eigenvalue can be small, so a small excess risk need not imply small coefficient error. Even small coefficient error is not by itself enough to guarantee the exact support of an unthresholded estimate: a truly zero coefficient can have a very small nonzero estimate.

Support recovery is more plausible when nonzero coefficients are sufficiently separated from zero, the design contains enough information to distinguish predictors, and the fitting and selection procedure meets conditions appropriate to the signal and design. A common signal-strength idea is the minimum nonzero magnitude, \(\beta_{\min}=\min_{j\in S^*}|\beta_j^*|\). If a procedure controls coordinatewise estimation error below \(\beta_{\min}/2\), thresholding estimates at \(\beta_{\min}/2\) separates active from inactive coordinates, provided the error bound applies to every coordinate. This is a sufficient reasoning pattern, not a guarantee that a particular penalized fit will satisfy the bound.

Worked Example: A Weak Active Gene Can Be Missed at Small Prediction Cost

Suppose a hypothetical standardized predictor has coefficient \(0.05\), while all other coefficients are zero, and its variance is one. A fit that sets every coefficient to zero omits this active predictor. The coefficient error on it is \(-0.05\), so the excess prediction risk is

$$ (-0.05)^2(1)=0.0025. $$

If \(\sigma^2=1\), total prediction risk is \(1.0025\) squared outcome units, compared with irreducible risk \(1\). The fit fails exact support recovery because it omits the active predictor, but the increase in prediction risk is small relative to the noise variance. This does not mean the gene is irrelevant for every scientific purpose; it means its omission has a small squared-error prediction cost under these assumptions.

Choosing a goal and diagnosing a mismatch

The aim of an analysis determines which evidence is relevant. If the primary aim is prediction for new samples from a defined population, assess predictive error on observations not used to fit the model, using a loss appropriate to the outcome. If the aim is exact support recovery, predictive error alone is insufficient: a procedure can predict well with false positives, false negatives, or substitutions among correlated genes. In practice, the true support is usually unknown, so exact recovery cannot be verified merely by inspecting a fitted model.

The following comparison summarizes the different roles of common penalized fits. It is not a ranking: which approach is useful depends on the scientific objective, signal structure, and design.

ApproachWhat it directly encouragesWhat a good result does not establish
Ridge regressionShrinkage of coefficients, usually without exact zerosWhich variables are truly active
LassoShrinkage and a sparse fitted coefficient vectorThat the selected support equals the true support
Elastic netShrinkage with a penalty that can retain groups of correlated predictorsThat every selected gene is truly active or that every active gene is selected

Useful diagnostics depend on the goal. For prediction, check performance on held-out data representative of the intended use, compare it with a relevant baseline, and examine whether results are sensitive to distribution shifts. For selection, report the selection rule and threshold, inspect whether genes are strongly correlated or nearly redundant, and assess whether scientific conclusions change under plausible modeling choices. A sparse output is not itself evidence of exact recovery, and a non-sparse output is not automatically a prediction failure.

Common warning signs include treating training error as evidence of generalization, interpreting a lasso-selected gene as uniquely identified despite strong correlation, or claiming that an unselected weak gene has no effect. Penalized estimates are affected by shrinkage and the chosen penalty; the selected set is a model output, not proof of a biological mechanism. Prediction and selection also do not, by themselves, establish a causal effect.

Common pitfall: “The model predicts well, so it must have found the true genes.” This reasoning is incorrect: predictive risk weights coefficient errors through the predictor covariance, whereas exact support recovery counts every coordinate mismatch. Strongly correlated predictors or weak signals can produce accurate predictions alongside an incorrect selected set.
Key takeaway: State the target before interpreting a penalized fit. Prediction asks how well outcomes will be forecast for new observations; support recovery asks whether the nonzero coordinates match the true active set. Good performance on one target does not guarantee good performance on the other.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. In the linear model above, what does the excess prediction risk measure, and what does exact support recovery require?
  2. Two standardized predictors have correlation \(0.95\). The true coefficient vector is \((1,0)^\mathsf{T}\), and the fitted vector is \((0,1)^\mathsf{T}\). Calculate the excess prediction risk.
  3. Why can a very small nonzero ridge coefficient count as a support error but have little effect on prediction risk?
  4. Suppose an active gene has coefficient \(0.02\), and a fit omits it. With predictor variance one, calculate its contribution to excess prediction risk.

Solutions. (1) Excess risk is \((\hat{\beta}-\beta^*)^\mathsf{T}\Sigma(\hat{\beta}-\beta^*)\), the squared prediction loss above irreducible noise; exact support recovery requires \(\hat{S}=S^*\), with every active and inactive coordinate classified correctly. (2) With \(d=(-1,1)^\mathsf{T}\), the risk is \(1-2(0.95)+1=0.10\). (3) Exact support treats any nonzero estimate on an inactive predictor as a false positive, whereas the prediction-risk contribution is weighted by its squared coefficient error and predictor variance; a tiny coefficient can therefore contribute very little. (4) The error is \(-0.02\), so the excess-risk contribution is \((-0.02)^2(1)=0.0004\) squared outcome units.

Clinical Biostats