Tutorials › Multi-Omics Data Integration › Worked Example Separating Shared And Private Factors

Latent Factor Models and Their Interpretation · Tutorial 256 of 597

Worked Example Separating Shared And Private Factors

Work through a simulated two-view factor model, fit its loadings from known scores, and separate shared from view-specific signal while checking the assumptions behind that decomposition.

Advanced 12 min read

What You'll Learn

  • Define shared scores, view-specific scores, loadings, and residuals for two omics views.
  • Fit loadings by least squares when the simulated factor scores are known.
  • Compare fitted coefficients with the known generating loadings.
  • Calculate shared and private signal contributions for each view.
  • State the cross-view assumptions needed to isolate shared covariance.
  • Recognize when orthogonality, residual, or factor-identification problems undermine interpretation.

Why Separate Shared and View-Specific Factors?

Two omics views measured on the same subjects can contain variation that moves together across views, as well as variation particular to one view. A factor model makes this distinction explicit: shared factors have scores common to the views, while private factors have view-specific scores. The distinction is useful, but it is not automatic. A factor should be called shared only relative to a model and its assumptions, and a fitted decomposition need not reproduce the generating structure exactly.

We work with two centered data matrices, \(X^{(1)}\) and \(X^{(2)}\), with the same \(n\) subjects in the same row order. The matrix \(X^{(v)}\) has \(p_v\) features for view \(v\). Centering means that each feature has mean zero across these subjects; in applications, covariate adjustment may also be needed, as in the earlier material on covariate-adjusted multi-omics factor models.

Definition: A two-view shared-and-private factor model is $$ X^{(v)}=ZA_v^\mathsf{T}+U^{(v)}B_v^\mathsf{T}+E^{(v)}, \qquad v=1,2. $$ Here \(Z\) is the \(n\times r\) matrix of shared subject scores; \(U^{(v)}\) is the \(n\times q_v\) matrix of scores private to view \(v\); \(A_v\) and \(B_v\) are the corresponding feature-loading matrices, of dimensions \(p_v\times r\) and \(p_v\times q_v\); and \(E^{(v)}\) is the residual matrix. A row of a score matrix gives a subject’s factor scores, and a row of a loading matrix gives a feature’s coefficients on those factors.

The model alone does not uniquely name or scale its factors. For example, replacing \(Z\) by \(ZQ\) and \(A_v\) by \(A_vQ^{-\mathsf{T}}\), for an invertible matrix \(Q\), leaves the shared fitted values unchanged. Sign changes and permutations are also possible. Thus, comparisons with a known generating structure require a fixed convention for score scaling and factor order, or a suitable alignment of the estimated solution. The worked example fixes both by using known scores and a specified order.

For the calculations below, use the empirical cross-product \(n^{-1}M^\mathsf{T}N\). Assume the scores are centered and have unit empirical variance, so \(Z^\mathsf{T}Z/n=I_r\) and \(U^{(v)\mathsf{T}}U^{(v)}/n=I_{q_v}\). For a clean separation within each view, also assume \(Z^\mathsf{T}U^{(v)}/n=0\), and that each residual is empirically uncorrelated with that view’s scores. These are transparent conditions for the example, not guarantees supplied by fitting a factor model.

A Simulated Dataset With Known Structure

Consider four hypothetical subjects and one shared factor. Use one private factor for each view. The score vectors are \(z=(1,1,-1,-1)^\mathsf{T}\), \(u^{(1)}=(1,-1,1,-1)^\mathsf{T}\), and \(u^{(2)}=(1,-1,-1,1)^\mathsf{T}\). Each is centered and has squared length four, so its empirical variance under the \(1/n\) convention is one. Their pairwise cross-products are zero. Generate two features in each view, without residual noise:

$$ X^{(1)}=z(2,1)+u^{(1)}(1,-2), \qquad X^{(2)}=z(1.5,-1)+u^{(2)}(2,1). $$

The row-vector notation in these expressions means that each score vector is multiplied by the displayed row of feature coefficients. Equivalently, the generating loadings are \(A_1=(2,1)^\mathsf{T}\), \(B_1=(1,-2)^\mathsf{T}\), \(A_2=(1.5,-1)^\mathsf{T}\), and \(B_2=(2,1)^\mathsf{T}\). The resulting data are:

SubjectView 1, feature 1View 1, feature 2View 2, feature 1View 2, feature 2
13-13.50
213-0.5-2
3-1-3-3.50
4-310.52

Worked Example: Recovering Loadings From Known Scores

Fit the loadings for each feature by least squares, treating the shared and relevant private scores as known. For a feature vector \(x\) in view \(v\), the model is \(x=za+u^{(v)}b+e\). Since the two score vectors are orthogonal and each has squared length four, the least-squares coefficients are \(a=z^\mathsf{T}x/4\) and \(b=u^{(v)\mathsf{T}}x/4\).

