9 Graphical Models--The Pearl's Framework

Bayesian Networks

We first introduce PGM (Probabilistic Graphical Models). It is combination of graph theory and probability theory. Formally speaking, graph encodes conditional independence assumptions and local functions at each node are factors in the joint probability distribution.

Markov network is PGM with undirected graph while Bayesian network is PGM based on directed acyclic graph (DAG).

Chain Rule for Bayesian Network

Given an ordered set of r.v.s X1,…,XnX_{1},\dots,X_{n}. Their joint probability distribution is

P(x1,…,xn)=P(x1)P(x2∣x1)P(x3∣x1,x2)…P(xn∣x1,…,xn−1)P(x_{1},\dots,x_{n})=P(x_{1})P(x_{2}\mid x_{1})P(x_{3}\mid x_{1},x_{2})\dots P(x_{n}\mid x_{1},\dots,x_{n-1})

The chain expansion just holds, with no other condition needed. Sometimes we might have conditions like X1⊥X2∣X3X_{1}\perp X_{2}\mid X_{3}, then the chain can be simplified. This introduces the following definition:

Definition (Markovian Parents)
Let V={X1,…,Xn}V = \{X_1, \dots, X_n\} be an ordered set of variables, and let P(v)P(\boldsymbol{v}) be the joint probability distribution on these variables. A set of variables PAjPA_j is said to be Markovian parents of XjX_j if PAjPA_j is a minimal set of predecessors of XjX_j that renders XjX_j independent of all its other predecessors. In other words, PAjPA_j is any subset of {X1,…,Xj−1}\{X_1, \dots, X_{j-1}\} satisfying

P(xj∣paj)=P(xj∣x1,…,xj−1)P(x_j \mid pa_j) = P(x_j \mid x_1, \dots, x_{j-1})

and such that no proper subset of PAjPA_j satisfies this.

Probability and Graph

Here is an example:

Let I(P)I(P) be the set of all the independence conditions. In this example,

I(P)={X2⊥X3∣X1, X4⊥X1∣(X2,X3), X5⊥(X1,X2,X3)∣X4}I(P)=\left\{ X_{2}\perp X_{3}\mid X_{1},\ X_{4}\perp X_{1}\mid (X_{2},X_{3}),\ X_{5}\perp (X_{1},X_{2},X_{3})\mid X_{4}\right\}

Note that the resulted graph is dependent to the order of the variables. That is saying,

P(x1,x2,x3,x4,x5)P(x_{1},x_{2},x_{3},x_{4},x_{5})

and

P(x2,x3,x1,x4,x5)P(x_{2},x_{3},x_{1},x_{4},x_{5})

don't necessarily produce the same graph. In fact these two do produce different graphs. The later graph doesn't represent the condition X2⊥X3∣X1X_{2}\perp X_{3}\mid X_{1}.


Given a DAG GG and a probability function PP defined on the same set of r.v.s, we may be interested in whether GG represents PP. Reversely we can read off the corresponding PP from GG. For example, we can read off P(x,y,z)=P(x)P(y∣x)P(z∣y)P(x,y,z)=P(x)P(y\mid x)P(z\mid y) from the following graph:
367
If PP actually can be decomposed as above, we say that GG represents PP. The formal definition is as follows.

Definition (Markov Compatibility)
If a probability function PP admits the factorization of

P(x1,…,xn)=∏i=1nP(xi∣pai)P(x_{1},\dots,x_{n})=\prod_{i=1}^{n} P(x_{i}\mid pa_{i})

relative to DAG GG, we say that GG represents PP, that GG and PP are compatible, or that PP is Markov relative to GG

The product decomposition above is no longer order-specific since, given PP and GG, we can test whether PP decomposes into the product given by it without making any reference to variable ordering. (Textbook p16)

Note that GG can represent more than one PP. Continue the example above. If X,Y,ZX,Y,Z are mutually independent, then P(x,y,z)=P(x)P(y)P(z)=P(x)P(y∣x)P(z∣y)P(x,y,z)=P(x)P(y)P(z)=P(x)P(y\mid x)P(z\mid y). This PP is relative to GG, too.

Then here comes the question: how can we find out all the probability functions that are compatible with a given GG ? We may notice that GG in essence gives some independency restrictions I(G)I(G). Every PP satisfying these restrictions is compatible with GG.

I(G)⊆I(P)  ⟺  G,PI(G)\subseteq I(P) \iff G,P are Markov compatible.

d−d-separation

A convenient way of characterizing the set of distributions compatible with a DAG GG is to list the set of (conditional) independencies that each such distribution must satisfy.

