Tutorials › Multi-Omics Data Integration › Aligning Factor Solutions Across Cohorts

Latent Factor Models and Their Interpretation · Tutorial 242 of 597

Aligning Factor Solutions Across Cohorts

Learn to prepare comparable loading profiles across cohorts and assess their similarity without confusing coordinate alignment with evidence of a shared biological mechanism.

Advanced 12 min read

What You'll Learn

  • Define a common feature space for separately fitted cohort-specific factor models.
  • Distinguish feature harmonization from comparisons of factor scores.
  • Calculate and interpret cosine similarity between loading profiles.
  • Recognize how scaling, missing features, and assay definitions affect alignment.
  • Diagnose when cross-cohort loading comparisons are descriptive rather than interpretable.

Why Align Factor Solutions Across Cohorts?

A factor fitted in one cohort is expressed through loadings on that cohort’s measured features. Comparing it with a factor fitted elsewhere is meaningful only if those loading coordinates refer to the same features, in the same order, with compatible measurement definitions. Without that foundation, apparent agreement or disagreement can be an artefact of mismatched labels, transformations, or assay coverage.

Here, alignment means preparing fitted loading profiles so that their entries refer to a shared, consistently defined set of features, then describing how similar those profiles are. It is a prerequisite for evaluating cross-cohort correspondence, not proof that two fitted factors represent the same biological process. In particular, similar loadings alone do not establish that the underlying associations are causal or that all relevant confounding has been addressed.

Definition: For cohort \(c\), let \(L^{(c)}\) be its fitted loading matrix, with one row per measured feature and one column per fitted factor. A loading profile is one column of \(L^{(c)}\), interpreted together with the feature definitions and transformations used to fit that cohort’s model. A common feature space is a set of features whose identities, definitions, and row ordering are made consistent across the loading matrices being compared.

This tutorial assumes the factor model and its loadings have already been estimated. It focuses on cross-cohort comparability, not on choosing the number of factors or fitting a joint model. The earlier material on interpreting loading patterns across omics provides the context for reading a loading profile within a fitted solution.

Establishing a Common Feature Space

Start with the feature definitions, not with a similarity calculation. For each feature, check its identifier, biological entity, assay, and any mapping from the original measurement to the analysis variable. For example, a gene-level count and a transcript-level abundance are not automatically the same feature, even if their labels look similar. Nor are two probes necessarily interchangeable merely because both are annotated to one gene.

Once the definitions are checked, choose a comparison set. A direct option is the intersection of features measured and usable in every cohort being compared. For each cohort, select the corresponding rows of its loading matrix and reorder those rows according to one shared list. If a feature is absent or cannot be mapped unambiguously, do not silently insert a zero: zero denotes an estimated loading of zero, whereas absence means there is no comparable estimate.

Using an intersection can reduce coverage, sometimes substantially. A broader alternative is to compare only specified feature groups or to use a prespecified mapping to a common resolution, such as a carefully justified gene-level aggregation. Either choice changes the question being answered. The comparison set and mapping should therefore be reported, and conclusions should be limited to that set.

Worked Example: Reordering Loadings to Match Features

Suppose two hypothetical cohorts have fitted one loading profile each. Cohort A reports features in the order \((g_1,g_2,g_3,g_4)\), with loadings \((0.6,0.2,-0.1,0.4)\). Cohort B reports \((g_3,g_1,g_4,g_2)\), with loadings \((-0.05,0.55,0.35,0.25)\). Assume the identifiers have been checked and refer to the same measured entities.

The shared feature order will be \((g_1,g_2,g_3,g_4)\). Cohort A is already in that order. Cohort B must be reordered by taking its \(g_1\) entry second, its \(g_2\) entry fourth, its \(g_3\) entry first, and its \(g_4\) entry third. Its aligned vector is therefore \((0.55,0.25,-0.05,0.35)\).

For example, the \(g_3\) comparison is \(-0.1\) in A versus \(-0.05\) in B; it would have been incorrectly compared with B’s first entry only if the feature labels were ignored. The aligned vectors now have coordinate-wise comparisons that refer to the same four features. This step does not decide whether the two factors correspond; it only makes the comparison well-defined.

The shared feature space must also preserve comparable measurement definitions. Check whether the variables are counts, transformed abundances, methylation proportions, or another quantity, and whether a feature refers to the same genomic region, transcript, or molecular entity across cohorts. Harmonizing names without harmonizing meanings is not adequate.

Preprocessing and Loading Comparability

