Presentation is loading. Please wait.

Presentation is loading. Please wait.

Bucket Elimination: A Unifying Framework for Probabilistic Inference By: Rina Dechter Presented by: Gal Lavee.

Similar presentations


Presentation on theme: "Bucket Elimination: A Unifying Framework for Probabilistic Inference By: Rina Dechter Presented by: Gal Lavee."— Presentation transcript:

1 Bucket Elimination: A Unifying Framework for Probabilistic Inference By: Rina Dechter Presented by: Gal Lavee

2 Multiplying Tables Often in inference we see the notation: f(A) * g(B) where A and B are sets of variables and f and g are functions (usually probability functions) given as tables of the form: Example: a function f of two variables: A1 and A2 Where ai and ~ai are the possible states of Ai ~a1a1 f(~a1,a2)f(a1,a2)a2 f(~a1,~a2)f(a1,~a2)~a2

3 Multiplying Tables Multiply the two functions (given as tables) f and g. Where g takes one variable (B1) and f takes two variables (A1,A2) ~a1a1 f(~a1,a2)f(a1,a2)a2 f(~a1,~a2)f(a1,~a2)~a2 ~b1b1 g(~b1)g(b1)

4 Multiplying Tables ~a1a1b1 f(~a1,a2)*g(b1)f(a1,a2)*g(b1) a2 f(~a1,~a2)*g(b1)f(a1,~a2)*g(b1) ~a2 ~a1a1~b1 f(~a1,a2)*g(~b1)f(a1,a2)*g(~b1) a2 f(~a1,~a2)*g(~b1)f(a1,~a2)*g(~b1) ~a2 The result is a function h, which takes as 3 arguments (the union of the arguments of f and g), A1,A2,B1 The value of the function h(A1,A2,B1) is simply the product f(A1,A2) * g(B1) This function can be expressed as a table with 2^3 entries:

5 Summing over tables Given a function of multiple variables it is often useful to eliminate variables by summation Summing the function f of variables A1,A2 (given as a table) over the variable A2 yields a new function f1 of just one variable(A1). The new function value is given by f(A1,a2)+f(A1,~a2). This function can be specified as the table: ~a1a1 f(~a1,a2)f(a1,a2)a2 f(~a1,~a2)f(a1,~a2)~a2 ~a1a1 f(~a1,a2)+ f(~a1,~a2) f(a1,a2)+ f(a1,~a2)

6 Bucket Elimination-Definition Bucket elimination is a unifying algorithmic framework that generalizes dynamic programming to accommodate algorithms for many complex problem-solving and reasoning activities Including: –Belief Assessment –Most Probable Estimation (MPE) –Maximum A posteriori Hypothesis (MAP) –Maximum Expected Utility MEU Uses “buckets”, an organizational device, to mimic the algebraic manipulations involved in each of these problems resulting in an easily expressible algorithmic formulation Each bucket elimination algorithm is associated with a node ordering

7 The Bucket Elimination Algorithm Mimics algebraic manipulation Partition functions on the graph into “buckets” in backwards relative to the given node order In the bucket of variable Xi we put all functions that mention Xi but do not mention any variable having a higher index e.g. in the bucketG we will place all functions whose scope includes variable G

8 The Algorithmcntd. Process buckets backwards relative to the node order Processing a bucket amounts to eliminating the variable in the bucket from subsequent computation. The computed function after elimination is placed in the bucket of the ‘highest’ variable in its scope E.g= sum over G is computed and placed in bucket F

9 Example - Belief Updating/Assessment Definition –Given a set of evidence compute the posterior probability of each proposition –The belief assessment task of X k = x k is to find where k – normalizing constant

10 Example - Belief Assessment F B C D G Node Ordering: A,C,B,F,D,G

11 Example - Belief Assessment F B C D G Node Ordering: A,C,B,F,D,G Initial Bucket Partition

12 Example - Belief Assessment F B C D G Node Ordering: A,C,B,F,D,G Process buckets in reverse order (G)

13 Example - Belief Assessment F B C D G Node Ordering: A,C,B,F,D,G Process buckets in reverse order (D)

14 Example - Belief Assessment F B C D G Node Ordering: A,C,B,F,D,G Process buckets in reverse order (F)

15 Example - Belief Assessment F B C D G Node Ordering: A,C,B,F,D,G Process buckets in reverse order (B)

16 Example - Belief Assessment F B C D G Node Ordering: A,C,B,F,D,G Process buckets in reverse order (C)

17 Example - Belief Assessment F B C D G Node Ordering: A,C,B,F,D,G Process buckets in reverse order (A)

18 Belief Assessment Summary In reverse Node Ordering: –Create bucket function by multiplying all functions (given as tables) containing the current node –Perform variable elimination using Summation over the current node –Place the new created function table) into the appropriate bucket

