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

Similar documents
Probability Basics. Robot Image Credit: Viktoriya Sukhanova 123RF.com

Sources of Uncertainty

Probabilistic Reasoning. (Mostly using Bayesian Networks)

Lecture 10: Introduction to reasoning under uncertainty. Uncertainty

Uncertainty. Chapter 13

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

Reasoning with Uncertainty

COMP5211 Lecture Note on Reasoning under Uncertainty

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

Quantifying uncertainty & Bayesian networks

Basic Probabilistic Reasoning SEG

COMP9414: Artificial Intelligence Reasoning Under Uncertainty

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

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

Probability. CS 3793/5233 Artificial Intelligence Probability 1

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

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

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.

Artificial Intelligence

STATISTICAL METHODS IN AI/ML Vibhav Gogate The University of Texas at Dallas. Propositional Logic and Probability Theory: Review

Uncertainty. Outline

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

Probabilistic Reasoning Systems

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

Modeling and reasoning with uncertainty

Probabilistic Reasoning. Kee-Eung Kim KAIST Computer Science

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

Uncertainty and Bayesian Networks

Pengju XJTU 2016

Computer Science CPSC 322. Lecture 18 Marginalization, Conditioning

Introduction to Artificial Intelligence. Unit # 11

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

Reasoning Under Uncertainty

Uncertainty. Russell & Norvig Chapter 13.

Foundations of Artificial Intelligence

Bayesian networks. Chapter 14, Sections 1 4

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

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

Bayesian Networks. Probability Theory and Probabilistic Reasoning. Emma Rollon and Javier Larrosa Q

Probabilistic Robotics

Artificial Intelligence Programming Probability

Reasoning Under Uncertainty

Uncertainty. Chapter 13

Bayesian belief networks

Bayesian Networks. Motivation

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

Probabilistic Reasoning

Reasoning Under Uncertainty: Conditioning, Bayes Rule & the Chain Rule

Introduction to Artificial Intelligence Belief networks

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

Basic Probability and Statistics

CS 331: Artificial Intelligence Probability I. Dealing with Uncertainty

Review: Bayesian learning and inference

CS 5100: Founda.ons of Ar.ficial Intelligence

Bayesian networks. Chapter Chapter

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

Introduction to Probabilistic Reasoning. Image credit: NASA. Assignment

Mobile Robotics II: Simultaneous localization and mapping

Uncertainty. Chapter 13. Chapter 13 1

Bayesian Networks BY: MOHAMAD ALSABBAGH

Probability Theory Review

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

Probabilistic representation and reasoning