Then how to read off the DAG all the (conditional) independencies, i.e. I(G)I(G) ? These independencies can be read off the DAG by using a graphical criterion called d−d-separation (the dd denotes directional).

Definition (dd-Separation)
A path pp is said to be dd-separated (or blocked) by a set of nodes ZZ if and only if

  1. pp contains a chain i→m→ji \to m \to j or a fork i←m→ji \leftarrow m \to j such that the middle node mm is in ZZ, or
  2. pp contains an inverted fork (or collider) i→m←ji \to m \leftarrow j such that the middle node mm is not in ZZ and such that no descendant of mm is in ZZ.

A set ZZ is said to d−d-separate XX from YY (XX and YY are sets of nodes) if and only if ZZ blocks every path from a node in XX to a node in YY.

Chain
264
Read off P(x,y,z)=P(x)P(y∣x)P(z∣y)P(x,y,z)=P(x)P(y\mid x)P(z\mid y) which is equivalent to X⊥Z∣YX\perp Z\mid Y.


Fork
156
Read off P(x,y,z)=P(x)P(y∣x)P(z∣y)P(x,y,z)=P(x)P(y\mid x)P(z\mid y) which is equivalent to X⊥Z∣YX\perp Z\mid Y. YY is called confounder. Note that it's the same as chain. So we cannot distinguish chain and fork by observed data.

Example: Simpson's paradox. Ignoring YY would cause confounding bias and wrong causal effects.


Inverted Fork
226
Read off P(x,y,z)=P(x)P(z)P(y∣x,z)P(x,y,z)=P(x)P(z)P(y\mid x,z) which is equivalent to X⊥ZX\perp Z. YY is called collider.

Examples:

  • Berkson's paradox. In hospital, broken leg and cough have negative correlation.
  • Monty Hall problem. Audience's choice and prize commonly influence whether the door is opened.

From now on the note strategy is decided to be changed: I will only take notes about the skeleton of the course.

d−d-separation is useful because the theorem below follows:

Theorem (Probabilistic Implications of dd-Separation)
If sets XX and YY are dd-separated by ZZ in a DAG GG, then XX is independent of YY conditional on ZZ in every distribution compatible with GG.

Conversely, if XX and YY are not dd-separated by ZZ in a DAG GG, then XX and YY are dependent conditional on ZZ in at least one distribution compatible with GG.

There are two necessary and sufficient conditions for GG and PP to be Markov compatible.

  1. Ordered Markov condition
  2. Parental Markov condition

Here we define faithfulness

Definition (Faithful)
PP is faithful to GG iff I(P)⊆I(G)I(P)\subseteq I(G).

If we believe GG and PP are Markov compatible and faithful, then I(P)=I(G)I(P)=I(G). From data we can know about I(P)I(P), and further we can recover GG from data.

Given independencies II, not only one GG can generate II (such as chain and fork). We define G={G:I(G)=I}\mathcal{G}=\{G:I(G)=I\}. Then items in G\mathcal{G} are observational equivalent (一种等价类).

Theorem (Observational Equivalence)
Two DAGs are observationally equivalent if and only if

  1. they have the same skeletons and
  2. they have the same sets of vv-structures, that is, two converging arrows whose tails are not connected by an arrow.

Causal Bayesian Networks

Seeing and Doing

237

Here we inject causality into the network. Below we discuss why ordinary BN has no causal meaning.

after observing that the sprinkler is on, we wish to infer that the season is dry, that it probably did not rain, and so on; no such inferences should be drawn in evaluating the effects of a contemplated action “turning the sprinkler On.” (Textbook p23)

Mathematically, P(X1=dry∣X3=on)>P(X1=dry)P(X_{1}=\text{dry}\mid X_{3}=\text{on})>P(X_{1}=\text{dry}). When the sprinkler is on, it's more likely that the season is dry. But sprinkler doesn't make the season dry. We concern that if we make the sprinkler on, how the season will be affected, i.e. we concern P(X1∣do(X3=on))P(X_{1}\mid do(X_{3}=\text{on})). Even we know everything about P(X1,…,X5)P(X_{1},\dots,X_{5}), we cannot know P(X1∣do(X3=on))P(X_{1}\mid do(X_{3}=\text{on})).

Intro to CBN

Then we make some assumptions on BN to let it be able to answer what P(X1∣do(X3=on))P(X_{1}\mid do(X_{3}=\text{on})) is like. The most important one is modularity, that is, if we make some interventions, the mechanisms of other unaffected modules are not changed.

we assume that the change is local, and does not spread over to mechanisms other than those specified. (Textbook p23)

The original distribution is

