Uncertainty. CmpE 540 Principles of Artificial Intelligence Pınar Yolum Uncertainty. Sources of Uncertainty

Similar documents
Artificial Intelligence

Artificial Intelligence Uncertainty

Uncertainty. Outline

Uncertainty. Chapter 13

Uncertainty. 22c:145 Artificial Intelligence. Problem of Logic Agents. Foundations of Probability. Axioms of Probability

Quantifying uncertainty & Bayesian networks

Uncertainty. Chapter 13

COMP9414/ 9814/ 3411: Artificial Intelligence. 14. Uncertainty. Russell & Norvig, Chapter 13. UNSW c AIMA, 2004, Alan Blair, 2012

Probability theory: elements

Probabilistic Reasoning. (Mostly using Bayesian Networks)

Pengju XJTU 2016

Probabilistic Reasoning

Web-Mining Agents Data Mining

Uncertainty. Outline. Probability Syntax and Semantics Inference Independence and Bayes Rule. AIMA2e Chapter 13

Uncertainty and Bayesian Networks

Uncertainty. Chapter 13, Sections 1 6

Uncertain Knowledge and Reasoning

Fusion in simple models

Outline. Uncertainty. Methods for handling uncertainty. Uncertainty. Making decisions under uncertainty. Probability. Uncertainty

Uncertainty. Chapter 13. Chapter 13 1

Resolution or modus ponens are exact there is no possibility of mistake if the rules are followed exactly.

Uncertainty. Introduction to Artificial Intelligence CS 151 Lecture 2 April 1, CS151, Spring 2004

CS 561: Artificial Intelligence

Brief Intro. to Bayesian Networks. Extracted and modified from four lectures in Intro to AI, Spring 2008 Paul S. Rosenbloom

Probabilistic representation and reasoning

Chapter 13 Quantifying Uncertainty

Pengju

Quantifying Uncertainty & Probabilistic Reasoning. Abdulla AlKhenji Khaled AlEmadi Mohammed AlAnsari

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

Uncertainty (Chapter 13, Russell & Norvig) Introduction to Artificial Intelligence CS 150 Lecture 14

Probabilistic Reasoning Systems

Probabilistic representation and reasoning

UNCERTAINTY. In which we see what an agent should do when not all is crystal-clear.

Probabilistic Models

Probabilistic Robotics

ARTIFICIAL INTELLIGENCE. Uncertainty: probabilistic reasoning

CS 5100: Founda.ons of Ar.ficial Intelligence

Bayesian networks. Soleymani. CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2018

Probabilistic Reasoning. Kee-Eung Kim KAIST Computer Science

Uncertainty. Russell & Norvig Chapter 13.

Course Introduction. Probabilistic Modelling and Reasoning. Relationships between courses. Dealing with Uncertainty. Chris Williams.

CS 5522: Artificial Intelligence II

Graphical Models - Part I

CS 188: Artificial Intelligence Fall 2009

Bayesian networks. Chapter 14, Sections 1 4

Bayesian networks. Chapter Chapter

CS 343: Artificial Intelligence

PROBABILISTIC REASONING SYSTEMS

Probabilistic Models. Models describe how (a portion of) the world works

Lecture 10: Introduction to reasoning under uncertainty. Uncertainty

Uncertainty. Logic and Uncertainty. Russell & Norvig. Readings: Chapter 13. One problem with logical-agent approaches: C:145 Artificial

An AI-ish view of Probability, Conditional Probability & Bayes Theorem

10/18/2017. An AI-ish view of Probability, Conditional Probability & Bayes Theorem. Making decisions under uncertainty.

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

Probability. CS 3793/5233 Artificial Intelligence Probability 1

CS 188: Artificial Intelligence Fall 2008

CS 188: Artificial Intelligence Spring Announcements

PROBABILISTIC REASONING Outline

Bayesian Reasoning. Adapted from slides by Tim Finin and Marie desjardins.

CSE 473: Artificial Intelligence Autumn 2011

Basic Probability and Decisions

Probability Hal Daumé III. Computer Science University of Maryland CS 421: Introduction to Artificial Intelligence 27 Mar 2012

This lecture. Reading. Conditional Independence Bayesian (Belief) Networks: Syntax and semantics. Chapter CS151, Spring 2004

