Exact Inference ..

Slides:



Advertisements
Similar presentations
Variational Methods for Graphical Models Micheal I. Jordan Zoubin Ghahramani Tommi S. Jaakkola Lawrence K. Saul Presented by: Afsaneh Shirazi.
Advertisements

. Exact Inference in Bayesian Networks Lecture 9.
Bayesian Networks, Winter Yoav Haimovitch & Ariel Raviv 1.
Lauritzen-Spiegelhalter Algorithm
Exact Inference in Bayes Nets
Junction Trees And Belief Propagation. Junction Trees: Motivation What if we want to compute all marginals, not just one? Doing variable elimination for.
For Monday Read chapter 18, sections 1-2 Homework: –Chapter 14, exercise 8 a-d.
Lirong Xia Approximate inference: Particle filter Tue, April 1, 2014.
EE462 MLCV Lecture Introduction of Graphical Models Markov Random Fields Segmentation Tae-Kyun Kim 1.
Clique Trees Amr Ahmed October 23, Outline Clique Trees Representation Factorization Inference Relation with VE.
Pearl’s Belief Propagation Algorithm Exact answers from tree-structured Bayesian networks Heavily based on slides by: Tomas Singliar,
Belief Propagation by Jakob Metzler. Outline Motivation Pearl’s BP Algorithm Turbo Codes Generalized Belief Propagation Free Energies.
Overview of Inference Algorithms for Bayesian Networks Wei Sun, PhD Assistant Research Professor SEOR Dept. & C4I Center George Mason University, 2009.
Junction Trees: Motivation Standard algorithms (e.g., variable elimination) are inefficient if the undirected graph underlying the Bayes Net contains cycles.
From Variable Elimination to Junction Trees
Machine Learning CUNY Graduate Center Lecture 6: Junction Tree Algorithm.
GS 540 week 6. HMM basics Given a sequence, and state parameters: – Each possible path through the states has a certain probability of emitting the sequence.
1 Graphical Models in Data Assimilation Problems Alexander Ihler UC Irvine Collaborators: Sergey Kirshner Andrew Robertson Padhraic Smyth.
. Bayesian Networks For Genetic Linkage Analysis Lecture #7.
Bayesian Networks Clique tree algorithm Presented by Sergey Vichik.
Propagation in Poly Trees Given a Bayesian Network BN = {G, JDP} JDP(a,b,c,d,e) = p(a)*p(b|a)*p(c|e,b)*p(d)*p(e|d) a d b e c.
Belief Propagation, Junction Trees, and Factor Graphs
Graphical Models Lei Tang. Review of Graphical Models Directed Graph (DAG, Bayesian Network, Belief Network) Typically used to represent causal relationship.
. Inference I Introduction, Hardness, and Variable Elimination Slides by Nir Friedman.
. Approximate Inference Slides by Nir Friedman. When can we hope to approximate? Two situations: u Highly stochastic distributions “Far” evidence is discarded.
Exact Inference: Clique Trees
PGM 2002/03 Tirgul5 Clique/Junction Tree Inference.
1 Bayesian Networks Chapter ; 14.4 CS 63 Adapted from slides by Tim Finin and Marie desJardins. Some material borrowed from Lise Getoor.
Computer vision: models, learning and inference
Ahsanul Haque *, Swarup Chandra *, Latifur Khan * and Michael Baron + * Department of Computer Science, University of Texas at Dallas + Department of Mathematical.
For Wednesday Read Chapter 11, sections 1-2 Program 2 due.
Automated Planning and Decision Making Prof. Ronen Brafman Automated Planning and Decision Making 2007 Bayesian networks Variable Elimination Based on.
Introduction to Bayesian Networks
1 Variable Elimination Graphical Models – Carlos Guestrin Carnegie Mellon University October 11 th, 2006 Readings: K&F: 8.1, 8.2, 8.3,
Daphne Koller Variable Elimination Graph-Based Perspective Probabilistic Graphical Models Inference.
Probabilistic Networks Chapter 14 of Dechter’s CP textbook Speaker: Daniel Geschwender April 1, 2013 April 1&3, 2013DanielG--Probabilistic Networks1.
1 CMSC 671 Fall 2001 Class #21 – Tuesday, November 13.
Intro to Junction Tree propagation and adaptations for a Distributed Environment Thor Whalen Metron, Inc.
Exact Inference in Bayes Nets. Notation U: set of nodes in a graph X i : random variable associated with node i π i : parents of node i Joint probability:
1 CMSC 671 Fall 2001 Class #20 – Thursday, November 8.
Today Graphical Models Representing conditional dependence graphically
Belief propagation with junction trees Presented by Mark Silberstein and Yaniv Hamo.
1 Relational Factor Graphs Lin Liao Joint work with Dieter Fox.
1 Variable Elimination Graphical Models – Carlos Guestrin Carnegie Mellon University October 15 th, 2008 Readings: K&F: 8.1, 8.2, 8.3,
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk
Inference in Bayesian Networks
PGM 2003/04 Tirgul6 Clique/Junction Tree Inference
Today.
Exam Preparation Class
Bayesian Networks Background Readings: An Introduction to Bayesian Networks, Finn Jensen, UCL Press, Some slides have been edited from Nir Friedman’s.
Exact Inference Continued
Bayesian Networks (Directed Acyclic Graphical Models)
Markov Networks.
CSCI 5822 Probabilistic Models of Human and Machine Learning
Professor Marie desJardins,
Exact Inference ..
Class #19 – Tuesday, November 3
Exact Inference Eric Xing Lecture 11, August 14, 2010
Directed Graphical Probabilistic Models: the sequel
Exact Inference Continued
Class #16 – Tuesday, October 26
Class #22/23 – Wednesday, November 12 / Monday, November 17
Readings: K&F: 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7 Markov networks, Factor graphs, and an unified view Start approximate inference If we are lucky… Graphical.
Inference III: Approximate Inference
Lecture 3: Exact Inference in GMs
Clique Tree Algorithm: Computation
Variable Elimination Graphical Models – Carlos Guestrin
Advanced Machine Learning
Presentation transcript:

Exact Inference .

Belief Update in Trees (Markov and Bayesian networks alike) P(x) = u,v,w,y,z P(u,…,z,x) V U X W Y Z P(x) = u,v,w,y,z g1(x,u) g2(v,u) g3(w,u) g4(y,x) g5(z,x) P(x) = u g1(x,u) v g2(v,u) w g3(w,u) y g4(y,x) z g5(z,x)

Belief Update in Trees P(x|e) = P(x,e) / x P(x,e) ; P(x,e) = u,v,w,y,z P(u,…,z,x,e) V U X W Y Z E1 E2 P(x,e) = u,v,w,y,z g1(x,u) g2(v,u) g3(w,u,e1) g4(y,x) g5(z,x,e2) P(x,e) = u g1(x,u) v g2(v,u) w g3(w,u,e1,) y g4(y,x) z g5(z,x,e2)

Belief Update in Trees ( Interpretation for Bayesian Networks) V U X W Y Z

Update all variables given the evidence Desired Query (update all beliefs): P(x|e),…,P(v|e) ? V U X W Y Z E1 E2 Solution: Keep all partial sums on the links in both directions Messages sent inwards first. P(x,e) = u g1(x,u) v g2(v,u) w g3(w,u,e1,) y g4(y,x) z g5(z,x,e2)

Now add a link from W to Z. What changes? V U X W Y Z E1 E2 P(x,e) = u g1(x,u) v g2(v,u) w g3(w,u,e1,) y g4(y,x) z g5(z,x,w,e2)

Variable Elimination Order We wish to compute P(l,do) for every value l of L given evidence D = do. A X D Good summation order (variable A is summed last): P(l, do) = a,l,t,x P(a,t,x,l,do) = a p(a) p(do|a) p(l|a) t p(t|a) x p(x|a) Bad summation order (variable A is summed first): P(l, do) = a,l,t,x P(a,t,x,l,do) = x t a p(a) p(l|a) p(do|a) p(t|a) p(x|a) Yields a high dimensional temporary table How to choose a reasonable order ? (generate “Small” cliques)

Belief Update in General BNs Input: A Bayesian network, a set of nodes E with evidence E=e, an ordering x1,…,xm of all variables not in E. Output: P(x1,e) for every value x1 of X1. The query: Set the evidence in all local probability tables that are defined over some variables from E. Iteratively (in some “optimal or good” order) Move all irrelevant terms outside of innermost sum Perform innermost sum, getting a new term Insert the new term into the product

Variable elimination in Bayes networks p(t|v) V S L T A B X D p(x|a) p(d|a,b) p(a|t,l) p(b|s) p(l|s) p(s) p(v) g1(t,v) V S L T A B X D g4(x,a) g2(a,t,l) g6(b,s) g5(l,s) g3(d,a,b) h1(t) S L T A B h4(a) g2(a,t,l) g6(b,s) g5(l,s) g3(d,a,b) g3(d,a,b) S L A B g6(b,s) g5(l,s) h2(a,l) T V,X

Update all variables in a general network Desired Query (update all beliefs): P(A|d0),…,P(X|D=d0) ? Can we still compute them all at the cost of computing one term twice? g1(t,v) V S L T A B X D g4(x,a) g3(d,a,b) g2(a,t,l) g6(l,b,s) g5(a,l,b) P(a,…,x) = K g1(t,v) g2(a,t,l) g3(d,a,b) g4(x,a)g5(a,l,b)g6(l,b,s)

Reminder: Chordal Graphs

Keep Partial Results in a Tree of Cliques g1(t,v) V S L T A B X D g4(x,a) g3(d,a,b) g2(a,t,l) g6(l,b,s) g5(a,l,b) T,V D,A,B A,L,B L,B,S A,T,L Maximum spanning tree with the size of separators as weights. X,A

Keep Partial Results in a Tree of Cliques P(a,…,x) = g1(t,v) g2(a,t,l) g3(d,a,b) g4(x,a) g5(a,l,b) g6(l,b,s) d a D,A,B A,T,L X,A T,V v x b,d A T a,l t,l A,L,B L,B,S s l A node in two cliques is also in all cliques on the path connecting them. Solution: Keep all partial sums on the links in both directions Messages sent inwards first.

Observations Every elimination order creates a chordal graph. Every elimination order creates a clique tree that helps store partial sums. Computing posterior belief is time exponential in the largest clique in the undirected graph with the add-in edges. Computing posterior belief for all variables requires only twice the number of computations needed for one variable update.

Global conditioning Fixing value of A & B L C I J M E K D a b A L C I This transformation yields an I-map of Prob(a,b,C,D…) for fixed values of A and B. Fixing values in the beginning of the summation can decrease tables formed by variable elimination. This way space is traded with time. Special case: choose to fix a set of nodes that “break all loops”. This method is called cutset-conditioning.

Cuteset conditioning A B Fixing value of A & B & L breaks all loops. But can we choose less variables to break all loops ? Are there better variables to choose than others ? This optimization question translates to the well known FVS problem: Choose a set of variables of least weight that lie on every cycle of a given weighted undirected graph G. C I D E K J L M

The Noisy Or-Gate Model

Belief Update in Poly-Trees

Belief Update in Poly-Trees