Tutorials › Multi-Omics Data Integration › Pathway-Informed Priors on Latent Factor Loadings

Using Biological Knowledge as Priors · Tutorial 357 of 597

Pathway-Informed Priors on Latent Factor Loadings

Learn to encode pathway membership as a probabilistic prior on latent-factor loadings and to interpret uncertainty at both pathway and feature levels.

Intermediate 13 min read

What You'll Learn

  • Specify a latent-factor model and a soft pathway-informed prior for its loadings.
  • Distinguish pathway-level inclusion uncertainty from feature-level loading uncertainty.
  • Derive the normal posterior update for a loading under a Gaussian likelihood and prior.
  • Calculate how uncertain pathway membership changes a loading prior and pathway evidence.
  • Diagnose factor non-identifiability, weak pathway support, and overconfident interpretations.
  • Compare soft pathway priors with hard constraints and unstructured shrinkage.

Why Put Pathway Information on Loadings?

A latent factor summarizes a pattern shared across measured features. Its loadings describe how strongly each feature contributes to that pattern. If a group of genes belongs to a biologically defined pathway, it can be useful to let that knowledge inform which features are more likely to have appreciable loadings on a factor. The aim is not to dictate the result: pathway membership should change the prior distribution, while the observed data can still support loadings outside the pathway or weak loadings within it.

This tutorial develops one explicit soft-prior construction. It separates two uncertainties: whether a pathway is relevant to a factor, and whether a particular feature has a practically meaningful loading. These are different questions. A pathway can have substantial posterior support even when some of its members have small loadings; conversely, one feature can have a substantial loading without providing strong evidence that the whole pathway is associated with a factor.

Factor Model and Pathway-Informed Prior

Let \(X_{ij}\) be the measured value for feature \(i\) in sample \(j\), where \(i=1,\ldots,p\) and \(j=1,\ldots,n\). A \(K\)-factor Gaussian model is

$$ X_{ij}\mid Z,\Lambda,\psi_i \sim N\left(\sum_{k=1}^{K}\lambda_{ik}z_{kj},\psi_i\right). $$

Here \(z_{kj}\) is the score of sample \(j\) on factor \(k\), \(\lambda_{ik}\) is the loading of feature \(i\) on factor \(k\), and \(\psi_i\) is the residual variance for feature \(i\). The second argument of \(N\) is a variance. In the examples, features and factor scores are treated as scaled so that loading magnitudes are comparable. In a fitted model, the scale of the scores and loadings must be fixed consistently.

Suppose there are \(G\) candidate pathways. Let \(q_{ig}\in[0,1]\) represent the annotation confidence that feature \(i\) belongs to pathway \(g\), and let \(A_{gk}\) indicate whether pathway \(g\) is relevant to factor \(k\). Set \(A_{gk}=1\) when it is relevant and \(A_{gk}=0\) otherwise, with \(A_{gk}\sim\operatorname{Bernoulli}(\pi_{gk})\). For the loading prior, choose nonnegative pathway weights \(w_g\) that sum to at most one, and define

$$ s_{ik}=\sum_{g=1}^{G}w_gq_{ig}A_{gk}, \qquad v_{ik}=\tau_{\mathrm{out}}^2+ \left(\tau_{\mathrm{in}}^2-\tau_{\mathrm{out}}^2\right)s_{ik}, \qquad \lambda_{ik}\mid A,q\sim N(0,v_{ik}). $$

The prior variance \(v_{ik}\) is larger when feature \(i\) has stronger membership in pathways considered relevant to factor \(k\). Typically, \(\tau_{\mathrm{in}}^2>\tau_{\mathrm{out}}^2\): the prior permits larger loadings for pathway-aligned features but shrinks other loadings more strongly toward zero. The weights and the bound on their sum keep \(s_{ik}\) between zero and one. This is a soft prior: neither pathway membership nor pathway relevance fixes a loading to a particular value.