Bayesian Networks. Vibhav Gogate The University of Texas at Dallas

CS 188: Artificial Intelligence Fall 2009

Uncertainty (Chapter 13, Russell & Norvig)

Bayesian Networks. Vibhav Gogate The University of Texas at Dallas

Uncertainty and Belief Networks. Introduction to Artificial Intelligence CS 151 Lecture 1 continued Ok, Lecture 2!

Cartesian-product sample spaces and independence

CS 380: ARTIFICIAL INTELLIGENCE UNCERTAINTY. Santiago Ontañón

13.4 INDEPENDENCE. 494 Chapter 13. Quantifying Uncertainty

CS 188: Artificial Intelligence. Our Status in CS188

Informatics 2D Reasoning and Agents Semester 2,

Review: Bayesian learning and inference

Probabilistic Reasoning

Reasoning Under Uncertainty

Bayesian networks (1) Lirong Xia

Reasoning Under Uncertainty

CSE 473: Artificial Intelligence

Ch.6 Uncertain Knowledge. Logic and Uncertainty. Representation. One problem with logical approaches: Department of Computer Science

Reasoning with Uncertainty. Chapter 13

Y. Xiang, Inference with Uncertain Knowledge 1

n How to represent uncertainty in knowledge? n Which action to choose under uncertainty? q Assume the car does not have a flat tire

Our Status. We re done with Part I Search and Planning!

Quantifying Uncertainty

COMP5211 Lecture Note on Reasoning under Uncertainty

Lecture Overview. Introduction to Artificial Intelligence COMP 3501 / COMP Lecture 11: Uncertainty. Uncertainty.

Directed Graphical Models

Bayesian Networks BY: MOHAMAD ALSABBAGH

Basic Probability. Robert Platt Northeastern University. Some images and slides are used from: 1. AIMA 2. Chris Amato

Course Overview. Summary. Outline

CS 2750: Machine Learning. Bayesian Networks. Prof. Adriana Kovashka University of Pittsburgh March 14, 2016

Announcements. CS 188: Artificial Intelligence Spring Probability recap. Outline. Bayes Nets: Big Picture. Graphical Model Notation

Bayesian Networks. Motivation

Outline. CSE 573: Artificial Intelligence Autumn Bayes Nets: Big Picture. Bayes Net Semantics. Hidden Markov Models. Example Bayes Net: Car

Introduction to Artificial Intelligence. Unit # 11

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

Introduction to Artificial Intelligence Belief networks

Bayesian networks. Chapter Chapter

CS 484 Data Mining. Classification 7. Some slides are from Professor Padhraic Smyth at UC Irvine

Transcription:

CmpE 540 Principles of Artificial Intelligence Pınar Yolum pinar.yolum@boun.edu.tr Department of Computer Engineering Boğaziçi University Uncertainty (Based mostly on the course slides from http://aima.cs.berkeley.edu/ and http://www.cmpe.boun.edu.tr/~akin/) 1 2 Uncertainty Our knowledge is incomplete and changing to include new facts How can we solve problems in the face of this incompleteness? Logic fails in such cases - but humans are capable of solving problems in these situations We need methods that can handle uncertainty Sources of Uncertainty Incorrectness Human error Equipment error False negative - rejecting a true hypothesis False positive - accepting a false hypothesis Measurement Precision, how precise e.g. cm or mm Accuracy - calibration 3 4 1

Sources of Uncertainty Random Due to noise, loose wires etc. Systematic Due to error in reading e.g. user giving inches not cm Reasoning Wrongly formulated or learnt rules Example of reasoning with uncertainty Abbott, Babbitt and Cabot are suspects in a murder case Abbott s alibi: registration in a respectable hotel in Albany Babbitt s alibi: was visiting his brother-in-law in Brooklyn at the time of the murder Cabot s alibi: watching a ski meet in the Catskills (but no witnesses) 5 6 Example of reasoning with uncertainty (Cont d) We have the following beliefs: Abbott, Babbitt, or Cabot committed the murder Abbott did not commit the murder (alibi) Babbitt did not commit the murder (alibi) Cabot may have committed the murder (his alibi is weak) We must solve this problem based on beliefs using belief states I believe that Cabot is the murderer because he has the weakest alibi Example of reasoning with uncertainty (Cont d) Now consider that Cabot is able to document his alibi (someone took a photograph of him watching the ski meet) Cabot s alibi is now stronger Babbitt s brother-in-law might be lying Babbitt s alibi is now weaker Abbott s registry could be forged Abbott s alibi is now weaker How do we deal with such uncertainties? What conclusion(s) should we draw? 7 8 2

Monotonic Reasoning Symbolic Approaches Conventional reasoning mechanisms, such as logic, assume: Knowledge used is complete, i.e. all facts and rules required are in the knowledge base. Facts that are necessary to solve the problem are present or can be derived from the knowledge provided in the knowledge base. Facts and knowledge are consistent, i.e. new facts or knowledge does not invalidate old ones. Facts are either known to be true or false Inferences can be established as either true or false. Such a reasoning mechanism is called monotonic reasoning If any of the above properties is not satisfied, conventional logic-based reasoning mechanisms become inadequate. 9 10 Nonmonotonic Reasoning Extending the knowledge base Make inferences when information not available Differentiate between: it is known that a fact is not true and the fact is not known Updating information in the knowledge base When a new fact is added Infer new facts from these Resolving conflicts when several inconsistent inferences are made. Assign preferences or Allow for multi-solution inferences Nonmonotonic Logic A system where statements can be T, F or neither (knowledge does not have to be complete) There is no formalism like Resolution, so we must develop more ad hoc methods. Add an operator M to first order predicate calculus M means True if consistent 11 12 3

Nonmonotonic Logic Now we are able to prove things T and F with statements that include M because it means that we assume any future information will be consistent. If not, our proof does not hold Example: X, Y: related (X,Y) M Get Along (X,Y) Will Defend (X, Y) That is, we assume that if X and Y are related then X will defend Y. However, if we learn that X does not get along with Y then this becomes false. Default Logic A logic where assumptions are made when rules are introduced A : B ---> If A is provable and it is C consistent to assume B then conclude C This is different from Non-monotonic logic by requiring the assumption to be made at the time a rule is introduced (i.e. you cannot add new rules of this form) 13 14 Abduction Standard deduction (Modus Ponens) states that if you know A is true and you have the rule A B, then you can conclude B is true. This is truth preserving In Abduction, we turn this around to read if B is true and you have a rule A B then you can conclude A is true. This is not truth preserving. Abduction Abduction is more often used when we have several rules A1 B, A2 B, A3 B, A4 B, etc... If B is true, what caused it (what was responsible for B being true)? Our answer is A1 or A2 or A3 or A4, but which one? We can use our beliefs to pick the right one. Abduction is often used for explanations: diagnosis/credit assignment theory understanding/legal reasoning recognition/perception/natural language understanding 15 16 4

Reconsider the murder case We assume Cabot s alibi is good because of the photograph. We assume that Abbott really went to the hotel because of the hotel s reputation. We believe that Babbitt s brother might lie (he has been known to lie before) Therefore, we conclude that Babbitt is the murderer Implementations Augmenting a problem solver with UNLESS Dependency-Directed Backtracking Justification-based Truth Maintenance System Assumption-based Truth Maintenance System 17 18 Using UNLESS Augment rules with the Unless clause which introduces exceptions to a rule Use forward chaining if the problem is datadriven Use backward chaining if the problem is goaldriven - this approach will not be able to determine if/when new information becomes available and thus is not as useful Dependency-Directed Backtracking Consider the following example: We want to prove F We have a nonmonotonic rule If A F We have no reason not to assume A, so we assume A is true F G H By some other facts, we can also derive M N We learn A is not true. Backtracking would remove F, G, H, M N. F, G H may not be true, but M N were derived independently! 19 20 5

Truth Maintenance Systems A Truth Maintenance System (TMS) is responsible for: Enforcing logical relations among beliefs. Generating explanations for conclusions. Finding solutions to search problems Supporting default reasoning. Identifying causes for failure and recover from inconsistencies. The TMS / IE relationship is the following: Inference Engine Justifications, assumptions Beliefs, contradictions TMS Problem Solver Families of TMSs There are several families of TMSs, which differ in the representation scheme they use and the functionality they support: Justification-based TMSs. The language used is limited to Horn formulas. Logic-based TMSs. These use a full propositional logic language. Assumption-based TMSs. Language limited to Horn formulas, but several alternatives (contexts) can be explored at the same time. Non-monotonic JTMSs. Language limited to Horn formulas, but allow non-monotonic justifications, thus making it possible to implement default reasoning. Clause Management Systems. Their representational power is equivalent to LTMSs, but like ATMSs can support several contexts at the same time. Contradiction-tolerant TMSs. Language limited to Horn formulas, but support non-monotonic and plausible reasoning and deal explicitly with contradictions in a single context. 21 22 Justification-Based TMS To justify (believe) an assertion, all items in the IN-list must be believed while all items in the OUT-list must be disbelieved. A breadth-first approach JTMS - depth-first search of possible beliefs with dependency-directed backtracking Here, backtracking is avoided by considering multiple belief states at one time As the search space is expanded, any states that are inconsistent are pruned away reducing some of the search 23 24 6

Numerical Approaches Probabilistic Reasoning 25 26 Statistical Reasoning Nonmonotonic reasoning can be used to model belief systems in which facts are believed to be true, false or unknown. However, for some problems, it is useful to be able to describe beliefs that are not certain but for which there is some supporting evidence. Classes of Problems There are two broad classes of problems. Genuine randomness of the world. Playing cards or throwing dice are examples of such problems. Model statistically Predict likelihood of various outcomes, though complete certainty is not possible. World not random, but we don t know the state. Many common sense tasks fall into this class, such as, in certain domains, fault diagnostic and engineering design. Difficult to model and enumerate exceptions Better to summarize statistically 27 28 7

Probability Probabilistic assertions summarize effects of laziness: failure to enumerate exceptions, qualifications, etc. ignorance: lack of relevant facts, initial conditions, etc. Subjective probability: Probabilities relate propositions to agent's own state of knowledge e.g., P(A 25 no reported accidents) = 0.06 These are not assertions about the world Probabilities of propositions change with new evidence: e.g., P(A 25 no reported accidents, 5 a.m.) = 0.15 Making decisions under uncertainty Suppose I believe the following: P(A 25 gets me there on time ) = 0.04 P(A 90 gets me there on time ) = 0.70 P(A 120 gets me there on time ) = 0.95 P(A 1440 gets me there on time ) = 0.9999 Which action to choose? Depends on my preferences for missing flight vs. time spent waiting, etc. Utility theory is used to represent and infer preferences Decision theory = probability theory + utility theory 29 30 Syntax Basic element: random variable Similar to propositional logic: possible worlds defined by assignment of values to random variables. Boolean random variables e.g., Cavity (do I have a cavity?) Discrete random variables e.g., Weather is one of <sunny,rainy,cloudy,snow> Domain values must be exhaustive and mutually exclusive Elementary proposition constructed by assignment of a value to a random variable: e.g., Weather = sunny, Cavity = false (abbreviated as cavity) Complex propositions formed from elementary propositions and standard logical connectives e.g., Weather = sunny Cavity = false Syntax Atomic event: A complete specification of the state of the world about which the agent is uncertain E.g., if the world consists of only two Boolean variables Cavity and Toothache, then there are 4 distinct atomic events: Cavity = false Toothache = false Cavity = false Toothache = true Cavity = true Toothache = false Cavity = true Toothache = true Atomic events are mutually exclusive and exhaustive 31 32 8

For any propositions A, B 0 P(A) 1 P(true) = 1 and P(false) = 0 P(A B) = P(A) + P(B) - P(A B) Axioms of probability Prior probability Prior or unconditional probabilities of propositions e.g., P(Cavity = true) = 0.1 and P(Weather = sunny) = 0.72 correspond to belief prior to arrival of any (new) evidence Probability distribution gives values for all possible assignments: P(Weather) = <0.72,0.1,0.08,0.1> (normalized, i.e., sums to 1) Joint probability distribution for a set of random variables gives the probability of every atomic event on those random variables P(Weather,Cavity) = a 4 2 matrix of values: Weather = sunny rainy cloudy snow Cavity = true 0.144 0.02 0.016 0.02 Cavity = false 0.576 0.08 0.064 0.08 Every question about a domain can be answered by the joint distribution 33 34 Conditional or posterior probabilities e.g., P(cavity toothache) = 0.8 i.e., given that toothache is all I know Conditional probability Notation for conditional distributions: P(Cavity Toothache) = 2-element vector of 2-element vectors If we know more, e.g., cavity is also given, then we have P(cavity toothache,cavity) = 1 New evidence may be irrelevant, allowing simplification, e.g., P(cavity toothache, sunny) = P(cavity toothache) = 0.8 This kind of inference, sanctioned by domain knowledge, is crucial Definition of conditional probability: P(a b) = P(a b) / P(b) if P(b) > 0 Conditional probability Product rule gives an alternative formulation: P(a b) = P(a b) P(b) = P(b a) P(a) A general version holds for whole distributions, e.g., P(Weather,Cavity) = P(Weather Cavity) P(Cavity) (View as a set of 4 2 equations, not matrix mult.) Chain rule is derived by successive application of product rule: P(X 1,,X n ) = P(X 1,...,X n-1 ) P(X n X 1,...,X n-1 ) = P(X 1,...,X n-2 ) P(X n-1 X 1,...,X n-2 ) P(X n X 1,...,X n-1 ) = = π i= 1n P(X i X 1,,X i-1 ) 35 36 9

Inference by enumeration Start with the joint probability distribution: Inference by enumeration Start with the joint probability distribution: For any proposition φ, sum the atomic events where it is true: P(φ) = Σ ω:ω φ P(ω) For any proposition φ, sum the atomic events where it is true: P(φ) = Σ ω:ω φ P(ω) P(toothache) = 0.108 + 0.012 + 0.016 + 0.064 = 0.2 37 38 Inference by enumeration Start with the joint probability distribution: Inference by enumeration Start with the joint probability distribution: For any proposition φ, sum the atomic events where it is true: P(φ) = Σ ω:ω φ P(ω) P(cavity v toothache) = 0.108 + 0.012 + 0.016 + 0.064 + 0.72 + 0.08 = 0.28 Can also compute conditional probabilities: P( cavity toothache) = P( cavity toothache) P(toothache) = 0.016+0.064 0.108 + 0.012 + 0.016 + 0.064 = 0.4 39 40 10

Normalization Inference by enumeration Typically, we are interested in the posterior joint distribution of the query variables Y given specific values e for the evidence variables E Let the hidden variables be H = X - Y - E Denominator can be viewed as a normalization constantα P(Cavity toothache) = α, P(Cavity,toothache) = α, [P(Cavity,toothache,catch) + P(Cavity,toothache, catch)] = α, [<0.108,0.016> + <0.012,0.064>] = α, <0.12,0.08> = <0.6,0.4> General idea: compute distribution on query variable by fixing evidence variables and summing over hidden variables Then the required summation of joint entries is done by summing out the hidden variables: P(Y E = e) = αp(y,e = e) = ασ h P(Y,E= e, H = h) The terms in the summation are joint entries because Y, E and H together exhaust the set of random variables Obvious problems: 1. Worst-case time complexity O(d n ) where d is the largest arity 2. Space complexity O(d n ) to store the joint distribution 3. How to find the numbers for O(d n ) entries? 41 42 Independence A is (unconditionally) independent of B if P(A B) = P(A). In this case, P(A B) = P(A)P(B). A is conditionally independent of B given C if P(A B C) = P(A C) and, symmetrically, P(B A C) = P(B C). What this means is that if we know P(A C), we also know P(A B C), so we don't need to store this case. Furthermore, it also means that P(A B C) = P(A C)P(B C). Independence A and B are independent iff P(A B) = P(A) or P(B A) = P(B) or P(A, B) = P(A) P(B) P(Toothache, Catch, Cavity, Weather) = P(Toothache, Catch, Cavity) P(Weather) 32 entries reduced to 12; for n independent biased coins, O(2 n ) O(n) Absolute independence powerful but rare Dentistry is a large field with hundreds of variables, none of which are independent. What to do? 43 44 11

Conditional independence P(Toothache, Cavity, Catch) has 2 3 1 = 7 independent entries If I have a cavity, the probability that the probe catches in it doesn't depend on whether I have a toothache: (1) P(catch toothache, cavity) = P(catch cavity) The same independence holds if I haven't got a cavity: (2) P(catch toothache, cavity) = P(catch cavity) Catch is conditionally independent of Toothache given Cavity: P(Catch Toothache,Cavity) = P(Catch Cavity) Equivalent statements: P(Toothache Catch, Cavity) = P(Toothache Cavity) P(Toothache, Catch Cavity) = P(Toothache Cavity) P(Catch Cavity) Conditional independence Write out full joint distribution using chain rule: P(Toothache, Catch, Cavity) = P(Toothache Catch, Cavity) P(Catch, Cavity) = P(Toothache Catch, Cavity) P(Catch Cavity) P(Cavity) = P(Toothache Cavity) P(Catch Cavity) P(Cavity) I.e., 2 + 2 + 1 = 5 independent numbers In most cases, the use of conditional independence reduces the size of the representation of the joint distribution from exponential in n to linear in n. Conditional independence is our most basic and robust form of knowledge about uncertain environments. 45 46 Bayes' Rule Product rule P(a b) = P(a b) P(b) = P(b a) P(a) Bayes' rule: P(a b) = P(b a) P(a) / P(b) or in distribution form P(Y X) = P(X Y) P(Y) / P(X) = αp(x Y) P(Y) Useful for assessing diagnostic probability from causal probability: P(Cause Effect) = P(Effect Cause) P(Cause) / P(Effect) E.g., let M be meningitis, S be stiff neck: P(m s) = P(s m) P(m) / P(s) = 0.8 0.0001 / 0.1 = 0.0008 Note: posterior probability of meningitis still very small! Bayes' Rule and Conditional Independence P(Cavity toothache catch) = αp(toothache catch Cavity) P(Cavity) = αp(toothache Cavity) P(catch Cavity) P(Cavity) This is an example of a naïve Bayes model: P(Cause,Effect 1,,Effect n ) = P(Cause) π i P(Effect i Cause) Total number of parameters is linear in n 47 48 12

Mycin Certainty Factors Mycin is the oldest and best known expert system Its function is to diagnose certain bacterial infections and recommend a drug treatment 49 50 Rules are of the form: IF: 1) The strain of the organism is gramneg AND 2) The morphology of the rod is coccus THEN: There is strongly suggestive evidence (0.8) that the genus of the organism is neisseria Mycin Handling uncertainty: Certainty Factors Everything in Mycin has a certainty factor associated with it CFs range from 1..1-1 means definitely not +1 means definitely 0 means equally likely and unlikely 51 52 13