19 Most Probable Explanation (MPE) Definition –Given evidence find the maximum probabillity assignment to the remaining variables –The MPE task is to find an assignment x o = (x o 1, …, x o n ) such that

20 Most Probable Explanation (MPE) Differences from Belief Assessment –Replace Sums With Maxs –Keep track of maximizing value at each stage –“Forward Step” to determine what is the maximizing assignment tuple

21 Example - MPE F B C D G Node Ordering: A,C,B,F,D,G

22 Example - MPE F B C D G Node Ordering: A,C,B,F,D,G Initial Bucket Partition (same as belief assessment)

23 Example - MPE F B C D G Node Ordering: A,C,B,F,D,G Process buckets in reverse order (G)

24 Example - MPE F B C D G Node Ordering: A,C,B,F,D,G Process buckets in reverse order (D)

25 Example - MPE F B C D G Node Ordering: A,C,B,F,D,G Process buckets in reverse order (F)

26 Example - MPE F B C D G Node Ordering: A,C,B,F,D,G Process buckets in reverse order (B)

27 Example - MPE F B C D G Node Ordering: A,C,B,F,D,G Process buckets in reverse order (C)

28 Example - MPE F B C D G Node Ordering: A,C,B,F,D,G Process buckets in reverse order (A)

29 Example - MPE F B C D G Node Ordering: A,C,B,F,D,G Forward Phase: determine maximizing tuple:

30 MPE Summary In reverse node Ordering –Create bucket function by multiplying all functions (given as tables) containing the current node –Perform variable elimination using the Maximization operation over the current node (recording the maximizing state function) –Place the new created function table) into the appropriate bucket In forward node ordering –Calculate the maximum probability using maximizing state functions

31 Maximum Aposteriori Hypothesis (MAP) Definition –Given evidence find an assignment to a subset of “hypothesis” variables that maximizes their probability –Given a set of hypothesis variables A = {A 1, …, A k },, the MAP task is to find an assignment a o = (a o 1, …, a o k ) such that

32 Maximum Aposteriori Hypothesis (MAP) Mixture of Belief Assessment and MPE –Sum over non-hypothesis vars –Max over hypothesis var –Forward phase over hypothesis vars only –Algorithm presented assumes hypothesis vars are at the beginning of the order

33 Example - MAP F B C D G Node Ordering: A,C,B,F,D,G Hypothesis Nodes: A,B,C

34 Example - MAP Initial Bucket Partition (Same as Belief Assessment, MPE) F B C D G Node Ordering: A,C,B,F,D,G Hypothesis Nodes: A,B,C

35 Example - MAP Process buckets in reverse order (G) F B C D G Node Ordering: A,C,B,F,D,G Hypothesis Nodes: A,B,C

36 Example - MAP Process buckets in reverse order (D) F B C D G Node Ordering: A,C,B,F,D,G Hypothesis Nodes: A,B,C

37 Example - MAP Process buckets in reverse order (F) F B C D G Node Ordering: A,C,B,F,D,G Hypothesis Nodes: A,B,C

38 Example - MAP Process buckets in reverse order (B) F B C D G Node Ordering: A,C,B,F,D,G Hypothesis Nodes: A,B,C

39 Example - MAP Process buckets in reverse order (C) F B C D G Node Ordering: A,C,B,F,D,G Hypothesis Nodes: A,B,C

40 Example - MAP Process buckets in reverse order (A) F B C D G Node Ordering: A,C,B,F,D,G Hypothesis Nodes: A,B,C

41 Example - MAP Forward Phase: determine maximizing tuple: F B C D G Node Ordering: A,C,B,F,D,G Hypothesis Nodes: A,B,C

42 MAP -Summary In reverse node Ordering –Create bucket function by multiplying all functions (given as tables) containing the current node –If is a hypothesis node: Perform variable elimination using the Maximization operation over the current node (recording the maximizing state function) –Else: Perform variable elimination using Summation over the current node (recording the maximizing state function) –Place the new created function (table) into the appropriate bucket In forward node ordering –Calculate the maximum probability using maximizing state functions over hypothesis nodes only

43 Generalizing Bucket Elimination As we have seen bucket elimination algorithms can be formulated for different problems by simply altering the elimination operation. For some problems we may also want to change the combination operation which we use to combine functions. Elimination OperatorCombination OperatorProblem SummationMultiplicationBelief Assessment MaximizationMultiplicationMPE MultiplicationJoinCSP MinimizationSummationMax-CSP

44 Thank You


Download ppt "Bucket Elimination: A Unifying Framework for Probabilistic Inference By: Rina Dechter Presented by: Gal Lavee."

Similar presentations


Ads by Google