Presentation is loading. Please wait.

Presentation is loading. Please wait.

Gated Graphs and Causal Inference

Similar presentations


Presentation on theme: "Gated Graphs and Causal Inference"β€” Presentation transcript:

1 Gated Graphs and Causal Inference
John Winn Microsoft Research, Cambridge with lots of input from Tom Minka Networks: Processes and Causality, September 2012

2 Outline Graphical models of mixtures Gated graphs
d-separation in gated graphs Inference in gated graphs Modelling interventions with gated graphs Causal inference with gated graphs

3 A mixture of two Gaussians
𝑃 𝑋 =𝑃 𝐢=1 𝑁 𝑋 πœ‡ 1 , 𝜎 𝑃 𝐢=2 𝑁 𝑋 πœ‡ 2 , 𝜎 2 2 C=1 C=2 𝑃 𝑋 𝑋

4 Mixture as a Bayesian Network
𝑃 𝑋|𝐢, πœ‡ 1 , πœ‡ 2 , 𝜎 1 , 𝜎 2 =𝛿 𝐢=1 𝑁 𝑋 πœ‡ 1 , 𝜎 𝛿 𝐢=2 𝑁 𝑋 πœ‡ 2 , 𝜎 2 2 All structure is lost!

5 Mixture as a Factor Graph
𝑃 𝑋|𝐢, πœ‡ 1 , πœ‡ 2 , 𝜎 1 , 𝜎 2 = 𝑁 𝑋 πœ‡ 1 , 𝜎 𝛿(𝐢=1) 𝑁 𝑋 πœ‡ 2 , 𝜎 𝛿(𝐢=2) Context-specific independence is lost!

6 Mixture as a Gated Graph
𝑃 𝑋|𝐢, πœ‡ 1 , πœ‡ 2 , 𝜎 1 , 𝜎 2 = 𝑁 𝑋 πœ‡ 1 , 𝜎 𝛿(𝐢=1) 𝑁 𝑋 πœ‡ 2 , 𝜎 𝛿(𝐢=2) Context-specific independence is retained!

7 gated graphs

8 The Gate Gate Selector variable Key Key 𝑖 𝑓 𝑖 𝑋 𝑖 𝛿(𝑐=π‘˜π‘’π‘¦) Gate:
𝑖 𝑓 𝑖 𝑋 𝑖 𝛿(𝑐=π‘˜π‘’π‘¦) Gate: Contained factor(s) Selector variable Contained factor(s) [Minka & Winn, Gates. NIPS 2009]

9 Mixture of Gaussians 𝑃 𝑋|𝐢 = 𝑁 𝑋 πœ‡ 1 , 𝜎 𝛿(𝐢=1) 𝑁 𝑋 πœ‡ 2 , 𝜎 𝛿(𝐢=2) Gate block

10 Mixture of Gaussians 𝑃 𝑋|𝐢 = 𝑁 𝑋 πœ‡ 1 , 𝜎 𝛿(𝐢=1) 𝑁 𝑋 πœ‡ 2 , 𝜎 𝛿(𝐢=2) Gate block

11 Mixture of Gaussians 𝑃 𝑋|𝐢 = 𝑁 𝑋 πœ‡ 1 , 𝜎 𝛿(𝐢=1) 𝑁 𝑋 πœ‡ 2 , 𝜎 𝛿(𝐢=2) Gate block

12 Model Selection Model 1 Model 2

13 Model Selection Model 1 Model 2

14 Structure learning Edge presence/absence Variable presence/absence
Edge type

15 Example: image edge model

16 Example: genetic association study

17 D-separation in gated graphs

18 d-separation in factor graphs
Tests whether X independent of Y given Z. Criterion 1: Observed node on path Criterion 2: No observed descendant

19 d-separation with gates
Gate selector acts like another parent 𝑿 𝑿 π‘Š 𝑿 F T Y 𝑍 F F 𝑍 π‘Š π‘Š 𝑍 T T Y Y Criterion 1: Observed node on path Criterion 2: No observed descendant

20 d-separation with gates
Paths are blocked by gates that are off, but pass through gates that are on. 𝒁=T 𝒁=F F F π‘Œ 𝑋 π‘Œ 𝑋 T T Criterion 3 (context-sensitive): Path passes through off gate

21 d-separation summary New! Criterion 1: Observed node on path
Criterion 2: No observed descendant Criterion 3: Path passes through off gate New! Allows new independencies to be detected, (even if they apply only in particular contexts)

22 Inference in gated graphs

23 Inference in Gated Graphs
Extended forms of standard algorithms: belief propagation expectation propagation variational message passing Gibbs sampling Algorithms become more accurate + more efficient by exploiting conditional independencies. Free software at [Minka & Winn, Gates. NIPS 2009]

24 BP in factor graphs π‘š 𝑖→𝑓 ( 𝑋 𝑖 )= π‘Žβ‰ π‘“ π‘š π‘Žβ†’π‘– ( 𝑋 𝑖 )
Variable to factor π‘š 𝑖→𝑓 ( 𝑋 𝑖 )= π‘Žβ‰ π‘“ π‘š π‘Žβ†’π‘– ( 𝑋 𝑖 ) Factor to variable π‘š 𝑓→𝑖 ( 𝑋 𝑖 )= 𝑋 𝑓 βˆ– 𝑋 𝑖 𝑓( 𝑋 𝑓 ) 𝑗≠𝑖 π‘š 𝑗→𝑓 𝑋 𝑗

