Lecture 22: 21 April, 2022
Madhavan Mukund
https://www.cmi.ac.in/~madhavan
Data Mining and Machine Learning January–May 2022
Probabilistic graphical models
Underlying DAG, no cyclic dependencies
Each node has a local (conditional) probability table
Conditional independence
x ?y — x and y are independent P(x^y) =P(x)·P(y)
x ?y |z
x andy are independent givenz
Is JohnCallsindependent of MaryCalls (j ?m)?
No — value ofj tells us something about value ofmand vice versa
Is JohnCallsindependent of MaryCalls given Alarm (j ?m|a)?
Yes — by semantics of network, local independence
Madhavan Mukund Lecture 22: 21 April, 2022 DMML Jan–May 2022 3 / 10
Conditional independence
x ?y — x and y are independent P(x^y) =P(x)·P(y)
x ?y |z
x andy are independent given z
Is JohnCallsindependent of MaryCalls (j ?m)?
No — value ofj tells us something about value ofmand vice versa
Is JohnCallsindependent of MaryCalls given Alarm (j ?m|a)?
Yes — by semantics of network, local independence
Conditional independence
x ?y — x and y are independent P(x^y) =P(x)·P(y)
x ?y |z
x andy are independent given z
Is JohnCallsindependent of MaryCalls (j ?m)?
No — value ofj tells us something about value ofmand vice versa
Is JohnCallsindependent of MaryCalls given Alarm (j ?m|a)?
Yes — by semantics of network, local independence
Madhavan Mukund Lecture 22: 21 April, 2022 DMML Jan–May 2022 3 / 10
Conditional independence
x ?y — x and y are independent P(x^y) =P(x)·P(y)
x ?y |z
x andy are independent given z
Is JohnCallsindependent of MaryCalls (j ?m)?
No — value ofj tells us something about value ofmand vice versa
Is JohnCallsindependent of MaryCalls given Alarm (j ?m|a)?
Yes — by semantics of network, local independence
Conditional independence
x ?y — x and y are independent P(x^y) =P(x)·P(y)
x ?y |z
x andy are independent given z
Is JohnCallsindependent of MaryCalls (j ?m)?
No — value ofj tells us something about value ofmand vice versa
Is JohnCallsindependent of MaryCalls given Alarm (j ?m|a)?
Yes — by semantics of network, local independence
Madhavan Mukund Lecture 22: 21 April, 2022 DMML Jan–May 2022 3 / 10
Conditional independence
x ?y — x and y are independent P(x^y) =P(x)·P(y)
x ?y |z
x andy are independent given z
Is JohnCallsindependent of MaryCalls (j ?m)?
No — value ofj tells us something about value ofmand vice versa
Is JohnCallsindependent of MaryCalls given Alarm (j ?m|a)?
Yes — by semantics of network, local independence
Probabilistic graphical models
Fundamental assumption
A node is conditionally independent of non-descendants, given its parents
Madhavan Mukund Lecture 22: 21 April, 2022 DMML Jan–May 2022 4 / 10
Student example
SAT ?Grade |Difficulty ?
No
Can we calculate
conditional independence from the graph?
In general, check if X ?Y |Z for setsof variables X,Y,Z
¥
Student example
SAT ?Grade |Difficulty ? No
Can we calculate
conditional independence from the graph?
In general, check if X ?Y |Z for setsof variables X,Y,Z
Madhavan Mukund Lecture 22: 21 April, 2022 DMML Jan–May 2022 5 / 10
Student example
SAT ?Grade |Difficulty ? No
Can we calculate
conditional independence from the graph?
In general, check if X ?Y |Z for setsof variables X,Y,Z
Student example
SAT ?Grade |Difficulty ? No
Can we calculate
conditional independence from the graph?
In general, check if X ?Y |Z for setsof variables X,Y,Z
Madhavan Mukund Lecture 22: 21 April, 2022 DMML Jan–May 2022 5 / 10
~
Conditional independence
How does dependence “flow” through a network?
For neighbouring nodes, dependence flows both ways
Ifx !y, knowingx tells us about y and vice versa
Examinetrails between nodes Paths in the underlying undirected graph
Basic trails— (undirected) paths of length 2
Four basic trails
Conditional independence
How does dependence “flow” through a network?
For neighbouring nodes, dependence flows both ways
Ifx!y, knowingx tells us about y and vice versa
Examinetrails between nodes Paths in the underlying undirected graph
Basic trails— (undirected) paths of length 2
Four basic trails
Madhavan Mukund Lecture 22: 21 April, 2022 DMML Jan–May 2022 6 / 10
✗
¥ FE
Conditional independence
How does dependence “flow” through a network?
For neighbouring nodes, dependence flows both ways
Ifx!y, knowingx tells us about y and vice versa
Examinetrails between nodes Paths in the underlying undirected graph
Basic trails— (undirected) paths of length 2
Four basic trails
✗t
0
✗↓ ↑
t
Conditional independence
How does dependence “flow” through a network?
For neighbouring nodes, dependence flows both ways
Ifx!y, knowingx tells us about y and vice versa
Examinetrails between nodes Paths in the underlying undirected graph
Basic trails— (undirected) paths of length 2
Four basic trails
Madhavan Mukund Lecture 22: 21 April, 2022 DMML Jan–May 2022 6 / 10
FETE
✓ ✓
A
✓Basic trails
(a), (b) and (c): Z blocks flow between X andY, by semantics of Bayesian networks
In (d), knowingZ allows influence to flow
Z: Car does not start X: Low Battery,Y: No Fuel Z: Grass is wet
X: Overnight rain,Y: Sprinkler ran Simplest form of V-structure
E
✗ ✗
J
- -
É→→→o→E
Basic trails
(a), (b) and (c): Z blocks flow between X andY, by semantics of Bayesian networks
In (d), knowingZ allows influence to flow
Z: Car does not start X: Low Battery,Y: No Fuel Z: Grass is wet
X: Overnight rain,Y: Sprinkler ran Simplest form of V-structure
Madhavan Mukund Lecture 22: 21 April, 2022 DMML Jan–May 2022 7 / 10
I
✗17/
2-Basic trails
(a), (b) and (c): Z blocks flow between X andY, by semantics of Bayesian networks
In (d), knowingZ allows influence to flow
Z: Car does not start X: Low Battery,Y: No Fuel Z: Grass is wet
X: Overnight rain,Y: Sprinkler ran Simplest form of V-structure
Basic trails
(a), (b) and (c): Z blocks flow between X andY, by semantics of Bayesian networks
In (d), knowingZ allows influence to flow
Z: Car does not start X: Low Battery,Y: No Fuel
Z: Grass is wet
X: Overnight rain,Y: Sprinkler ran Simplest form of V-structure
Madhavan Mukund Lecture 22: 21 April, 2022 DMML Jan–May 2022 7 / 10
Basic trails
(a), (b) and (c): Z blocks flow between X andY, by semantics of Bayesian networks
In (d), knowingZ allows influence to flow
Z: Car does not start X: Low Battery,Y: No Fuel Z: Grass is wet
X: Overnight rain,Y: Sprinkler ran
Simplest form of V-structure
☐
Basic trails
(a), (b) and (c): Z blocks flow between X andY, by semantics of Bayesian networks
In (d), knowingZ allows influence to flow
Z: Car does not start X: Low Battery,Y: No Fuel Z: Grass is wet
X: Overnight rain,Y: Sprinkler ran Simplest form of V-structure
Madhavan Mukund Lecture 22: 21 April, 2022 DMML Jan–May 2022 7 / 10
D-Separation
Check if X ?Y |Z
Dependence should be blocked on every trail from X toY
Each undirected path from X toY is a sequence of basic trails For (a), (b), (c), needZ present For (d), need Z absent
In general, V-structure includes descendants of the bottom node
x andy are D-separatedgiven z if all trails are blocked
Variation of breadth first search (BFS)to check if y is reachable fromx through some trail
Extends to sets — eachx 2X is D-separated from eachy 2Y
D-Separation
Check if X ?Y |Z
Dependence should be blocked on every trail from X toY
Each undirected path from X toY is a sequence of basic trails For (a), (b), (c), needZ present For (d), need Z absent
In general, V-structure includes descendants of the bottom node
x andy are D-separatedgiven z if all trails are blocked
Variation of breadth first search (BFS)to check if y is reachable fromx through some trail
Extends to sets — eachx 2X is D-separated from eachy 2Y
Madhavan Mukund Lecture 22: 21 April, 2022 DMML Jan–May 2022 8 / 10
D-Separation
Check if X ?Y |Z
Dependence should be blocked on every trail from X toY
Each undirected path fromX toY is a sequence of basic trails
For (a), (b), (c), needZ present For (d), need Z absent
In general, V-structure includes descendants of the bottom node
x andy are D-separatedgiven z if all trails are blocked
Variation of breadth first search (BFS)to check if y is reachable fromx through some trail
Extends to sets — eachx 2X is D-separated from eachy 2Y
D-Separation
Check if X ?Y |Z
Dependence should be blocked on every trail from X toY
Each undirected path fromX toY is a sequence of basic trails For (a), (b), (c), needZ present
For (d), need Z absent
In general, V-structure includes descendants of the bottom node
x andy are D-separatedgiven z if all trails are blocked
Variation of breadth first search (BFS)to check if y is reachable fromx through some trail
Extends to sets — eachx 2X is D-separated from eachy 2Y
Madhavan Mukund Lecture 22: 21 April, 2022 DMML Jan–May 2022 8 / 10
⊕
D-Separation
Check if X ?Y |Z
Dependence should be blocked on every trail from X toY
Each undirected path fromX toY is a sequence of basic trails For (a), (b), (c), needZ present For (d), need Z absent
In general, V-structure includes descendants of the bottom node
x andy are D-separatedgiven z if all trails are blocked
Variation of breadth first search (BFS)to check if y is reachable fromx through some trail
Extends to sets — eachx 2X is D-separated from eachy 2Y
D-Separation
Check if X ?Y |Z
Dependence should be blocked on every trail from X toY
Each undirected path fromX toY is a sequence of basic trails For (a), (b), (c), needZ present For (d), need Z absent
In general, V-structure includes descendants of the bottom node
x andy are D-separatedgiven z if all trails are blocked
Variation of breadth first search (BFS)to check if y is reachable fromx through some trail
Extends to sets — eachx 2X is D-separated from eachy 2Y
Madhavan Mukund Lecture 22: 21 April, 2022 DMML Jan–May 2022 8 / 10
④
→④
←⑦
②
→ ✓ W is knownD-Separation
Check if X ?Y |Z
Dependence should be blocked on every trail from X toY
Each undirected path fromX toY is a sequence of basic trails For (a), (b), (c), needZ present For (d), need Z absent
In general, V-structure includes descendants of the bottom node
x andy are D-separatedgiven z if all trails are blocked
Variation of breadth first search (BFS)to check if y is reachable fromx through some trail
Extends to sets — eachx 2X is D-separated from eachy 2Y
D-Separation
Check if X ?Y |Z
Dependence should be blocked on every trail from X toY
Each undirected path fromX toY is a sequence of basic trails For (a), (b), (c), needZ present For (d), need Z absent
In general, V-structure includes descendants of the bottom node
x andy are D-separatedgiven z if all trails are blocked
Variation of breadth first search (BFS)to check if y is reachable fromx through some trail
Extends to sets — eachx 2X is D-separated from eachy 2Y
Madhavan Mukund Lecture 22: 21 April, 2022 DMML Jan–May 2022 8 / 10
D-Separation
Check if X ?Y |Z
Dependence should be blocked on every trail from X toY
Each undirected path fromX toY is a sequence of basic trails For (a), (b), (c), needZ present For (d), need Z absent
In general, V-structure includes descendants of the bottom node
x andy are D-separatedgiven z if all trails are blocked
Variation of breadth first search (BFS)to check if y is reachable fromx through some trail
Extends to sets — eachx 2X is D-separated from eachy 2Y
Conditional independence, example
Is SATindependent of Difficulty given Intelligence?
Yes,Difficulty – Grade –
Intelligence – SAT trail is blocked atGrade(V-structure)
Is SATindependent of Difficulty given Grade?
No,Difficulty – Grade – Intelligence – SATtrail is open becauseGrade is known (V-structure)
Madhavan Mukund Lecture 22: 21 April, 2022 DMML Jan–May 2022 9 / 10
-
_
-
00*0
Conditional independence, example
Is SATindependent of Difficulty given Intelligence?
Yes,Difficulty – Grade –
Intelligence – SAT trail is blocked atGrade(V-structure)
Is SATindependent of Difficulty given Grade?
No,Difficulty – Grade – Intelligence – SATtrail is open becauseGrade is known (V-structure)
0*0