Why Approximate the Posterior?
A multi-omics factor model represents aligned samples using latent scores and view-specific feature loadings. Even with a simple Gaussian observation model, the posterior distribution of all scores and loadings is generally dependent and can be costly to calculate exactly. Variational inference replaces that posterior with a tractable distribution chosen to approximate it. The choice of approximation determines both the computation and which posterior dependencies can be represented.
The central objective is the evidence lower bound, or ELBO. Maximizing it improves the chosen approximation to the posterior while also giving a lower bound on the marginal log probability of the observed data. Coordinate updates make this optimization practical when the number of samples and features is large.
A Gaussian Multi-Omics Model and Variational Family
For a precise derivation, consider \(V\) aligned omics views. In view \(v\), let \(Y_v\) be an \(n \times p_v\) data matrix, \(Z\) an \(n \times K\) matrix of sample scores, and \(W_v\) a \(p_v \times K\) matrix of feature loadings. Write \(z_i\) for the \(K\)-vector of scores for sample \(i\), and \(w_{vj}\) for the \(K\)-vector of loadings for feature \(j\) in view \(v\). For observed entries, use the model
Assume entries are conditionally independent given the scores and loadings. The precision \(\tau_{vj}\) is treated as known and positive. To make the example model fully specified, use independent standard-normal priors \(z_i\sim N(0,I_K)\) and \(w_{vj}\sim N(0,I_K)\). This is a convenient baseline model, not a claim that these prior choices suit every analysis. Let \(\Omega_v\) denote the set of observed sample-feature pairs in view \(v\); missing entries contribute no likelihood term.
This factorization is an approximation, not a property of the model’s exact posterior. In particular, it removes posterior dependence between a score and its loadings, and between different score or loading vectors. The approximation retains uncertainty within each vector through its covariance matrix.
The ELBO and Its Coordinate Updates
Let \(Y_{\mathrm{obs}}\) denote all observed entries. For any normalized \(q\) supported wherever the posterior is supported, the ELBO is
The bound follows by writing the marginal likelihood as an expectation under \(q\) and applying Jensen’s inequality:
Equivalently, the gap is a Kullback–Leibler divergence: \(\log p(Y_{\mathrm{obs}})-\mathcal{L}(q)=\operatorname{KL}\{q(Z,W)\,\|\,p(Z,W\mid Y_{\mathrm{obs}})\}\), which is nonnegative. Thus maximizing the ELBO over a chosen family minimizes this divergence within that family. A larger ELBO does not by itself establish that the family captures all posterior structure.
For this Gaussian model, define the second moments \(R_i=S_i+m_im_i^\mathsf{T}\) and \(Q_{vj}=C_{vj}+a_{vj}a_{vj}^\mathsf{T}\). The mean-field coordinate optimum for one factor is proportional to the exponential of the expected log joint density, where the expectation is over all other factors. Applying this result gives
The identity matrices come from the standard-normal priors. The loading second moments enter the score precision; the score second moments enter the loading precision. The means use the other factor’s current mean. These are coordinate updates: update one block using the current expected moments of the other block, then alternate. Each exact coordinate maximization cannot decrease the ELBO, although it need not find the global maximum.
Worked Example: Updating One Score and One Loading
Suppose a hypothetical single-view model has one sample, one feature, one factor, observed value \(y=2\), and precision \(\tau=1\). Begin with the loading approximation \(q(w)=N(1,1)\). Its second moment is \(E_q(w^2)=1^2+1=2\).
Using the score update, the posterior variance under the variational factor is \(S=(1+\tau E_q(w^2))^{-1}=(1+2)^{-1}=1/3\). Its mean is \(m=S\tau yE_q(w)=\frac{1}{3}(1)(2)(1)=2/3\). Thus \(q(z)=N(2/3,1/3)\).
Now update the loading. The score second moment is \(E_q(z^2)=S+m^2=1/3+4/9=7/9\). Therefore \(C=(1+\tau E_q(z^2))^{-1}=(1+7/9)^{-1}=9/16\), and \(a=C\tau ym=(9/16)(1)(2)(2/3)=3/4\). The updated loading factor is \(q(w)=N(3/4,9/16)\). These are coordinate updates for the stated model and current factors, not a claim that one pass has reached convergence.
Calculating and Interpreting the Bound
For the Gaussian model, the expected squared residual for an observed entry is
This identity uses independence of \(q(z_i)\) and \(q(w_{vj})\), so that the expected squared inner product is \(\operatorname{tr}(R_iQ_{vj})\). The likelihood contribution to the ELBO is the sum, over observed entries, of \(-\frac12\{\log(2\pi/\tau_{vj})+\tau_{vj}\mathbb{E}_q[(y_{vij}-z_i^\mathsf{T}w_{vj})^2]\}\). The remaining terms are expected log priors minus the entropy of \(q\), where entropy is \(-\mathbb{E}_q[\log q]\). Including these terms matters: fitting expected squared residuals alone is not ELBO optimization.
Worked Example: Evaluating an ELBO at a Simple Approximation
Consider one hypothetical observation \(y=1\) under the scalar model \(y\mid z,w\sim N(zw,1)\), with independent \(z,w\sim N(0,1)\). Evaluate the ELBO at \(q(z)=N(0,1)\) and \(q(w)=N(0,1)\). Since the factors are independent, \(E_q(zw)=0\) and \(E_q[(1-zw)^2]=1+E_q(z^2)E_q(w^2)=2\).
The expected log likelihood is \(-\frac12\{\log(2\pi)+2\}=-1.9189\). For each of \(z\) and \(w\), the expected log prior is \(-\frac12\{\log(2\pi)+1\}=-1.4189\), while the Gaussian entropy is \(\frac12\log(2\pi e)=1.4189\). Each prior-plus-entropy contribution is therefore zero. Adding the likelihood gives \(\mathcal{L}(q)=-1.9189\). This is a lower bound on \(\log p(y=1)\) for the specified model and this particular \(q\); it is not the marginal log likelihood itself.
Worked Example: Combining Evidence Across Two Omics Views
For one hypothetical sample and one factor, suppose view 1 has an observed value \(y_1=1\), precision \(\tau_1=1\), and loading factor \(N(a_1,C_1)=N(1,0.25)\). View 2 has \(y_2=2\), \(\tau_2=0.5\), and loading factor \(N(a_2,C_2)=N(2,0.5)\). The loading second moments are \(Q_1=0.25+1^2=1.25\) and \(Q_2=0.5+2^2=4.5\).
The score precision is \(1+\tau_1Q_1+\tau_2Q_2=1+1.25+0.5(4.5)=4.5\), so its variance is \(S=1/4.5=2/9\). The score mean is \(m=S\{\tau_1y_1a_1+\tau_2y_2a_2\}=(2/9)\{1(1)(1)+0.5(2)(2)\}=(2/9)(3)=2/3\). Both views contribute to the same score update, with their precisions weighting their contributions.
Computation, Diagnostics, and Alternatives
The coordinate formulas explain the computational appeal. Each score update only requires the observed features for that sample; each loading update only requires the observed samples for that feature. If entries are missing, the sums use observed pairs only. Accumulating the relevant \(K \times K\) second moments avoids forming or storing a full joint covariance over every score and loading. With dense data, full covariance factors can still be expensive as \(K\) grows; diagonal covariance factors reduce memory and computation, at the cost of a more restrictive approximation.
Check that the ELBO is finite and nondecreasing across exact coordinate updates, and inspect expected residuals and predictive performance rather than relying on the bound alone. A falling ELBO may indicate an implementation error, inconsistent updates, or an inaccurate numerical calculation. A stable ELBO does not prove that the approximation is adequate: mean-field factorization can understate posterior uncertainty when scores and loadings are strongly dependent. Different initializations can also lead to different local optima. For non-Gaussian observation models, the Gaussian coordinate formulas above do not apply directly; an appropriate expected-likelihood calculation or additional approximation is required.
Variational inference differs from expectation-maximization in its target: it optimizes a distribution over latent quantities, rather than using an E-step and M-step to optimize a point estimate of model parameters. Compared with posterior sampling methods such as Markov chain Monte Carlo, coordinate variational inference is often faster and easier to scale, but generally gives a less flexible representation of posterior dependence. These methods answer related but distinct computational needs; the appropriate comparison depends on the desired uncertainty representation and available computation.
Check Your Understanding
Work through the questions, then compare your reasoning with the solutions.
- In the Gaussian model, why does the score update use \(E_q(w_{vj}w_{vj}^{\mathsf T})\), rather than only the outer product of the loading mean?
- For \(K=1\), suppose one observed feature has \(\tau=2\), \(y=1\), and a current loading factor with \(a=1\) and \(C=1\). Find the updated score variance and mean for that feature, including the standard-normal score prior.
- What does the difference between the log evidence and the ELBO equal, and why is it nonnegative?
- Give one computational advantage and one inferential limitation of the mean-field factorization.
Solutions. (1) The score’s quadratic term involves \(E_q(ww^\mathsf{T})=C+aa^\mathsf{T}\); omitting \(C\) discards loading uncertainty from the score precision. (2) Here \(E_q(w^2)=1+1=2\), so \(S=(1+2\cdot2)^{-1}=1/5\), and \(m=S(2\cdot1\cdot1)=2/5\). (3) The difference is \(\operatorname{KL}\{q(Z,W)\,\|\,p(Z,W\mid Y_{\mathrm{obs}})\}\), which is nonnegative by the nonnegativity of Kullback–Leibler divergence. (4) The factorization permits updates using local sums instead of a full joint posterior covariance; it cannot represent dependence between scores and loadings and may therefore understate posterior uncertainty.