Loading magnitudes depend on how the measured variables are represented. If each cohort’s features are standardized separately, a loading describes change relative to that cohort’s feature variability. This can be useful for comparing relative patterns, but it does not preserve differences in absolute variability across cohorts. If features are left in raw units, numerical loadings may be incomparable when those units or scales differ.

The factor-model specification also matters. A loading from a model with a particular residual structure or feature-specific adjustment need not have the same interpretation as a loading from a differently specified model. Before comparing profiles, check that the cohorts use compatible transformations, covariate adjustments, and loading conventions. If choices differ, state what the comparison can still support; do not treat a numerical match as automatically comparable evidence.

For a simple descriptive measure, take two aligned loading profiles \(u\) and \(v\), each containing one entry per feature in the common set. Their cosine similarity is the dot product divided by the product of their Euclidean lengths:

$$ \operatorname{cos}(u,v) = \frac{\sum_{j=1}^{p} u_jv_j} {\sqrt{\sum_{j=1}^{p}u_j^2}\sqrt{\sum_{j=1}^{p}v_j^2}} $$

When both profiles are nonzero, this quantity is the inner product of their unit-length versions. It summarizes directional resemblance in the chosen feature coordinates; it is not a probability, a test statistic, or a measure of causal similarity. Its value depends on the features included and on the loading representations being compared.

Justification: Define the normalized profiles \(u^\star=u/\|u\|\) and \(v^\star=v/\|v\|\), where \(\|u\|=\sqrt{\sum_j u_j^2}\). Their inner product is \(u^\star{}^\mathsf{T}v^\star=\sum_j u_jv_j/(\|u\|\|v\|)\), which is exactly the cosine formula. Thus the calculation compares profile direction after removing overall length; it does not compare loading magnitude.

Quantifying Profile Similarity

A cosine near \(1\) indicates that the profiles point in a similar direction in the aligned feature space; a cosine near \(0\) indicates little directional agreement under this measure; and a negative cosine indicates opposing directions. These descriptions are mathematical, not biological conclusions. In particular, a negative value should prompt careful consideration of the model’s loading orientation and interpretation rather than an immediate claim of opposing biology. Resolving orientation and factor-label ambiguities is a distinct step in comparing fitted solutions.

Worked Example: Calculating Cosine Similarity

Suppose two hypothetical cohorts have loading profiles on the same four features: \(u=(0.8,0.4,0,0.2)\) and \(v=(0.7,0.5,0.1,0.1)\). Assume both profiles were obtained using compatible feature definitions and transformations.

The dot product is \(0.8(0.7)+0.4(0.5)+0(0.1)+0.2(0.1)=0.56+0.20+0+0.02=0.78\). The squared lengths are \(0.8^2+0.4^2+0^2+0.2^2=0.84\) and \(0.7^2+0.5^2+0.1^2+0.1^2=0.76\). Therefore,

$$ \operatorname{cos}(u,v) = \frac{0.78}{\sqrt{0.84}\sqrt{0.76}} = \frac{0.78}{\sqrt{0.6384}} \approx 0.976 $$

The profiles have strong directional similarity across these four features. This is a descriptive comparison, not a significance result: it does not quantify sampling uncertainty, show that the factors have identical meanings, or establish that the cohorts share a causal mechanism.

Cosine similarity is not the only useful summary. A feature-by-feature display of aligned loadings can reveal whether resemblance is broad or driven by a few large entries. Correlation of loading values is another descriptive option, but it centers the profiles before comparing them and therefore answers a different question from cosine similarity. A ranked list of the largest absolute loadings can be helpful for interpretation, but discards information about the rest of the profile. Choose summaries that match the scientific question and show the underlying loadings when feasible.

Why Scaling Choices Can Mislead

Worked Example: The Same Standardized Loading, Different Raw Loading

Consider one hypothetical feature measured in two cohorts. Suppose both cohort-specific models use that feature after dividing its centered value by its cohort standard deviation, and both estimate a loading of \(0.5\) in standardized units. The feature’s standard deviation is \(2\) raw units in cohort A and \(8\) raw units in cohort B.

If \(x\) is the centered raw measurement, \(s\) its standard deviation, and \(f\) a factor score, a standardized-feature model writes \(x/s\approx 0.5f\). Multiplying both sides by \(s\) gives \(x\approx (0.5s)f\). Thus the equivalent raw-unit loadings are \(0.5(2)=1\) for cohort A and \(0.5(8)=4\) for cohort B.

