Exact Reasoning: AND/OR Search and Hybrids COMPSCI 276, Fall 2009 Set 8, Rina dechter
Approximation Techniques bounded inference COMPSCI 276, Fall 2009 Set 6: Rina Dechter eading: Primary: Class Notes (7) econdary: , Darwiche chapters 14)
Probabilistic Inference Tasks Belief updating: BEL(X ) P(X x | evidence) i i i Finding most probable explanation (MPE) x * arg max P( x , e) x Finding maximum a-posteriory hypothesis A : X * * (a ,..., a ) arg max P( x , e) 1 k hypothesis variables a X/A Finding maximum-expected-utility (MEU) decision D : X decision variables * * (d ,..., d ) arg max P( x , e) U( x ) 1 k ( ) : U x utility function d X/D CS 276 3
Belief Updating Smoking Bronchitis lung Cancer X-ray Dyspnoea P (lung cancer=yes | smoking=no, dyspnoea=yes ) = ? CS 276 4
Conditioning generates the probability tree ( , 0 ) ( ) ( | ) ( | ) ( | , ) ( | , ) P a e P a P b a P c a P d a b P e b c b c b e 0 Complexity of conditioning: exponential time, linear space CS 276 5
Conditioning+Elimination ( , 0 ) ( ) ( | ) ( | ) ( | , ) ( | , ) P a e P a P b a P c a P d a b P e b c 0 b c d e Idea: conditioning until of a (sub)problem gets small * w CS 276 6
Loop-cutset decomposition You condition until you get a polytree A=1 A=0 A A=0 A=0 A=1 A=1 A=0 A=1 C B C B C B B B B F F F P(B|F=0) = P(B, A=0|F=0)+P(B,A=1|F=0) Loop-cutset method is time exp in loop-cutset size And linear space CS 276 7
OR search space A F Ordering: A B E C D F B C E D A 0 1 B 0 1 0 1 E 0 1 0 1 0 1 0 1 C 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 D 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 F 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 CS 276 8
AND/OR search space A A A A F F F B B B C C B C E C E E D D E D D F Primal graph DFS tree OR A AND 0 1 OR B B AND 0 1 0 1 OR E C E C E C E C AND 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 OR D F D F D F D F D F D F D F D F AND 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 CS 276 9
A A F B B C OR vs AND/OR E C E D D F OR A AND 0 1 AND/OR OR B B AND 0 1 0 1 OR E C E C E C E C AND 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 OR D F D F D F D F D F D F D F D F AND 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 A A 0 0 0 1 1 OR B B 0 0 1 1 1 0 0 1 1 E E 0 0 1 1 0 0 1 1 1 0 0 1 1 0 0 1 1 C C 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 D D 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 F F 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 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 CS 276 10
A A F B AND/OR vs. OR B C E C E D D F OR A AND 0 1 AND/OR OR B B AND 0 1 0 1 OR E C E C E C E C AND 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 OR D F D F D F D F D F D F D F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 0 0 0 E E E 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 C C C 1 1 1 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 D D D 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 CS 276 13 F F F 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 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
OR space vs. AND/OR space OR space AND/OR space width height time(sec.) nodes backtracks time(sec.) AND nodes OR nodes 5 10 3.154 2,097,150 1,048,575 0.03 10,494 5,247 4 9 3.135 2,097,150 1,048,575 0.01 5,102 2,551 5 10 3.124 2,097,150 1,048,575 0.03 8,926 4,463 4 10 3.125 2,097,150 1,048,575 0.02 7,806 3,903 5 13 3.104 2,097,150 1,048,575 0.1 36,510 18,255 5 10 3.125 2,097,150 1,048,575 0.02 8,254 4,127 6 9 3.124 2,097,150 1,048,575 0.02 6,318 3,159 5 10 3.125 2,097,150 1,048,575 0.02 7,134 3,567 5 13 3.114 2,097,150 1,048,575 0.121 37,374 18,687 5 10 3.114 2,097,150 1,048,575 0.02 7,326 3,663 CS 276 14
AND/OR search tree for graphical models The AND/OR search tree of R relative to a spanning-tree, T, has: Alternating levels of: OR nodes (variables) and AND nodes (values) Successor function: A The successors of OR nodes X are all its consistent values along its path F The successors of AND <X,v> are all X child variables in T B C E D A solution is a consistent subtree Task: compute the value of the root node A B E C OR A D F AND 0 1 OR B B AND 0 1 0 1 OR E C E C E C E C AND 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 OR D F D F D F D F D F D F D F D F AND 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 CS 276 15
From DFS trees to pseudo-trees (Freuder 85, Bayardo 95) 1 4 1 6 2 3 2 7 5 3 (a) Graph 4 7 1 1 2 7 5 3 5 3 5 4 2 7 6 6 4 6 (b) DFS tree (c) pseudo- tree (d) Chain depth=3 depth=2 depth=6 CS 276 16
From DFS trees to Pseudo-trees OR 1 AND a b c OR 2 7 AND a b c a b c DFS tree OR 3 3 3 5 5 5 AND a b c a b c a b c a b c a b c a b c depth = 3 OR 4 4 4 4 4 4 4 4 4 6 6 6 6 6 6 6 6 6 AND a b c a b c a b c a b c a b c a b c a b c a b c a b c a b c a b c a b c a b c a b c a b c a b c a b c a b c OR 1 AND a b c OR 3 5 AND a b c a b c pseudo- tree OR 4 4 4 7 7 7 2 2 2 6 6 6 depth = 2 AND a b c a b c a b c a b c a b c a b c a b c a b c a b c a b c a b c a b c CS 276 17
Recommend
More recommend