Definition: In this construction, pathway-level uncertainty is uncertainty about \(A_{gk}\), whether pathway \(g\) is relevant to factor \(k\). Feature-level loading uncertainty is uncertainty about \(\lambda_{ik}\) for a particular feature and factor, including its sign and magnitude. Posterior probabilities for these quantities answer different questions and should not be interchanged.

This variance-interpolation prior is one modeling choice, not a universal definition of pathway-informed modeling. It treats \(q_{ig}\) as a graded annotation confidence in the prior variance. A different model could represent membership uncertainty with a mixture distribution; that model would have different prior and posterior calculations. The assumptions here include a suitable likelihood, a prespecified annotation map, and prior hyperparameters chosen on the scale of the loadings. Conditional on the pathway indicators, the displayed loading priors are independent; this conditional independence is a modeling assumption, not a biological fact.

What the Prior Does to a Loading

A simple conditional calculation makes the shrinkage effect explicit. Suppose the other model quantities are fixed and the likelihood for one loading can be summarized by an estimate \(\widehat{\lambda}\) with standard error \(s_\lambda\), so that

$$ \widehat{\lambda}\mid\lambda\sim N(\lambda,s_\lambda^2), \qquad \lambda\sim N(0,v). $$

Multiplying these two normal densities and completing the square gives a normal posterior. Specifically, the terms involving \(\lambda\) in the log density are proportional to \(-(\widehat{\lambda}-\lambda)^2/s_\lambda^2-\lambda^2/v\). The coefficient of \(\lambda^2\) is \(1/s_\lambda^2+1/v\), and the linear coefficient is \(2\widehat{\lambda}/s_\lambda^2\). Therefore the posterior variance is the inverse of that quadratic coefficient and the posterior mean is that variance times \(\widehat{\lambda}/s_\lambda^2\):

$$ \lambda\mid\widehat{\lambda}\sim N\left( \frac{v}{v+s_\lambda^2}\widehat{\lambda}, \frac{vs_\lambda^2}{v+s_\lambda^2} \right). $$

The posterior mean is a weighted version of the data estimate. A larger prior variance \(v\) gives the data estimate more weight; a smaller \(v\) pulls the estimate more strongly toward zero. This derivation is conditional on the other model quantities and a normal approximation to the loading likelihood. In a full latent-factor model, factor scores, loadings, residual variances, and pathway indicators are usually inferred jointly, so this calculation illustrates the mechanism rather than replacing joint inference.

Worked Example: Different Shrinkage for a Pathway Member

Suppose one feature has a pathway-supported prior variance \(v=0.64\), while an otherwise comparable feature outside the pathway has \(v=0.04\). For either feature, suppose the likelihood summary is \(\widehat{\lambda}=0.80\) with standard error \(s_\lambda=0.30\). These are hypothetical values on the model's loading scale.

For the pathway-supported feature, \(s_\lambda^2=0.09\). The posterior mean and variance are

$$ \frac{0.64}{0.64+0.09}(0.80)=0.7014, \qquad \frac{(0.64)(0.09)}{0.64+0.09}=0.07890. $$

Its posterior standard deviation is \(\sqrt{0.07890}=0.2809\). For the feature outside the pathway, the corresponding calculations are

$$ \frac{0.04}{0.04+0.09}(0.80)=0.2462, \qquad \frac{(0.04)(0.09)}{0.04+0.09}=0.02769, $$

with posterior standard deviation \(\sqrt{0.02769}=0.1664\). The same likelihood estimate is pulled less toward zero for the pathway-supported feature because its prior allows larger loading magnitudes. The smaller posterior standard deviation outside the pathway does not mean that the outside feature has stronger evidence: it partly reflects the more concentrated prior.

Uncertainty About Whether a Pathway Is Relevant

When pathway relevance is uncertain, it is not enough to report loadings conditional on \(A_{gk}=1\). The data should also update the probability that the pathway is relevant. For one pathway and one loading, the updating calculation has a transparent form. Under \(A=1\), let the loading prior be \(N(0,v_1)\); under \(A=0\), let it be \(N(0,v_0)\). With the normal likelihood summary above, integrating out the loading gives

