1 Exact Inference Algorithms Bucket-elimination and more COMPSCI 179, Spring 2010 Set 8: Rina Dechter (Reading: chapter 14, Russell and Norvig
Counting How many people? SUM operator CHAINstructure
Maximization What is the maximum? MAX operator TREEstructure
12”14”15” S IIIIII P 60G80G H 6C9C B Min-Cost Assignment What is minimum cost configuration? 6C9C I3050 II4055 III∞60 IIIIII 12”45∞∞ 14” ”∞ G80G 12” ” ”50∞ IIIIII 12”75∞∞ 14” ”∞ ”14”15” II 30 I 60 III + MIN-SUMoperators CHAINstructure ” 75 12” ” ” 30 12” 50 15” +=
Belief Updating B uzz sound M echanical problem H igh temperature F aulty head R ead delays HP(H) FP(F) HFMP(M|H,F) FRP(R|F) P(F | B=1) = ? Mh 1 (M) HFMBel(M,H,F) Hh 2 (H) Fh 3 (F) Fh 4 (F) HFMP(M|H,F) ** = MBP(B|M) ** = FP(F,B=1) P(B=1) = Probability of evidence P(F=1|B=1) =.3725 Updated belief SUM-PRODoperators POLY-TREEstructure P(h,f,r,m,b) = P(h) P(f) P(m|h,f) P(r|f) P(b|m)
X YZ TRLM Belief updating (sum-prod)
X YZ TRLM MPE (max-prod)
CSP – consistency (projection-join) X YZ TRLM
X YZ TRLM #CSP (sum-prod)
X YZ TRLM Tree-solving Belief updating (sum-prod) MPE (max-prod) CSP – consistency (projection- join) #CSP (sum-prod)
Belief Propagation Instances of tree message passing algorithm Exact for trees Linear in the input size Importance: – One of the first algorithms for inference in Bayesian networks – Gives a cognitive dimension to its computations – Basis for conditioning algorithms for arbitrary Bayesian network – Basis for Loopy Belief Propagation (approximate algorithms) [Pearl, 1988]
21 Exact Inference Algorithms Bucket-elimination COMPSCI 179, Spring 2010 Set 8: Rina Dechter (Reading: chapter 14, Russell and Norvig
26 Belief Updating lung Cancer Smoking X-ray Bronchitis Dyspnoea P (lung cancer=yes | smoking=no, dyspnoea=yes ) = ?
27 Belief updating: P(X|evidence)=? “Moral” graph A D E C B P(a|e=0) P(a,e=0)= P(a)P(b|a)P(c|a)P(d|b,a)P(e|b,c)= P(a) P(b|a)P(d|b,a)P(e|b,c) BC ED Variable Elimination P(c|a)
28 Bucket elimination Algorithm BE-bel (Dechter 1996) Elimination operator P(a|e=0) W*=4 ”induced width” (max clique size) bucket B: P(a) P(c|a) P(b|a) P(d|b,a) P(e|b,c) bucket C: bucket D: bucket E: bucket A: e=0 B C D E A
29 “Moral” graph A D E C B
30 BE-BEL
IntelligenceDifficulty Grade Letter SAT Job Apply Student Network example P(J)?
36 E D C B A B C D E A
Fall 2003 ICS 275A - Constraint Networks 37 The induced-width width: is the max number of parents in the ordered graph Induced-width: width of induced graph: recursively connecting parents going from last node to first. Induced-width w*(d) = the max induced-width over all nodes Induced-width of a graph: max w*(d) over all d
38 Complexity of elimination The effect of the ordering: “Moral” graph A D E C B B C D E A E D C B A
39 More accurately: O(r exp(w*(d)) where r is the number of cpts. For Bayesian networks r=n. For Markov networks? BE-BEL
40
41 The impact of observations Moral graph Induced Moral graph Adjusted Graph for evidence in B Induced- adjusted.
42 Probabilistic Inference Tasks Belief updating: Finding most probable explanation (MPE)
43 Elimination operator MPE W*=4 ”induced width” (max clique size) bucket B: P(a) P(c|a) P(b|a) P(d|b,a) P(e|b,c) bucket C: bucket D: bucket E: bucket A: e=0 B C D E A Algorithm elim-mpe (Dechter 1996)
44 Generating the MPE-tuple C: E: P(b|a) P(d|b,a) P(e|b,c)B: D: A: P(a) P(c|a) e=0
12”14”15” S IIIIII P 60G80G H 6C9C B Min-Cost Assignment What is minimum cost configuration? 6C9C I3050 II4055 III∞60 IIIIII 12”45∞∞ 14” ”∞ G80G 12” ” ”50∞ IIIIII 12”75∞∞ 14” ”∞ ”14”15” II 30 I 60 III + MIN-SUMoperators CHAINstructure ” 75 12” ” ” 30 12” 50 15” +=
46
47 BE-MPE
48 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)