Tutorials › Quantitative Systems Pharmacology (QSP) › Attributing Predictive Variance to Uncertain Inputs

Propagating Uncertainty to Clinical Predictions · Tutorial 730 of 799

Attributing Predictive Variance to Uncertain Inputs

You will learn when variance components have a unique interpretation, how to estimate them by conditional simulation, and why correlated inputs require care in attributing shared predictive variation.

Advanced 13 min read

What You'll Learn

  • Define the predictive variance being attributed and distinguish it from Monte Carlo error.
  • Use the law of total variance to form sequential conditional contributions.
  • Interpret first-order and total-effect indices when uncertain inputs are independent.
  • Explain why correlated inputs can make conditional contributions overlap.
  • Use Shapley effects to allocate variance under dependence, and recognize their limitations.
  • Diagnose unstable or misleading variance attributions.

Why Attribute Predictive Variance?

A QSP model can produce a clinical prediction that varies across a parameter ensemble. Knowing the total predictive variance describes the spread, but not which uncertain inputs account for that spread. Attribution can help identify which parameter groups drive uncertainty in a specified prediction, and where additional evidence might be most informative. It does not establish that a parameter causes a clinical outcome, nor does it measure how much the outcome would change under an intervention on that parameter.

The attribution depends on the predictive target and the uncertainty distribution used for the inputs. Let \(Y=f(\Theta)\) be a scalar prediction, where \(\Theta=(\Theta_1,\ldots,\Theta_d)\) is a random vector of uncertain model inputs and \(f\) is the model mapping. Assume \(Y\) has finite variance. The target might be a biomarker change at a specified visit; the variance considered here is across the specified input distribution. The prediction target and that distribution must be held fixed when comparing attributions.

Definition: The predictive variance is \(V=\operatorname{Var}(Y)\), calculated over the stated distribution of uncertain inputs. A variance attribution assigns some or all of \(V\) to inputs or input groups according to a stated decomposition rule. An attribution is therefore a property of the model, target, input distribution, and rule together.

The groups can be individual parameters or scientifically meaningful blocks, such as receptor-binding parameters and intracellular turnover parameters. Grouping matters: an attribution to a block does not identify which member of the block is responsible. Parameter correlations must also be represented in the joint input distribution rather than discarded for convenience.

Conditional Variance and Sequential Decomposition

For any input group \(A\), the conditional expectation \(E[Y\mid A]\) is the mean prediction among inputs with that group fixed at its observed value, while the other inputs retain their conditional distribution. The law of total variance gives an exact two-part decomposition:

$$ \operatorname{Var}(Y) = \operatorname{Var}\bigl(E[Y\mid A]\bigr) + E\bigl[\operatorname{Var}(Y\mid A)\bigr]. $$

The first term is variation in the conditional mean prediction as \(A\) varies; the second is the average remaining variation after conditioning on \(A\). This is an identity for any joint distribution with finite variance. It does not require independent inputs. However, the first term is not automatically an exclusive share: if inputs are correlated, conditioning on one group can reveal information about another.

For several groups, choose an ordering \(A_1,\ldots,A_m\), and let \(S_k=(A_1,\ldots,A_k)\), with \(S_0\) empty. Define sequential increments as the increase in variance of the conditional mean when each group is added. The final residual is the average variance remaining conditional on all groups.

$$ C_k=\operatorname{Var}\bigl(E[Y\mid S_k]\bigr) -\operatorname{Var}\bigl(E[Y\mid S_{k-1}]\bigr), \qquad R=E\bigl[\operatorname{Var}(Y\mid S_m)\bigr]. $$

Because \(S_{k-1}\) is contained in \(S_k\), the conditional-expectation variance cannot decrease, so \(C_k\geq 0\). Telescoping the increments and applying the law of total variance gives \(\operatorname{Var}(Y)=\sum_{k=1}^{m}C_k+R\). If the prediction is fully determined by the included groups, \(R=0\). Sequential increments depend on group order: information shared by correlated groups is credited to whichever group enters earlier.

Worked Example: An Exact Sequential Decomposition

Suppose two independent, uncertain parameter groups \(A\) and \(B\) each take values \(-1\) and \(1\) with equal probability. A hypothetical model gives the normalized prediction \(Y=A+B+AB\). The four equally likely predictions are \(3,-1,-1,-1\), so \(E[Y]=0\) and \(\operatorname{Var}(Y)=E[Y^2]=(9+1+1+1)/4=3\).

Given \(A=1\), the two possible predictions are \(3\) and \(-1\), with mean \(1\). Given \(A=-1\), both predictions are \(-1\), with mean \(-1\). Thus \(E[Y\mid A]\) is equally likely to be \(1\) or \(-1\), and \(\operatorname{Var}(E[Y\mid A])=1\). Given \(B\), the calculation is symmetric, so \(\operatorname{Var}(E[Y\mid B])=1\).