P(x1,x2,x3,x4,x5)=P(x1)⋅P(x2∣x1)⋅P(x3∣x1)⋅P(x4∣x2,x3)⋅P(x5∣x4).\begin{aligned} P(x_1,x_2,x_3,x_4,x_5) ={}&P(x_1)\\ &\cdot P(x_2\mid x_1)\\ &\cdot P(x_3\mid x_1)\\ &\cdot P(x_4\mid x_2,x_3)\\ &\cdot P(x_5\mid x_4). \end{aligned}

283

For example, if we make interventions that is X3=onX_{3}=\text{on}, that is, anything which can affect X3X_{3} has no say, i.e., the mechanism of X3X_{3} is imposed as

P(X3=x∣do(X3=on))={1x=on0o.w.P(X_{3}=x\mid do(X_{3}=\text{on}))=\begin{cases} 1 & x=\text{on} \\ 0 & \text{o.w.} \end{cases}

but other mechanisms are not affected, i.e.

P(x1∣do(⋅))=P(x1)P(x2∣x1,do(⋅))=P(x2∣x1)…P(x_{1}\mid do(\cdot))=P(x_{1})\\ P(x_{2}\mid x_{1},do(\cdot))=P(x_{2}\mid x_{1})\\ \dots

Thus, the distribution turns into

P(x1,x2,x3,x4,x5∣do(X3=on))=P(x1)⋅P(x2∣x1)⋅P(x3∣do(X3=on))⋅P(x4∣x2,x3)⋅P(x5∣x4).\begin{aligned} P(x_1,x_2,x_{3},x_4,x_5\mid do(X_3=\mathrm{on}))={}&P(x_1)\\ & \cdot P(x_2\mid x_1)\\ & \cdot P(x_{3}\mid do(X_{3}=\text{on}))\\ &\cdot P(x_4\mid x_2,x_{3})\\ &\cdot P(x_5\mid x_4). \end{aligned}

And we only concerns the condition where X3=onX_{3}=\text{on}, so we consider

P(x1,x2,x4,x5∣do(X3=on))=P(x1)P(x2∣x1)P(x4∣x2,X3=On)P(x5∣x4)P(x_1, x_2, x_4, x_5\mid do(X_{3}=\text{on})) = P(x_1) P(x_2 \mid x_1) P(x_4 \mid x_2, X_3 = \mathrm{On}) P(x_5 \mid x_4)

(This is obtained from deriving the marginal distribution without x3x_{3}.)

Formal Definition

We can finally introduce the definition:

Definition (Causal Bayesian Network)
Let P(v)P(v) be a probability distribution on a set VV of variables, and let Px(v)P_x(v) denote the distribution resulting from the intervention do(X=x)\mathrm{do}(X = x) that sets a subset XX of variables to constants xx. Denote by P∗P_* the set of all interventional distributions Px(v)P_x(v), X⊆VX \subseteq V, including P(v)P(v), which represents no intervention (i.e., X=∅X = \emptyset). A DAG GG is said to be a causal Bayesian network compatible with P∗P_* if and only if the following three conditions hold for every Px∈P∗P_x \in P_*:

  1. Px(v)P_x(v) is Markov relative to GG;
  2. Px(vi)=1P_x(v_i) = 1 for all Vi∈XV_i \in X whenever viv_i is consistent with X=xX = x;
  3. Px(vi∣pai)=P(vi∣pai)P_x(v_i \mid pa_i) = P(v_i \mid pa_i) for all Vi∉XV_i \notin X whenever paipa_i is consistent with X=xX = x, i.e., each P(vi∣pai)P(v_i \mid pa_i) remains invariant to interventions not involving ViV_i.

Given CBN, we can compute the distribution Px(v)P_x(v) resulting from any intervention do(X=x)\mathrm{do}(X = x) as a truncated factorization

Px(v)=∏{i∣Vi∉X}P(vi∣pai)for all v consistent with xP_x(v) = \prod_{\{i \mid V_i \notin X\}} P(v_i \mid pa_i) \qquad \text{for all } v \text{ consistent with } x

We have two properties:

  1. For all i, P(vi∣pai)=Ppai(vi).i,\ P(v_i \mid pa_i) = P_{pa_i}(v_i).
  2. For all ii and for every subset SS of variables disjoint of {Vi,PAi}\{V_i, PA_i\}, Ppai,s(vi)=Ppai(vi)P_{pa_i, s}(v_i) = P_{pa_i}(v_i).

The first is saying intervening parental nodes is equivalent to observing them. The second is saying after intervening parental nodes, intervening more is useless.


9 Graphical Models--The Pearl's Framework
https://wtx17.github.io/2026/11/25/9 Graphical Models--The Pearl's Framework/
作者
wtx
发布于
2026年11月25日
更新于
2026年12月2日
许可协议