1) partial observability (road state, other drivers' plans, etc.) 4) immense complexity of modelling and predicting tra_c

REASONING UNDER UNCERTAINTY: CERTAINTY THEORY

Y. Xiang, Inference with Uncertain Knowledge 1

PROBABILISTIC REASONING SYSTEMS

Uncertainty and Rules

Another look at Bayesian. inference

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

Stochastic Methods. 5.0 Introduction 5.1 The Elements of Counting 5.2 Elements of Probability Theory

Quantifying Uncertainty

Probabilistic Models

Artificial Intelligence Uncertainty

Probabilistic representation and reasoning

Graphical Models - Part I

Web-Mining Agents Data Mining

Reasoning Under Uncertainty

Learning Bayesian Networks (part 1) Goals for the lecture

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

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

CS 188: Artificial Intelligence Fall 2009

Uncertain Knowledge and Reasoning

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

14 PROBABILISTIC REASONING

Directed Graphical Models

Probabilistic Models

12. Vagueness, Uncertainty and Degrees of Belief

Probabilistic Reasoning

Informatics 2D Reasoning and Agents Semester 2,

Pengju

Introduction to Bayesian Learning

Where are we? Knowledge Engineering Semester 2, Reasoning under Uncertainty. Probabilistic Reasoning

Reasoning about uncertainty

Completeness for FOL

Artificial Intelligence CS 6364

Uncertain Knowledge and Bayes Rule. George Konidaris

CS 4649/7649 Robot Intelligence: Planning

Machine Learning

Transcription:

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

Outline Probability theory Bayesian inference From the joint distribution Using independence/factoring From sources of evidence 2

Abduction Abduction is a reasoning process that tries to form plausible explanations for abnormal observations Abduction is distinctly different from deduction and induction Abduction is inherently uncertain Uncertainty is an important issue in abductive reasoning Some major formalisms for representing and reasoning about uncertainty Mycin s certainty factors (an early representative) Probability theory (esp. Bayesian belief networks) Dempster-Shafer theory Fuzzy logic Truth maintenance systems Nonmonotonic reasoning 3

Abduction Definition (Encyclopedia Britannica): reasoning that derives an explanatory hypothesis from a given set of facts The inference result is a hypothesis that, if true, could explain the occurrence of the given facts Examples Dendral, an expert system to construct 3D structure of chemical compounds Fact: mass spectrometer data of the compound and its chemical formula KB: chemistry, esp. strength of different types of bounds Reasoning: form a hypothetical 3D structure that satisfies the chemical formula, and that would most likely produce the given mass spectrum 4

Abduction examples (cont.) Medical diagnosis Facts: symptoms, lab test results, and other observed findings (called manifestations) KB: causal associations between diseases and manifestations Reasoning: one or more diseases whose presence would causally explain the occurrence of the given manifestations Many other reasoning processes (e.g., word sense disambiguation in natural language process, image understanding, criminal investigation) can also been seen as abductive reasoning 5

Comparing abduction, deduction, and induction Deduction: major premise: minor premise: conclusion: Abduction: rule: observation: explanation: All balls in the box are black These balls are from the box These balls are black All balls in the box are black These balls are black These balls are from the box A => B A --------- B A => B B ------------- Possibly A Induction: case: These balls are from the box observation: These balls are black hypothesized rule: All ball in the box are black Deduction reasons from causes to effects Abduction reasons from effects to causes Induction reasons from specific cases to general rules Whenever A then B ------------- Possibly A => B 6

Characteristics of abductive reasoning Conclusions are hypotheses, not theorems (may be false even if rules and facts are true) E.g., misdiagnosis in medicine There may be multiple plausible hypotheses Given rules A => B and C => B, and fact B, both A and C are plausible hypotheses Abduction is inherently uncertain Hypotheses can be ranked by their plausibility (if it can be determined) 7

Characteristics of abductive reasoning (cont.) Reasoning is often a hypothesize-and-test cycle Hypothesize: Postulate possible hypotheses, any of which would explain the given facts (or at least most of the important facts) Test: Test the plausibility of all or some of these hypotheses One way to test a hypothesis H is to ask whether something that is currently unknown but can be predicted from H is actually true If we also know A => D and C => E, then ask if D and E are true If D is true and E is false, then hypothesis A becomes more plausible (support for A is increased; support for C is decreased) 8

Characteristics of abductive reasoning (cont.) Reasoning is non-monotonic That is, the plausibility of hypotheses can increase/ decrease as new facts are collected In contrast, deductive inference is monotonic: it never change a sentence s truth value, once known In abductive (and inductive) reasoning, some hypotheses may be discarded, and new ones formed, when new observations are made 9

Sources of uncertainty Uncertain inputs Missing data Noisy data Uncertain knowledge Multiple causes lead to multiple effects Incomplete enumeration of conditions or effects Incomplete knowledge of causality in the domain Probabilistic/stochastic effects Uncertain outputs Abduction and induction are inherently uncertain Default reasoning, even in deductive fashion, is uncertain Incomplete deductive inference may be uncertain Probabilistic reasoning only gives probabilistic results (summarizes uncertainty from various sources) 10

Decision making with uncertainty Rational behavior: For each possible action, identify the possible outcomes Compute the probability of each outcome Compute the utility of each outcome Compute the probability-weighted (expected) utility over possible outcomes for each action Select the action with the highest expected utility (principle of Maximum Expected Utility) 11

Bayesian reasoning Probability theory Bayesian inference Use probability theory and information about independence Reason diagnostically (from evidence (effects) to conclusions (causes)) or causally (from causes to effects) Bayesian networks Compact representation of probability distribution over a set of propositional random variables Take advantage of independence relationships 12

Why probabilities anyway? Kolmogorov showed that three simple axioms lead to the rules of probability theory De Finetti, Cox, and Carnap have also provided compelling arguments for these axioms 1. All probabilities are between 0 and 1: 0 P(a) 1 2. Valid propositions (tautologies) have probability 1, and unsatisfiable propositions have probability 0: P(true) = 1 ; P(false) = 0 3. The probability of a disjunction is given by: P(a b) = P(a) + P(b) P(a b) a a b b 13

Probability theory Random variables Domain Atomic event: complete specification of state Prior probability: degree of belief without any other evidence Joint probability: matrix of combined probabilities of a set of variables Alarm, Burglary, Earthquake Boolean (like these), discrete, continuous (Alarm=True Burglary=True Earthquake=False) or equivalently (alarm burglary earthquake) P(Burglary) = 0.1 P(Alarm, Burglary) = alarm alarm burglary 0.09 0.01 burglary 0.1 0.8 14

Probability theory (cont.) Conditional probability: probability of effect given causes Computing conditional probs: P(a b) = P(a b) / P(b) P(b): normalizing constant Product rule: P(a b) = P(a b) P(b) Marginalizing: P(B) = Σ a P(B, a) P(B) = Σ a P(B a) P(a) (conditioning) P(burglary alarm) = 0.47 P(alarm burglary) = 0.9 P(burglary alarm) = P(burglary alarm) / P(alarm) = 0.09 / 0.19 = 0.47 P(burglary alarm) = P(burglary alarm) P(alarm) = 0.47 * 0.19 = 0.09 P(alarm) = P(alarm burglary) + P(alarm burglary) = 0.09 + 0.1 = 0.19 15

Example: Inference from the joint alarm alarm earthquake earthquake earthquake earthquake burglary 0.01 0.08 0.001 0.009 burglary 0.01 0.09 0.01 0.79 P(Burglary alarm) = α P(Burglary, alarm) = α [P(Burglary, alarm, earthquake) + P(Burglary, alarm, earthquake) = α [ (0.01, 0.01) + (0.08, 0.09) ] = α [ (0.09, 0.1) ] Since P(burglary alarm) + P( burglary alarm) = 1, α = 1/(0.09+0.1) = 5.26 (i.e., P(alarm) = 1/α = 0.109 Quizlet: how can you verify this?) P(burglary alarm) = 0.09 * 5.26 = 0.474 P( burglary alarm) = 0.1 * 5.26 = 0.526 16

Exercise: Inference from the joint p(smart study prep) smart smart study study study study prepared 0.432 0.16 0.084 0.008 prepared 0.048 0.16 0.036 0.072 Queries: What is the prior probability of smart? What is the prior probability of study? What is the conditional probability of prepared, given study and smart? Save these answers for next time! J 17

Independence When two sets of propositions do not affect each others probabilities, we call them independent, and can easily compute their joint and conditional probability: Independent (A, B) P(A B) = P(A) P(B), P(A B) = P(A) For example, {moon-phase, light-level} might be independent of {burglary, alarm, earthquake} Then again, it might not: Burglars might be more likely to burglarize houses when there s a new moon (and hence little light) But if we know the light level, the moon phase doesn t affect whether we are burglarized Once we re burglarized, light level doesn t affect whether the alarm goes off We need a more complex notion of independence, and methods for reasoning about these kinds of relationships 18

Exercise: Independence p(smart study prep) smart smart study study study study prepared 0.432 0.16 0.084 0.008 prepared 0.048 0.16 0.036 0.072 Queries: Is smart independent of study? Is prepared independent of study? 19

Conditional independence Absolute independence: A and B are independent if and only if P(A B) = P(A) P(B); equivalently, P(A) = P(A B) and P(B) = P(B A) A and B are conditionally independent given C if and only if P(A B C) = P(A C) P(B C) This lets us decompose the joint distribution: P(A B C) = P(A C) P(B C) P(C) Moon-Phase and Burglary are conditionally independent given Light-Level Conditional independence is weaker than absolute independence, but still useful in decomposing the full joint probability distribution 20

Exercise: Conditional independence p(smart study prep) smart smart study study study study prepared 0.432 0.16 0.084 0.008 prepared 0.048 0.16 0.036 0.072 Queries: Is smart conditionally independent of prepared, given study? Is study conditionally independent of prepared, given smart? 21

Bayes s rule Bayes s rule is derived from the product rule: P(Y X) = P(X Y) P(Y) / P(X) Often useful for diagnosis: If X are (observed) effects and Y are (hidden) causes, We may have a model for how causes lead to effects (P(X Y)) We may also have prior beliefs (based on experience) about the frequency of occurrence of effects (P(Y)) Which allows us to reason abductively from effects to causes (P(Y X)). 22

Bayesian inference In the setting of diagnostic/evidential reasoning P( E j H i ) H i P( Hi ) hypotheses E E E 1 j m evidence/manifestations Know prior probability of hypothesis conditional probability Want to compute the posterior probability Bayes theorem (formula 1): P P P ( Hi ) ( E j H i ( H i E j ) ) P ( H i E j ) = P( H i ) P( E j H i ) / P( E j ) 23

Simple Bayesian diagnostic reasoning Knowledge base: Evidence / manifestations: E 1,, E m Hypotheses / disorders: H 1,, H n E j and H i are binary; hypotheses are mutually exclusive (nonoverlapping) and exhaustive (cover all possible cases) Conditional probabilities: P(E j H i ), i = 1,, n; j = 1,, m Cases (evidence for a particular instance): E 1,, E m Goal: Find the hypothesis H i with the highest posterior Max i P(H i E 1,, E m ) 24

Bayesian diagnostic reasoning II Bayes rule says that P(H i E 1,, E m ) = P(E 1,, E m H i ) P(H i ) / P(E 1,, E m ) Assume each piece of evidence E i is conditionally independent of the others, given a hypothesis H i, then: P(E 1,, E m H i ) = m j=1 P(E j H i ) If we only care about relative probabilities for the H i, then we have: P(H i E 1,, E m ) = α P(H i ) m j=1 P(E j H i ) 25

Limitations of simple Bayesian inference Cannot easily handle multi-fault situation, nor cases where intermediate (hidden) causes exist: Disease D causes syndrome S, which causes correlated manifestations M 1 and M 2 Consider a composite hypothesis H 1 H 2, where H 1 and H 2 are independent. What is the relative posterior? P(H 1 H 2 E 1,, E m ) = α P(E 1,, E m H 1 H 2 ) P(H 1 H 2 ) = α P(E 1,, E m H 1 H 2 ) P(H 1 ) P(H 2 ) = α m j=1 P(E j H 1 H 2 ) P(H 1 ) P(H 2 ) How do we compute P(E j H 1 H 2 )?? 26

Limitations of simple Bayesian inference II Assume H 1 and H 2 are independent, given E 1,, E m? P(H 1 H 2 E 1,, E m ) = P(H 1 E 1,, E m ) P(H 2 E 1,, E m ) This is a very unreasonable assumption Earthquake and Burglar are independent, but not given Alarm: P(burglar alarm, earthquake) << P(burglar alarm) Another limitation is that simple application of Bayes s rule doesn t allow us to handle causal chaining: A: this year s weather; B: cotton production; C: next year s cotton price A influences C indirectly: A B C P(C B, A) = P(C B) Need a richer representation to model interacting hypotheses, conditional independence, and causal chaining Next time: conditional independence and Bayesian networks! 27