Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Machine Learning – Lecture 13 Exact Inference & Belief Propagation 17.06.2009 Bastian.

Slides:



Advertisements
Similar presentations
Linear Time Methods for Propagating Beliefs Min Convolution, Distance Transforms and Box Sums Daniel Huttenlocher Computer Science Department December,
Advertisements

Exact Inference. Inference Basic task for inference: – Compute a posterior distribution for some query variables given some observed evidence – Sum out.
Variational Methods for Graphical Models Micheal I. Jordan Zoubin Ghahramani Tommi S. Jaakkola Lawrence K. Saul Presented by: Afsaneh Shirazi.
CS498-EA Reasoning in AI Lecture #15 Instructor: Eyal Amir Fall Semester 2011.
Graphical Models BRML Chapter 4 1. the zoo of graphical models Markov networks Belief networks Chain graphs (Belief and Markov ) Factor graphs =>they.
Bayesian Networks, Winter Yoav Haimovitch & Ariel Raviv 1.
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.
Dynamic Bayesian Networks (DBNs)
Loopy Belief Propagation a summary. What is inference? Given: –Observabled variables Y –Hidden variables X –Some model of P(X,Y) We want to make some.
Supervised Learning Recap
An Introduction to Variational Methods for Graphical Models.
Introduction to Belief Propagation and its Generalizations. Max Welling Donald Bren School of Information and Computer and Science University of California.
EE462 MLCV Lecture Introduction of Graphical Models Markov Random Fields Segmentation Tae-Kyun Kim 1.
Overview of Inference Algorithms for Bayesian Networks Wei Sun, PhD Assistant Research Professor SEOR Dept. & C4I Center George Mason University, 2009.
Chapter 8-3 Markov Random Fields 1. Topics 1. Introduction 1. Undirected Graphical Models 2. Terminology 2. Conditional Independence 3. Factorization.
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.
Lecture 17: Supervised Learning Recap Machine Learning April 6, 2010.
ETHEM ALPAYDIN © The MIT Press, Lecture Slides for.
1 Graphical Models in Data Assimilation Problems Alexander Ihler UC Irvine Collaborators: Sergey Kirshner Andrew Robertson Padhraic Smyth.
Global Approximate Inference Eran Segal Weizmann Institute.
Conditional Random Fields
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.
Today Logistic Regression Decision Trees Redux Graphical Models
Exact Inference: Clique Trees
Bayesian Networks Alan Ritter.
Computer vision: models, learning and inference Chapter 10 Graphical Models.
Machine Learning CUNY Graduate Center Lecture 21: Graphical Models.
Computer vision: models, learning and inference
CSC2535 Spring 2013 Lecture 1: Introduction to Machine Learning and Graphical Models Geoffrey Hinton.
Ch 8. Graphical Models Pattern Recognition and Machine Learning, C. M. Bishop, Summarized by B.-H. Kim Biointelligence Laboratory, Seoul National.
Perceptual and Sensory Augmented Computing Machine Learning, WS 13/14 Machine Learning – Lecture 14 Introduction to Regression Bastian Leibe.
Undirected Models: Markov Networks David Page, Fall 2009 CS 731: Advanced Methods in Artificial Intelligence, with Biomedical Applications.
Perceptual and Sensory Augmented Computing Machine Learning, Summer’11 Machine Learning – Lecture 13 Introduction to Graphical Models Bastian.
1 Variable Elimination Graphical Models – Carlos Guestrin Carnegie Mellon University October 11 th, 2006 Readings: K&F: 8.1, 8.2, 8.3,
Ch 8. Graphical Models Pattern Recognition and Machine Learning, C. M. Bishop, Revised by M.-O. Heo Summarized by J.W. Nam Biointelligence Laboratory,
CS Statistical Machine learning Lecture 24
An Introduction to Variational Methods for Graphical Models
INTRODUCTION TO MACHINE LEARNING 3RD EDITION ETHEM ALPAYDIN © The MIT Press, Lecture.
1 Mean Field and Variational Methods finishing off Graphical Models – Carlos Guestrin Carnegie Mellon University November 5 th, 2008 Readings: K&F:
Lecture 2: Statistical learning primer for biologists
Belief Propagation and its Generalizations Shane Oldenburger.
1 Use graphs and not pure logic Variables represented by nodes and dependencies by edges. Common in our language: “threads of thoughts”, “lines of reasoning”,
Machine Learning – Lecture 15
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:
ECE 8443 – Pattern Recognition ECE 8527 – Introduction to Machine Learning and Pattern Recognition Objectives: Elements of a Discrete Model Evaluation.
Maximum Entropy Model, Bayesian Networks, HMM, Markov Random Fields, (Hidden/Segmental) Conditional Random Fields.
Christopher M. Bishop, Pattern Recognition and Machine Learning 1.
Machine Learning – Lecture 11
Pattern Recognition and Machine Learning
Machine Learning – Lecture 18
Today Graphical Models Representing conditional dependence graphically
Distributed cooperation and coordination using the Max-Sum algorithm
1 Variable Elimination Graphical Models – Carlos Guestrin Carnegie Mellon University October 15 th, 2008 Readings: K&F: 8.1, 8.2, 8.3,
Slide 1 Directed Graphical Probabilistic Models: inference William W. Cohen Machine Learning Feb 2008.
CS 2750: Machine Learning Bayesian Networks Prof. Adriana Kovashka University of Pittsburgh March 14, 2016.
Prof. Adriana Kovashka University of Pittsburgh April 4, 2017
Markov Networks.
CSCI 5822 Probabilistic Models of Human and Machine Learning
Markov Random Fields Presented by: Vladan Radosavljevic.
Graduate School of Information Sciences, Tohoku University
Expectation-Maximization & Belief Propagation
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.
Lecture 3: Exact Inference in GMs
Variable Elimination Graphical Models – Carlos Guestrin
Presentation transcript:

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Machine Learning – Lecture 13 Exact Inference & Belief Propagation Bastian Leibe RWTH Aachen TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A AA A A A A A AAAAAA A AAAA A A A AA A A Many slides adapted from C. Bishop, Z. Gharahmani

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Announcements Exercise 4 now on the web  Bayesian networks  Conditional independence  Bayes ball  Sum-product algorithm Next week  Exercise on Tuesday!  No class on Wednesday! (RWTH Sports Day) 2 B. Leibe

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Course Outline Fundamentals (2 weeks)  Bayes Decision Theory  Probability Density Estimation Discriminative Approaches (5 weeks)  Lin. Discriminants, SVMs, Boosting  Dec. Trees, Random Forests, Model Sel. Graphical Models (5 weeks)  Bayesian Networks  Markov Random Fields  Exact Inference  Approximate Inference Regression Problems (2 weeks)  Gaussian Processes B. Leibe 3

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Recap: Conditional Independence Three cases  Divergent (“Tail-to-Tail”) –Conditional independence when c is observed.  Chain (“Head-to-Tail”) –Conditional independence when c is observed.  Convergent (“Head-to-Head”) –Conditional independence when neither c, nor any of its descendants are observed. 4 B. Leibe Image source: C. Bishop, 2006

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Recap: “Bayes Ball” Algorithm Graph algorithm to compute d-separation  Goal: Get a ball from X to Y without being blocked by V.  Depending on its direction and the previous node, the ball can –Pass through (from parent to all children, from child to all parents) –Bounce back (from any parent/child to all parents/children) –Be blocked Game rules  An unobserved node ( W  V ) passes through balls from parents, but also bounces back balls from children.  An observed node ( W 2 V ) bounces back balls from parents, but blocks balls from children. 5 B. Leibe Slide adapted from Zoubin Gharahmani

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Recap: Undirected Graphical Models Undirected graphical models (“Markov Random Fields”)  Given by undirected graph Conditional independence for undirected graphs  If every path from any node in set A to set B passes through at least one node in set C, then.  Simple Markov blanket: 6 B. Leibe Image source: C. Bishop, 2006

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Recap: Factorization in MRFs Joint distribution  Written as product of potential functions over maximal cliques in the graph:  The normalization constant Z is called the partition function. Remarks  BNs are automatically normalized. But for MRFs, we have to explicitly perform the normalization.  Presence of normalization constant is major limitation! –Evaluation of Z involves summing over O ( K M ) terms for M nodes! 7 B. Leibe

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Factorization in MRFs Role of the potential functions  General interpretation –No restriction to potential functions that have a specific probabilistic interpretation as marginals or conditional distributions.  Convenient to express them as exponential functions (“Boltzmann distribution”) –with an energy function E.  Why is this convenient? –Joint distribution is the product of potentials  sum of energies. –We can take the log and simply work with the sums… 8 B. Leibe

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Problematic case: multiple parents  Need to introduce additional links (“marry the parents”).  This process is called moralization. It results in the moral graph. Recap: Converting Directed to Undirected Graphs 9 B. Leibe Image source: C. Bishop, 2006 Need a clique of x 1,…, x 4 to represent this factor! Fully connected, no cond. indep.! Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Recap: Conversion Algorithm General procedure to convert directed  undirected 1.Add undirected links to marry the parents of each node. 2.Drop the arrows on the original links  moral graph. 3.Find maximal cliques for each node and initialize all clique potentials to 1. 4.Take each conditional distribution factor of the original directed graph and multiply it into one clique potential. Restriction  Conditional independence properties are often lost!  Moralization results in additional connections and larger cliques. 10 B. Leibe Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Recap: Computing Marginals How do we apply graphical models?  Given some observed variables, we want to compute distributions of the unobserved variables.  In particular, we want to compute marginal distributions, for example p ( x 4 ). How can we compute marginals?  Classical technique: sum-product algorithm by Judea Pearl.  In the context of (loopy) undirected models, this is also called (loopy) belief propagation [Weiss, 1997].  Basic idea: message-passing. 11 B. Leibe Slide credit: Bernt Schiele, Stefan Roth

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Recap: Message Passing on a Chain  Idea –Pass messages from the two ends towards the query node x n.  Define the messages recursively:  Compute the normalization constant Z at any node x m. 12 B. Leibe Image source: C. Bishop, 2006 Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Recap: Message Passing on Trees General procedure for all tree graphs.  Root the tree at the variable that we want to compute the marginal of.  Start computing messages at the leaves.  Compute the messages for all nodes for which all incoming messages have already been computed.  Repeat until we reach the root. If we want to compute the marginals for all possible nodes (roots), we can reuse some of the messages.  Computational expense linear in the number of nodes. We already motivated message passing for inference.  How can we formalize this into a general algorithm? 13 B. Leibe Slide credit: Bernt Schiele, Stefan Roth

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 How Can We Generalize This? Message passing algorithm motivated for trees.  Now: generalize this to directed polytrees.  We do this by introducing a common representation  Factor graphs 14 B. Leibe Undirected Tree Directed TreePolytree Image source: C. Bishop, 2006

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Topics of This Lecture Factor graphs  Construction  Properties Sum-Product Algorithm for computing marginals  Key ideas  Derivation  Example Max-Sum Algorithm for finding most probable value  Key ideas  Derivation  Example Algorithms for loopy graphs  Junction Tree algorithm  Loopy Belief Propagation 15 B. Leibe

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Factor Graphs Motivation  Joint probabilities on both directed and undirected graphs can be expressed as a product of factors over subsets of variables.  Factor graphs make this decomposition explicit by introducing separate nodes for the factors.  Joint probability 16 Regular nodes Factor nodes B. Leibe Image source: C. Bishop, 2006 Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Factor Graphs from Directed Graphs Conversion procedure 1.Take variable nodes from directed graph. 2.Create factor nodes corresponding to conditional distributions. 3.Add the appropriate links.  Different factor graphs possible for same directed graph. 17 B. Leibe Image source: C. Bishop, 2006 Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Factor Graphs from Undirected Graphs Some factor graphs for the same undirected graph:  The factor graph keeps the factors explicit and can thus convey more detailed information about the underlying factorization! 18 B. Leibe Image source: C. Bishop, 2006 Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Factor Graphs – Why Are They Needed? Converting a directed or undirected tree to factor graph  The result will again be a tree. Converting a directed polytree  Conversion to undirected tree creates loops due to moralization!  Conversion to a factor graph again results in a tree. 19 B. Leibe Image source: C. Bishop, 2006

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Topics of This Lecture Factor graphs  Construction  Properties Sum-Product Algorithm for computing marginals  Key ideas  Derivation  Example Max-Sum Algorithm for finding most probable value  Key ideas  Derivation  Example Algorithms for loopy graphs  Junction Tree algorithm  Loopy Belief Propagation 20 B. Leibe

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product Algorithm Objectives  Efficient, exact inference algorithm for finding marginals.  In situations where several marginals are required, allow computations to be shared efficiently. General form of message-passing idea  Applicable to tree-structured factor graphs.  Original graph can be undirected tree or directed tree/polytree. Key idea: Distributive Law  Exchange summations and products exploiting the tree structure of the factor graph.  Let’s assume first that all nodes are hidden (no observations). 21 B. Leibe Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product Algorithm Goal:  Compute marginal for x :  Tree structure of graph allows us to partition the joint distrib. into groups associated with each neighboring factor node: 22 B. Leibe ne ( x ) : neighbors of x. Image source: C. Bishop, 2006 Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product Algorithm Marginal:  Exchanging products and sums: 23 B. Leibe ne ( x ) : neighbors of x. Image source: C. Bishop, 2006 Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product Algorithm Marginal:  Exchanging products and sums: 24 B. Leibe This defines a first type of message : Image source: C. Bishop, 2006

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product Algorithm Evaluating the messages:  Each factor F s ( x, X s ) is again described by a factor (sub-)graph.  Can itself be factorized: 25 B. Leibe First message type: Image source: C. Bishop, 2006 Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product Algorithm Evaluating the messages:  Thus, we can write 26 B. Leibe First message type: Image source: C. Bishop, 2006 Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product Algorithm Evaluating the messages:  Thus, we can write 27 B. Leibe Second message type: First message type: Image source: C. Bishop, 2006

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product Algorithm Recursive message evaluation:  Exchanging sum and product, we again get 28 B. Leibe Each term G m ( x m, X sm ) is again given by a product Recursive definition: Image source: C. Bishop, 2006

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product Algorithm – Summary Two kinds of messages  Message from factor node to variable nodes: –Sum of factor contributions  Message from variable node to factor node: –Product of incoming messages  Simple propagation scheme. 29 B. Leibe

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product Algorithm Initialization  Start the recursion by sending out messages from the leaf nodes Propagation procedure  A node can send out a message once it has received incoming messages from all other neighboring nodes.  Once a variable node has received all messages from its neighboring factor nodes, we can compute its marginal by multiplying all messages and renormalizing: 30 B. Leibe Image source: C. Bishop, 2006

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product Algorithm – Summary To compute local marginals:  Pick an arbitrary node as root.  Compute and propagate messages from the leaf nodes to the root, storing received messages at every node.  Compute and propagate messages from the root to the leaf nodes, storing received messages at every node.  Compute the product of received messages at each node for which the marginal is required, and normalize if necessary. Computational effort  Total number of messages = 2 ¢ number of links in the graph.  Maximal parallel runtime = 2 ¢ tree height. 31 B. Leibe Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product: Example We want to compute the values of all marginals… 32 B. Leibe Unnormalized joint distribution: Picking x 3 as root…  x 1 and x 4 are leaves. Image source: C. Bishop, 2006 Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product: Example 33 B. Leibe Message definitions: Image source: C. Bishop, 2006 Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product: Example 34 B. Leibe Message definitions: Image source: C. Bishop, 2006

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product: Example 35 B. Leibe Message definitions: Image source: C. Bishop, 2006

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product: Example 36 B. Leibe Message definitions: Image source: C. Bishop, 2006 Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product: Example 37 B. Leibe Verify that marginal is correct: Message definitions: Image source: C. Bishop, 2006 Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Sum-Product Algorithm – Extensions Dealing with observed nodes  Until now we had assumed that all nodes were hidden…  Observed nodes can easily be incorporated: –Partition x into hidden variables h and observed variables. –Simply multiply the joint distribution p ( x ) by  Any summation over variables in v collapses into a single term. Further generalizations  So far, assumption that we are dealing with discrete variables.  But the sum-product algorithm can also be generalized to simple continuous variable distributions, e.g. linear-Gaussian variables. 38 B. Leibe where

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Topics of This Lecture Factor graphs  Construction  Properties Sum-Product Algorithm for computing marginals  Key ideas  Derivation  Example Max-Sum Algorithm for finding most probable value  Key ideas  Derivation  Example Algorithms for loopy graphs  Junction Tree algorithm  Loopy Belief Propagation 39 B. Leibe

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Max-Sum Algorithm Objective: an efficient algorithm for finding  Value x max that maximises p(x) ;  Value of p(x max ).  Application of dynamic programming in graphical models. In general, maximum marginals  joint maximum.  Example: 40 B. Leibe Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Max-Sum Algorithm – Key Ideas Key idea 1: Distributive Law (again)  Exchange products/summations and max operations exploiting the tree structure of the factor graph. Key idea 2: Max-Product  Max-Sum  We are interested in the maximum value of the joint distribution  Maximize the product p ( x ).  For numerical reasons, use the logarithm.  Maximize the sum (of log-probabilities). 41 B. Leibe

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Max-Sum Algorithm Maximizing over a chain (max-product) Exchange max and product operators Generalizes to tree-structured factor graph 42 B. Leibe Image source: C. Bishop, 2006 Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Max-Sum Algorithm Initialization (leaf nodes) Recursion  Messages  For each node, keep a record of which values of the variables gave rise to the maximum state: 43 B. Leibe Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Max-Sum Algorithm Termination (root node)  Score of maximal configuration  Value of root node variable giving rise to that maximum  Back-track to get the remaining variable values 44 B. Leibe Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Visualization of the Back-Tracking Procedure Example: Markov chain  Same idea as in Viterbi algorithm for HMMs… 45 B. Leibe variables states stored links Image source: C. Bishop, 2006 Slide adapted from Chris Bishop

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Topics of This Lecture Factor graphs  Construction  Properties Sum-Product Algorithm for computing marginals  Key ideas  Derivation  Example Max-Sum Algorithm for finding most probable value  Key ideas  Derivation  Example Algorithms for loopy graphs  Junction Tree algorithm  Loopy Belief Propagation 46 B. Leibe

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Junction Tree Algorithm Motivation  Exact inference on general graphs.  Works by turning the initial graph into a junction tree and then running a sum-product-like algorithm.  Intractable on graphs with large cliques. Main steps 1.If starting from directed graph, first convert it to an undirected graph by moralization. 2.Introduce additional links by triangulation in order to reduce the size of cycles. 3.Find cliques of the moralized, triangulated graph. 4.Construct a new graph from the maximal cliques. 5.Remove minimal links to break cycles and get a junction tree.  Apply regular message passing to perform inference. 47 B. Leibe

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Junction Tree Algorithm Starting from an undirected graph… 48 B. Leibe Image source: Z. Gharahmani Slide adapted from Zoubin Gharahmani

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Junction Tree Algorithm 1. Convert to an undirected graph through moralization.  Marry the parents of each node.  Remove edge directions. 49 B. Leibe Image source: Z. Gharahmani Slide adapted from Zoubin Gharahmani

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Junction Tree Algorithm 2. Triangulate  Such that there is no loop of length > 3 without a chord.  This is necessary so that the final junction tree satisfies the “running intersection” property (explained later). 50 B. Leibe Image source: Z. Gharahmani Slide adapted from Zoubin Gharahmani

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Junction Tree Algorithm 3. Find cliques of the moralized, triangulated graph. 51 B. Leibe Image source: Z. Gharahmani Slide adapted from Zoubin Gharahmani

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Junction Tree Algorithm 4. Construct a new junction graph from maximal cliques.  Create a node from each clique.  Each link carries a list of all variables in the intersection. –Drawn in a “separator” box. 52 B. Leibe Image source: Z. Gharahmani

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Junction Tree Algorithm 5. Remove links to break cycles  junction tree.  For each cycle, remove the link(s) with the minimal number of shared nodes until all cycles are broken.  Result is a maximal spanning tree, the junction tree. 53 B. Leibe Image source: Z. Gharahmani

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Junction Tree – Properties Running intersection property  “If a variable appears in more than one clique, it also appears in all intermediate cliques in the tree”.  This ensures that neighboring cliques have consistent probability distributions.  Local consistency  global consistency 54 B. Leibe Image source: Z. Gharahmani Slide adapted from Zoubin Gharahmani

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Junction Tree: Example 1 Algorithm 1.Moralization 2.Triangulation (not necessary here) 55 B. Leibe Image source: J. Pearl, 1988

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Junction Tree: Example 1 Algorithm 1.Moralization 2.Triangulation (not necessary here) 3.Find cliques 4.Construct junction graph 56 B. Leibe Image source: J. Pearl, 1988

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Junction Tree: Example 1 Algorithm 1.Moralization 2.Triangulation (not necessary here) 3.Find cliques 4.Construct junction graph 5.Break links to get junction tree 57 B. Leibe Image source: J. Pearl, 1988

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Junction Tree: Example 2 Without triangulation step  The final graph will contain cycles that we cannot break without losing the running intersection property! 58 B. Leibe Image source: J. Pearl, 1988

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Junction Tree: Example 2 When applying the triangulation  Only small cycles remain that are easy to break.  Running intersection property is maintained. 59 B. Leibe Image source: J. Pearl, 1988

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Junction Tree Algorithm Good news  The junction tree algorithm is efficient in the sense that for a given graph there does not exist a computationally cheaper approach. Bad news  This may still be too costly.  Effort determined by number of variables in the largest clique.  Grows exponentially with this number (for discrete variables).  Algorithm becomes impractical if the graph contains large cliques! 60 B. Leibe

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 Loopy Belief Propagation Alternative algorithm for loopy graphs  Sum-Product on general graphs.  Strategy: simply ignore the problem.  Initial unit messages passed across all links, after which messages are passed around until convergence –Convergence is not guaranteed! –Typically break off after fixed number of iterations.  Approximate but tractable for large graphs.  Sometime works well, sometimes not at all. 61 B. Leibe

Perceptual and Sensory Augmented Computing Machine Learning, Summer’09 References and Further Reading A thorough introduction to Graphical Models in general and Bayesian Networks in particular can be found in Chapter 8 of Bishop’s book. B. Leibe 62 Christopher M. Bishop Pattern Recognition and Machine Learning Springer, 2006