Certainty Factors User can input CFs in the range 10..10, which are converted to the range 1..1 These CFs are propagated through the rules CFs in the range 0.2..0.2 are not propagated as their values are too small Propagating CFs For a rule of the form: If A and B and C then D The CF associated with D is found by taking the minimum CF of A, B and C and then multiplying it by the CF associated with the rule 53 54 Propagating CFs For a rule of the form: If A or B or C then D The maximum CF associated with A, B or C is taken and then multiplied by the CF associated with the rule Propagating CFs If two CFs are derived for the same conclusion they are combined as follows: New CF = CF1 + CF2 (CF1)(CF2) If both CF1 & CF2 > 0 New CF = CF1 + CF2 + (CF1)(CF2) If both CF1 & CF2 < 0 New CF = (CF1 + CF2) / (1- min( CF1, CF2 )) Otherwise 55 56 14

Coments on Certainty Factors Examples These calculations are not probabilistic They assume that the conclusions are independent These problems are a restriction on the viability of Mycin, however as long as the same conclusion isn t reached too often this shouldn t create a problem Mycin has a very shallow search space If the following are known: A CF(0.4) B CF(0.7) C CF(0.9) And the rule If A and B and C then E(0.4) 57 58 Examples Examples For ands we take min So min of 0.4, 0.7, 0.9 = 0.4 Multiply this by the CF for the rule (0.4) Gives 0.16 This is < 0.2 and so is ignored Given: A CF(0.4) B CF(0.7) C CF(0.9) And the rule: If A or B or C then E(0.4) 59 60 15

