Tutorials › Multivariate Statistics (Graduate) › Marginalization, Latent Variables, And Spurious Graph Edges

Sparse Precision and Graphical Models · Tutorial 843 of 975

Marginalization, Latent Variables, And Spurious Graph Edges

Learn how marginalizing Gaussian latent variables changes precision-matrix zeros, and why an observed edge need not be an edge in the joint graph.

Advanced 10 min read

What You'll Learn

  • Derive the marginal precision matrix as a Schur complement.
  • Distinguish conditional precision given latent variables from marginal precision.
  • Identify when latent-variable elimination induces an observed graph edge.
  • Work out examples of dense induced edges and exact edge cancellation.
  • Separate the observed-variable precision graph from the full joint graph.

Why Marginalizing Changes a Graph

A Gaussian graphical model describes conditional relationships through zeros in a precision matrix. But a study may record only some of the variables in the model. If other variables are unobserved and are integrated out, the distribution of the recorded variables remains Gaussian, yet its precision matrix can have a different pattern of zeros. A sparse graph containing latent nodes can therefore correspond to a much denser graph among the observed variables.

The distinction matters when interpreting a fitted graph. An edge in the graph of observed variables represents conditional dependence given the other observed variables. It does not, by itself, establish a direct edge between those variables in a larger model that includes latent variables.

Joint and Marginal Precision Matrices

Let \(X\in\mathbb{R}^p\) be the observed vector and \(Z\in\mathbb{R}^q\) the latent vector. Suppose the centered joint vector \((X^\mathsf{T},Z^\mathsf{T})^\mathsf{T}\) is multivariate Gaussian with positive-definite precision matrix

$$ \Omega= \begin{pmatrix} A & B\\ B^\mathsf{T} & C \end{pmatrix}, $$

where \(A\) is \(p\times p\), \(C\) is \(q\times q\), and \(B\) is \(p\times q\). Positive definiteness of \(\Omega\) implies that its principal block \(C\) is positive definite, so \(C^{-1}\) exists.

Definition: The joint precision graph has one node for each component of \((X,Z)\); two distinct nodes are joined when the corresponding off-diagonal entry of \(\Omega\) is nonzero. The observed-variable precision graph has one node for each component of \(X\); two distinct nodes are joined when the corresponding off-diagonal entry of the marginal precision matrix of \(X\) is nonzero. For a nondegenerate Gaussian distribution, each such zero is equivalent to conditional independence of the corresponding variables given all the other variables in that graph’s distribution.

The block \(A\) has a different interpretation from the observed marginal precision. In the joint Gaussian density, terms depending on \(x\), with \(z\) held fixed, have quadratic part \(x^\mathsf{T}Ax\). Thus \(A\) is the conditional precision of \(X\) given \(Z\). It need not be the precision matrix of \(X\) after \(Z\) has been integrated out.

The Marginal Precision Is a Schur Complement

Theorem: Under the joint Gaussian model above, the marginal distribution of \(X\) is Gaussian with precision matrix \(S=A-BC^{-1}B^\mathsf{T}\). This matrix is positive definite.

Proof. Up to its normalizing constant, the joint density has exponent

$$ -\frac12\left(x^\mathsf{T}Ax+2x^\mathsf{T}Bz+z^\mathsf{T}Cz\right). $$

Complete the square in \(z\):

$$ x^\mathsf{T}Ax+2x^\mathsf{T}Bz+z^\mathsf{T}Cz = (z+C^{-1}B^\mathsf{T}x)^\mathsf{T}C(z+C^{-1}B^\mathsf{T}x) +x^\mathsf{T}(A-BC^{-1}B^\mathsf{T})x. $$

Integrating over \(z\) integrates a shifted Gaussian kernel with precision \(C\). Its integral is a finite constant independent of \(x\), because \(C\) is positive definite. The remaining density in \(x\) is therefore proportional to \(\exp\{-x^\mathsf{T}Sx/2\}\), where \(S=A-BC^{-1}B^\mathsf{T}\). To check that this is a valid positive-definite precision matrix, take any nonzero \(x\) and set \(z=-C^{-1}B^\mathsf{T}x\). Then