For view 1, feature 1 is \(x=(3,1,-1,-3)^\mathsf{T}\). Its shared coefficient is \(a=(3+1+1+3)/4=8/4=2\). Its private coefficient is \(b=(3-1-1+3)/4=4/4=1\). Thus the fitted feature is \(2z+u^{(1)}\), exactly as generated.

For view 1, feature 2 is \(x=(-1,3,-3,1)^\mathsf{T}\). The coefficients are \(a=(-1+3+3-1)/4=4/4=1\) and \(b=(-1-3-3-1)/4=-8/4=-2\). For view 2, feature 1 gives \(a=(3.5-0.5+3.5-0.5)/4=6/4=1.5\) and \(b=(3.5+0.5-3.5-0.5)/4=0\)? This last expression must use \(u^{(2)}=(1,-1,-1,1)^\mathsf{T}\), so the private projection is \((3.5+0.5+3.5+0.5)/4=8/4=2\). View 2, feature 2 gives \(a=(0-2+0-2)/4=-1\) and \(b=(0+2+0+2)/4=1\).

The fitted coefficient vectors therefore equal the generating values: \(A_1=(2,1)^\mathsf{T}\), \(B_1=(1,-2)^\mathsf{T}\), \(A_2=(1.5,-1)^\mathsf{T}\), and \(B_2=(2,1)^\mathsf{T}\). This is an exact recovery because the scores are supplied, the score design is orthogonal, and the data have no residual component. It is not evidence that unknown scores can generally be recovered without ambiguity.

What the Cross-View Product Does—and Does Not—Measure

A shared score can induce cross-view covariance because it contributes to both views. But taking a cross-product of the observed matrices does not, by itself, isolate that contribution. To see why, substitute the factor models into \(X^{(v)\mathsf{T}}X^{(w)}/n\), for \(v\ne w\). The complete expansion is

$$ \begin{aligned} \frac{X^{(v)\mathsf{T}}X^{(w)}}{n} ={}&A_v\frac{Z^\mathsf{T}Z}{n}A_w^\mathsf{T} +A_v\frac{Z^\mathsf{T}U^{(w)}}{n}B_w^\mathsf{T} +A_v\frac{Z^\mathsf{T}E^{(w)}}{n}\\ &+B_v\frac{U^{(v)\mathsf{T}}Z}{n}A_w^\mathsf{T} +B_v\frac{U^{(v)\mathsf{T}}U^{(w)}}{n}B_w^\mathsf{T} +B_v\frac{U^{(v)\mathsf{T}}E^{(w)}}{n}\\ &+\frac{E^{(v)\mathsf{T}}Z}{n}A_w^\mathsf{T} +\frac{E^{(v)\mathsf{T}}U^{(w)}}{n}B_w^\mathsf{T} +\frac{E^{(v)\mathsf{T}}E^{(w)}}{n}. \end{aligned} $$

Consequently, the exact finite-sample equality \(X^{(v)\mathsf{T}}X^{(w)}/n=A_vA_w^\mathsf{T}\) requires more than zero cross-view residual cross-product. Under the unit score normalization, it holds if the cross-view private-score products \(U^{(v)\mathsf{T}}U^{(w)}/n\) and the cross-products between scores and residuals in both views are zero, as well as \(E^{(v)\mathsf{T}}E^{(w)}/n=0\). The score-residual conditions include \(Z^\mathsf{T}E^{(w)}/n\), \(U^{(v)\mathsf{T}}E^{(w)}/n\), \(E^{(v)\mathsf{T}}Z/n\), and \(E^{(v)\mathsf{T}}U^{(w)}/n\), along with the score cross-products shown in the expansion. Omitting any nonzero term can give an incorrect decomposition.

For a population cross-covariance result, use the same expansion with expectations in place of empirical cross-products. If residuals are uncorrelated with latent scores in both views, private scores are uncorrelated across views, and residuals have zero cross-view covariance, then only the shared term remains. Under unit score covariance, the population cross-covariance is \(A_vA_w^\mathsf{T}\). In the finite simulated dataset above, all score vectors are mutually orthogonal and the residuals are zero, so the exact equality applies.

Worked Example: Checking the Shared Cross-View Contribution

For the simulated data, calculate \(X^{(1)\mathsf{T}}X^{(2)}/4\). The shared-loading prediction is

$$ A_1A_2^\mathsf{T} = \begin{pmatrix}2\\1\end{pmatrix} \begin{pmatrix}1.5&-1\end{pmatrix} = \begin{pmatrix}3&-2\\1.5&-1\end{pmatrix}. $$

Directly from the data, the first entry is \((3\cdot3.5+1\cdot(-0.5)+(-1)\cdot(-3.5)+(-3)\cdot0.5)/4=12/4=3\). The upper-right entry is \((3\cdot0+1\cdot(-2)+(-1)\cdot0+(-3)\cdot2)/4=-8/4=-2\). The lower-left entry is \(((-1)\cdot3.5+3\cdot(-0.5)+(-3)\cdot(-3.5)+1\cdot0.5)/4=6/4=1.5\). The lower-right entry is \(((-1)\cdot0+3\cdot(-2)+(-3)\cdot0+1\cdot2)/4=-4/4=-1\). Thus, the observed cross-view product matches the shared contribution exactly. The match follows from the construction and orthogonality; it is not a general property of arbitrary fitted models.

