Upload
others
View
10
Download
0
Embed Size (px)
Citation preview
CausalInference:predic1on,explana1on,andinterven1on
Lecture5:CausalityandGraphicalModels
Nextfewweeks
• October11(Tuesdayclass!):Timeseries• October17:Lecture+midtermreview/Q&A• October24:Midtermexam• October31:Projectproposaldue
• November29andDecember6:finalpresenta1ons
FinalProject
• Projecttypes(notexhaus1ve!)– Analyzedata,adaptcausalinferencemethodtopar1culardomain
– Comparecausalinferencemethods– Theore1calworkoncausality(methodsormeaning)
• Proposal– What’sthegoal?Howwillyouaccomplishit?Howwillyouknowtheprojectwassuccessful?Whatresourcesareneeded(anddoyouhavethem)?1page
Today
• Whatmakesagraphicalmodelcausal?• Howtousegraphicalmodelstoanswercausalques1ons– Predic1ngeffectsofac1ons– Counterfactualqueries– Explana1on
Applica1on:infantmortality
Mani,S.,&Cooper,G.F.(2004).CausalDiscoveryUsingaBayesianLocalCausalDiscoveryAlgorithm.ProceedingsofMedInfo,731-735
Applica1on:Organizingevidence
Lagnado,D.(2011).ThinkingaboutEvidence.InProceedingsoftheBri2shAcademy(Vol.171,pp.183-223)
Applica1on:Causesandeffectsofpoverty
Bessler,D.A.(2003).Onworldpoverty:Itscausesandeffects.FoodandAgriculturalOrganiza2on(FAO)oftheUnitedNa2ons,ResearchBulle2n,Rome
Applica1onsofcausalBNs
• Biomedicalinforma1cs–diagnosis,prognosis• Psychology–representa1onofcausallearning• Economics/finance
Markovcondi1on
(fromlastweek)Nodeindependentofnon-descendantsgivenitsparents
X
Y Z
Y ⊥ Z | X
d-separa1on
X YZ
DAGGSetofindependencies
Y ⊥ Z | X
d-separa1on
d-separa1on
Equivalentstatements,forsetsofnodesX,Y,ZingraphG:– XandYared-separatedbyZ(Zcanbenodeorsetofnodes)inG
– XandYarecondi1onallyindependentgivenZ– ZblocksallpathsbetweenXandY
d-separa1onandMarkovblanketMarkovblanket:setofnodesthatseparateanodefromallothersd-separa3on:Methodfordeterminingwhetherapairofnodes(orsetsofnodes)areindependentcondi1onedonanotherset
Defini1on:d-separa1on• Nodevisacollideriftwoarrowheadsmeetatv
• XandYared-connectedbyZingraphGiff– ExistsanundirectedpathbetweenavertexinXandvertexinYs.t.foreverycolliderConthepath,CordescendantofCisinZandnonon-collideronpathisinZ
• XandYared-separatedbyZinGifftheyarenotd-connectedbyZinG
Z YX Z YX
✓✗
Example1
• X→Y→Z
• XßY→Z
Inbothcases,X,Zd-separatedbyY:nocollidersonpathfromXtoZ,andXandZnotd-connectedbyY
Example2
• X→Y←Z
• X,Zd-separatedbyasetofnodesonlyifYNOTinthatset.X,Zd-connectedbyY
Example3
• AreY,Zd-separatedbyW?
• No,d-connectedbyXandWisdescendent
X
YZ
W
But…
Indep->manynetworksNetwork->1setindep
X YZY ⊥ Z | X
X YZ
X
YZ
But…
Canruleoutsome
X YZY ⊥ Z | X
X YZ
X
YZX
YZ
X
…And
HDL
Heartdisease
Genes
Heartdisease HDL
…AlsoCoin1 Coin2 #obs.
H H 5
T T 3
H T 1
T H 1
P(C1 = H ^C2 = H )> P(C1 = H )P(C2 = H )5 /10 > 6 /10*6 /10
C1 /⊥C2
Causalinterpreta1on
• CausalMarkovcondi1on• Faithfulness• Causalsufficiency
+afewothers,e.g.variables“correctly”specified
Causalgraph
• Arrowsdenotedirectcauses– EdgefromXtoYmeansXcausesY
• DAG
ads buy weather
CausalMarkovcondi1on(CMC)
Nodeinthegraphisindependentofallofitsnon-descendants(directandindirecteffects)givenitsdirectcauses
CMCandscreeningoff
RecallCommonCausePrinciple(CCP)IfP(X^Y)>P(X)P(Y)theneitherXcausesY(orviceversa)ortheyhaveacommoncause
Now:ifP(X^Y)>P(X)P(Y)andtheyhaveacommoncauseC,itmeansXindY|CNotethatCCPseekssinglecommoncause.CMCallowsforsetsofnodes.
Problems:feedback
Supply
Demand
Problems:Indeterminism
P(picture|switch)<P(picture|switch,sound)
TVswitch
Picture Sound
TVswitch
Picture Sound
ClosedCircuit
Spirtes,P.,Glymour,C.,&Scheines,R.(2000).Causa2on,predic2on,andsearch.MITPress
Problems:hiddencommoncauses
CFS
Tired Achy
Flu
Completenessofgraph
• Complete:allcommoncausesincluded,allcausalrela1onsamongvariablesincluded
• Incomplete:notallintermediatefactorsnecessarilyincluded
Faithfulness
Exactlythedependenciesintheunderlyingstructureholdinthedata– i.e.Independencerela1onsnotfromchancebutfromstructure
– Nocancelingout
Example
Smoking
Exercise
Health
- +
+
Anotherexample
GeneA
GeneB Phenotype
- +
+
Afinalexample(determinis1cchain)
X Y Z
X ⊥ Z |Y
Selec1onbias
fever Abdominalpain F+A
GotohospitalStayhome
Cooper,G.F.(1999).Anoverviewoftherepresenta1onanddiscoveryofcausalrela1onshipsusingbayesiannetworks.InC.Glymour&G.F.Cooper(Eds.),Computa2on,causa2on,anddiscovery.AAAIPressandMITPress
Howbigofaproblemisthis?
Recapofproblemsforfaithfulness
• Onlytrueinlargesamplelimit• Simpson’sparadox• Selec1onbias• Sta1s1caltests
Quickrecap
• CMC:popula1onproducedbystructurehastheseindependencies
• Faithfulness:popula1onhasonlytheseindependenciesWhydoweneedboth?
X Y Z
Causalsufficiency
• Allcommoncausesofpairsofvariablesmeasured
• NotsufficientifYnotmeasured
X
Y
Z
Completenessvs.sufficiency
Completeness:commoncausesareincludedincausalgraphSufficiency:allcommoncauseshavebeenmeasured
Example
Intelligence
X Y Z
Scheines,R.(1997).Anintroduc1ontocausalinference.CausalityinCrisis,185-99
Whatifnocausalsufficiency?
• Needtoincludeallgraphswithunmeasuredcommoncauses.
• Ex:measuredA,B,C.FoundA�C.WithCMC,faithfulnessbutnocausalsufficiency,thefollowinggraphsareallpossible(Xisunmeasured):
A
B
C A
B
C
X
A
B
C
X ...
Inabsenceofsufficiency…
• Cans1lllearnsomething– Somerela1onshipsmayappearinallgraphs– Canfindsetofallgraphsrepresen1ngindependencerela1ons,withnodesforpossiblehiddenvariables
• Timinginforma1onhelps
Thingstobewareofwithinference
• Samplesize• Missingdata(notjustvariables)• Mul1pletes1ng(andFDR)• WhatstructuresDAGcan/cannotrepresent(e.g.1meseriesandfeedback)
• Variablerepresenta1on
Thegoodnews
• Canadd1me• Canexperiment• Methodsfortes1ngassump1ons
RecapofcausalinferencewithBN
WhatmakesaBayesiannetworkcausal?Theassump1ons:CMC,sufficiency,faithfulness
Assump1ons+DataàIndependenciesàCausalBN(s)àeffectsofinterven1ons
LearningBN
Samemethodswediscussedlastweek– Searchandscore– Constraintbased(e.g.PCalgorithm)
UsesforBNs
• Ac1ons– WhathappensifwedoX?
• Counterfactuals– Whatifthingshappeneddifferently?
• Explana1ons– WhydidXhappen?
Manipulability
BPA
Obesity
Idealmanipula1ons
• Defini1on:changeinvalueofavariablethatdoesnotintroduceanyotherchanges(exceptthoseproducedbythechangeinvariable)
Weather
Runningspeed Aircondi1oner
Speeches
Popularity Dona1ons
Tes1ngpopularity,howdowemanipulateit’svalue?
Seeingversusdoing
Disease
Treatment
Doctor
Outcome
Hospital
What’sP(C)ifIturnthesprinkleron? IsthisthesameasP(C|S=T)?
Cloudy
Sprinkler Rain
Wetgrass
Interven1onandjointprobability
!=justincorpora1ngevidence– Lastweek:setvalueofobservedvalues– Thisweek:setvaluebyforcingvariabletotakevalueindependentofitsparents’values
Cloudy
Sprinkler Rain
Wetgrass
Ifturnonsprinkler,thefactthatit’sonnolongergivesinfoaboutC
Interven1onandjointprobability
Cloudy
Sprinkler Rain
Wetgrass
P(C,S,W,R) = P(c)P(s | c)P(r | c)P(w | s, r)C,S,W ,R∑
P(C,W,R | do(s)) = P(c)P(s)P(r | c)P(w | s, r)C,W ,R∑
do()operator
Modelcanhelpusdeterminetheeffectofinterven1onsP(X=x|Y=y)!=P(X=x|setY=y)Bigassump1on:cansetvariableT/F!
Example
P(S|do(M))
Disease
Medica1on
Sideeffect
ExampleDisease
Medica1on
Sideeffect
XP(s | do(m)) = P(s | m̂))
= P(s,d, m̂d∑ ) / P(m̂) = P(s | d, m̂
d∑ )P(d | m̂)P(m̂) / P(m̂)
= P(s | d, m̂d∑ )P(d)
BUT!P(d | m̂) = P(d)P(m) / P(m) =1
SO
do-calculusrules
1. Inser1on/dele1onofobserva1ons
P(y | do(x), z,w) = P(y | do(x),w) if (Y⊥ Z|X,W)GX
Disease
Medica1on
Sideeffect
GX MeansedgesintoXdeleted
do-calculusrule1examples
1. Inser1on/dele1onofobserva1ons
P(y | do(x), z,w) = P(y | do(x),w) if (Y⊥ Z|X,W)GX
D
M
S
G GS
D
M
S
X
W
Y
Z
G
X
W
Y
Z
GX
do-calculusrules
2.Ac1on/Observa1onexchangeIfremoveedgesfromZ,andindependent,canreplacedoingwithobserving
P(y | do(x),do(z),w) = P(y | do(x), z,w) if (Y⊥ Z | X,W)GXZ
X YZ
W
X YZ
W
GG-XZ
do-calculusrules
3.Inser1on/dele1onofac1onsZ(W)issetofZnodesthatarenotancestorsofW-nodesin
P(y | do(x),do(z),w) = P(y | do(x),w) if (Y ⊥ Z | X,W )GX,Z (W )
X YQ
W
Z X YQ
W
Z
GX
G G–X,Z(W)
Summaryofdo-calculus
1. Inser1on/dele1onofobserva1ons2. Ac1on/Observa1onexchange3. Inser1on/dele1onofac1ons
Ingeneral,mayhaveunobserved/hiddenvariables
Somecaveats
• Time• Modularity• Possibilityofintervening• Efficacy
Counterfactualsreminder
• IfIhadnotgonerunning,Iwouldnothavego|enasunburn
• Ifthepa1enthadtakenthedrug,shewouldhaverecovered
• HadIboughtsharesofApplestockin2004,Iwouldhavemadealargeprofit
PearlonCounterfactuals
Likedo(),exceptbackwardlookingandchangingvalueofvariableThreesteps
1. Abduc1on:useevidencetointerpretpast
2. Ac1on:changetohypothe1calvalues
3. Predic1on:seeconsequencesofac1ons
Disease(D)
Medica1on(M)
Sideeffect(S)
ExamplefromPearlIfD,thenDwoulds1llbetrueifAwerefalseDàD¬A
Court(U)
Captain(C)
A B
Death(D)
Abduc1on
Captain(C)
A B
Death(D)
Ac1on
Court(U)
Captain(C)
A B
Death(D)
Predic1on
Court(U)
Pearl,J.(2000).Causality:Models,reasoning,andinference.CambridgeUniversityPress
Actualcausality
Pearl:tokencause=actualcause– Whatcausedaperson’slungcancer?– Whoisresponsibleforanaccident
Graphicalmodelsandexplana1on
• Graphicalmodelrepresentsrela1onshipsbetweenvariables
• Observa1onsgivetruthvalueofvariablesinpar1cularscenario
• Evaluatecounterfactualqueriesusingmodel+observa1ons
Pearl’sapproachtoactualcause
• Basedonbuta|emptstosolveproblemswithcounterfactuals– BobandSusieandthebrokenbo|le
• Keyidea:sustenance(mixofnecessityandsufficiency)– IfBob’srockmissed,wouldSusie’ssustaintheglassbreaking?
Defini1ons
• Depends(necessity)– ydependsonx,ifxisnecessarytomaintainvalueofy
• Produces(sufficiency)– xcanproduceyifitcanbringabouteffectwhenneitherarepresent
• Sustains– xsustainsyifthereisatleastonecondi1onwhereYwilldifferfromyinabsenceofxANDY=yismaintainedinpresenceofxunderanysetofcondi1ons
CausalBeams
• Causalbeam:Newmodel,whereweremoveallparentsexceptthosethatminimallysustaintheirchildren.Setotherparentstosomew’.
• xisactualcauseofyifxisnecessaryforyinthatcausalbeamforsomew’
Exampleofcausalbeam
• Didthetravelerdieofthirstorpoisoning?
• Death=CvD
X(enemy2shootscanteen)
D(dehydra1on)
p(enemy1Poisonswater)
C(cyanideIntake)
Y(death)
Pearl,J.(2000).Causality:Models,reasoning,andinference.CambridgeUniversityPress
Construc1ngthecausalbeam
• True:X,D,Y,P• False:C
• Note:C=¬X^P
X=1
D=1
P=1
C=0
Y=1
X=shootscanteen,D=dehydra1on,Y=Death,C=cyanideintake,P=poisonswater
Sustaining
Inac1ve
Construc1ngthecausalbeam
• True:X,D,Y,P• False:C
• Now:C=¬X
X=1
D=1
P=1
C=0
Y=1
X=shootscanteen,D=dehydra1on,Y=Death,C=cyanideintake,P=poisonswater
Sustaining
Construc1ngthecausalbeam
• True:X,D,Y,P• False:C
• Next:Y=DvC
X=1
D=1
P=1
C=0
Y=1
X=shootscanteen,D=dehydra1on,Y=Death,C=cyanideintake,P=poisonswater
Sustaining
SustainingInac1ve
Construc1ngthecausalbeam
• True:X,D,Y,P• False:C
• Finally:Y=D,Y=X
X=1
D=1
P=1
C=0
Y=1
X=shootscanteen,D=dehydra1on,Y=Death,C=cyanideintake,P=poisonswater
Sustaining
Sustaining
Whatifweareuncertain?
• Urepresents1me1llfirstdrink
• U=1ifcanteenemp1edbeforedrink
• U=0otherwise
X=1
D
P=1
C
Y
u
Case1:u=1
• Canteenemp1edbeforetravelerdrinks
• Samebeamasbefore
X=1
D=1 C=0
Y=1
P=1U=1
Case2:u=0
• Drinksbeforecanteenisemp1ed
• WhatifUisuncertain?• UseP(u)tocalculate• P(xcausedy)=– SumofP(u)overuwherexcausedyinu
X=1
D=0
P=1
C=1
Y=1
U=0
Problem:Over-determina1on
• Whichriflemancausedthedeath?
• Counterfactual:– IfnotA,thenBwouldhavecausedD
Court(U)
Captain(C)
A B
Death(D)
Problem:Over-determina1on
• Whichriflemancausedthedeath?
• Counterfactual:– IfnotA,thenBwouldhavecausedD
• Structural:– AsustainsDagainstB
Court(U)
Captain(C)
A
Death(D)
B=False
Par1alsolu1on:defaults
Example:NeitherJacknorJillwateraplant,andtheplantdies.Jillusuallywatersit,JackneverdoesWho’satfault?
Halpern,JosephY."DefaultsandNormalityinCausalStructures."KR.2008.JosephY.HalpernandChristopherHitchcock.GradedCausa1onandDefaults.TheBri1shJournalforthePhilosophyofScience,66(2):413–457,2015.
• Default:whatwethinkistruemostofthe1me• Typicality:whatusuallyhappens(frequency)• Norms:judgmentofwhatshouldusuallyhappen
• Mainidea:forcounterfactualswecomparepossibleworlds,nowwerankthem
• Recallpenproblem!
Challengesfortheactualcause
• Type!=Token• Subjec1vity• Timing• Limitedbycompletenessofmodel
Challenge:subjec1vity
• Variableschosenandwhatvaluestheyaresettoaffectoutcome– Smokingvs.dura1onofsmoking
• Note:bothqueriesandtheiranswersmaythendiffer
Intoxica1on
CarAccident
WeatherEmo1onalstate
Challenge:1me
• Bobstartssmoking(S)Wednesday.He’sdiagnosedwithlungcancer(LC)onFriday.DidhisScausehisLC?
• Boblaterdies.WasLCthecause?
Smoking
Lungcancer
Death
InferencerecapBN DBN Granger Temporallogic
Results Graph
Time No
Data C/D/M
Cycles No
Latentvars. Yes
Predic1on Yes
Tokencause
Counterfactual-based
BN DBN Granger Temporallogic
Results Graph Graph Rela1onships Rela1onships
Time No Setoflags Singlelag* Window
Data C/D/M C/D/M* C D/M
Cycles No Yes Yes Yes
Latentvars
Yes Yes No No
Predic1on
Yes Yes No No
Tokencause
Counterfactual-based
No No Probabilis1c
Furtherreading• Graphicalmodelsandcausality– Spirtes,P.,Glymour,C.,&Scheines,R.(2000).Causa2on,predic2on,andsearch.MITPress
– Pearl,J.(2000/2009).Causality:Models,reasoning,andinference.CambridgeUniversityPress.
• Actualcause– Pearl’sbook– Halpern,J.Y.,&Pearl,J.(2005).Causesandexplana1ons:Astructural-modelapproach.PartI:Causes.TheBri2shJournalforthePhilosophyofScience,56(4),843-887.
Fornextweek
• Howcanwefindhowlongittakesforsmokingtocauselungcancer?
• Whentobuy/sellastockaÇeryouhearsomenews?
• ReadCPT2.4.2