Tutorials › High-Dimensional Genomic Data Analysis › Decomposing Transferability Error Into LD, Frequency, and Effects

Polygenic Risk Scores · Tutorial 592 of 795

Decomposing Transferability Error Into LD, Frequency, and Effects

Learn to express cross-population genetic prediction error using genotype covariance, then separate frequency, LD, and effect changes with a clearly defined counterfactual decomposition.

Advanced 11 min read

What You'll Learn

  • Define transfer error as mean squared error in predicting the additive genetic component.
  • Express genotype covariance using allele-frequency scales and LD correlations.
  • Calculate target error from score weights, target effects, and target genotype covariance.
  • Use an order-averaged counterfactual decomposition to allocate changes across frequency, LD, and effects.
  • Recognize interactions, negative component attributions, and assumptions that limit interpretation.

What Changes When a Score Is Transferred?

A polygenic score can lose predictive accuracy in a new population for several distinct reasons. Allele frequencies affect genotype variances; linkage disequilibrium (LD) changes how variants covary; and effects can differ across populations. These mechanisms are related, so a single comparison of score performance does not identify their separate contributions. A useful starting point is to define the prediction error precisely and then state which counterfactual comparisons are being used to attribute it.

The framework here concerns the genetic component of a quantitative phenotype, on a common phenotype scale, and uses the same aligned variants in both populations. It is not a decomposition of all observed phenotype prediction error: environmental variation and measurement error are not included in the genetic prediction error defined below.

Definition: Let \(G\) be the vector of allele dosages at the variants used in a score, with each genotype centered by its population mean. Let \(b_S\) be the source-population score weights and \(\beta_T\) the target-population additive effects, both on the raw allele-dosage scale. The score is \(G^\mathsf{T}b_S\), the target additive genetic component is \(G^\mathsf{T}\beta_T\), and the target genetic prediction error is $$ E_T = \mathbb{E}_T\left[\left\{G^\mathsf{T}(b_S-\beta_T)\right\}^2\right]. $$ If \(\Sigma_T=\mathbb{E}_T[GG^\mathsf{T}]\), then \(E_T=(b_S-\beta_T)^\mathsf{T}\Sigma_T(b_S-\beta_T)\), in squared phenotype units.

This is a model-based target-population quantity. Its interpretation assumes that the additive target effects adequately represent the genetic component of interest, variants and alleles are aligned consistently, and the covariance matrix describes the target genotypes. A score estimated from data will also contain estimation error; in this expression that error is reflected in the difference between \(b_S\) and the true target effects, but uncertainty in estimating the error itself is not yet represented.

Separating Allele-Frequency Scale From LD

For variant \(j\), let \(p_j\) be its allele frequency and \(v_j=2p_j(1-p_j)\) its genotype variance under Hardy–Weinberg equilibrium. Define \(D\) as the diagonal matrix with entries \(\sqrt{v_j}\), and let \(R\) be the correlation matrix of the centered genotypes. Then \(\Sigma=DRD\). This separates marginal genotype scale, which depends on allele frequency, from correlation between variants, which represents LD.

When Hardy–Weinberg equilibrium is not appropriate, the same factorization can use the observed genotype standard deviations in \(D\) and the corresponding genotype correlation matrix in \(R\). It is important not to call a change in a correlation an allele-frequency change: the two enter the covariance matrix differently. The factorization is exact when the same variants, allele coding, and population-specific covariance matrix are used.

$$ E(p,R,\beta_T)=(b_S-\beta_T)^\mathsf{T}D(p)R D(p)(b_S-\beta_T) $$

This formula shows why the three mechanisms cannot generally be read off as independent percentages. Frequency and LD changes alter the covariance weighting of effect mismatch, while effect heterogeneity changes the mismatch vector itself. Their interaction means that the amount assigned to a factor can depend on the order in which counterfactual changes are made.

Worked Example: Computing Target Genetic Error

Suppose a hypothetical two-variant score has raw dosage weights \(b_S=(0.20,0.10)^\mathsf{T}\). The target additive effects are \(\beta_T=(0.15,0.16)^\mathsf{T}\), and target allele frequencies are \(0.20\) and \(0.40\). Assume Hardy–Weinberg equilibrium and target genotype correlation \(r=0.50\). All effects are in phenotype units per allele.