For the order \(A\) then \(B\), the first increment is \(C_A=1\); the second is \(C_B=\operatorname{Var}(E[Y\mid A,B])-1=3-1=2\), since \(Y\) is determined by both inputs. The increments sum to \(3\), but reversing the order assigns \(1\) to \(B\) and \(2\) to \(A\). The interaction \(AB\) makes the allocation order-dependent even though the inputs are independent.

Independent Inputs: Variance Components and Sensitivity Indices

When input groups are mutually independent and \(Y\) is square-integrable, a functional ANOVA decomposition separates variation into orthogonal components: a mean, individual-group effects, pairwise interactions, and higher-order interactions. Orthogonality means that distinct components have zero covariance, so their variances add to \(V\). For example, in the preceding model, the components are \(A\), \(B\), and \(AB\); each has variance \(1\), giving \(V=3\).

The first-order index for group \(i\) is the fraction of total variance explained by its conditional mean alone. The total-effect index is the fraction associated with all variance components that involve that group, including interactions. For independent inputs these standard definitions are:

$$ S_i=\frac{\operatorname{Var}(E[Y\mid \Theta_i])}{V}, \qquad S_{T_i}=\frac{E[\operatorname{Var}(Y\mid \Theta_{-i})]}{V} =1-\frac{\operatorname{Var}(E[Y\mid \Theta_{-i}])}{V}. $$

Here \(\Theta_{-i}\) denotes all input groups other than \(i\), and \(V>0\) is required for the ratios. \(S_i\) measures the individual-group component; \(S_{T_i}\) includes interactions involving that group. A difference between them indicates interaction contributions. First-order indices sum to one only if there are no interactions; total-effect indices can sum to more than one because interactions are counted for each participating group.

Worked Example: Reading First-Order and Total Effects

For the model \(Y=A+B+AB\) above, the total variance is \(3\). Since \(E[Y\mid A]=A\), the first-order index for \(A\) is \(S_A=1/3\). Conditioning on \(B\) gives \(E[Y\mid B]=B\), so \(S_B=1/3\). The remaining one-third is the interaction component \(AB\).

To calculate the total effect of \(A\), hold \(B\) fixed. For \(B=1\), \(Y=1+2A\), which has conditional variance \(4\) because \(A\) is equally likely to be \(-1\) or \(1\). For \(B=-1\), \(Y=-1\), with conditional variance \(0\). Therefore \(E[\operatorname{Var}(Y\mid B)]=(4+0)/2=2\), and \(S_{T_A}=2/3\). By symmetry \(S_{T_B}=2/3\). Each input has a one-third first-order share and an additional one-third through interaction.

An additive independent-input model provides a useful contrast. If \(Y=2A+B\), \(A\) and \(B\) are independent, and their variances are \(1\) and \(4\), then \(V=4(1)+4=8\). The variance contributions are \(4\) from \(A\) and \(4\) from \(B\); each first-order and total-effect index is \(4/8=0.5\). The arithmetic relies on independence: without it, the covariance term in \(\operatorname{Var}(2A+B)\) cannot be omitted.

Correlated Inputs: Shared Information Is Not an Exclusive Share

With correlated inputs, the classical orthogonal variance-component decomposition generally does not apply. The conditional quantity \(\operatorname{Var}(E[Y\mid\Theta_i])\) remains defined, but two groups can each carry information about the same variation in \(Y\). Their normalized conditional contributions may therefore sum to more than one. This is not a calculation error; it signals overlap, not two separate pieces of variance.

Worked Example: Correlation Creates Overlapping Contributions

Let \(A\) and \(B\) be standardized, jointly normal uncertain inputs with variances \(1\) and correlation \(0.6\). Suppose the hypothetical prediction is \(Y=A+B\). Then \(\operatorname{Var}(Y)=1+1+2(0.6)=3.2\). For jointly normal inputs, \(E[B\mid A]=0.6A\); hence \(E[Y\mid A]=1.6A\), and \(\operatorname{Var}(E[Y\mid A])=1.6^2=2.56\). The same result holds conditioning on \(B\).

Each normalized conditional contribution is \(2.56/3.2=0.8\), so together they total \(1.6\), or 160% of the predictive variance. Both groups partly reveal the same shared variation. It would be incorrect to report each 80% as a distinct, additive share.

One allocation for dependent inputs is the Shapley effect. Define \(c(S)=\operatorname{Var}(E[Y\mid\Theta_S])\), with \(c(\varnothing)=0\) and \(c(\text{all groups})=V\). The Shapley effect for a group is its average increase in \(c(S)\) over all orders in which the groups can be added. With two groups, the variance allocations are \( \phi_A=\{c(A)-c(\varnothing)+c(A,B)-c(B)\}/2 =\{2.56+0.64\}/2=1.60\), and, by symmetry, \(\phi_B=1.60\). Each is half of \(V=3.2\). The normalized effects are \(0.5\) each, summing to one. This rule splits shared information symmetrically; it is a convention for allocation, not evidence that either input has a causal effect.

