1 / 49

Exact Reasoning: conditioning search and hybrids

Exact Reasoning: conditioning search and hybrids. COMPSCI 276 Fall 2007. Probabilistic Inference Tasks. Belief updating: Finding most probable explanation (MPE) Finding maximum a-posteriory hypothesis Finding maximum-expected-utility (MEU) decision. Belief Updating. Smoking.

udell
Download Presentation

Exact Reasoning: conditioning search and hybrids

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Exact Reasoning:conditioning search and hybrids COMPSCI 276 Fall 2007

  2. Probabilistic Inference Tasks • Belief updating: • Finding most probable explanation (MPE) • Finding maximum a-posteriory hypothesis • Finding maximum-expected-utility (MEU) decision CS 276

  3. Belief Updating Smoking lung Cancer Bronchitis X-ray Dyspnoea P (lung cancer=yes | smoking=no, dyspnoea=yes ) = ? CS 276

  4. Conditioning generates the probability tree Complexity of conditioning: exponential time, linear space CS 276

  5. Idea: conditioning until of a (sub)problem gets small Conditioning+Elimination CS 276

  6. A=0 A=0 A=0 A B C B C B B F F Loop-cutset decomposition • You condition until you get a polytree A=1 A=0 A=1 A=1 A=1 B C B 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. 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 OR search space A F B C Ordering: A B E C D F E D CS 276

  8. A A F F B B C C E E D D A B OR A E C AND 0 1 D F OR B B AND 0 0 1 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 AND/OR search space A F B C E D Primal graph DFS tree CS 276

  9. A F B C E D A B A 0 1 E C B 0 1 0 1 D F A E 0 1 0 1 0 1 0 1 0 1 B C 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 E 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 0 1 0 1 0 1 0 1 C 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 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 OR vs AND/OR OR A AND 0 1 AND/OR OR B B AND 0 0 1 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 0 OR 1 1 1 0 CS 276 1

  10. A F B C E D A B A OR A 0 1 E C B 0 1 0 1 D F A A E 0 0 1 1 0 1 0 1 0 1 0 1 B B C 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 E E D 0 0 1 1 0 0 1 1 0 0 1 1 0 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 C C F 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 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 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 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 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 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 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 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 AND/OR vs. OR AND 0 1 AND/OR OR B B AND 0 0 1 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 AND/OR size: exp(4), OR size exp(6) OR CS 276

  11. A F B C E D A B A OR A 0 1 E C B 0 1 0 1 D F A A E 0 0 1 1 0 1 0 1 0 1 0 1 B B C 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 E E D 0 0 1 1 0 0 1 1 0 0 1 1 0 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 C C F 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 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 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 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 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 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 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 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 No-goods (A=1,B=1) (B=0,C=0) AND/OR vs. OR AND 0 1 AND/OR OR B B AND 0 0 1 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 OR CS 276

  12. A F B C E D A B E C D F (A=1,B=1) (B=0,C=0) AND/OR vs. OR OR A AND 0 1 AND/OR OR B B AND 0 0 1 OR E C E C E C AND 0 1 1 0 1 1 0 1 0 1 OR 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 A A A 0 0 0 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 F F F 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 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

  13. OR space vs. AND/OR space CS 276

  14. A F B C E D A B E C D F OR A AND 0 1 OR B B AND 0 0 1 1 OR E C E C E C E C AND 0 1 0 1 0 1 0 1 1 1 0 0 0 1 0 1 OR D D F D F F D F D F D F D F D F AND 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 0 1 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: • The successors of OR nodes X are all its consistent values along its path • The successors of AND <X,v> are all X child variables in T • A solution is a consistent subtree • Task: compute the value of the root node 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 depth=3 (c) pseudo- tree depth=2 (d) Chain depth=6 CS 276

  16. OR 1 AND a b c OR 3 5 AND a b c a b c OR 4 4 4 7 7 7 2 2 2 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 From DFS trees to Pseudo-trees OR 1 AND a b c OR 2 7 AND a b c a b c DFS tree depth = 3 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 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 pseudo- tree depth = 2 CS 276

  17. Finding min-depth backbone trees • Finding min depth DFS, or pseudo tree is NP-complete, but: • Given a tree-decomposition whose tree-width is w*, there exists a pseudo tree T of G whose depth, satisfies (Bayardo and Mirankar, 1996, bodlaender and Gilbert, 91): m <= w* log n, CS 276

  18. A F C bucket-A A E B D AB bucket-B bucket-C ABC ABE bucket-E bucket-D BDE AEF bucket-F A A OR AND 0 1 B OR B B AND 0 0 1 1 C E OR C E C E C E C E AND 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 D F 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 Generating pseudo-trees from Bucket trees A A (A) B B (AB) C C (AC) (BC) E E (AE) (BE) (AE) D D (BD) (DE) F F (AF) (EF) d: A B C E D F Bucket-tree based on d Induced graph Bucket-tree Bucket-tree used as pseudo-tree AND/OR search tree CS 276

  19. AND/OR Search-tree properties(k= domain size, m = pseudo-tree depth. n = number of variables) • Theorem: Any AND/OR search tree based on a pseudo-tree is sound and complete (expresses all and only solutions) • Theorem: Size of AND/OR search tree is O(n km) Size of OR search tree is O(kn) • Theorem: Size of AND/OR search tree can be bounded by O(exp(w* log n)) • Related to:(Freuder 85; Dechter 90, Bayardo et. al. 96, Darwiche 1999, Bacchus 2003) • When the pseudo-tree is a chain we get an OR space CS 276

  20. Tasks and value of nodes • V( n) is the value of the tree T(n) for the task: • Counting: v(n) is number of solutions in T(n) • Consistency: v(n) is 0 if T(n) inconsistent, 1 othewise. • Optimization: v(n) is the optimal solution in T(n) • Belief updating: v(n), probability of evidence in T(n). • Partition function: v(n) is the total probability in T(n). • Goal: compute the value of the root node recursively using dfs search of the AND/OR tree. • Theorem: Complexity of AO dfs search is • Space: O(n) • Time: O(n km) • Time: O(exp(w* log n)) CS 276

  21. A A B B C E D E D C A 0 1 B B 0 1 0 1 E D E D E D E D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 C C C C C C C C 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Belief-updating on example CS 276

  22. A A B B C E D E D C A PA(0) PA(1) 0 1 B B PB|A(0|0) PB|A(1|0) PB|A(0|1) PB|A(1|1) 0 1 0 1 E D E D E D E D PE|AB(1|0,0) PE|AB(0|0,1) PE|AB(0|1,0) PE|AB(1|1,0) PE|AB(0|1,1) PE|AB(1|1,1) PE|AB(0|0,0) PE|AB(1|0,1) 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 C C C C C C C C PD|BC(0|0,0)× PC|A(0|0) 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 CS 276

  23. A P(A=0) 0 B P(B=0|A=0) P(B=1|A=0) 0 1 E D E D P(E=0|A=0,B=0) P(E=1|A=0,B=0) P(E=0|A=0,B=1) P(E=1|A=0,B=1) 1 0 1 0 0 1 0 1 C C C C A A P(D=0|B=0,C=0)× P(C=0|A=0) P(D=0|B=0,C=1)× P(C=1|A=0) P(D=1|B=0,C=0)× P(C=0|A=0) P(D=1|B=0,C=1)× P(C=1|A=0) P(D=0|B=1,C=0)× P(C=0|A=0) P(D=0|B=1,C=1)× P(C=1|A=0) P(D=1|B=1,C=0)× P(C=0|A=0) P(D=1|B=1,C=1)× P(C=1|A=0) B 0 1 0 1 0 1 0 1 B C E D E D C CS 276

  24. A P(A=0) 0 B P(B=0|A=0) P(B=1|A=0) 0 1 E C E C P(E=0|A=0,B=0) P(E=1|A=0,B=0) P(E=0|A=0,B=1) P(E=1|A=0,B=1) P(C=0|A=0) P(C=1|A=0) P(C=0|A=0) P(C=1|A=0) 0 1 0 1 0 1 0 1 D D D D P(D=0|B=0,C=0) P(D=0|B=0,C=1) P(D=1|B=0,C=0) P(D=1|B=0,C=1) P(D=0|B=1,C=0) P(D=0|B=1,C=1) P(D=1|B=1,C=0) P(D=1|B=1,C=1) 0 1 0 1 0 1 0 1 (d) CS 276

  25. A A B B C E C D E D AND/OR Tree DFS Algorithm (Belief Updating) Result: P(D=1,E=0) Evidence: E=0 .24408 OR A .6 .4 .3028 AND .1559 0 1 .3028 .1559 OR B B .1 .9 .4 .6 .352 .623 AND .27 .104 0 0 1 1 .5 .7 OR .4 .88 .54 .89 .2 .52 E C E C E C E C .4 .5 .7 .2 .2 .8 .2 .8 .1 .9 .1 .9 .8 .9 .7 .5 .8 .9 .7 .5 AND 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 OR .8 .9 .7 .5 .8 .9 .7 .5 D D D D D D D D .8 .9 .5 .8 .9 .7 .5 .7 AND 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 OR node: Marginalization operator (summation) AND node: Combination operator (product) CS 276 Value of node = updated belief for sub-problem below Evidence: D=1

  26. Complexity of AND/OR Tree Search • k = domain size • m = depth of pseudo-tree • n = number of variables • w*= treewidth CS 276

  27. From Search Trees to Search Graphs • Any two nodes that root identical subtrees (subgraphs) can be merged CS 276

  28. From Search Trees to Search Graphs • Any two nodes that root identical subtrees (subgraphs) can be merged CS 276

  29. 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 J J J J G G J J G G J J J J G G J J G G G G J J G G J J G G G G 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 H H H H K K K K H H H H K K K K H H H H K K K K H H H H K K K K H H H H K K K K H H H H K K K K H H H H K K K K H H H H K K K K 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 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 J A F B AND/OR Tree B C K E C E D D F G J G H OR A H K AND 0 1 OR B B AND 0 0 1 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 OR AND OR AND CS 276

  30. A J A F B An AND/ORgraph B C K E C E D D F G J G H OR A H K AND 0 1 OR B B AND 0 0 1 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 OR J J G G AND 0 1 0 1 0 1 0 1 OR H H H H K K K K AND 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 CS 276

  31. A C C A A F F B D D B B E E C E D F pseudo tree Merging Based on Context One way of recognizing nodes that can be merged: context (X) = ancestors of X in pseudo tree that are connected to X, or to descendants of X [ ] [A] [AB] [AB] [AE] [BC] CS 276

  32. A C A F B D B E C E D F AND/OR Search Graph Constraint Satisfaction – Counting Solutions Context [ ] [A] [AB] [AB] [AE] [BC] pseudo tree OR A AND 0 1 OR B B AND 1 1 0 0 C C OR C C E E E E AND 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 OR D D D D F F F F AND 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 CS 276 context minimal graph

  33. Context [ ] A A [A] B [AB] [AB] E C B C [BC] D E D AND/OR Tree DFS Algorithm (Belief Updating) Result: P(D=1,E=0) Evidence: E=0 .24408 A .6 .4 .3028 .1559 0 1 .3028 .1559 B B .1 .9 .4 .6 .352 .623 .27 .104 0 0 1 1 .5 .7 .4 .88 .54 .89 .2 .52 E C E C E C E C .4 .5 .7 .2 .2 .8 .2 .8 .1 .9 .1 .9 .8 .9 .7 .5 .8 .9 .7 .5 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 .8 .9 .7 .5 .8 .9 .7 .5 D D D D D D D D .8 .9 .5 .8 .9 .7 .5 .7 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 OR node: Marginalization operator (summation) AND node: Combination operator (product) CS 276 Value of node = updated belief for sub-problem below Evidence: D=1

  34. Context [ ] A A [A] B [AB] [AB] E C B C [BC] D E D Cache table for D AND/OR Graph DFS Algorithm (Belief Updating) Result: P(D=1,E=0) Evidence: E=0 .24408 A .6 .4 .3028 .1559 0 1 .3028 .1559 B B .1 .9 .4 .6 .352 .623 .27 .104 0 0 1 1 .5 .7 .4 .88 .54 .89 .2 .52 E C E C E C E C .4 .5 .7 .2 .2 .8 .2 .8 .1 .9 .1 .9 .8 .9 .7 .5 .8 .9 .7 .5 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 .8 .9 .7 .5 D D D D .8 .9 .5 .7 0 1 0 1 0 1 0 1 CS 276 Evidence: D=1

  35. F G B A J H E C C [ ] [ ] C D K K H H [C] [C] [C] [C] L L L A A [CK] [CK] [CH] [CH] K M N N B B [CKL] [CKL] [CHA] [CHA] N O O E E P [CKLN] [CKLN] [CHAB] [CHAB] F F [AB] [AB] O P P J J [CKO] [CKO] [CHAE] [CHAE] G G [AF] [AF] D D [CEJ] [CEJ] M M [CD] [CD] (C K H A B E J L N O D P M F G) (C K H A B E J L N O D P M F G) AND/OR context minimal graph C 0 1 H H K K 0 1 0 1 0 1 0 1 A A A A L L L L 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 B B B B B B B B N N N N N N N N 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 O O O O O O O O O O O O O O O O 0 1 0 1 0 1 0 1 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 F F F E E E E E E E E E E E E E E E E 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 P P P P P P P P 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 G G G G J J J J J J J J J J J J J J J J 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 D D D D D D D D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 M M M M 0 1 0 1 0 1 0 1 CS 276

  36. F G B A J H E max context size = treewidth C [ ] C D K H [C] [C] L L A [CK] [CH] K M N B [CKL] [CHA] N O E P [CKLN] [CHAB] F [AB] O P J [CKO] [CHAE] G [AF] D [CEJ] M [CD] (C K H A B E J L N O D P M F G) How Big Is the Context? Theorem: The maximum context size for a pseudo tree is equal to the treewidth of the graph along the pseudo tree. CS 276

  37. G D A B BDEFG F C E EFH M K H FHKJ L J KLM Treewidth vs. Pathwidth TREE G ABC BDFG BDEF D A B treewidth = 3 = (max cluster size) - 1 F EFH C E M K H FHK L HJ KLM J CHAIN ABC pathwidth = 4 = (max cluster size) - 1 CS 276

  38. Complexity of AND/OR Graph Search • k = domain size • n = number of variables • w*= treewidth • pw*= pathwidth w* ≤ pw* ≤ w* log n CS 276

  39. AND/OR search algorithms • AO(i) • i = the max size of a cache table (i.e. number of variables in a context) i = 0 i = w* treewidth Space: Time: O( n ) O( exp (w* log n) ) O(n exp w* ) O(n exp w* ) CS 276

  40. Searching AND/OR Graphs • AO(i): searches depth-first, cache i-context • i = the max size of a cache table (i.e. number of variables in a context) i=0 i=w* i Space: O(exp w*) Time: O(exp w*) Space: O(n) Time: O(exp(w* log n)) Space: O(exp(i) ) Time: O(exp(m_i+i ) CS 276

  41. 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 J J J J G G J J G G J J J J G G J J G G G G J J G G J J G G G G 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 H H H H K K K K H H H H K K K K H H H H K K K K H H H H K K K K H H H H K K K K H H H H K K K K H H H H K K K K H H H H K K K K 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 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 J A F B Caching B C K E C E D D F G J G H OR A H K context(D)={D} context(F)={F} AND 0 1 OR B B AND 0 0 1 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 OR AND OR AND CS 276

  42. A J A F B Caching B C K E C E D D F context(D)={D} context(F)={F} G J G H OR A H K AND 0 1 OR B B AND 0 0 1 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 OR J J G G AND 0 1 0 1 0 1 0 1 OR H H H H K K K K AND 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 CS 276

  43. A F 0 1 A B C 0 1 0 1 B 0 1 0 1 0 1 0 1 E 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 C E 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 A 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 0 1 0 1 0 1 0 1 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 B A 0 1 B E C 0 1 0 1 E 0 1 0 1 0 1 0 1 C 0 1 0 1 0 1 0 1 D F D OR AND A 0 1 0 1 0 1 0 1 0 1 AND F 0 1 OR 0 1 B B OR B B AND 0 0 1 1 AND 0 0 1 1 OR E C E C E C E C OR E C E C E C E C AND 0 1 0 1 0 1 AND 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 D F D F D F D F D F D F D F D F OR OR D F D F D F D F D F D F D F D F AND 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 0 1 0 1 All four search spaces Full OR search tree Context minimal OR search graph CS 276 Full AND/OR search tree Context minimal AND/OR search graph

  44. A F 0 1 A B C 0 1 0 1 B 0 1 0 1 0 1 0 1 E 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 C E 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 A 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 0 1 0 1 0 1 0 1 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 B A 0 1 B E C 0 1 0 1 E 0 1 0 1 0 1 0 1 C 0 1 0 1 0 1 0 1 D F D OR AND A 0 1 0 1 0 1 0 1 0 1 AND F 0 1 OR 0 1 B B OR B B AND 0 0 1 1 AND 0 0 1 1 OR E C E C E C E C OR E C E C E C E C AND 0 1 0 1 0 1 AND 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 D F D F D F D F D F D F D F D F OR OR D F D F D F D F D F D F D F D F AND 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 0 1 0 1 All four search spaces Full OR search tree Context minimal OR search graph Time-space CS 276 Full AND/OR search tree Context minimal AND/OR search graph

  45. Available code • http://graphmod.ics.uci.edu/group/Software CS 276

  46. E E E E D D D D M M M M C C C A L L L L B B K K K H H H H F F F F G G G J J J J A A A A B K B K B K B K C G L C G L C G L C G L D F M D F M D F M D F M E H E H E H E H J J J J 1-cutset 3-cutset 2-cutset AND/OR w-cutset CS 276

  47. E D M C A L B K H F G J E E D D M M C C A L A L B B K K H H F F G J G J AND/OR w-cutset grahpical model pseudo tree 1-cutset tree CS 276

  48. Searching AND/OR Graphs • AO(i): searches depth-first, cache i-context • i = the max size of a cache table (i.e. number of variables in a context) i=0 i=w* i Space: O(exp w*) Time: O(exp w*) Space: O(n) Time: O(exp(w* log n)) Space: O(exp(i) ) Time: O(exp(m_i+i ) CS 276

  49. w-cutset Trees Over AND/OR space • Definition: • T_w is a w-cutset tree relative to backbone tree T, iff T_w is roots T and when removed, yields tree-width w. • Theorem: • AO(i) time complexity for backbone T is time O(exp(i+m_i)) and space O(i), m_i is the depth of the T_i tree. • Better than w-cutset: O(exp(i+c_i)) when c_i is the number of nodes in T_i CS 276

More Related