Reasoning with Graphical Models Class 1 Rina Dechter
class1 compsci2020
Darwiche chapters 1,3 Dechter‐Morgan&claypool book: Chapters 1‐2 Pearl chapter 1‐2
Reasoning with Graphical Models Class 1 Rina Dechter Darwiche - - PowerPoint PPT Presentation
Reasoning with Graphical Models Class 1 Rina Dechter Darwiche chapters 1,3 DechterMorgan&claypool book: Chapters 12 Pearl chapter 12 class1 compsci2020 Congressional Breifing: AI at UCI Rina Dechter Congressional Briefing,
class1 compsci2020
Darwiche chapters 1,3 Dechter‐Morgan&claypool book: Chapters 1‐2 Pearl chapter 1‐2
Congressional Briefing, December 2019 2
Congressional Briefing, December 2019 3
replicating humans learning
replicating how people reason.
PCWP CO HRBP HREKG HRSAT ERRCAUTER HR HISTORY CATECHOL SAO2 EXPCO2 ARTCO2 VENTALV VENTLUNG VENITUBE DISCONNECT MINVOLSET VENTMACH KINKEDTUBE INTUBATION PULMEMBOLUS PAP SHUNT ANAPHYLAXIS MINOVL PVSAT FIO2 PRESS INSUFFANESTH TPR LVFAILURE ERRBLOWOUTPUT STROEVOLUME LVEDVOLUME HYPOVOLEMIA CVP BP
A neural network A Graphical Model
Congressional Briefing, December 2019 4
Lawyer Policy Maker Medical Doctor
Queries:
Queries:
answers
5
Knowledge is huge, so How to identify what’s relevant?
Graphical Models
Congressional Briefing, December 2019
Example: diagnosing liver disease (Onisko et al., 1999)
6
Automated Reasoning:
Congressional Briefing, December 2019
Queries:
class1 compsci2020
Congressional Briefing, December 2019 8
278 monitoring stations (147 seismic)
CNTBT:A Graphical Model Application
The IDC (International Data Centers)
performing signal processing
Congressional Briefing, December 2019 9
Given: continuous waveform measurements from a global network of seismometer stations
Congressional Briefing, December 2019
Input: obsreved detection Output: a bulletin listing seismic events, with
Result: 60% reduction in error compared with human experts. Reasoning methods infers the most likely set of seismic events given the observed detections,
200 400 600 800 1000 1200 1 2 3 4 5 6 7 8 9 10 f(n) n
Linear / Polynomial / Exponential
Line ar
Reasoning is computationally hard
Complexity is exponential
Congressional Briefing, December 2019
Approximation, anytime
Bounded error
11
class1 compsci2020
class1 compsci2020
Class page
class1 compsci2020
E K F L H C B A M G J D ABC BDEF DGF EFH FHK HJ KLM
1 1 1 1 1 1 1 1 1 1 1 1 0101010101010101010101010101010101010101010101010101010101010101 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1
E C F D B A
1
Context minimal AND/OR search graph
A
OR AND
B
OR AND OR
E
OR
F F
AND
01
AND
0 1 C D D 01 0 1 1 E C D D 0 1 1 B E F F 0 1 C 1 E C
– Large complex system – Made of “smaller”, “local” interactions – Complexity emerges through interdependence
class1 compsci2020
– Large complex system – Made of “smaller”, “local” interactions – Complexity emerges through interdependence
– Maximization (MAP): compute the most probable configuration
[Yanover & Weiss 2002] [Bruce R. Donald et. Al. 2016]
class1 compsci2020
sequences
combinatorial number of candidate structures to compute the Global Minimum Energy Conformation (GMEC).
– Large complex system – Made of “smaller”, “local” interactions – Complexity emerges through interdependence
– Summation & marginalization
grass plane sky grass cow
Observation y Observation y Marginals p( xi | y ) Marginals p( xi | y )
and “partition function”
class1 compsci2020
e.g., [Plath et al. 2009]
Image segmentation and classification:
– Large complex system – Made of “smaller”, “local” interactions – Complexity emerges through interdependence
– Mixed inference (marginal MAP, MEU, …)
Test Drill Oil sale policy Test result Seismic structure Oil underground Oil produced Test cost Drill cost Sales cost Oil sales Market information
Influence diagrams &
(the “oil wildcatter” problem)
class1 compsci2020
e.g., [Raiffa 1968; Shachter 1986]
class1 compsci2020
P(S, C, B, X, D) = P(S) P(C|S) P(B|S) P(X|C,S) P(D|C,B)
lung Cancer Smoking X-ray Bronchitis Dyspnoea
P(D|C,B) P(B|S) P(S) P(X|C,S) P(C|S)
CPD:
C B P(D|C,B) 0 0 0.1 0.9 0 1 0.7 0.3 1 0 0.8 0.2 1 1 0.9 0.1
P(S)· P(C|S)· P(B|S)· P(X|C,S)· P(D|C,B
,,,
MAP(P)= 𝑛𝑏𝑦,,, P(S)· P(C|S)· P(B|S)· P(X|C,S)· P(D|C,B) Combination: Product Marginalization: sum/max
class1 compsci2020
An early example From medical diagnosis
PCWP CO HRBP HREKG HRSAT ERRCAUTER HR HISTORY CATECHOL SAO2 EXPCO2 ARTCO2 VENTALV VENTLUNG VENITUBE DISCONNECT MINVOLSET VENTMACH KINKEDTUBE INTUBATION PULMEMBOLUS PAP SHUNT ANAPHYLAXIS MINOVL PVSAT FIO2 PRESS INSUFFANESTH TPR LVFAILURE ERRBLOWOUTPUT STROEVOLUME LVEDVOLUME HYPOVOLEMIA CVP BP
The “alarm” network: 37 variables, 509 parameters (rather than 237 = 1011 !) [Beinlich et al., 1989]
class1 compsci2020
class1 compsci2020
A B
red green red yellow green red green yellow yellow green yellow red
Variables - countries (A,B,C,etc.) Values - colors (red, green, blue) Constraints:
C A B D E F G
A B E G D F C
Constraint graph
class1 828X‐2018
Is it possible that Chris goes to the party but Becky does not?
B A A C
A B C
class1 828X‐2018
Questions:
likely to show up at the party?
but Becky does not?
P(W,A,C,B) = P(B|W) · P(C|W) · P(A|W) · P(W) P(A,C,B|W=bad) = 0.9 · 0.1 · 0.5
P(A|W=bad)=.9
W A
P(C|W=bad)=.1
W C
P(B|W=bad)=.5
W B W P(W) P(A|W) P(C|W) P(B|W) B C A
W A P(A|W) good .01 good 1 .99 bad .1 bad 1 .9
class1 828X‐2018
P(C|W) P(B|W) P(W) P(A|W) W B A C
Query: Is it likely that Chris goes to the party if Becky does not but the weather is bad?
) , , | , ( A C B A bad w B C P
C→A
B A C P(C|W) P(B|W) P(W) P(A|W) W B A C
A→B C→A
B A C
Alex is‐likely‐to‐go in bad weather Chris rarely‐goes in bad weather Becky is indifferent but unpredictable
class1 828X‐2018
– Information extraction, semantic parsing, translation, topic models, …
– Object recognition, scene analysis, segmentation, tracking, …
– Pedigree analysis, protein folding and binding, sequence matching, …
– Webpage link analysis, social networks, communications, citations, ….
– Planning & decision making
class1 compsci2020
200 400 600 800 1000 1200 1 2 3 4 5 6 7 8 9 10 f(n) n
Linear / Polynomial / Exponential
Linear Polynomial Exponential
Complexity is Time and space(memory)
class1 compsci2020
Belief updating (sum-prod) MPE (max-prod)
CSP – consistency (projection-join) #CSP (sum-prod)
P(X) P(Y|X) P(Z|X) P(T|Y) P(R|Y) P(L|Z) P(M|Z)
) (X mZX ) (X mXZ ) (Z mZM
) (Z mZL
) (Z mMZ ) (Z mLZ ) (X mYX ) (X mXY
) (Y mTY ) (Y mYT ) (Y mRY ) (Y mYR
Trees are processed in linear time and memory
class1 compsci2020
class1 compsci2020
E K F L H C B A M G J D ABC BDEF DGF EFH FHK HJ KLM
treewidth = 4 - 1 = 3 treewidth = (maximum cluster size) - 1 Inference algorithm: Time: exp(tree-width) Space: exp(tree-width)
class1 compsci2020
C P J A L B E D F M O H K G N C P J L B E D F M O H K G N
A
C P J L E D F M O H K G N
B
P J L E D F M O H K G N
C Cycle cutset = {A,B,C}
C P J A L B E D F M O H K G N C P J L B E D F M O H K G N C P J L E D F M O H K G N C P J A L B E D F M O H K G N
class1 compsci2020
A=yellow A=green B=red B=blue B=red B=blue B=green B=yellow
C K G L D F H M J E C K G L D F H M J E C K G L D F H M J E C K G L D F H M J E C K G L D F H M J E C K G L D F H M J E
A C B K G L D F H M J E
Graph Coloring problem
class1 compsci2020
exp(w*) time/space
A D B C E F
1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
E C F D B A
1
Exp(w*) time O(w*) space
E K F L H C B A M G J D ABC BDEF DGF EFH FHK HJ KLM A=yellow A=green B=blue B=red B=blue B=green C K G L D F H M J E A C B K G L D F H M J E C K G L D F H M J E C K G L D F H M J E C K G L D F H M J E
Search+inference: Space: exp(q) Time: exp(q+c(q)) q: user controlled
class1 compsci2020
exp(w*) time/space
A D B C E F
1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
E C F D B A
1
Exp(w*) time O(w*) space
E K F L H C B A M G J D ABC BDEF DGF EFH FHK HJ KLM A=yellow A=green B=blue B=red B=blue B=green C K G L D F H M J E A C B K G L D F H M J E C K G L D F H M J E C K G L D F H M J E C K G L D F H M J E
Search+inference: Space: exp(q) Time: exp(q+c(q)) q: user controlled
Context minimal AND/OR search graph 18 AND nodes
A
OR AND
B
OR AND OR
E
OR
F F
AND
0 1
AND
1 C D D 0 1 1 1 E C D D 1 1 B E F F 1 C 1 E C
class1 compsci2020
A D B C E F
1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
E C F D B A
1
E K F L H C B A M G J D ABC BDEF DGF EFH FHK HJ KLM A=yellow A=green B=blue B=red B=blue B=green C K G L D F H M J E A C B K G L D F H M J E C K G L D F H M J E C K G L D F H M J E C K G L D F H M J E
Search + inference: Sampling + bounded inference
class1 compsci2020
Context minimal AND/OR search graph 18 AND nodes
A
OR AND
B
OR AND OR
E
OR
F F
AND
0 1
AND
1 C D D 0 1 1 1 E C D D 1 1 B E F F 1 C 1 E C
class1 compsci2020
class1 compsci2020
a dress. Why jump to that conclusion?: 1. because time is night time. 2. certain designs look like pajama.
see a car coming : you think ah… now there is a space (vacated), OR… there is no space and this guy is looking and leaving to another parking lot. What other clues can we have?
instead of ground floor. It steps out and should immediately recognize not being in the right level, and go back inside.
– If machines will not be allowed to be fallible they cannot be intelligent – (Mathematicians are wrong from time to time so a machine should also be allowed)
class1 compsci2020
system to reason.
– Limitation in observing the world: e.g., a physician see symptoms and not exactly what goes in the body when he performs diagnosis. Observations are noisy (test results are inaccurate) – Limitation in modeling the world, – maybe the world is not deterministic.
class1 compsci2020
class1 compsci2020
class1 compsci2020
class1 compsci2020
class1 compsci2020
class1 compsci2020
class1 compsci2020
class1 compsci2020
class1 compsci2020
class1 compsci2020
Alpha and beta are events
class1 compsci2020
class1 compsci2020
Burglary is independent of Earthquake
class1 compsci2020
Earthquake is independent of burglary
class1 compsci2020
class1 compsci2020
class1 compsci2020
class1 compsci2020
class1 compsci2020
class1 compsci2020
class1 compsci2020
class1 compsci2020
class1 compsci2020
class1 compsci2020
P(B,E,A,J,M)=?
class1 compsci2020
class1 compsci2020
class1 compsci2020
class1 compsci2020
class1 compsci2020
= P(S) P(C|S) P(B|S) P(X|C,S) P(D|C,B) lung Cancer Smoking X-ray Bronchitis Dyspnoea
P(D|C,B) P(B|S) P(S) P(X|C,S) P(C|S)
P(S, C, B, X, D)
CPD:
C B D=0 D=1 0 0 0.1 0.9 0 1 0.7 0.3 1 0 0.8 0.2 1 1 0.9 0.1
class1 compsci2020
class1 compsci2020
End of slides