UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Bayes-ball—an Efficient Algorithm to Assess D-separation A Presentation for.

Slides:



Advertisements
Similar presentations
Chapter 12 Binary Search Trees
Advertisements

Exact Inference. Inference Basic task for inference: – Compute a posterior distribution for some query variables given some observed evidence – Sum out.
Lauritzen-Spiegelhalter Algorithm
The Volcano/Cascades Query Optimization Framework
Comp 122, Spring 2004 Binary Search Trees. btrees - 2 Comp 122, Spring 2004 Binary Trees  Recursive definition 1.An empty tree is a binary tree 2.A node.
Theory of Computing Lecture 6 MAS 714 Hartmut Klauck.
Junction Trees And Belief Propagation. Junction Trees: Motivation What if we want to compute all marginals, not just one? Doing variable elimination for.
More Graphs COL 106 Slides from Naveen. Some Terminology for Graph Search A vertex is white if it is undiscovered A vertex is gray if it has been discovered.
Applications of graph traversals
CS 171: Introduction to Computer Science II
Data Structures: Trees i206 Fall 2010 John Chuang Some slides adapted from Marti Hearst, Brian Hayes, or Glenn Brookshear.
Topics: 1. Finding a cycle in a graph 2. Propagation delay - example 3. Trees - properties מבנה המחשב - אביב 2004 תרגול 3#
Binary Trees Terminology A graph G = is a collection of nodes and edges. An edge (v 1,v 2 ) is a pair of vertices that are directly connected. A path,
CS 206 Introduction to Computer Science II 09 / 22 / 2008 Instructor: Michael Eckmann.
1 Data Structures and Algorithms Graphs I: Representation and Search Gal A. Kaminka Computer Science Department.
December Marginal and Joint Beliefs in BN1 A Hybrid Algorithm to Compute Marginal and Joint Beliefs in Bayesian Networks and its complexity Mark.
Spring 2010CS 2251 Graphs Chapter 10. Spring 2010CS 2252 Chapter Objectives To become familiar with graph terminology and the different types of graphs.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.6 [P]: Reasoning Under Uncertainty Sections.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 390 Professional Issues in Computer Science and Engineering Ch.6: The.
מבנה המחשב – מבוא למחשבים ספרתיים Foundations of Combinational Circuits תרגול מספר 3.
Bayesian Networks Alan Ritter.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Heuristic Search Notes for Ch.12 of Bratko and Ch.2 of Shoham For CSCE 580.
Important Problem Types and Fundamental Data Structures
C o n f i d e n t i a l HOME NEXT Subject Name: Data Structure Using C Unit Title: Trees.
KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE The trees.
Graph Algorithms Using Depth First Search Prepared by John Reif, Ph.D. Distinguished Professor of Computer Science Duke University Analysis of Algorithms.
Computer vision: models, learning and inference
Advanced Algorithms Analysis and Design Lecture 8 (Continue Lecture 7…..) Elementry Data Structures By Engr Huma Ayub Vine.
MA/CSSE 473 Day 12 Insertion Sort quick review DFS, BFS Topological Sort.
Chapter 14 Graphs. © 2004 Pearson Addison-Wesley. All rights reserved Terminology G = {V, E} A graph G consists of two sets –A set V of vertices,
Lecture 10 Trees –Definiton of trees –Uses of trees –Operations on a tree.
Perceptual and Sensory Augmented Computing Machine Learning, Summer’11 Machine Learning – Lecture 13 Introduction to Graphical Models Bastian.
1 Introduction to trees Instructor: Dimitrios Kosmopoulos.
Introduction to Bayesian Networks
Discussion #32 1/13 Discussion #32 Properties and Applications of Depth-First Search Trees.
Lecture 13 Jianjun Hu Department of Computer Science and Engineering University of South Carolina CSCE350 Algorithms and Data Structure.
Preview  Graph  Tree Binary Tree Binary Search Tree Binary Search Tree Property Binary Search Tree functions  In-order walk  Pre-order walk  Post-order.
INTERVENTIONS AND INFERENCE / REASONING. Causal models  Recall from yesterday:  Represent relevance using graphs  Causal relevance ⇒ DAGs  Quantitative.
Chapter 4: Trees Part I: General Tree Concepts Mark Allen Weiss: Data Structures and Algorithm Analysis in Java.
Graphs. Graphs Similar to the graphs you’ve known since the 5 th grade: line graphs, bar graphs, etc., but more general. Those mathematical graphs are.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Ver Chapter 13: Graphs Data Abstraction & Problem Solving with C++
© 2006 Pearson Addison-Wesley. All rights reserved 14 A-1 Chapter 14 Graphs.
Properties and Applications of Depth-First Search Trees and Forests
Pattern Recognition and Machine Learning
Trees Ellen Walker CPSC 201 Data Structures Hiram College.
1 Trees General Trees  Nonrecursive definition: a tree consists of a set of nodes and a set of directed edges that connect pairs of nodes.
BINARY TREES Objectives Define trees as data structures Define the terms associated with trees Discuss tree traversal algorithms Discuss a binary.
1 BN Semantics 2 – Representation Theorem The revenge of d-separation Graphical Models – Carlos Guestrin Carnegie Mellon University September 17.
Trees CSIT 402 Data Structures II 1. 2 Why Do We Need Trees? Lists, Stacks, and Queues are linear relationships Information often contains hierarchical.
Brian Williams, Fall 041 Analysis of Uninformed Search Methods Brian C. Williams Sep 21 st, 2004 Slides adapted from: Tomas Lozano Perez,
COP 3530 Spring2012 Data Structures & Algorithms Discussion Session.
CSC317 1 At the same time: Breadth-first search tree: If node v is discovered after u then edge uv is added to the tree. We say that u is a predecessor.
Breadth-First Search (BFS)
Binary Search Trees What is a binary search tree?
Trees Chapter 15.
CSCE 210 Data Structures and Algorithms
COSC160: Data Structures Binary Trees
Trees.
Lecture 18. Basics and types of Trees
ITEC 2620M Introduction to Data Structures
Binary Tree and General Tree
Depth-First Search.
Graph Algorithms Using Depth First Search
Week nine-ten: Trees Trees.
Lectures on Graph Algorithms: searching, testing and sorting
Trees-2, Graphs Data Structures with C Chpater-6 Course code: 10CS35
Important Problem Types and Fundamental Data Structures
3.2 Graph Traversal.
Analysis and design of algorithm
Binary Search Trees Comp 122, Spring 2004.
Presentation transcript:

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Bayes-ball—an Efficient Algorithm to Assess D-separation A Presentation for CSCE 582 (Fall 03) Marco Valtorta

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering D-separation Two nodes x and y in a directed acyclic graph (DAG) are d-separated if for each chain between x and y in the DAG, either: –there is a serial connection with evidence, or –there is a diverging connection with evidence, or –there is a converging connection with no evidence on it or on any of its descendants Two sets of nodes X and Y are d-separated if all of pairs x and y, with x in X and y in Y, are d- separated.

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Testing D-separation Direct testing of d-separation may be inefficient, because of the large number of chains in acyclic directed graphs (dags) How many paths are there in a connected dag? First consider how to count the number of paths in a dag –Topologically sort the dag. –The number of paths reaching node i is the sum, for all predecessors, of the number of paths that reach each predecessor –This leads to an inefficient recursive algorithm and an efficient dynamic programming algorithm

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Example A topological order of the nodes is indicated inside the nodes. The number of paths reaching a node from node 1 is written over each node. (Node 1 is a special case.)

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Special Case: Staged Networks Special case: There is an edge from each node in a layer to each node in the next layer, i.e. the layers are stages Each layer has the same number of nodes –Because x*y subject to x+y=c is maximized by x=y=c/2 How many stages? –For N nodes and c nodes per stage, there are c exp(N/c) paths –c=3 is the worst case

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Worst Case (ctd.) In fact, x exp(c/x) is maximum for x = e The general case of DAGs and the special case of staged networks motivate the search for more efficient algorithms to test d-separation

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering The Bayes-ball Algorithm There are several efficient algorithms for computing d-separation Bayes-Ball is both efficient (O(V+E)) and easy to code The main idea is to pass the Bayes-Ball to nodes in a DAG in different ways, according to who passes the ball (child or parent) and the state of the node that receives the ball (observed or unobserved)

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Passing the Ball From parent to unobserved child From parent to observed child From child to unobserved parent From child to observed parent The ball passes through to all children The ball bounces back to children and passes through to all parents The ball bounces back to all parents e The ball comes from the left The ball is blocked e

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Example A T E X L S B D What is A d-connected to? (1)Passes through T (2) Bounces back from E (2a) Passes through (3) Passes through and is blocked by S (4) Bounces back and is blocked, because E is marked on the top (1) (2) e e (4) (3) Termination requires a marking scheme. Two visits of each edge are sufficient (2a)

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering The Marking Scheme Nodes may marked as: –visited, if they are passed the ball at all –marked on the top, if they pass the ball to their parents –marked on the bottom, if they pass the ball to their children

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Nodes D-separated From v Insert v in a list of nodes to be visited, as if from one of its children. Call the list LV (1)If LV is empty, stop; else, take a node j out of LV and mark it visited (2)if j is not an evidence node and it is visited from a child if the top of j is not marked, mark its top and insert each of its parents in LV if the bottom of j is not marked, mark its bottom and schedule each of its children to be visited (3) if j is visited from a parent –if j is an evidence node and the top of j is not marked, then mark its top and schedule a visit to each of its parents –if j is not an evidence node and the bottom of j is not marked, then mark its bottom and schedule each of its children to be visited (4) Go back to 1

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Example A T E X L S B D What is A d-connected to? LV={A from child} LV={T from parent} LV={A from child, T, E from parent} LV={E from parent} LV={T from child, L from child} LV={L from child} LV={E from parent, S from child} LV={S from child} LV={} (1) (2) e e (4) (3) (2a) Every evidence node that is visited is d-connected to A. Every other node that is marked on the bottom is d-connected to A. Note: Every non-evidence node that is visited is also marked on the bottom, so: every node that is visited is d-connected to A.

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Example A T E X L S B D What is T d-connected to? LV={T from child} LV={A from child, T, E from parent} LV={E from parent} LV={T from child, L from child} LV={L from child} LV={E from parent, S from child} LV={S from child} LV={} e e Every evidence node that is visited is d-connected to A. Every other node that is marked on the bottom is d-connected to A. Note: Every non-evidence node that is visited is also marked on the bottom, so: every node that is visited is d-connected to A.

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Correctness In the case in which the start node has evidence, the algorithm does not mark any nodes as visited. This is not in accordance with the definition of d-separation, but it conforms to the intention of the author to identify the nodes that are relevant to assessing the belief in the start node. A non-evidence node j is marked on the bottom if and only if there is a non-blocked path from the start node to j –Note: for the version given in the presentation, this can be simplified to: any visited node is d-connected to the start node. Any edge is traversed at most once in each direction, so the algorithm has complexity O(n+m), where n is the number of nodes, and m is the number of edges. –O(n) operations are needed to initialize the markings of the nodes.

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Extensions and Reference Any edge is traversed at most once in each direction, so the algorithm has complexity O(n+m), where n is the number of nodes, and m is the number of edges. –O(n) operations are needed to initialize the markings of the nodes. Extensions involve explicit functional nodes and influence diagrams (decision networks) –In the Original Reference: –Ross D. Shachter. “Bayes-Ball: The Rational Pastime (for Determining Irrelevance and Requisite Information in Belief Networks and Influence Diagrams).” Proceedings of UAI-98, pp Soft copy at

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Extra Credit Prove correctness of Bayes-ball algorithm with marking. Two extra credit points if in by September 9 (one week from today). One extra credit point if in later, and to the discretion of the instructor.