1 / 51

Bayesian Networks in Probabilistic Reasoning

Learn about Bayesian Networks and how they are used in probabilistic reasoning. Discover how to represent knowledge in uncertain domains and how to perform exact inference in Bayesian Networks.

ebrewer
Download Presentation

Bayesian Networks in Probabilistic Reasoning

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Artificial Intelligence: Representation and Problem SolvingProbabilistic Reasoning (2): Bayesian Networks 15-381 / 681 Instructors: Fei Fang (This Lecture) and Dave Touretzky feifang@cmu.edu Wean Hall 4126

  2. Recap • Probability Models • Joint probability distribution of random variables • Probabilistic Inference • Compute Marginal probability or Conditional probability • Chain Rule, Independence, Bayes’ Rule • Full joint distribution is hard to estimate and too big to represent explicitly Fei Fang

  3. Outline • Bayesian Networks • Independence in Bayes’ Net • Construct a Bayes’ Net • Exact Inference in Bayes’ Net • Applications of Bayes’ Net Fei Fang

  4. Bayesian Network • Bayesian Network (Bayes’ net) Overview • A compact way to represent knowledge in an uncertain domain • Describe full joint probability distributions using simple, local distributions • A probabilistic graphical model • A directed acyclic graph • Each node corresponds to a random variable • Each direct edge represent is a parent of • Each node has a conditional probability distribution (≈ “directly influences”) Way to Commute to Work Weather Sleeping Quality Fei Fang

  5. Example: Alarm • I’m at work, both of my neighbors John and Mary call to say my alarm for burglary is ringing. Sometimes it’s set off by minor earthquakes. Is there a burglary? • How do we model this scenario? How can we represent our knowledge in such a domain with uncertainty? Fei Fang

  6. Example: Alarm • Random Variables: , , , , • Domain • Knowledge base: Full joint probability distribution • How big is the table? • Task: Compute Fei Fang

  7. Example: Alarm • Recall Independence • Can be represented much more efficiently! • Are all the random variables independent in this example? Fei Fang

  8. Example: Alarm • However, there are some intuitive independence relationships based on our causal knowledge! • Causal knowledge – • A burglary can set the alarm off • An earthquake can set the alarm off • The alarm can cause Mary to call • The alarm can cause John to call Burglary Earthquake Alarm MaryCalls JohnCalls Fei Fang

  9. Example: Alarm • and are independent with each other • Conditioned on the value of , and are independent • Similar independence assumptions for and • Conditioned on the value of , and are independent with each other Burglary (B), Earthquake (E), Alarm (A), JohnCalls (J), MaryCalls (M)

  10. Example: Alarm • Given these independence relationships, • We don’t need fill the full joint probability table anymore to represent our knowledge! • Only need to provide these conditional probabilities • Is this better or worse? Fei Fang

  11. Example: Alarm How many numbers we need here? ! Recall we need for the original table. burglary (B), Earthquake (E), Alarm (A), JohnCalls (J), MaryCalls (M)

  12. Example: Alarm Enrich the network with more links: more realistic, less compact Fei Fang

  13. Bayesian Network • Bayesian Network: A compact way to represent knowledge in an uncertain domain Fei Fang

  14. Bayesian Network • Bayesian Network: Describe full joint probability distributions using simple, local distributions Global semantics Have to be equivalent! Fei Fang

  15. Bayesian Network • Bayesian Network: Describe full joint probability distributions using simple, local distributions • What is ? means Have to be equivalent! Fei Fang

  16. Bayesian Network • Bayesian Network: A probabilistic graphical model • A directed acyclic graph • Node – random variable; Edge – parent-child relationship • Conditional probability distribution • Often represented by CPT (conditional probability table) A Bayes’ Net = topology (graph) + local conditional probabilities Fei Fang

  17. Quiz 1 • At least how many entries are needed for a general CPT (conditional probability table) for the node “Way to Commute to Work”? • A: 18 • B: 12 • C: 6 • D: 3 Weather Way to Commute to Work Sleeping Quality Fei Fang

  18. Quiz 1 Weather Way to Commute to Work Sleeping Quality Fei Fang

  19. Another Perspective of Bayes’ Net • Assume you have no “causal knowledge” but someone gives you the full joint probability table • You observe there is a valid factorization of the full joint probability distribution • You further observe that such factorization can be represented using a DAG • You can prove ’s equal to “conditional probabilities” • Now you get a Bayes’ Net Fei Fang

  20. Outline • Bayesian Networks • Independence in Bayes’ Net • Construct a Bayes’ Net • Exact Inference in Bayes’ Net • Applications of Bayes’ Net Fei Fang

  21. Independence in Bayes’ Net • Given a Bayes’ Net, which variables are independent? • Each node is conditionally independent of its non-descendants given its parents Local semantics Given , is independent of Fei Fang

  22. Independence in Bayes’ Net • Each node is conditionally independent of all others given its Markov blanket: parents + children + children’s parents Fei Fang

  23. Example • List all the independence relationships Local Semantics: Each node is conditionally independent of its non-descendants given its parents Each node is conditionally independent of all others given its Markov blanket: parents + children + children’s parents Fei Fang

  24. Quiz 2 • Which of the following statements of independence are true given the Bayes’ Net based on local semantics and Markov blankets? • A: • B: • C: • D: • E: B C A D E G F Local Semantics: Each node is conditionally independent of its non-descendants given its parents Each node is conditionally independent of all others given its Markov blanket: parents + children + children’s parents H Fei Fang

  25. Outline • Bayesian Networks • Independence in Bayes’ Net • Construct a Bayes’ Net • Exact Inference in Bayes’ Net • Applications of Bayes’ Net Fei Fang

  26. Is Bayes’ Net Expressive Enough? • Any full joint probability table can be represented by a Bayes’ Net Fei Fang

  27. Is Bayes’ Net Unique? • One (full joint probability distribution)-to-many (Bayes’ Net) mapping Fei Fang

  28. Construct a Bayes’ Net • Construct a (ideally simple) Bayes’ Net systematically As a knowledge engineer or domain expert Choose an ordering of variables For Add to the network Select a minimal subset of variables from , denoted such that Add edges from nodes in to , write down the conditional probability table (CPT) This process guarantees Fei Fang

  29. Construct a Bayes’ Net • Construct a (ideally simple) Bayes’ Net systematically • Ordering of variables matters • Exploit domain knowledge to determine the ordering: intuitively, parent of a node should contain all nodes that directly influences Fei Fang

  30. Outline • Bayesian Networks • Independence in Bayes’ Net • Construct a Bayes’ Net • Exact Inference in Bayes’ Net • Applications of Bayes’ Net Fei Fang

  31. Probabilistic Inference in Bayes’ Net • Recap: Probabilistic inference: • No evidence: Marginal probability • With evidence: Posterior / Conditional probability • Inference with full joint probability distribution: Marginalization, Bayes’ Rule • Exact Inference in Bayes’ Net: (1) Enumeration; (2) Variable Elimination Fei Fang

  32. General Inference Procedure • Partition the set of random variables in the model • Evidence variables , and be e the list of observed values from them • Remaining unobserved / hidden variables • Query variables • The query can be answered by Fei Fang

  33. Inference in Bayes’ Net • Inference with full joint probability distribution table available: Read the joint probability from the table • Inference in Bayes’ Net: compute joint probability through conditional probability table Fei Fang

  34. Example: Alert • I’m at work, both of my neighbors John and Mary call to say my alarm for burglary is ringing. Sometimes it’s set off by minor earthquakes. Is there a burglary? Fei Fang

  35. Example: Alert • Evaluate through depth-first recursion of the following expression tree Top-down DF evaluation: × Values along each path + at the branching nodes Fei Fang

  36. Example: Alert • Normalize Fei Fang

  37. Exact Inference in Bayes’ Net: Enumeration Fei Fang

  38. Exact Inference in Bayes’ Net: Variable Elimination • Avoid repeated computation of subexpressions in the enumeration algorithm • Similar to dynamic programming Fei Fang

  39. Outline • Bayesian Networks • Independence in Bayes’ Net • Construct a Bayes’ Net • Exact Inference in Bayes’ Net • Applications of Bayes’ Net Fei Fang

  40. Bayes’ Net as a Model of Real World • Bayes’ Net represents knowledge in an uncertain domain • View it as a way to model the real world based on domain knowledge • Is your model (Bayes’ Net) for a real-world problem correct? Not necessarily. Fei Fang

  41. Bayes’ Net as a Model of Real World • "All models are wrong“ • Acommon aphorism in statistics • Generally attributed to the statistician George Box "Essentially, all models are wrong, but some are useful". https://en.wikipedia.org/wiki/All_models_are_wrong Fei Fang

  42. Use of Bayes’ Net • Diagnosis: (cause | symptom)? • Prediction: (symptom | cause)? • Classification: (class | data) • Decision-making (given a cost function) Fei Fang

  43. Use of Bayes’ Net Russel and Novig Fei Fang

  44. Summary • Bayes’ Net • Graphical model • Decompose full joint probability distributions into interpretable, simple, local distributions • Independence in Bayes’ Net • Local semantics • Markov Blanket • Construct a Bayes Net • Exact Inference in Bayes’ Net • Applications of Bayes’ Net Fei Fang

  45. Acknowledgment • Some slides are borrowed from previous slides made by Tai Sing Lee Fei Fang

  46. Backup Slides Fei Fang

  47. Conditional Independence • Example graph (1) Fei Fang

  48. Conditional Independence • Example graph (2) Fei Fang

  49. Conditional Independence • Example graph (3) Fei Fang

  50. D-Separation for Conditional Independence • is valid in general if and only if all the paths from any node in to any node in are blocked • A path is blocked if and only if it includes a node such that either one of the following statements are true • The rows on the path meet head-to-tail or tail-to-tail at the node, and the node is in the set • The rows on the path meet head-to-head at the node, and neither the node nor any of its descendants, is in the set Head-to-tail at Tail-to-tail at Head-to-head at Fei Fang

More Related