Lecture 3 — Causality and Graphical Models
M2 Data Science — Université d’Évry
\(C\) separates \(A\) from \(B\) when every path from \(A\) to \(B\) goes through \(C\).
| Property | Statement |
|---|---|
| global | \(C\) separates \(A\) and \(B\) \(\Rightarrow\) \(X_A \perp X_B \mid X_C\) |
| local | \(X_v \perp X_{V \setminus (\{v\} \cup N(v))} \mid X_{N(v)}\) |
| pairwise | \(u \not\sim v\) \(\Rightarrow\) \(X_u \perp X_v \mid X_{V \setminus \{u, v\}}\) |
A Gibbs distribution for \(G\) is a product of non-negative potentials over the cliques of \(G\), normalised by the partition function.
\[ p(x) = \frac{1}{Z} \prod_{c \in \mathcal C(G)} \psi_c(x_c), \qquad Z = \sum_x \prod_{c \in \mathcal C(G)} \psi_c(x_c) \]
A strictly positive distribution satisfies the global Markov property of \(G\) if and only if it is a Gibbs distribution for \(G\).
\[ p > 0: \quad p \text{ globally Markov w.r.t. } G \iff p(x) = \frac{1}{Z} \prod_{c \in \mathcal C(G)} \psi_c(x_c) \]
\[ Q(x) = \sum_{A \subseteq V} \textstyle\prod_{i \in A} x_i\; G_A(x_A) \]
Moral graph of a DAG: parents of each node married, then orientations dropped.
Proposition A distribution factorising according to a DAG \(G\) is a Gibbs distribution for its moral graph \(G^m\).
Price: lost independences (v-structures).
\[ p(x) = \frac{1}{Z} \exp\Big(\sum_{s \sim t} w_{st}\, x_s x_t + \sum_s b_s x_s\Big) \]
With \(w_{st} = \beta\) and \(b_s = \alpha\), a site depends on the rest only through the sum of its neighbours.
\[ p(x_i = 1 \mid x_{-i}) = \frac{e^{\alpha + \beta m_i}}{e^{\alpha + \beta m_i} + e^{-\alpha - \beta m_i}} = \sigma\big(2(\alpha + \beta m_i)\big), \qquad m_i = \sum_{j \sim i} x_j \]
\(Z\) cancels: local computation only.
Critical value (2D grid, infinite size): \(\beta_c = \tfrac12 \log(1 + \sqrt 2) \approx 0.44\).
\[ f(x) = \frac{1}{(2\pi)^{p/2} |\Sigma|^{1/2}} \exp\Big(-\tfrac12 (x - \mu)^\top K (x - \mu)\Big), \qquad K = \Sigma^{-1} \]
For a Gaussian vector split into blocks \(A\) and \(B\), the law of \(X_A\) given \(X_B = b\) is Gaussian.
\[ \begin{aligned} X_A \mid X_B = b \;&\sim\; \mathcal N\big(\mu_A + \Sigma_{AB} \Sigma_{BB}^{-1} (b - \mu_B),\ \Sigma_{A \mid B}\big) \\ \Sigma_{A \mid B} &= \Sigma_{AA} - \Sigma_{AB} \Sigma_{BB}^{-1} \Sigma_{BA} = (K_{AA})^{-1} \end{aligned} \]
Last equality: Schur complement.
In a Gaussian vector, two variables are independent given all the others if and only if the corresponding entry of \(K\) is zero.
\[ K_{ij} = 0 \iff X_i \perp X_j \mid X_{V \setminus \{i, j\}} \]
Partial correlation: \(\rho_{ij \cdot V \setminus\{i,j\}} = -K_{ij} / \sqrt{K_{ii} K_{jj}}\).
Gaussian graphical model Graph \(G\) with edge \(i - j\) iff \(K_{ij} \neq 0\): support of the precision matrix.
Marginal correlation everywhere, conditional dependence only along the chain.
Gaussian Bayesian network \(x - \mu = W(x - \mu) + S z\):
\[ K = (I - W)^\top S^{-2} (I - W) \]
Sample \(x_1, \dots, x_N\), empirical covariance \(S\). Log-likelihood up to constants:
\[ \ell(K) = \frac N2 \big(\log\det K - \operatorname{tr}(S K)\big), \qquad \nabla_K \ell \propto K^{-1} - S \]
Maximum likelihood under the constraint \(K_{st} = 0\) for \(s \not\sim t\):
The graphical lasso penalises the \(\ell_1\) norm of the precision matrix to obtain a sparse estimate.
\[ \hat K_\lambda = \arg\min_{K \succ 0}\; -\log\det K + \operatorname{tr}(S K) + \lambda \sum_{s \neq t} |K_{st}| \]
Subgradient condition: \(W - S - \lambda\, \Gamma = 0\), \(W = K^{-1}\), \(\Gamma_{st} \in \partial|K_{st}|\).
Choice of \(\lambda\): cross-validation, StARS, BIC.
Graph learned: conditional dependences, not causal directions.
Binary units \(x \in \{0, 1\}^p\), symmetric weights \(w_{jk}\), \(w_{jj} = 0\):
\[ p(x) = \frac{1}{Z} \exp\Big(\sum_j \alpha_j x_j + \sum_{j < k} w_{jk}\, x_j x_k\Big) \]
\[ p(h_j = 1 \mid v) = \sigma\big(c_j + \textstyle\sum_i w_{ij} v_i\big), \qquad p(v_i = 1 \mid h) = \sigma\big(b_i + \textstyle\sum_j w_{ij} h_j\big) \]