The dosage variances are \(v_1=2(0.20)(0.80)=0.32\) and \(v_2=2(0.40)(0.60)=0.48\). Thus the covariance matrix is $$ \Sigma_T= \begin{pmatrix} 0.32 & 0.50\sqrt{0.32(0.48)}\\ 0.50\sqrt{0.32(0.48)} & 0.48 \end{pmatrix} = \begin{pmatrix} 0.32 & 0.1960\\ 0.1960 & 0.48 \end{pmatrix}. $$

The weight mismatch is \(\delta=b_S-\beta_T=(0.05,-0.06)^\mathsf{T}\). Substitution gives $$ E_T=(0.05)^2(0.32)+(-0.06)^2(0.48)+2(0.05)(-0.06)(0.1960) =0.000800+0.001728-0.001176=0.001352. $$

The target genetic prediction error is therefore \(0.001352\) squared phenotype units, or a root mean squared genetic error of \(\sqrt{0.001352}=0.03677\) phenotype units. The negative cross-product reduces the error because the two weight mismatches have opposite signs and the genotypes are positively correlated. It does not mean that either variant contributes a negative variance on its own.

An Exact, Reference-Dependent Attribution

To attribute the change from a source architecture to a target architecture, define a counterfactual error function \(E(p,R,\beta)\) while holding the source score weights \(b_S\) fixed. The source setting uses source frequencies \(p_S\), LD matrix \(R_S\), and effects \(\beta_S\); the target setting uses \(p_T,R_T,\beta_T\). If the source weights equal the source effects, the source error is zero. Otherwise the source error is a nonzero baseline, and the decomposition below attributes the change from that baseline.

A sequential substitution gives an exact decomposition, but its allocation depends on the chosen order. For example, replacing frequencies before effects can give a different frequency contribution than replacing effects first, because frequency changes reweight the effect mismatch. An order-averaged decomposition removes the arbitrary choice of a single order. For each factor—frequency \(p\), LD \(R\), and effects \(\beta\)—calculate its change in error over all six possible orders of substitution, and average those changes.

$$ \phi_k=\frac{1}{3!}\sum_{\pi} \left[ E(\text{factors switched before }k\text{ and }k\text{ switched}) - E(\text{factors switched before }k) \right], \qquad \phi_p+\phi_R+\phi_\beta=E_T-E_S $$

Here \(\pi\) ranges over the six orders, \(k\) is one of \(p,R,\beta\), and each error is evaluated with factors already switched to target values and the rest left at source values. This is an exact accounting identity for the chosen counterfactual function. It does not make the contributions uniquely causal: changing the reference populations, variants, or score can change them. Contributions may be negative when a change reduces error, and interaction effects are shared among factors by the averaging rule.

Worked Example: Averaging Frequency and Effect Contributions

Consider one hypothetical variant, for which LD is not a factor. The source score weight is \(b_S=0.20\) phenotype units per allele. The source effect is \(\beta_S=0.20\), and the target effect is \(\beta_T=0.10\). The source allele frequency is \(p_S=0.20\), giving variance \(v_S=0.32\); the target frequency is \(p_T=0.40\), giving variance \(v_T=0.48\). Assume Hardy–Weinberg equilibrium in both populations.

At the source, \(E_S=(0.20-0.20)^2(0.32)=0\). At the target, \(E_T=(0.20-0.10)^2(0.48)=0.0048\) squared phenotype units.

If the effect changes first while the source frequency is retained, error increases by \((0.20-0.10)^2(0.32)=0.0032\); the subsequent frequency change adds \(0.0048-0.0032=0.0016\). In the reverse order, the frequency change made while the source effect matches the score adds zero, and the effect change at the target frequency adds \(0.0048\). Averaging the two possible orders gives an effect contribution \((0.0032+0.0048)/2=0.0040\), and a frequency contribution \((0.0016+0)/2=0.0008\). They sum to the total change, \(0.0040+0.0008=0.0048\).

The frequency contribution is not an additional mismatch by itself: it allocates part of the increase that occurs because the effect mismatch is weighted by a larger target genotype variance. With no effect mismatch, a frequency change alone would leave this genetic prediction error at zero.

Worked Example: How LD Changes Error

For a hypothetical two-variant comparison, suppose the mismatch is \(\delta=(0.10,0.10)^\mathsf{T}\) and both dosage variances are \(0.50\) in both populations. The only change is genotype correlation, from \(r_S=0.20\) to \(r_T=0.80\). This isolates an LD change under the stated covariance model.

The source covariance matrix has diagonal entries \(0.50\) and off-diagonal entries \(0.20\sqrt{0.50(0.50)}=0.10\). Hence $$ E_S=0.10^2(0.50)+0.10^2(0.50)+2(0.10)(0.10)(0.10)=0.0120. $$