The raw-unit loadings differ by a factor of four even though the standardized loadings are equal. Comparing \(1\) with \(4\) as if they measured a difference in relative loading pattern would be misleading. Conversely, using equal standardized loadings does not imply equal raw-scale effects. Report which scale supports the comparison and avoid mixing the two.

A practical diagnostic is to compute or inspect the feature-wise scales and transformations used in each cohort before interpreting loading differences. Also examine whether a few high-magnitude entries dominate a similarity summary. If the conclusion changes sharply when a small number of features are removed, the apparent alignment may be fragile or specific to those features. Such checks are descriptive diagnostics, not substitutes for quantifying uncertainty.

Separate Fits and Alternative Comparisons

Fitting each cohort separately and then comparing harmonized loadings allows cohort-specific structure to emerge. It is useful when the cohorts differ in size or design, or when the goal is to assess reproducibility rather than impose a common latent representation. Its cost is that each fit may produce a different set of factor coordinates, so a similarity between individual profiles is not, by itself, a complete solution to cross-cohort correspondence.

A joint fit instead estimates a shared representation from combined data, potentially with cohort-specific components. It can produce directly comparable shared loading estimates under the joint model’s assumptions, but may conceal real cohort heterogeneity or be dominated by a larger cohort. These are different estimands: the separate-fit comparison asks whether independently fitted patterns resemble one another, whereas a joint model asks what shared structure is estimated under its specified pooling assumptions.

Comparing factor scores answers another question: whether samples occupy similar positions along estimated latent dimensions. Score comparisons depend on compatible sample definitions and score scales and should not be substituted for feature-level loading comparison. Pathway-level summaries can reduce sensitivity to individual features, but may hide differing feature-level profiles or depend on the pathway definitions chosen. No single approach is universally best.

Failure Modes and Limits

  • Comparing rows by position rather than identity. The third row in one matrix may represent a different feature from the third row in another. Verify identifiers and reorder explicitly.
  • Treating missing features as zero loadings. An unmeasured feature has no estimated loading in that cohort. Restrict the comparison or use a defensible, explicit mapping.
  • Assuming equal labels imply equal measurements. Check assay targets, units, transformations, and feature resolution; matching names alone may not establish comparability.
  • Interpreting similarity as factor identity. A high descriptive similarity supports resemblance on the selected features, not identical mechanisms, causal effects, or immunity to confounding.
  • Comparing magnitudes across incompatible scales. Establish whether the loadings refer to raw units, within-cohort standard deviations, or another scale before interpreting their sizes.
  • Relying on one summary statistic. Inspect the aligned feature-level profiles and assess whether a small number of features drive the conclusion.

Alignment is limited by measurement coverage, mapping quality, model specification, and estimation uncertainty. A common feature set can be unrepresentative of the full biology, and a stable-looking descriptive similarity can still be uncertain when loadings are imprecisely estimated. Accordingly, report the feature set, transformations, comparison measure, and important limitations alongside the result.

Key takeaway: A cross-cohort loading comparison is interpretable only after the feature coordinates and measurement scales are made explicit. Harmonize the feature space first, compare profiles with a stated descriptive measure, and treat resemblance as evidence to investigate rather than proof of shared biological identity.

Check Your Understanding

Try these questions, then compare your reasoning with the solutions below.

  1. One cohort’s loading rows are ordered by gene symbol and another’s by probe identifier. What must be done before comparing corresponding entries?
  2. Two aligned profiles have cosine similarity \(0.02\). What can and cannot be concluded from that value?
  3. A feature is absent from one cohort’s assay. Why is inserting a zero loading generally inappropriate?
  4. Both cohorts have standardized loading \(0.4\) for a feature, with standard deviations \(3\) and \(6\) raw units. What are the equivalent raw-unit loadings under the simple scaling relation in the worked example?

Solutions. (1) Verify a valid mapping between the identifiers, select a clearly defined common feature set, and reorder both loading matrices to the same feature list. If mapping is ambiguous, exclude the feature or use a justified mapping rather than assuming equivalence. (2) The profiles show little directional agreement under this cosine measure on the selected features. The value alone does not establish that the factors are unrelated, statistically indistinguishable, or biologically different. (3) Zero represents an estimated absence of loading, while an unmeasured feature has no estimate in that cohort; substituting zero confounds missingness with an observed model result. (4) The raw-unit loadings are \(0.4(3)=1.2\) and \(0.4(6)=2.4\), respectively. The standardized loadings agree, but the raw-unit loadings differ because the feature scales differ.

Clinical Biostats