$$ \widehat{\lambda}\mid A=a\sim N(0,v_a+s_\lambda^2), \qquad \frac{P(A=1\mid\widehat{\lambda})}{P(A=0\mid\widehat{\lambda})} = \frac{P(A=1)}{P(A=0)} \frac{f_1(\widehat{\lambda})}{f_0(\widehat{\lambda})}, $$

where \(f_a\) is the normal density with variance \(v_a+s_\lambda^2\). This is Bayes' rule: the prior odds are multiplied by the Bayes factor, the ratio of the two marginal likelihoods. In a model with many features, the pathway-level posterior uses their joint information under the specified model, rather than treating one feature as the whole pathway.

Worked Example: Updating Pathway-Level Relevance

Consider one hypothetical feature with membership confidence \(q=0.60\). For an active pathway, set \(\tau_{\mathrm{in}}^2=0.25\) and \(\tau_{\mathrm{out}}^2=0.01\), giving

$$ v_1=0.60(0.25)+0.40(0.01)=0.154. $$

For an inactive pathway, set \(v_0=0.04\). Suppose the likelihood summary is \(\widehat{\lambda}=0.70\) with \(s_\lambda=0.40\), and the prior probability of pathway relevance is \(P(A=1)=0.30\). The marginal variances of the estimate are \(0.154+0.16=0.314\) when active and \(0.04+0.16=0.20\) when inactive. The Bayes factor is

$$ \frac{f_1(0.70)}{f_0(0.70)} = \sqrt{\frac{0.20}{0.314}}\, \exp\left\{-\frac{0.70^2}{2} \left(\frac{1}{0.314}-\frac{1}{0.20}\right)\right\} \approx 1.245. $$

The prior odds are \(0.30/0.70=0.4286\). The posterior odds are \(0.4286(1.245)=0.5336\), so

$$ P(A=1\mid\widehat{\lambda}=0.70) = \frac{0.5336}{1+0.5336} \approx 0.348. $$

The estimate favors the active-pathway model only modestly: the posterior probability rises from 0.30 to about 0.348 under this simplified one-feature calculation. It does not establish that the pathway is biologically active. In a full analysis, the pathway-level probability should reflect the joint model for all relevant features and uncertainty in other latent quantities.

Feature-Level Uncertainty and Interpretation

A pathway-level probability does not state which members have appreciable loadings. For that purpose, report feature-level posterior summaries. A probability such as \(P(|\lambda_{ik}|>\delta\mid X)\) asks whether the loading exceeds a prespecified practically meaningful magnitude \(\delta\) on the chosen scale. It is more informative than simply labeling a loading “present” or “absent,” but its value depends on the scale and the chosen threshold. A posterior sign probability, such as \(P(\lambda_{ik}>0\mid X)\), answers a different question.

Worked Example: Probability of a Meaningful Feature Loading

Suppose a feature has a hypothetical likelihood estimate \(\widehat{\lambda}=0.60\) with standard error \(0.20\), and a pathway-informed prior \(N(0,0.09)\). The posterior mean and variance are

$$ \mu_{\mathrm{post}}=\frac{0.09}{0.09+0.04}(0.60)=0.4154, \qquad \sigma_{\mathrm{post}}^2=\frac{(0.09)(0.04)}{0.13}=0.02769. $$

Thus the posterior standard deviation is \(0.1664\). If a meaningful loading is defined in advance as having magnitude greater than \(\delta=0.30\), then

$$ P(|\lambda|>0.30\mid X) = \Phi\left(\frac{-0.30-0.4154}{0.1664}\right) + 1-\Phi\left(\frac{0.30-0.4154}{0.1664}\right) \approx 0.756. $$

Under this conditional normal calculation, the posterior probability that the loading exceeds 0.30 in magnitude is about 0.756. It is not a probability that the feature is truly a pathway member, nor does it establish a causal role. If the loading scale changes, the threshold must be reconsidered.