25 BP in a gate block π‘š 𝑓→𝐢 (𝐢)=𝛿(𝐢=π‘˜) 𝑋 𝑓 𝑓( 𝑋 𝑓 ) 𝑗 π‘š 𝑗→𝑓 𝑋 𝑗
βˆ‘ π‘š 𝐢→𝐺 βˆ‘ Factor fk to selector (evidence) π‘š 𝑓→𝐢 (𝐢)=𝛿(𝐢=π‘˜) 𝑋 𝑓 𝑓( 𝑋 𝑓 ) 𝑗 π‘š 𝑗→𝑓 𝑋 𝑗 Factor fk to variable (after leaving gate) π‘š 𝑓→𝑖 𝑋 𝑖 = π‘š 𝑓→𝑖 𝑋 𝑖 . π‘š 𝑓→𝐢 (π‘˜) π‘š 𝐢→𝐺 π‘˜ 𝑋 𝑖 β€² π‘š 𝑓→𝑖 𝑋 𝑖 β€² π‘š 𝑖→𝑓 𝑋 𝑖 β€² scale factor

26 Modelling Interventions with gated graphs
(yes – I’m finally getting round to talking about causality)

27 Intervention with Gates
doZ False Y Z f True Gate block I

28 Normal (no intervention)
doZ = F F Y Z f T I

29 Intervention on Z doZ = T F Y Z f T I

30 Example model

31 Example model with interventions

32 do calculus Rules for rewriting P(y| π‘₯ ) in terms of P(𝑦|π‘₯) etc. where π‘₯ stands for β€œan intervention on π‘₯”. P y π‘₯ ,𝑧 =𝑃(𝑦| π‘₯ ) if y independent of z in graph with parent edges of x removed. P y 𝑧 =𝑃(𝑦|𝑧) if y independent of z in graph with child edges of z removed. P y 𝑧 =𝑃(𝑦) if y independent of z in graph with parent edges of z removed if no descendent of z is observed. [Pearl, Causal diagrams for empirical research, Biometrika 1995]

33 Rule 1: deletion of observations
do calculus gates P y π‘₯ ,𝑧 =𝑃(𝑦| π‘₯ ) P(yβ”‚π‘‘π‘œπ‘‹=𝑇,𝑧)=𝑃(𝑦|π‘‘π‘œπ‘‹=𝑇) π‘‘π‘œπ‘‹ =T parents(π‘₯) π‘₯ Criterion 3: Gate is off F Remove parent edges of x parents(π‘₯) π‘₯ T parents(π‘₯) π‘₯

34 Rule 2: action/observation exchange
do calculus gates P y 𝑧 =𝑃(𝑦|𝑧) P(yβ”‚π‘‘π‘œπ‘=𝑇,𝑧)=𝑃(𝑦|π‘‘π‘œπ‘=𝐹,𝑧) Criterion 1: Observed node on path π‘‘π‘œπ‘ 𝑧 children(𝑧) F Remove child edges of z parents(𝑧) 𝑧 T 𝑧 children(𝑧) children(𝑧)

35 Rule 3: deletion of actions
do calculus gates P y 𝑧 =𝑃(𝑦) P(yβ”‚π‘‘π‘œπ‘)=𝑃(𝑦) Criterion 2: No observed descendent parents(𝑧) 𝑧 π‘‘π‘œπ‘ F parents(𝑧) 𝑧 parents(𝑧) 𝑧 T desc(𝑧) desc(𝑧)

36 Rule 3: deletion of actions
do calculus gates P y 𝑧 =𝑃(𝑦) P(yβ”‚π‘‘π‘œπ‘)=𝑃(𝑦) parents(𝑧) 𝑧 π‘‘π‘œπ‘ F parents(𝑧) 𝑧 parents(𝑧) 𝑧 T desc(𝑧) desc(𝑧)

37 do calculus equivalence
The three rules of do calculus are a special case of the three d-separation criteria applied to the gated graph of an intervention.

38 Causal inference with gated graphs

39 Causal Inference using BP

40 Causal Inference using BP
Intervention on X Posterior for Y

41 Causal Inference using BP
Posterior for Y Intervention on Z

42 Learning causal structure
Does A cause B or B cause A? A, B are binary. f is noisy equality with flip probability q.

43 Learning causal structure
Add gated structure for intervention on B

44 Learning causal structure

45 …and without interventions
X Y 1 g(r) r 1-r Thanks to Bernhard!

46 …and without interventions
Same algorithm as before

47 Dominik’s idea

48 Conclusions Causal reasoning is a special case of probabilistic inference: The rules of do-calculus arise from testing d-separation in the gated graph. Causal inference can be performed using probabilistic inference in the gated graph. Causal structure can be discovered by using gates in two ways: to model interventions and/or to compare alternative structures.

49 Future directions Imperfect interventions Counterfactuals
Partial compliance Mechanism change Counterfactuals Variables that differ in the real and counterfactual worlds lie in different gates Variables common to both worlds lie outside the gates

50 Thank you!

51 Imperfect Interventions
β€˜Fat hand’ Mechanism change Partial compliance


Download ppt "Gated Graphs and Causal Inference"

Similar presentations


Ads by Google