Exact Inference Algorithms Bucket-elimination

Similar documents
Exact Inference Algorithms Bucket-elimination

COMPSCI 276 Fall 2007

Reasoning with Deterministic and Probabilistic graphical models Class 2: Inference in Constraint Networks Rina Dechter

Capturing Independence Graphically; Undirected Graphs

Bayesian Networks: Representation, Variable Elimination

Capturing Independence Graphically; Undirected Graphs

Variable Elimination (VE) Barak Sternberg

CS6220: DATA MINING TECHNIQUES

Lecture 17: May 29, 2002

Variable Elimination: Algorithm

From Bayesian Networks to Markov Networks. Sargur Srihari

Implementing Machine Reasoning using Bayesian Network in Big Data Analytics

CS6220: DATA MINING TECHNIQUES

Variable Elimination: Algorithm

CS281A/Stat241A Lecture 19

Intelligent Systems: Reasoning and Recognition. Reasoning with Bayesian Networks

Message Passing and Junction Tree Algorithms. Kayhan Batmanghelich

Bounded Inference Non-iteratively; Mini-Bucket Elimination

Artificial Intelligence

Inference in Graphical Models Variable Elimination and Message Passing Algorithm

Weighted Heuristic Anytime Search

Inference and Representation

Probabilistic Reasoning; Network-based reasoning

Probabilistic Graphical Models (I)

Bayesian networks. Chapter 14, Sections 1 4

Probabilistic Partial Evaluation: Exploiting rule structure in probabilistic inference

Statistical Approaches to Learning and Discovery

Defining Things in Terms of Joint Probability Distribution. Today s Lecture. Lecture 17: Uncertainty 2. Victor R. Lesser

STATISTICAL METHODS IN AI/ML Vibhav Gogate The University of Texas at Dallas. Bayesian networks: Representation

Exact Inference I. Mark Peot. In this lecture we will look at issues associated with exact inference. = =

Probability. CS 3793/5233 Artificial Intelligence Probability 1

Introduction to Probabilistic Reasoning. Image credit: NASA. Assignment

Objectives. Probabilistic Reasoning Systems. Outline. Independence. Conditional independence. Conditional independence II.

Bayesian networks. Chapter Chapter

COMP538: Introduction to Bayesian Networks

Machine Learning Lecture 14

Probabilistic Reasoning Systems

Probabilistic Reasoning; Network-based reasoning

Lecture 9: PGM Learning

Sampling Algorithms for Probabilistic Graphical models

Bayesian Networks. Exact Inference by Variable Elimination. Emma Rollon and Javier Larrosa Q

15-780: Graduate Artificial Intelligence. Bayesian networks: Construction and inference

Rapid Introduction to Machine Learning/ Deep Learning

5. Sum-product algorithm

Quantifying uncertainty & Bayesian networks

Exercises, II part Exercises, II part

Mini-Buckets: A General Scheme for Bounded Inference

Bayesian Machine Learning

Machine Learning 4771

Intro to AI: Lecture 8. Volker Sorge. Introduction. A Bayesian Network. Inference in. Bayesian Networks. Bayesian Networks.

Context-specific independence Parameter learning: MLE

UNCERTAIN KNOWLEDGE AND REASONING

Clique trees & Belief Propagation. Siamak Ravanbakhsh Winter 2018

last two digits of your SID

Probabilistic Reasoning; Network-based reasoning

Bayesian Inference. Definitions from Probability: Naive Bayes Classifiers: Advantages and Disadvantages of Naive Bayes Classifiers:

12 : Variational Inference I

Computational Complexity of Inference

Undirected Graphical Models: Markov Random Fields

Introduction to Bayesian Networks. Probabilistic Models, Spring 2009 Petri Myllymäki, University of Helsinki 1