$$ x^\mathsf{T}Sx = \begin{pmatrix}x\\-C^{-1}B^\mathsf{T}x\end{pmatrix}^{\mathsf{T}} \Omega \begin{pmatrix}x\\-C^{-1}B^\mathsf{T}x\end{pmatrix} >0, $$

since the vector in the quadratic form is nonzero and \(\Omega\) is positive definite. Hence \(S\) is positive definite, and it is the marginal precision of \(X\). \(\square\)

For the graph, the key entrywise identity is

$$ S_{ij}=A_{ij}-b_i^\mathsf{T}C^{-1}b_j, $$

where \(b_i^\mathsf{T}\) is row \(i\) of \(B\). Thus, even if \(A_{ij}=0\), the marginal precision entry \(S_{ij}\) can be nonzero. Conversely, a nonzero \(A_{ij}\) can be canceled by the second term. Since \(C^{-1}\) is positive definite, \(b_i^\mathsf{T}C^{-1}b_j\) is an inner product under the \(C^{-1}\) metric; it may be zero, positive, or negative.

Worked Example: A Latent Hub Creates a Complete Observed Graph

Let \(X=(X_1,X_2,X_3)^\mathsf{T}\), let \(Z\) be a single latent variable, and consider the joint precision matrix

$$ \Omega= \begin{pmatrix} I_3 & \mathbf{1}\\ \mathbf{1}^\mathsf{T} & 4 \end{pmatrix}, \qquad \mathbf{1}=(1,1,1)^\mathsf{T}. $$

Here \(A=I_3\), \(B=\mathbf{1}\), and \(C=4\). The matrix is positive definite: its Schur complement with respect to \(A\) is \(4-\mathbf{1}^\mathsf{T}I_3^{-1}\mathbf{1}=4-3=1>0\).

The marginal precision is

$$ S=I_3-\frac14\mathbf{1}\mathbf{1}^\mathsf{T} = \begin{pmatrix} 3/4&-1/4&-1/4\\ -1/4&3/4&-1/4\\ -1/4&-1/4&3/4 \end{pmatrix}. $$

Every off-diagonal entry is nonzero, so the observed-variable precision graph is complete. In contrast, the joint precision has zero off-diagonal entries between each pair of \(X\) variables and nonzero entries from each \(X_i\) to \(Z\). Its graph is a star. In fact, the eigenvalue of \(S\) in the \(\mathbf{1}\) direction is \(1-3/4=1/4\), and each eigenvalue in a direction orthogonal to \(\mathbf{1}\) is \(1\), confirming that \(S\) is positive definite.

Induced Edges and Exact Cancellation

The matrix \(BC^{-1}B^\mathsf{T}\) has rank at most \(q\), the number of latent variables. Low rank does not mean sparse: even a rank-one matrix can have a nonzero entry for every pair of variables. Marginalization can therefore add many edges at once. But it does not necessarily add every possible edge: the formula for \(S_{ij}\) allows both zero inner products and exact cancellation.

Worked Example: A Direct Edge Can Be Canceled

Let \(X\in\mathbb{R}^3\), \(Z\in\mathbb{R}\), and choose

$$ A= \begin{pmatrix} 1&1/4&0\\ 1/4&1&0\\ 0&0&1 \end{pmatrix}, \qquad B=\mathbf{1}, \qquad C=4. $$

The eigenvalues of \(A\) are \(5/4\), \(3/4\), and \(1\), so \(A\) is positive definite. Also,

$$ \mathbf{1}^\mathsf{T}A^{-1}\mathbf{1} = \frac{2}{5/4}+1 = \frac85+1 = \frac{13}{5}. $$

The Schur complement with respect to \(A\) is \(4-13/5=7/5>0\), so the joint precision is positive definite. Marginalizing \(Z\) gives

$$ S=A-\frac14\mathbf{1}\mathbf{1}^\mathsf{T} = \begin{pmatrix} 3/4&0&-1/4\\ 0&3/4&-1/4\\ -1/4&-1/4&3/4 \end{pmatrix}. $$