Examples Examples For or s we take max So max of 0.4, 0.7, 0.9 gives 0.9. Multiplying by CF of rule (0.4) Gives 0.36 This is > 0.2 so the CF for E becomes 0.36 Given: A CF(0.7) B CF(0.8) C CF(0.5) E CF(0.4) And the rule If A or B or C then E (0.7) 61 62 Or s so max of 0.7, 0.8, 0.5 = 0.8 Multiply this by CF for rule 0.8*0.7 = 0.56 > 0.2 so new CF for E is 0.56 Already have a CF for E of 0.4 Need to combine them Examples As both > 0 1 st rule applies New CF = CF1 + CF2 (CF1)(CF2) = 0.4 + 0.56 0.4 * 0.56 = 0.96 0.224 = 0.736 New CF for E is therefore 0.736 This reinforces existing CF Examples 63 64 16

Theoretical Flaws in Mycin Mycin assumes that a failure to establish the truth of something, despite attempts to do so means that it is false The threshold of 0.2 is arbitrary Mycin detects and rejects circularity in rules such as: If A then B If B then C If C then A By ignoring the first rule This is not always the best approach Self referencing rules cause a problem The ordering of the rules is important Reasoning under Uncertainty 65 66 Bayesian Networks A directed graph in which the following holds: 1. A set of random variables makes up the nodes of the network. Variables may be discrete or continuous. 2. A set of directed links or arrows connects pairs of nodes. If there is an arrow from node X to node Y, X is said to be a parent of Y. 3. Each node X i has an associated conditional probability distribution P(X i Parents(X i )) that quantifies the effect of the parents on the node. 4. The graph has no directed cycles (hence is a directed, acyclic graph, or DAG). Topology of network encodes conditional independence assertions: Weather is independent of the other variables Toothache and Catch are conditionally independent given Cavity Example 67 68 17