{ p if x = 1 1 p if x = 0

Junction Tree, BP and Variational Methods

Introduction to Bayesian Networks

Introduction to Artificial Intelligence. Unit # 11

Outline. CSE 573: Artificial Intelligence Autumn Agent. Partial Observability. Markov Decision Process (MDP) 10/31/2012

Graphical Models and Kernel Methods

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Lecture 15: MCMC Sanjeev Arora Elad Hazan. COS 402 Machine Learning and Artificial Intelligence Fall 2016

Search and Lookahead. Bernhard Nebel, Julien Hué, and Stefan Wölfl. June 4/6, 2012

Bayesian Networks Inference with Probabilistic Graphical Models

Module 10. Reasoning with Uncertainty - Probabilistic reasoning. Version 2 CSE IIT,Kharagpur

Improving Bound Propagation

Final Exam December 12, 2017

Bayesian Networks BY: MOHAMAD ALSABBAGH

Uncertainty and knowledge. Uncertainty and knowledge. Reasoning with uncertainty. Notes

STATISTICAL METHODS IN AI/ML Vibhav Gogate The University of Texas at Dallas. Markov networks: Representation

Graphical Models. Lecture 10: Variable Elimina:on, con:nued. Andrew McCallum

Bayesian networks: approximate inference

CSEP 573: Artificial Intelligence

UNIVERSITY OF CALIFORNIA, IRVINE. Fixing and Extending the Multiplicative Approximation Scheme THESIS

Directed Graphical Models or Bayesian Networks

Probabilistic Graphical Models. Guest Lecture by Narges Razavian Machine Learning Class April

Graph structure in polynomial systems: chordal networks

On finding minimal w-cutset problem

4 : Exact Inference: Variable Elimination

Uncertainty and Bayesian Networks

Introduction to Bayes Nets. CS 486/686: Introduction to Artificial Intelligence Fall 2013

Graph structure in polynomial systems: chordal networks

Y. Xiang, Inference with Uncertain Knowledge 1

Conditional Independence

Intelligent Systems (AI-2)

Motivation. Bayesian Networks in Epistemology and Philosophy of Science Lecture. Overview. Organizational Issues

Announcements. CS 188: Artificial Intelligence Fall Causality? Example: Traffic. Topology Limits Distributions. Example: Reverse Traffic

Exact Inference: Variable Elimination

Graphical Probability Models for Inference and Decision Making

Recall from last time: Conditional probabilities. Lecture 2: Belief (Bayesian) networks. Bayes ball. Example (continued) Example: Inference problem

Bayesian & Markov Networks: A unified view

Bayesian Network. Outline. Bayesian Network. Syntax Semantics Exact inference by enumeration Exact inference by variable elimination

Artificial Intelligence Bayes Nets: Independence

Undirected Graphical Models 4 Bayesian Networks and Markov Networks. Bayesian Networks to Markov Networks

Transcription:

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 lung Cancer Bronchitis X-ray Dyspnoea P (lung cancer=yes smoking=no, dyspnoea=yes ) =? 2

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 Finding most probable explanation (MPE) x* Finding maximum a-posteriory hypothesis * * (a1,...,ak ) argmax P(x, e) i a i argmax P(x,e) X/A Finding maximum-expected-utility (MEU) decision * * (d1,...,dk ) argmax P(x, e)u(x) d X/D x A X : hypothesisvariables D X : decisionvariables U( x): utilityfunction 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

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

Belief updating: P(X evidence)=? A P(a e=0) P(a,e=0)= B C e 0, d, c, b P(a)P(b a)p(c a)p(d b,a)p(e b,c)= D E Moral graph P(a) e 0 d P(c a) c b P(b a)p(d b,a)p(e b,c) Variable Elimination h B ( a, d, c, e) 10

11

A B C D E Moral graph 12

13

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

BE-BEL 19

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

E D C B A B C D E A 21

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

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

24

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

A B C D E Moral graph BE-BEL Use the ancestral graph only 26

Probabilistic Inference Tasks Belief updating: BEL(X i ) P(X i x i evidence) Finding most probable explanation (MPE) x* argmax P(x,e) Finding maximum a-posteriory hypothesis * * (a1,...,ak ) argmax P(x, e) a X/A Finding maximum-expected-utility (MEU) decision * * (d1,...,dk ) argmax P(x, e)u(x) d X/D x A X : hypothesisvariables D X : decisionvariables U( x): utilityfunction 32

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

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

35

Algorithm BE-MPE 36

37

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

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

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

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

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 and induced-width of 1. min-fill (min-fill) input: a graph G = (V;E), V = {v1; :::; 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 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

Different Induced-graphs 43

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

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

Chordal graphs and Maxcardinality 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

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