Tutorials › Statistical Learning (Graduate) › Selecting Subensembles Under Correlated Candidate Errors

Ensemble Risk and Diversity · Tutorial 884 of 989

Selecting Subensembles Under Correlated Candidate Errors

Use the joint second moments of candidate errors to compare equal-weight subsets, account for subset size and dependence, and identify the limits of correlation-based selection.

Advanced 12 min read

What You'll Learn

  • Define subensemble risk for a fixed subset of candidate predictors using their joint error moments
  • Separate error covariance from bias when constructing the risk matrix
  • Derive the risk of an equal-weight subset under exchangeable errors
  • Compare subsets of the same size using their diagonal and off-diagonal error moments
  • Recognize why low individual risks or low correlations alone do not determine the best subset

Why Subset Selection Depends on Joint Errors

A dictionary of candidate predictors can contain many useful models, but selecting a subset is not simply a matter of keeping the predictors with the smallest individual errors. When errors move together, averaging them may leave much of their error intact; when errors offset one another, a group of individually imperfect predictors may average well. The relevant object is therefore the joint behavior of the errors in each proposed subset.

This tutorial studies fixed subsets combined with equal weights under squared prediction loss. The risk comparisons are population comparisons for a fresh test observation. They describe the risk of a specified subset; if the subset is itself chosen from data, the risk of the resulting selection procedure also includes the effects of that selection.

Definition: Let \(M\) fixed candidate prediction rules be \(\hat f_1,\ldots,\hat f_M\), and let \((X,Y)\) be a fresh test observation. Candidate \(j\)'s prediction error is \(e_j=\hat f_j(X)-Y\). For a nonempty subset \(S\subseteq\{1,\ldots,M\}\) of size \(k=|S|\), its equal-weight subensemble predicts \(k^{-1}\sum_{j\in S}\hat f_j(X)\). Its squared prediction risk is \(R(S)=E[(k^{-1}\sum_{j\in S}e_j)^2]\), assumed finite.

The errors are defined against the same response \(Y\), so their dependence is part of the prediction problem, not an optional adjustment. Define the error second-moment matrix \(Q\) by \(Q_{j\ell}=E[e_j e_\ell]\). This is not necessarily a covariance matrix: if the candidates have nonzero mean errors, then the second moments include both their covariance and their biases.

Risk identity: For any fixed nonempty subset \(S\), \(R(S)=k^{-2}\sum_{j\in S}\sum_{\ell\in S}Q_{j\ell}\). If \(b_j=E[e_j]\), then \(Q_{j\ell}=\operatorname{Cov}(e_j,e_\ell)+b_jb_\ell\).

The double sum includes the diagonal terms \(Q_{jj}=E[e_j^2]\), which are the candidates' individual risks, and the off-diagonal terms \(Q_{j\ell}\), which describe how their errors co-occur. For a fixed subset size, the denominator \(k^2\) is the same across subsets. Thus the best subset of that size minimizes the sum of all its diagonal and off-diagonal second moments. A correlation is only a standardized off-diagonal quantity; it does not by itself reveal the size of the cross-moment or the diagonal risks.

Worked Example: Comparing Subsets With Correlated Errors

Let \(Z_1,Z_2\) be independent \(N(0,1)\) variables, and suppose three candidate errors are \(e_1=Z_1\), \(e_2=Z_2\), and \(e_3=(Z_1+Z_2)/\sqrt{2}\). Each has mean zero and individual risk 1. Their second-moment matrix is

$$ Q= \begin{pmatrix} 1&0&1/\sqrt{2}\\ 0&1&1/\sqrt{2}\\ 1/\sqrt{2}&1/\sqrt{2}&1 \end{pmatrix}. $$

For the size-two subset \(\{1,2\}\), the cross-moment is zero, so \(R(\{1,2\})=(1+1+2(0))/4=1/2\). For \(\{1,3\}\), the cross-moment is \(1/\sqrt{2}\), giving \(R(\{1,3\})=(1+1+2/\sqrt{2})/4=(2+\sqrt{2})/4\), approximately \(0.854\). The same calculation gives \(R(\{2,3\})=(2+\sqrt{2})/4\). Although all three candidates have equal individual risk, the subset \(\{1,2\}\) is better because its errors have a smaller cross-moment.

A Risk Formula for Exchangeable Errors

A useful benchmark is a dictionary whose errors have a common mean, common variance, and common pairwise correlation. This symmetry makes the role of subset size explicit. Write \(b=E[e_j]\), \(\sigma^2=\operatorname{Var}(e_j)>0\), and suppose \(\operatorname{Corr}(e_j,e_\ell)=\rho\) for every distinct pair. For a dictionary of size \(M\geq2\), such an equicorrelation matrix must satisfy \(-1/(M-1)\leq\rho\leq1\).

Theorem: Under these assumptions, every subset \(S\) of size \(k\) has risk \(R(S)=b^2+\sigma^2\{\rho+(1-\rho)/k\}\). In particular, all subsets of a given size have the same risk.

Proof. The mean error of the average is \(b\). Each error has variance \(\sigma^2\), and each distinct pair has covariance \(\rho\sigma^2\). Expanding the variance of the average gives

$$ \operatorname{Var}\left(\frac{1}{k}\sum_{j\in S}e_j\right) =\frac{1}{k^2}\left(k\sigma^2+k(k-1)\rho\sigma^2\right) =\sigma^2\left(\rho+\frac{1-\rho}{k}\right). $$

