Exact Reasoning: AND/ OR Search and Hybrids COMPSCI 276, Fall 2014 Set 8, Rina dechter
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 2
Belief Updating Smoking Bronchitis lung Cancer X-ray Dyspnoea P (lung cancer= yes | smoking= no, dyspnoea= yes ) = ? CS 276 3
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 = 0 b c b e 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 * w Idea: conditioning until of a (sub)problem gets small 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 B C Ordering: A B E C D F 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 E C OR vs AND/OR 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 B B OR 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 B C AND/OR vs. 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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 1 1 1 OR B B B 0 0 0 1 1 1 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 a GM relative to a spanning-tree, T, has: Alternating levels of: OR nodes (variables) and AND nodes (values) Successor function: A F The successors of OR nodes X are all its consistent values along its path B C The successors of AND < X,v> are all X child variables in T 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
Pseudo-tree definition Given undirected graph G = (V, E), a directed rooted tree T = (V, E′) defined on all its nodes is a pseudo tree if any arc of G which is not included in E′ is a back-arc in T , namely it connects a node in T to an ancestor in T . The arcs in E′ may not all be included in E. Given a pseudo tree T of G, the extended graph of G relative to T includes also the arcs in E′ that are not in E: as GT = (V, E ∪ E′). CS 276 17
Recommend
More recommend