Assumptions, Diagnostics, and Alternatives

The interpretation of these priors depends on both the latent-factor model and the biological annotations. The Gaussian likelihood is a modeling choice appropriate for suitably transformed continuous measurements; other measurement types require an appropriate likelihood. Residual structure, missingness, and dependence across samples must also be handled consistently with the data. The annotations are treated as prior information, not as additional measured outcomes. Prior variances and inclusion probabilities should be specified on a meaningful scale, and conclusions should be checked for dependence on them.

Latent factors have an identifiability issue: different combinations of scores and loadings can represent the same fitted matrix. In particular, reversing the sign of every score and loading for one factor leaves the model fit unchanged. More general rotations can also create equivalent representations unless constraints or prior structure resolve them. Therefore, compare loading signs only after a consistent factor orientation and labeling convention has been established. A pathway prior may encourage a particular orientation or alignment, but pathway membership alone does not imply a positive loading, a regulatory direction, or a causal effect.

Useful diagnostics include checking whether posterior loadings are concentrated almost entirely by the prior rather than by the likelihood, whether pathway indicators remain uncertain, and whether a small change in annotation confidence changes factor interpretation sharply. Inspect posterior summaries for both \(A_{gk}\) and \(\lambda_{ik}\), and compare fitted patterns with the observed feature covariance structure. If the model assigns nearly all relevant loadings to a pathway solely because its prior variance is large, revisit the prior scales and the factor identification. Overlapping pathways can also make pathway-level explanations difficult to distinguish; correlated annotations may yield diffuse or competing posterior support.

A hard constraint sets nonmembers' loadings exactly to zero, which can simplify interpretation but cannot accommodate genuine signal outside the annotation. Unstructured shrinkage applies a common loading prior without pathway information; it avoids reliance on annotations but does not use them to guide alignment. Post-hoc pathway enrichment asks whether an estimated factor is enriched for pathway members, but it does not incorporate pathway uncertainty into loading estimation. The earlier material on Pathway-Level Hierarchical Priors for Omics Effects concerns pathway structure in omics effects; here the prior acts specifically on loadings that define latent factors. No approach makes an annotation correct by assumption: soft priors reduce the cost of an imperfect map but do not eliminate bias from misspecified biological knowledge.

Common pitfall: “A feature belongs to the pathway, so its loading must be large and positive.” That reasoning confuses annotation with evidence and treats a soft prior as a hard constraint. In this model membership can increase prior variance, while the data can still support a loading near zero or with either sign. A pathway prior does not specify regulatory direction or causation.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. If \(q=0.25\), \(\tau_{\mathrm{in}}^2=0.36\), \(\tau_{\mathrm{out}}^2=0.04\), and the pathway is active, what is the loading prior variance?
  2. In the normal update, what happens to the posterior mean as \(v\) becomes very small relative to \(s_\lambda^2\)?
  3. Does a large \(P(A_{gk}=1\mid X)\) guarantee that every feature in pathway \(g\) has a large loading? Explain.
  4. Why must factor signs be oriented consistently before comparing loading signs across fitted models?
  5. What does \(P(|\lambda_{ik}|>0.30\mid X)=0.756\) mean, and what does it not mean?

Solutions. (1) \(v=0.25(0.36)+0.75(0.04)=0.09+0.03=0.12\). (2) Since the posterior mean is \(v\widehat{\lambda}/(v+s_\lambda^2)\), it approaches zero as \(v\) becomes small relative to \(s_\lambda^2\). (3) No. The pathway probability concerns pathway relevance to the factor; individual loadings can remain small or uncertain. (4) Reversing both the scores and loadings of a factor leaves the fitted values unchanged, so an unaligned sign has no stable interpretation. (5) It is the posterior probability, under the stated model and loading scale, that the feature's loading magnitude exceeds 0.30. It is not the probability that pathway membership is true, nor evidence of causation.

Clinical Biostats