Properties of Bayesian Networks Space-efficient data structure for encoding all of the information in the full joint probability distribution for the set of random variables defining a domain. Represents all of the direct causal relationships between variables Space efficient because it exploits the fact that in many real-world problem domains the dependencies between variables are generally local, so there are a lot of conditionally independent variables Can be used to reason Each node is conditionally independent of all others given its Markov blanket: parents + children + childrens parents Markov blanket 69 70 Burglary Example Burglary Example 71 72 18

Reasoning with Bayesian Networks Inference in Bayesian networks means computing the probability distribution of a set of query variables, given a set of evidence variables. predictive reasoning (causal reasoning) Forward (top-down) from causes to effects diagnostic reasoning Backward (bottom-up) from effects to causes Global semantics defines the full joint distribution as the product of the local conditional distributions Semantics Local semantics: each node is conditionally independent of its nondescendants given its parents 73 74 Example The probability of the event that the alarm has sounded but neither a burglary nor an earthquake has occurred, and both John and Mary call. Compactness A CPT for Boolean X i with k Boolean parents has 2 k rows for the combinations of parent values Each row requires one number p for X i = true (the number for X i = false is just 1-p) If each variable has no more than k parents, the complete network requires O(n 2 k ) numbers I.e., grows linearly with n, vs. O(2 n ) for the full joint distribution For burglary net, 1 + 1 + 4 + 2 + 2 = 10 numbers (vs. 2 5-1 = 31) 75 76 19