For any random variable \(A\) with finite second moment, \(E[A^2]=\operatorname{Var}(A)+(E[A])^2\). Applying this identity to the average error adds \(b^2\) to the displayed variance and proves the formula. Since it depends on \(S\) only through \(k\), every subset of that size has the same risk. \(\square\)

For \(\rho<1\), increasing \(k\) decreases the term \((1-\rho)\sigma^2/k\), but the risk approaches \(b^2+\rho\sigma^2\), not necessarily zero. The shared component remains in the average. At \(\rho=1\), all errors are perfectly correlated and averaging does not reduce their variance. If \(\rho\) is negative, the formula still applies within the stated positive-semidefinite range; offsetting errors can make the risk decrease more quickly with subset size.

Worked Example: How Subset Size Changes Risk

Suppose there are \(M=4\) exchangeable candidate errors with common mean \(b=1\), variance \(\sigma^2=4\), and pairwise correlation \(\rho=0.25\). The correlation is admissible because \(-1/3\leq0.25\leq1\). The theorem gives \(R_k=1+4\{0.25+0.75/k\}\) for a subset of size \(k\).

For \(k=1\), \(R_1=1+4(1)=5\), which is the individual squared error risk. For \(k=2\), \(R_2=1+4(0.25+0.375)=3.5\). For \(k=4\), \(R_4=1+4(0.25+0.1875)=2.75\). The limiting risk as \(k\) grows is \(1+4(0.25)=2\). Thus the larger subsets improve risk here, but the nonzero common bias and positive shared covariance prevent the risk from vanishing.

Selection Within a Fixed Subset Size

When candidate errors are not exchangeable, the risk depends on which members are chosen, not just on how many. For a subset \(S\) with size \(k\), define its total second-moment sum as \(A(S)=\sum_{j\in S}Q_{jj}+2\sum_{j<\ell,\ j,\ell\in S}Q_{j\ell}\). Symmetry of \(Q\) gives \(R(S)=A(S)/k^2\). This provides an exact population criterion for comparisons among subsets of equal size.

Fixed-size selection rule: Among all subsets of a specified size \(k\), a subset minimizes equal-weight squared risk exactly when it minimizes \(A(S)\). The criterion combines each member's individual second moment with every pairwise cross-moment inside the subset.

This criterion explains why there is no universal ranking of candidates that can be used independently of the subset. A candidate with a relatively large individual risk may still help a particular group if its errors have sufficiently negative cross-moments with that group's errors. Conversely, several strong individual predictors can make a poor subset if their errors are strongly aligned.

Worked Example: The Best Individual Need Not Belong to the Best Pair

Let \(Z,W,V\) be independent \(N(0,1)\) variables, and take \(e_1=Z\), \(e_2=-Z+0.2W\), and \(e_3=0.5V\). The individual risks are \(E[e_1^2]=1\), \(E[e_2^2]=1+0.2^2=1.04\), and \(E[e_3^2]=0.5^2=0.25\). Thus candidate 3 has the lowest individual risk.

Independence gives \(E[e_1e_2]=E[Z(-Z+0.2W)]=-1\), while \(E[e_1e_3]=E[e_2e_3]=0\). Therefore, \(R(\{1,2\})=(1+1.04+2(-1))/4=0.01\). For the other pairs, \(R(\{1,3\})=(1+0.25)/4=0.3125\), and \(R(\{2,3\})=(1.04+0.25)/4=0.3225\). The best pair is \(\{1,2\}\), which excludes the best individual predictor. The strong negative cross-moment between candidates 1 and 2 allows their errors to cancel.

Interpretation and a Common Pitfall

The risk matrix makes dependence concrete: for each proposed subset, assess both the diagonal risks and the pairwise cross-moments. Under common, zero-mean errors, equal variances, and common pairwise correlation, a single correlation parameter is enough to describe the risk by subset size. Outside that symmetric setting, candidate-specific risks, biases, and dependencies all matter. Correlation summaries can be useful descriptions, but they are not substitutes for the risk calculation.

Common mistake: choosing the lowest-risk candidates and assuming their average must be best. This ignores the off-diagonal terms. In the worked example, candidate 3 is individually best, yet the pair \(\{1,2\}\) has lower risk than either pair containing candidate 3 because its negative cross-moment reduces the average's error. The correction is to compare the full subset risk, including all cross-moments, rather than rank candidates by their individual risks alone.

There is also an important distinction between an oracle comparison and a data-driven selection procedure. The formulas above compare specified subsets using their population error moments. If a subset is chosen after inspecting data, the selected subset is random, and evaluating that selection procedure requires accounting for how the choice was made. The fixed-subset identity by itself does not remove that selection effect.

Check Your Understanding

Use the definitions and risk identities above to answer the following.

  1. For a subset of size \(k\), explain why its risk contains \(k\) diagonal terms and \(k(k-1)\) ordered off-diagonal terms.
  2. Under the exchangeable-error assumptions, what part of the risk remains as \(k\) becomes large, and what features determine it?
  3. If two candidates have equal individual risks, what additional quantity determines whether their equal-weight pair has lower risk than twice the single-candidate average-risk benchmark?
  4. Why can a candidate with the smallest individual risk be absent from the lowest-risk subset of size two?
  5. What extra distinction is needed when comparing the risk of a fixed subset with the risk of a procedure that selects a subset using data?
Clinical Biostats