Why Weight–Error Dependence Changes Risk
An ensemble combines predictions, but its risk depends on more than the average weight assigned to each member. If weights vary across prediction cases, the weights may systematically be large when particular errors are large, or small when they are large. That dependence changes the squared error of the aggregate. It can increase risk, but it can also reduce it.
The distinction is between fixed-weight aggregation, where the same weight vector is used for every case, and adaptive-weight aggregation, where the weight vector is random and statistically related to the prediction errors being evaluated. The goal here is to derive the risk terms created by that relationship. We use squared prediction loss and do not require the individual errors to have mean zero.
Write \(M=E[ee^\top]\), the error second-moment matrix. For a fixed vector \(w\), the risk is
If the errors have mean zero, \(M\) is their covariance matrix. If not, it includes both covariance and mean-error contributions. Using the second-moment matrix keeps the fixed-weight formula valid without a centering assumption.
An Exact Decomposition for Random Weights
For adaptive weights, replacing \(W\) by its mean \(\mu=E[W]\) does not generally preserve risk. The exact difference has two parts: an interaction between the mean-weight aggregate error and the weight fluctuation, and a squared fluctuation term.
Proof. Since \(W=\mu+\Delta\), the aggregate error satisfies \(W^\top e=\mu^\top e+\Delta^\top e\). Squaring and taking expectations gives
Here \((\mu^\top e)(\Delta^\top e)=\mu^\top ee^\top\Delta\). The first term is \(R(\mu)\), and the last term is an expectation of a square, so it is nonnegative. Subtracting \(R(\mu)\) proves the risk-difference identity. \(\square\)
The interaction term is the part that a simple “random weights add variance” argument misses. It is not generally zero just because \(E[\Delta]=0\): it involves \(ee^\top\Delta\), so the relevant dependence is between the weights and products of errors. The interaction may offset some or all of the nonnegative fluctuation term.
Worked Example: Risk Under Fixed Weights
Suppose two members have mean-zero errors with second-moment matrix \(M=\begin{pmatrix}4&1\\1&1\end{pmatrix}\). Use fixed weights \(w=(0.25,0.75)^\top\). Calculate the aggregate risk.
The fixed-weight formula gives
The off-diagonal entries contribute \(2(0.25)(0.75)(1)\); omitting that term would incorrectly give \(0.8125\). This calculation is the fixed-weight baseline against which a random weighting rule can be compared.
When Random Weights Are Independent of Evaluation Errors
Independence is a useful special case, but it is stronger than merely having mean-zero weight fluctuations. If \(W\) is independent of \(e\), then \(E[ee^\top\Delta]=E[ee^\top]E[\Delta]=0\). The interaction term vanishes, leaving only the nonnegative cost of weight variability around \(\mu\).
Proof. Independence and \(E[\Delta]=0\) imply \(E[ee^\top\Delta]=E[ee^\top]E[\Delta]=0\), so the exact decomposition reduces to \(R(W)=\mu^\top M\mu+E[\Delta^\top ee^\top\Delta]\). By independence, the second term is \(E[\Delta^\top M\Delta]\). Writing the scalar as a trace and using \(E[\Delta\Delta^\top]=\operatorname{Var}(W)\) gives
For positive semidefinite matrices \(M\) and \(\operatorname{Var}(W)\), this trace is nonnegative: it equals \(\operatorname{tr}(M^{1/2}\operatorname{Var}(W)M^{1/2})\), the trace of a positive semidefinite matrix. This proves the result. \(\square\)
Worked Example: Dependence Adds Risk Above the Mean-Weight Baseline
Let \(U\) equal \(1\) or \(-1\), each with probability \(1/2\), and let the two member errors be \(e=(U,0)^\top\). Use weights \(W=(1,0)^\top\) when \(U=1\), and \(W=(0,1)^\top\) when \(U=-1\). The weights are nonnegative and sum to one. Compare adaptive risk with risk at the mean weights.
The mean weights are \(\mu=(0.5,0.5)^\top\). With these fixed weights, the aggregate error is \(U/2\), so \(R(\mu)=E[U^2/4]=0.25\). Under the adaptive rule, the aggregate error is \(1\) when \(U=1\) and \(0\) when \(U=-1\). Thus \(R(W)=0.5(1^2)+0.5(0^2)=0.5\).
The decomposition confirms the difference. When \(U=1\), \(\Delta=(0.5,-0.5)^\top\) and \(\Delta^\top e=0.5\); when \(U=-1\), \(\Delta=(-0.5,0.5)^\top\) and \(\Delta^\top e=0.5\). The mean-weight aggregate error is \(U/2\), so
Therefore \(R(W)-R(\mu)=0+0.25=0.25\). Although the weights have mean \(\mu\), their dependence on the error makes their average risk larger than the risk of using \(\mu\) on every case.
Adaptive Weights Can Also Reduce Risk
The word “penalty” can be misleading if it suggests that dependence must increase risk. The squared fluctuation term is always nonnegative, but the interaction can be negative and larger in magnitude. In that case adaptive weighting improves on the fixed mean-weight aggregate. The next example uses error information from the same evaluation case, so it illustrates the algebra rather than a generally implementable prediction rule.
Worked Example: Idealized Adaptation Cancels the Risk
There are two equally likely error scenarios: \(e=(1,0)^\top\) and \(e=(0,1)^\top\). A rule assigns all weight to the member with zero error in each scenario: \(W=(0,1)^\top\) in the first and \(W=(1,0)^\top\) in the second. Compare this rule with its mean weights.
The mean weights are \(\mu=(0.5,0.5)^\top\). Under these fixed weights the aggregate error is \(0.5\) in either scenario, giving \(R(\mu)=0.25\). Under the adaptive rule the aggregate error is zero in both scenarios, so \(R(W)=0\).
In each scenario, \(\mu^\top e=0.5\) and \(\Delta^\top e=-0.5\). Hence the interaction contribution is \(2(0.5)(-0.5)=-0.5\) in either scenario, while the squared fluctuation contribution is \((-0.5)^2=0.25\). Combining terms gives
The negative interaction more than offsets the positive fluctuation term. But this rule needs to know which member has zero error on the evaluation case, information that ordinarily depends on its outcome. In a real prediction setting, weights based on observed error estimates can still be associated with future errors, but that relationship must be assessed for the actual evaluation process; same-case oracle information should not be mistaken for a deployable rule.
What the Dependence Is—and Is Not
The exact decomposition applies to the joint distribution of the weights and evaluation errors. It does not require weights to be calculated directly from the true errors. For example, weights may be estimated from training or validation predictions, while the errors of interest are on new cases. Whether the interaction vanishes depends on the relationship between those random weights and the new-case errors, not simply on the fact that the weights were estimated in advance.
Conditioning makes this distinction precise. For any random \(W\) and \(e\) with finite squared risk,
This follows by conditioning \((W^\top e)^2\) on \(W\), which is then fixed inside the conditional expectation. If \(E[ee^\top\mid W]\) varies with \(W\), replacing it by the unconditional matrix \(M\) is generally invalid. If \(W\) and \(e\) are independent, the conditional second moment is \(M\), and the independent-weight result applies.
A practical analysis should therefore state what information determines the weights and which cases define the risk. Weights chosen using error estimates may be independent of future evaluation errors under a suitable sampling design, or they may remain dependent because of shared data, model fitting, or distributional structure. The risk identity describes the consequences without assuming one answer in advance.
Common Mistake
- Wrong reasoning: “The random weights have mean \(\mu\), so their risk equals the fixed-weight risk \(\mu^\top M\mu\).” This silently replaces the random product \(W^\top ee^\top W\) by a product of separate expectations.
- Correction: Mean weights determine the fixed-weight baseline, not the adaptive risk. The exact difference includes \(2\mu^\top E[ee^\top\Delta]\) and \(E[(\Delta^\top e)^2]\). Independence makes the first term zero; dependence need not. The net change can be positive or negative.
Check Your Understanding
Use the risk decompositions above to answer the following questions.
- Why is \(M=E[ee^\top]\) the appropriate matrix for the fixed-weight squared-risk formula when the errors need not have mean zero?
- In the exact adaptive-weight decomposition, which term is always nonnegative, and why can the other term have either sign?
- What additional assumption makes the interaction term vanish and yields a nonnegative difference from the mean-weight baseline?
- In the two-scenario example, identify the interaction and squared-fluctuation contributions to the risk change.
- Why does a rule that uses the evaluation outcome to identify the zero-error member not automatically describe a usable prediction procedure?