In the target, the off-diagonal entries are \(0.80\sqrt{0.50(0.50)}=0.40\), so $$ E_T=0.10^2(0.50)+0.10^2(0.50)+2(0.10)(0.10)(0.40)=0.0180. $$ The error increases by \(0.0060\) squared phenotype units. Here positive LD increases error because both mismatches have the same sign. If one mismatch had the opposite sign, stronger positive LD could instead reduce the error through a negative cross-product. LD does not have a universally harmful direction.

Assumptions, Diagnostics, and Limitations

Before interpreting a decomposition, check that the comparison is on a common phenotype and allele scale. The variants must be harmonized for effect allele, dosage coding, and genome build; otherwise a sign or alignment error can look like effect heterogeneity. Confirm that the reported \(p\), \(D\), and \(R\) refer to the same target samples and variant set. If using \(2p(1-p)\), assess whether Hardy–Weinberg variance is a defensible approximation; otherwise use empirical genotype variances.

The additive model also excludes dominance and gene-by-environment effects unless these are represented explicitly. Population structure or relatedness can distort estimated allele frequencies, LD, and effects, so those quantities should be estimated with appropriate design and adjustment. In finite samples, target effects may be imprecise or unavailable; then the decomposition is an estimate with uncertainty, not a direct observation of the true mechanisms. Resampling individuals or using a suitable model-based procedure can quantify sampling variability, but it cannot repair allele misalignment or an incorrectly specified genetic model.

A further limitation is that real polygenic scores often use tag variants whose weights summarize LD with unobserved or unscored causal variants. In that setting, the simple same-variant effect-mismatch expression is a useful diagnostic framework, not a complete causal partition. A more general prediction-error calculation must use the covariance between score variants and the variants or genetic component defining the target signal. If variants are missing or imputed differently across populations, the comparison must represent that explicitly rather than forcing it into an effect-size category.

The main alternative is to report only an overall portability metric, such as a difference in prediction error or variance explained. Such a metric is easier to estimate and avoids choosing counterfactual substitutions, but it does not identify which mechanisms account for the difference. A sequential decomposition is simpler to calculate and explain, but is order-dependent. The order-averaged approach is symmetric across the three substitutions, but its allocations remain reference-dependent and are not evidence that a mechanism caused a specific fraction of an observed performance gap.

Common Pitfall

Common mistake: “The target allele frequencies and LD differ, so these differences alone must create genetic prediction error.” In the same-variant additive model, if \(b_S=\beta_T\), then \((b_S-\beta_T)=0\) and \(E_T=0\), regardless of \(D_T\) and \(R_T\). Frequency and LD changes alter the weighting of a mismatch; they do not create this defined error when the score exactly matches the target effects. They can still change score variance or other performance measures, which are different quantities.
Key takeaway: Start with the target covariance-weighted mismatch \(E_T=(b_S-\beta_T)^\mathsf{T}D_T R_T D_T(b_S-\beta_T)\). Attribute changes across populations only after specifying the source and target reference settings; report the decomposition as an exact, reference-dependent accounting of prediction-error change, not as a unique causal partition.

Check Your Understanding

Work through each question, then check the brief solutions below.

  1. For one variant, let the weight mismatch be \(0.08\) phenotype units per allele and the target genotype variance be \(0.40\). Calculate target genetic prediction error.
  2. If source and target effects match the score exactly, can a change in LD alone make the defined same-variant genetic prediction error nonzero? Explain.
  3. Why can the LD contribution to an error change be negative in an order-averaged decomposition?
  4. What is the difference between a sequential substitution decomposition and an order-averaged decomposition?
  5. Name two checks needed before interpreting frequency, LD, and effect contributions across populations.

Solutions. (1) \(E=(0.08)^2(0.40)=0.00256\) squared phenotype units. (2) No. If \(b_S=\beta_T\), the mismatch vector is zero, so its covariance-weighted quadratic form is zero for any LD matrix. (3) A target substitution can reduce error relative to the source setting; for example, a covariance change can reduce cross-products between mismatches. The averaged marginal contribution can therefore be negative. (4) A sequential decomposition follows one specified order and assigns interactions according to that order; an order-averaged decomposition averages each factor’s marginal change over all orders. Both sum to the total change for the defined counterfactual function. (5) Examples include checking allele alignment and variant matching, confirming that frequencies and LD use the same samples, and checking Hardy–Weinberg assumptions or using empirical genotype variances.

Clinical Biostats