Constructing Belief Networks Example Need a method such that a series of locally testable assertions of conditional independence guarantees the required global semantics Suppose we choose the ordering M, J, A, B, E P(J M) = P(J)? 77 78 Example Example Suppose we choose the ordering M, J, A, B, E Suppose we choose the ordering M, J, A, B, E P(J M) = P(J)? No P(A J, M) = P(A J)? P(A J, M) = P(A)? P(J M) = P(J)? No P(A J, M) = P(A J)? P(A J, M) = P(A)? No P(B A, J, M) = P(B A)? P(B A, J, M) = P(B)? 79 80 20

Example Example Suppose we choose the ordering M, J, A, B, E Suppose we choose the ordering M, J, A, B, E P(J M) = P(J)? No P(A J, M) = P(A J)? P(A J, M) = P(A)? No P(B A, J, M) = P(B A)? Yes P(B A, J, M) = P(B)? No P(E B, A,J, M) = P(E A)? P(E B, A, J, M) = P(E A, B)? P(J M) = P(J)? No P(A J, M) = P(A J)? P(A J, M) = P(A)? No P(B A, J, M) = P(B A)? Yes P(B A, J, M) = P(B)? No P(E B, A,J, M) = P(E A)? No P(E B, A, J, M) = P(E A, B)? Yes 81 82 Example contd. Deciding conditional independence is hard in noncausal directions (Causal models and conditional independence seem hardwired for humans!) Network is less compact: 1 + 2 + 4 + 2 + 4 = 13 numbers needed 83 21