bucket elimination
play

Bucket-elimination COMPSCI 276, Spring 2011 Class 5: Rina Dechter - PowerPoint PPT Presentation

Exact Inference Algorithms Bucket-elimination COMPSCI 276, Spring 2011 Class 5: Rina Dechter (Reading: class notes chapter 4 , Darwiche chapter 6) 1 Belief Updating Smoking Bronchitis lung Cancer X-ray Dyspnoea P (lung cancer=yes |


  1. Exact Inference Algorithms Bucket-elimination COMPSCI 276, Spring 2011 Class 5: Rina Dechter (Reading: class notes chapter 4 , Darwiche chapter 6) 1

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

  3. Probabilistic Inference Tasks  Belief updating: E is a subset {X1,…,Xn}, Y subset X -E, P(Y=y|E=e)  P(e)?   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 4

  4. Belief updating is NP-hard  Each sat formula can be mapped to a Bayesian network query.  Example: (u,~v,w) and (~u,~w,y) sat? 5

  5. Motivation A B C D Given:  How can we compute P(D)?, P(D|A=0)? P(A|D=0)?  Brute force O(k^4)  Maybe O(4k^2) 6

  6. Belief updating: P(X|evidence)=? P(a|e=0)  P(a,e=0)= A  B C B C P(a)P(b|a)P(c|a)P(d|b,a)P(e|b,c)=  0 , , , e d c b D D E E  P(a)    “Moral” graph P(b|a)P(d|b,a)P(e|b,c) P(c|a)  0 e d c b Variable Elimination h B ( , , , ) a d c e 10

  7. 11

  8. A B C D E “Moral” graph 12

  9. 13

  10. Bucket elimination Algorithm BE-bel (Dechter 1996)  Elimination operator b bucket B: P(b|a) P(d|b,a) P(e|b,c) B bucket C: P(c|a) h B (a, d, c, e) C bucket D: h C (a, d, e) D h D bucket E: e=0 (a, e) E W*=4 bucket A: P(a) h E (a) ”induced width” A (max clique size) P(a|e=0) 18

  11. BE-BEL 19

  12. Student Network example  P(J)? Difficulty Intelligence Grade SAT Apply Letter Job

  13. E D C B A B C D E A 21

  14. Complexity of elimination * d ( exp ( ( )) O n w  * ( ) the induced width of moral graph along ordering w d d The effect of the ordering: A B E C D B C D C E B D E A A   “Moral” graph * * ( ) 4 ( ) 2 w d w d 1 2 22

  15. BE-BEL More accurately: O(r exp(w*(d)) where r is the number of cpts. For Bayesian networks r=n. For Markov networks? 23

  16. 24

  17. The impact of observations Induced graph 25 Ordered graph Ordered conditioned graph

  18. A B C D E “Moral” graph BE-BEL Use the ancestral graph only 26

  19. 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 32

  20. Finding  MPE max P( x ) x Algorithm elim-mpe (Dechter 1996)   is replaced by max : max ( ) ( | ) ( | ) ( | , ) ( | , ) MPE P a P c a P b a P d a b P e b c a , e , d , c , b  max Elimination operator b bucket B: P(b|a) P(d|b,a) P(e|b,c) B bucket C: P(c|a) h B (a, d, c, e) C bucket D: h C (a, d, e) D h D bucket E: e=0 (a, e) E W*=4 h E bucket A: P(a) (a) ”induced width” A (max clique size) MPE 33

  21. Generating the MPE-tuple   5. b' arg max P(b | a' ) B: P(b|a) P(d|b,a) P(e|b,c) b   P(d' | b, a' ) P(e' | b, c' )   h B (a, d, c, e) 4. c' arg max P(c | a' ) C: P(c|a) c  B h (a' , d' , c, e' ) h C (a, d, e) D:  C 3. d' arg max h (a' , d, e' ) d h D (a, e) E: e=0  2. e' 0 A: P(a) h E (a)   E 1. a' arg max P(a) h (a) a Return (a' , b' , c' , d' , e' ) 34

  22. 35

  23. Algorithm BE-MPE 36

  24. 37

  25. Algorithm BE-MAP Variable ordering: Restricted: Max buckets should Be processed after sum buckets 38

  26. More accurately: O(r exp(w*(d)) where r is the number of cpts. For Bayesian networks r=n. For Markov networks? 39

  27. Finding small induced-width  NP-complete  A tree has induced-width of ?  Greedy algorithms:  Min width  Min induced-width  Max-cardinality  Fill-in (thought as the best)  See anytime min-width (Gogate and Dechter) 40

  28. Min-width ordering Proposition: algorithm min-width finds a min-width ordering of a graph 41

  29. Greedy orderings heuristics min-induced-width (miw) input: a graph G = (V;E), V = {1; :::; vn} output: An ordering of the nodes d = (v1; :::; vn). 1. for j = n to 1 by -1 do 2. r  a node in V with smallest degree. 3. put r in position j. 4. connect r's neighbors: E  E union {(vi; vj)| (vi; r) in E; (vj ; r) 2 in E}, 5. remove r from the resulting graph: V  V - {r}. Theorem: A graph is a tree iff it has both width min-fill (min-fill) input: a graph G = (V;E), V = {v1; :::; vn} and induced-width of 1. output: An ordering of the nodes d = (v1; :::; vn). 1. for j = n to 1 by -1 do 2. r  a node in V with smallest fill edges for his parents. 3. put r in position j. 4. connect r's neighbors: E  E union {(vi; vj)| (vi; r) 2 E; (vj ; r) in E}, 5. remove r from the resulting graph: V  V – {r}. 42

  30. Different Induced-graphs 43

  31. Min-induced-width Fall 2003 ICS 275A - Constraint Networks 44

  32. Min-fill algorithm  Prefers a node who add the least number of fill-in arcs.  Empirically, fill-in is the best among the greedy algorithms (MW,MIW,MF,MC) Fall 2003 ICS 275A - Constraint Networks 45

  33. Chordal graphs and Max- cardinality ordering A graph is chordal if every cycle of length at least 4 has a chord  Finding w* over chordal graph is easy using the max-cardinality  ordering If G* is an induced graph it is chordal chord  K-trees are special chordal graphs (A graph is a k-tree if all its  max-clique are of size k+1, created recursively by connection a new node to k earlier nodes in a cliques Finding the max-clique in chordal graphs is easy (just  enumerate all cliques in a max-cardinality ordering Fall 2003 ICS 275A - Constraint Networks 46

  34. Max-cardinality ordering Figure 4.5 The max-cardinality (MC) ordering procedure. 47

Recommend


More recommend