1
Exact Inference Algorithms Bucket-elimination
COMPSCI 276, Spring 2011 Class 5: Rina Dechter
(Reading: class notes chapter 4 , Darwiche chapter 6)
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
(Reading: class notes chapter 4 , Darwiche chapter 6)
2
lung Cancer Smoking X-ray Bronchitis Dyspnoea
4
X/A a * k * 1
e) , x P( max arg ) a ,..., (a evidence) | x P(X ) BEL(X
i i i
e) , x P( max arg * x
x
) x U( e) , x P( max arg ) d ,..., (d
X/D d * k * 1
variables hypothesis : X A function utility x variables decision : ) ( : U X D
5
Each sat formula can be mapped to a
Example: (u,~v,w) and (~u,~w,y) sat?
6
How can we compute P(D)?, P(D|A=0)? P(A|D=0)? Brute force O(k^4) Maybe O(4k^2)
Given:
10
“Moral” graph
A D E C B
b c d e , , ,
0 e
d
) , , , ( e c d a h B
b
B C E D
Variable Elimination
c
11
12
“Moral” graph
A D E C B
13
18
b
Elimination operator
W*=4 ”induced width” (max clique size)
19
BE-BEL
P(J)?
21
E D C B A B C D E A
22
* d
d d w
along graph moral
width induced the ) (
*
The effect of the ordering:
1 *
2 *
“Moral” graph
A D E C B
B C D E A E D C B A
23
More accurately: O(r exp(w*(d)) where r is the number of cpts. For Bayesian networks r=n. For Markov networks?
BE-BEL
24
25
Induced graph Ordered graph Ordered conditioned graph
26
Use the ancestral graph only BE-BEL “Moral” graph
A D E C B
32
X/A a * k * 1
e) , x P( max arg ) a ,..., (a evidence) | x P(X ) BEL(X
i i i
e) , x P( max arg * x
x
) x U( e) , x P( max arg ) d ,..., (d
X/D d * k * 1
variables hypothesis : X A function utility x variables decision : ) ( : U X D
33
b
Elimination operator
W*=4 ”induced width” (max clique size)
e) (a, h D
x
) , | ( ) , | ( ) | ( ) | ( ) ( max by replaced is
, , , ,
c b e P b a d P a b P a c P a P MPE :
b c d e a
max
34
e) (a, h D
(a) hE
e) c, d, (a, h B
e) d, (a, hC
(a) h P(a) max arg a' 1.
E a
e' 2.
) e' d, , (a' h max arg d' 3.
C d
) e' c, , d' , (a' h ) a' | P(c max arg c' 4.
B c
) c' b, | P(e' ) a' b, | P(d' ) a' | P(b max arg b' 5.
b
) e' , d' , c' , b' , (a' Return
35
36
37
38
Variable ordering: Restricted: Max buckets should Be processed after sum buckets
39
More accurately: O(r exp(w*(d)) where r is the number of cpts. For Bayesian networks r=n. For Markov networks?
40
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)
41
Proposition: algorithm min-width finds a min-width ordering of a graph
42
min-induced-width (miw) input: a graph G = (V;E), V = {1; :::; vn}
min-fill (min-fill) input: a graph G = (V;E), V = {v1; :::; vn}
Theorem: A graph is a tree iff it has both width and induced-width of 1.
43
Fall 2003 ICS 275A - Constraint Networks 44
Fall 2003 ICS 275A - Constraint Networks 45
Prefers a node who add the least
Empirically, fill-in is the best among the
Fall 2003 ICS 275A - Constraint Networks 46
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
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
47
Figure 4.5 The max-cardinality (MC) ordering procedure.