Why Separate the Sources of Portability Loss?
A score developed in one ancestry can predict less accurately in another for more than one reason. The variants in the score may tag causal variation differently because genotype covariance patterns differ; the causal effects themselves may also differ. These mechanisms can occur together, and their contributions can offset one another. A comparison of prediction performance alone does not reveal which mechanism is responsible.
This tutorial derives a decomposition for squared prediction error under a linear additive model. It treats the score weights as fixed and distinguishes changes in genotype covariance from changes in causal effects. The decomposition is a way to organize evidence and counterfactual calculations, not a claim that either component can always be estimated precisely from validation data alone.
Model and Error Formula
Assume genotypes and genetic values are centered within each ancestry, allele coding is consistent, and the score weights \(w\) are held fixed. Assume a linear additive genetic model with a specified set of causal variants. Define the covariance matrices \(\Sigma_{CC,a}=\operatorname{Cov}(C_a,C_a)\), \(\Sigma_{TC,a}=\operatorname{Cov}(T_a,C_a)\), and \(\Sigma_{TT,a}=\operatorname{Cov}(T_a,T_a)\). These matrices describe variation at the causal and score variants and their covariance structure in ancestry \(a\).
The genetic prediction error follows by expanding the square. This formula is the basis for separating the two sources of change:
The first term is the variance of the causal genetic value. The final term is the variance of the score. The middle term is minus twice their covariance. A score can therefore have a larger error because the genetic value varies more, because the score and genetic value covary less, or because the score itself varies differently.
The covariance matrices include more than pairwise LD correlations if genotypes are represented on their original dosage scales: their diagonal entries also reflect genotype variances, which can differ with allele frequency. Thus, in raw dosage coordinates, the covariance component below includes changes in genotype variance as well as changes in tagging covariance. To describe LD correlation changes alone, the analysis must use a clearly specified standardized-genotype representation and express the score weights in those same coordinates. The decomposition should not silently label every covariance change as pure LD.
For an observed quantitative outcome, suppose \(Y_a=G_a+\varepsilon_a\), where the residual has mean zero and is uncorrelated with \(G_a\) and \(S_a\). Then \(E[(Y_a-S_a)^2]=Q_a+\operatorname{Var}(\varepsilon_a)\). The genetic decomposition applies directly to the outcome-error gap only when residual variance is equal across the ancestries being compared, or when residual variance is separately accounted for. Differences in outcome scale or residual variation can otherwise contribute to a performance gap.
An Exact Counterfactual Decomposition
Write \(L_a\) for the set of covariance matrices in ancestry \(a\), and write \(Q(L,\beta)\) for the error formula evaluated using covariance structure \(L\), causal effects \(\beta\), and the fixed score weights \(w\). Let \(d\) denote the discovery or reference ancestry and \(t\) the target ancestry. One exact decomposition changes covariance first, holding effects at their reference values, and then changes effects at the target covariance structure:
The identity holds because the intermediate term \(Q(L_t,\beta_d)\) is added and subtracted. The covariance component asks what the target covariance structure would do if reference effects applied. The effect component asks what changing effects would do after the covariance structure has been changed to the target one. A positive component increases error; a negative component reduces it.
This ordering is not unique. If covariance and effects interact, changing effects first generally gives a different allocation to the two components, although the total error difference is unchanged. A symmetric decomposition averages the two possible orders:
Adding these expressions cancels the counterfactual terms, giving \(D_L+D_\beta=Q(L_t,\beta_t)-Q(L_d,\beta_d)\). The symmetric allocation gives each component the average of its contribution when changed first and when changed second. It is useful when no ordering is preferred, but it does not remove the need to estimate the counterfactual quantities.
Worked Example: Separating Tagging and Effect Changes
Consider one standardized causal genotype \(C\) and one standardized tag genotype \(T\), each with variance 1 in both ancestries. Let the fixed score be \(S=0.8T\), so \(w=0.8\). Suppose the reference causal effect is \(\beta_d=1.0\), the target effect is \(\beta_t=1.2\), and the correlation \(r=\operatorname{Cov}(T,C)\) changes from 0.80 to 0.50. These values are hypothetical. With the unit variances specified, \(Q= \beta^2+w^2-2w\beta r\).
In the reference ancestry, \(Q_d=1.0^2+0.8^2-2(0.8)(1.0)(0.80)=1.00+0.64-1.28=0.360\).
At the target covariance but with the reference effect, the counterfactual error is \(Q(L_t,\beta_d)=1.0^2+0.8^2-2(0.8)(1.0)(0.50)=1.00+0.64-0.80=0.840\). Thus the covariance component, changing covariance first, is \(0.840-0.360=0.480\).
The actual target error is \(Q_t=1.2^2+0.8^2-2(0.8)(1.2)(0.50)=1.44+0.64-0.96=1.120\). The effect component in this ordering is \(1.120-0.840=0.280\). The total increase in genetic prediction error is \(0.480+0.280=0.760\). In these hypothetical conditions, both the changed tag-causal correlation and the changed causal effect increase error.
The arithmetic also illustrates why the scale and assumptions matter: the calculation uses unit genotype variances and a single tag, so the covariance change is specifically a change in correlation. With multiple variants or unequal genotype variances, the matrix formula is needed.
Interactions and the Choice of Allocation
The simple example has a nonzero interaction: the effect of changing the correlation depends on the value of \(\beta\), because the covariance term contains the product \(\beta r\). The symmetric decomposition assigns half of the difference between the two ordering-specific allocations to each component. For the values above, changing covariance at \(\beta_t\) gives \(Q(L_t,\beta_t)-Q(L_d,\beta_t)=1.120-0.544=0.576\), since \(Q(L_d,\beta_t)=1.44+0.64-2(0.8)(1.2)(0.80)=0.544\).
Changing effects at \(L_d\) gives \(0.544-0.360=0.184\), while changing effects at \(L_t\) gives \(0.280\). Therefore the symmetric components are \(D_L=(0.480+0.576)/2=0.528\) and \(D_\beta=(0.184+0.280)/2=0.232\). Their sum is \(0.760\), the same total error increase. The ordered decomposition instead assigned \(0.480\) to covariance and \(0.280\) to effects. Both are valid; the allocation convention should be stated.
Worked Example: A Negative Effect Component Can Offset LD Loss
Keep the same hypothetical unit-variance genotypes, fixed weight \(w=0.8\), reference effect \(\beta_d=1.0\), and reference correlation \(r_d=0.80\). Now suppose the target correlation falls to \(0.50\), but the target effect is \(\beta_t=0.80\). The reference error remains \(Q_d=0.360\).
At target covariance and the reference effect, the error is \(Q(L_t,\beta_d)=1.00+0.64-2(0.8)(1.0)(0.50)=0.840\), so the covariance component is \(0.840-0.360=0.480\).
At the target effect and target covariance, \(Q_t=0.8^2+0.8^2-2(0.8)(0.8)(0.50)=0.64+0.64-0.64=0.640\). The effect component is \(0.640-0.840=-0.200\). Hence the net error increase is \(0.480-0.200=0.280\).
The negative effect component does not mean effects are more biologically similar, nor that every aspect of prediction improves. It means that, for this score and this error measure, replacing the reference effect by the target effect reduces the error under the target covariance structure. A single observed gap can conceal this kind of offset.
What an Observed Gap Can Identify
The decomposition identifies counterfactual components only when the required covariance structures and causal effects are available or can be estimated under defensible assumptions. An observed difference in validation error supplies the total difference, not its unique attribution. This distinction matters because a predictor’s performance can be summarized by several metrics, including error, explained variance, or correlation. The formula above decomposes squared error on a specified scale; a difference in another metric does not automatically have the same additive components.
For example, even in the one-causal-variant setting, the error depends jointly on effect size and correlation. With \(w=0.8\) and unit variances, a target with \(\beta=1.0\) and \(r=0.50\) has \(Q=0.840\). A different target with \(\beta=1.2\) and \(r=0.6458\) has approximately \(Q=1.44+0.64-2(0.8)(1.2)(0.6458)=0.840\). The same target error is compatible with different combinations of effect and tagging changes. The reference error alone cannot distinguish them.
A defensible analysis therefore needs to specify the score, outcome scale, ancestry-specific covariance inputs, effect vectors, and reference ordering or symmetric allocation. In practice, causal variants and their effects are not known without uncertainty. Estimated effects, LD reference panels, variant coverage, and residual variation can all affect the resulting attribution. The decomposition is an accounting identity conditional on its inputs; it is not, by itself, a causal proof that a particular biological mechanism produced the observed gap.
Common Mistake
- Wrong reasoning: “The score performs worse in the target ancestry, so LD mismatch must be the cause.” A performance gap alone does not isolate LD; causal effects, genotype variance, residual variance, outcome scale, or combinations of these may also matter.
- Correction: State the prediction-error estimand and model, then compare the relevant counterfactual errors while changing one input at a time. Report the allocation rule, acknowledge interaction, and avoid calling a covariance component pure LD unless marginal genotype variances have been handled explicitly.
Check Your Understanding
Use the model and definitions above to answer the following questions.
- In the error formula, which covariance matrix determines the covariance between the score variants and causal variants?
- Why does changing covariance first and then effects give an exact decomposition of the total error difference?
- When can the covariance component be interpreted specifically as an LD-correlation change rather than a broader genotype-covariance change?
- In the second worked example, what does the negative effect component mean for the specified score and error measure?
- Why can an observed prediction-error gap not, by itself, establish that LD mismatch caused the gap?