Shapley effects can be defined for groups using their joint distribution, but their values depend on the selected groups and the conditional distributions used. They provide an additive allocation of the variance in this setting; they do not create a unique, assumption-free answer to “which parameter caused the variance.” Report the allocation rule, input dependence, and grouping alongside the numbers.

Conditional Simulation and Diagnostics

In a QSP application, conditional expectations and variances are often estimated by simulation. For a chosen subset \(S\), sample values of \(\Theta_S\) from their marginal distribution, then sample the remaining inputs from their conditional distribution given \(\Theta_S\). Run the model for those completed input vectors. Repeating this procedure estimates \(E[Y\mid\Theta_S]\), its variance across the outer draws, and, when needed, the conditional residual variance.

The conditional sampling step is essential when inputs are correlated. Pairing a fixed value of one parameter with independently drawn values of the others generally breaks the joint distribution and estimates a different quantity. If conditional distributions are difficult to sample, the simulation method must preserve the intended joint distribution by another validated approach. For independent inputs, pick-freeze estimators or variance-based sampling designs are common alternatives; they are not automatically valid for dependent inputs.

1
Specify the target and input distribution.
State the prediction, the uncertain groups, their joint distribution, and the variance \(V\) to be decomposed.
2
Choose an attribution rule.
Use orthogonal variance components for independent inputs; use a clearly stated conditional or Shapley allocation when dependence matters.
3
Simulate with the correct dependence.
Estimate conditional predictions using draws from the appropriate joint or conditional distributions, not independently shuffled correlated inputs.
4
Check numerical stability and interpretation.
Repeat with larger simulation budgets or independent batches; check that component estimates stabilize and that the decomposition sums to the stated total, within Monte Carlo error.

A decomposition that fails to reconcile with \(V\) may indicate an estimator or implementation problem, a residual term that was omitted, or Monte Carlo error. Large changes in estimated shares across batches suggest insufficient simulation, especially when conditional expectations are noisy. Other warning signs include implausible results after breaking input correlations, unstable rankings under modest changes in grouping, and reporting a sequential allocation without stating its order.

Attribution also has substantive limits. It describes variation under a chosen uncertainty distribution, so changing parameter ranges or correlations can change the result even when the QSP equations remain fixed. A low share does not prove an input is biologically unimportant: its effect may be small over the selected range, masked by other inputs, or expressed in a different prediction target. Conversely, a high share is not evidence that reducing uncertainty in that parameter will necessarily improve a decision. Variance attribution is a diagnostic of predictive uncertainty, not a substitute for scientific interpretation.

Common Pitfall

Wrong reasoning: “The conditional indices for two correlated parameters are 0.8 each, so each parameter independently explains 80% of the prediction variance.” This double-counts shared information and treats overlapping conditional summaries as additive.

Correction: State that the two conditional contributions overlap, then choose an allocation rule suitable for the question. For example, a Shapley allocation splits the shared contribution by averaging over input orderings. Alternatively, report the conditional contributions as overlapping measures without claiming they partition the variance. In either case, preserve and describe the input correlation structure.

Key takeaway: A variance attribution is meaningful only alongside its prediction target, input distribution, dependence assumptions, grouping, and decomposition rule. Independent-input variance components can separate main effects and interactions; correlated inputs can share predictive information and require an explicit allocation convention.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. If \(Y\) has finite variance, what two terms partition \(\operatorname{Var}(Y)\) when conditioning on a group \(A\)?
  2. In the independent-input model \(Y=A+B+AB\) from the examples, why do the first-order indices sum to less than one?
  3. For two correlated inputs, both normalized conditional contributions equal 0.8. What prevents interpreting them as additive variance shares?
  4. Why can a sequential variance allocation change when the order of input groups changes?
  5. Name two checks that can reveal unreliable conditional-simulation attributions.

Solutions. (1) The partition is \(\operatorname{Var}(E[Y\mid A])+E[\operatorname{Var}(Y\mid A)]\), by the law of total variance. (2) Each first-order index is \(1/3\), so they sum to \(2/3\); the remaining \(1/3\) is the interaction component \(AB\). (3) Correlated inputs can both reveal the same variation in \(Y\), so their conditional contributions overlap and need not sum to one. (4) Earlier groups can receive shared information before later groups are added; the sequential increments are conditional on the chosen order. (5) Examples include comparing estimates across independent simulation batches or larger simulation budgets, checking that components reconcile with total variance, and verifying that correlated inputs were not sampled independently.

Clinical Biostats