The joint model has a direct \(X_1\)--\(X_2\) edge because \(A_{12}=1/4\), as well as links from all three observed variables to \(Z\). But the marginal entry is \(S_{12}=1/4-1/4=0\), so there is no \(X_1\)--\(X_2\) edge in the observed-variable precision graph. The remaining observed edges are \(X_1\)--\(X_3\) and \(X_2\)--\(X_3\).

Conditional and Marginal Graphs Answer Different Questions

The joint graph describes conditional independences among all variables when the other joint variables are conditioned on. The observed-variable graph describes conditional independences among recorded variables when conditioning only on the other recorded variables. Once latent variables are omitted from the conditioning set, they can transmit dependence between observed variables. This is why taking the observed nodes of a joint graph and simply deleting its latent nodes does not generally produce the observed-variable precision graph.

Worked Example: Conditional Independence Does Not Survive Marginalization

Take two observed variables and one latent variable, with

$$ A=2I_2,\qquad B= \begin{pmatrix}1\\1\end{pmatrix}, \qquad C=3. $$

The joint precision is positive definite because \(A\) is positive definite and its Schur complement is \(3-B^\mathsf{T}A^{-1}B=3-1=2>0\). Given \(Z\), the conditional precision of \(X\) is \(A=2I_2\), which is diagonal: \(X_1\) and \(X_2\) are conditionally independent given \(Z\).

After integrating out \(Z\), the precision becomes

$$ S=2I_2-\frac13 \begin{pmatrix}1&1\\1&1\end{pmatrix} = \begin{pmatrix}5/3&-1/3\\-1/3&5/3\end{pmatrix}. $$

Its off-diagonal entry is nonzero, so the two observed variables are not conditionally independent in their marginal distribution. Direct inversion gives

$$ S^{-1} = \frac{1}{(25-1)/9} \begin{pmatrix}5/3&1/3\\1/3&5/3\end{pmatrix} = \begin{pmatrix}5/8&1/8\\1/8&5/8\end{pmatrix}. $$

The positive marginal covariance is consistent with their dependence, but the graph edge criterion here is the nonzero off-diagonal entry of the marginal precision, not merely a nonzero covariance.

How to Interpret an Observed Edge

In an observed-variable precision graph, an edge means conditional dependence given the other observed variables under the fitted Gaussian model. It does not tell us whether the dependence arises from a direct interaction, an omitted common influence, or a combination of pathways. In particular, an edge induced by a latent variable is a real edge in the marginal graph, not a computational error; it simply has a different interpretation from an edge in a larger joint graph.

When latent variables are plausible, it is useful to state which graph is being discussed. A sparse joint precision matrix can have a dense observed marginal precision matrix. Conversely, exact cancellations can make a joint edge disappear from the marginal graph. Neither relationship can be inferred by merely inspecting the observed-node subgraph of the joint graph; the Schur complement determines the marginal pattern.

Common Mistake

Pitfall: “\(A_{ij}=0\), so the observed variables \(X_i\) and \(X_j\) are conditionally independent.” This uses the conditional precision of \(X\) given \(Z\) as if it were the marginal precision. The correction is to compute \(S=A-BC^{-1}B^\mathsf{T}\): marginal conditional independence is determined by \(S_{ij}=0\), which may differ from \(A_{ij}=0\).
Key takeaway: Marginalizing Gaussian latent variables replaces the observed block \(A\) of the joint precision by its Schur complement \(A-BC^{-1}B^\mathsf{T}\). The resulting observed graph can gain edges, lose edges through cancellation, or retain some zeros; it is not generally the joint graph with latent nodes removed.

Check Your Understanding

Use the block-matrix identity and distinguish carefully between conditional and marginal precision.

  1. In the block precision matrix \(\Omega\), which block is the conditional precision of \(X\) given \(Z\), and which matrix is the marginal precision of \(X\)?
  2. Why can a single latent variable induce several edges among observed variables even though the adjustment \(BC^{-1}B^\mathsf{T}\) has rank at most one?
  3. What exact equality produces cancellation of the \(i,j\) entry in the marginal precision?
  4. In the latent-hub example, why is the joint graph a star while the observed-variable graph is complete?
  5. Does an edge in an observed-variable precision graph, by itself, establish a direct edge in a model that includes latent variables? Explain.
Clinical Biostats