Comparing Shared and Private Signal Contributions

A simple measure of the fitted contribution of a factor set to one view is its squared Frobenius norm divided by \(n\). Under the stated unit score scaling and orthogonality, the shared contribution in view \(v\) is \(\lVert ZA_v^\mathsf{T}\rVert_F^2/n=\lVert A_v\rVert_F^2\), and the private contribution is \(\lVert U^{(v)}B_v^\mathsf{T}\rVert_F^2/n=\lVert B_v\rVert_F^2\). This follows by expanding the squared norm and using \(Z^\mathsf{T}Z/n=I\) or \(U^{(v)\mathsf{T}}U^{(v)}/n=I\). The total fitted signal is the sum of these contributions only if the shared and private fitted components are orthogonal within the view. Otherwise their cross-term must also be included.

Worked Example: Comparing the Generating Contributions

For view 1, the squared loading norm for the shared factor is \(2^2+1^2=5\), and for the private factor it is \(1^2+(-2)^2=5\). The total fitted signal energy per subject is therefore \(5+5=10\), with a shared fraction of \(5/10=0.500\).

For view 2, the shared contribution is \(1.5^2+(-1)^2=2.25+1=3.25\), while the private contribution is \(2^2+1^2=5\). The total is \(8.25\), and the shared fraction is \(3.25/8.25=0.3939\). Across both views, the shared energy is \(5+3.25=8.25\), the private energy is \(5+5=10\), and the shared fraction of the combined fitted signal energy is \(8.25/(8.25+10)=0.4521\).

These fractions describe this simulated construction under its chosen factor scaling. They are not percentages of biological variation attributable to a causal process. In real data, residual energy, preprocessing, feature scaling, and factor non-identifiability affect the interpretation.

Diagnostics, Alternatives, and Limitations

A useful diagnostic is to inspect whether the fitted shared scores align across views and whether each view retains systematic structure in its residuals. Also check score cross-products, residual-score cross-products, residual cross-view covariance, and within-view shared-private cross-products if using an orthogonal decomposition. Large remaining structure in residuals, nearly collinear score directions, or a decomposition that changes markedly under resampling are warnings that the factors are not cleanly separated. The earlier material on factor stability and residual diagnostics develops these checks in broader settings.

The least-squares calculation above is appropriate because the scores are known and the model is linear. In practical applications, scores are usually unknown and must be estimated jointly with loadings; different algorithms or constraints can produce different but observationally similar solutions. An alternative is to analyze each view separately, which can describe view-specific structure but does not directly impose shared scores. Another is a joint model that constrains some scores or loadings to be common; it can improve integration but risks forcing unrelated patterns together. No option removes the need to examine assumptions and sensitivity.

The main pitfall is to see a nonzero cross-view product and conclude that it is entirely due to shared factors. That reasoning silently discards private-score and residual terms in the expansion. The correction is to state the cross-view orthogonality and residual-uncorrelation assumptions explicitly, or to report the cross-view product as a mixture of contributions rather than as a pure shared signal. Likewise, a small residual cross-product alone does not establish the needed score-residual conditions.

Key takeaway: Shared and private contributions are interpretable only relative to a specified factor model, score scaling, and cross-product assumptions. In a controlled simulation, compare fitted loadings and energies with the known generating values; in real data, treat that comparison as unavailable and report diagnostics and uncertainty instead.

Check Your Understanding

Answer each question, then compare with the brief solutions below.

  1. Why do the known-score loading estimates in the simulation equal the generating coefficients?
  2. Which condition is missing if one assumes only that \(E^{(1)\mathsf{T}}E^{(2)}/n=0\) when interpreting a cross-view product?
  3. Under unit score scaling and within-view orthogonality, what is the shared energy in view 1, and what fraction of its fitted signal energy is shared?
  4. Give one reason the fitted shared factor in an actual analysis may not match a generating factor exactly.

Solutions. (1) The score vectors are known, centered, mutually orthogonal, and each has squared length four; projection onto the two predictors therefore recovers their coefficients exactly, and the residual is zero. (2) The score-residual cross-products must also vanish, including \(Z^\mathsf{T}E^{(2)}/n\), \(U^{(1)\mathsf{T}}E^{(2)}/n\), \(E^{(1)\mathsf{T}}Z/n\), and \(E^{(1)\mathsf{T}}U^{(2)}/n\); private scores must also be uncorrelated across views. (3) The shared energy is \(2^2+1^2=5\); private energy is also 5, so the shared fraction is \(5/(5+5)=0.500\). (4) Scores are unknown and factors have sign, permutation, scale, and more general rotation ambiguities; noise, model misspecification, or unstable estimation can also alter the fitted solution.

Clinical Biostats