1 / 29

Introduction to Artificial Intelligence LECTURE 11 : Nonmonotonic Reasoning

Introduction to Artificial Intelligence LECTURE 11 : Nonmonotonic Reasoning. Motivation: beyond FOL + resolution Closed-world assumption Default rules and theories Ref: “Logical Foundations of AI”, Genesereth and Nilsson, Morgan Kauffman, 1987.

ifama
Download Presentation

Introduction to Artificial Intelligence LECTURE 11 : Nonmonotonic 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. Introduction to Artificial IntelligenceLECTURE 11: Nonmonotonic Reasoning • Motivation: beyond FOL + resolution • Closed-world assumption • Default rules and theories Ref: “Logical Foundations of AI”, Genesereth and Nilsson, Morgan Kauffman, 1987.

  2. Knowledge representation with FOL + resolution • FOL + resolution have limitations in the kind of sentences and deductions we can make. • cannot express uncertainty • cannot make unsound but likely deductions • cannot revise conclusions in light of new knowledge • cannot make conclusions based on the entire state of the KB

  3. Motivation: incompleteness • If we cannot prove P or ~P from KB, what should we conclude? KB:neighbor(israel,jordan) neighbor(israel,egypt) neighbor(lebanon,syria) … Query: neighbor(israel,morroco) • Cannot conclude anything unless there is an explicit statement (negation) in KB!

  4. Motivation: exceptions • All rules have exceptions! For each, we must forsee all of them and explicitly state them: “all birds fly” Xbird(X)=> flies(X) “except ostriches” Xbird(X)/\~ostrich(X) => flies(X) “except newborns” Xbird(X) /\ ~ostrich(X) /\ ~newborn(X) => flies(X) • We wouldlike toconclude flies(X) from bird(X) unless something is abnormal with X Xbird(X)/\ ~Abnormal(X)=> flies(X)

  5. Motivation: changes • We assumed that all clauses in KB are true and remain true. What if we later discover that this is not the case? How do we revise conclusions already made? Xcitizen(X)/\income(X,Y) => pay_tax(X,Y) • As the rules change, we need to revise all the intermediate conclusions! • We would like to identify only those that indeed need revision

  6. Possible extensions • Language: make it more expressive without loosing some of its computational properties • Semantics: revise the concept of truth value • Inferencing: design new inference rules to deal with exceptions, uncertainty, etc Minimal extensions to FOL+new inference rules!

  7. Nonmonotonic logics (NML) • FOL + resolution is monotonic:if KB|=P then (KB U {Q})|= P for all consistent KB and all Q obtained from KB by applying resolution. • The number of statements known to be true is strictly increasing over time • Non-monotonic: “jump” to conclusions that can later be withdrawn (defeasible conclusions)

  8. Consistency in NML • A deduction rule R is consistent iff: KR |=Rc KR U {c} |= Ø iff KR |= Ø • TR(KB) = the set of all conclusions from KB using inference rule R (transitive closure). Note: R is applied in parallel!

  9. Nonmonotonic frameworks 1. Closed World Assumption if you cannot prove P or ~P from KB, add ~P to KB. 2. Default Rules new inference rules on how to augment KB 3. (Predicate completion -- Circumscription) compute a formula which says how KB should be satisfied 4. (Truth Maintenance Systems) methods to maintain consistency in a KB where statements are constantly added and deleted

  10. 1. Closed-world assumption (CWA) if you cannot prove P or~P from KB, add ~P to KB KB |= c and KB |= ~c then add ~c • Idea:if you cannot prove P, assume it is false. This means you assume you know everything there is to know about the world (e.g. the world is closed). • This is the semantics of databases and of PROLOG.

  11. Complete theories • A theory T is a set of sentences closed under logical implication (like transitive closure) • T is complete if either every ground literal in the language or its negation is in the theory KB: neighbor(israel,jordan) neighbor(israel,egypt) XYneighbor(X,Y) <=> neighbor(Y,X) T(KB) is not complete because neither neighbor(egypt,jordan) or ~neighbor(egypt,jordan) is in T(KB).

  12. Theory completion • Given an incomplete KB, include the negation of a ground literal when the ground literal does not follow from KB KB: neighbor(israel,jordan) neighbor(israel,egypt) XY neighbor(X,Y) <=> neighbor(Y,X) The atom ~neighbor(egypt,jordan) will be added • Is this always consistent? NO!

  13. Completion inconsistency • Completion can lead to inconsistent theories: KB: p(a)\/p(b) neither KB |= ~p(a), p(a) nor KB |= ~p(b), p(b) follow So we add ~p(a) and ~p(b) to KB: KB’: p(a)\/p(b) ~p(a) ~p(b) KB’ is inconsistent! • Modify the completion rule for consistency

  14. CWA theorem (1) • Augment a consistent KB with a new set of sentences (beliefs), to obtain a new consistent set CWA(KB). • Theorem: CWA(KB) is consistent iff for every disjunction p1\/p2\/ …. \/pn, that followsfrom KB, where pi is a positive-ground literal, there is at least one pisuch that KB |= pi Eq: CWA(KB) is inconsistent iff there are positive ground literals p1, … pnsuch that KB |= p1\/p2\/…. \/pnbut for all i, KB |pi.

  15. CWA theorem (2) Intuition: add all of ~ pi except one, so no contradiction occurs! Proof: Let KBassumed be the set of all conclusions ~p derived with CWA rule: ~p is in KBassumed iff KB |= pandKB |= ~p CWA(KB) is inconsistent only if KB U KBassumed is. Then, there is a finite subset of KBassumed that contradicts KB. Let this subset be L = {~p1,…,~pn}. Then KB |= p1\/p2\/ …. \/pn,the negation of L. Since each ~pi is in KBassumed by thedefinition of KBassumed KB |= pi contradiction!

  16. Consistent CWA rule • Complete a KB by including all ground literals that do not contradict the theorem. Important: define the constant atoms first • Ex1: KB: p(a)\/p(b) is not consistent • Ex2: KB: Xp(X)\/q(X) p(a) q(b)for atoms a,b, the augmentation is ~q(a) and~p(b) OK for atom c, the augmentation is inconsistent: NOT OK (p(X)\/ q(X))| p(c) or (p(X)\/ q(X))| q(c)

  17. CWA consistency for Horn clauses • In general, testing for consistency to see what negated ground literals to add to KB can be expensive! • Not so for Horn clauses: Theorem:CWA(KB) isalwaysconsistent when KB is a consistent set of Horn clauses. • Follows from the fact that Horn clauses have a single positive literal. • Variant: define CWA for a subset of clauses only.

  18. Restricted CWA • Define the predicates on which CWA is applied KB: Xq(X) => p(X) q(a) p(b) \/ r(b) If we apply CWA to p(X), we will conclude only ~p(b), which keeps consistency (~r(b) cannot be inferred)

  19. Other assumptions • Domain closure assumption: Limit the constant terms in the language to be those that can be named using constant and function symbols in KB. Strong assumption: allows replacing universal quantifiers by finite conjunctions and disjunctions. Xp(X) is (X=a1 \/ X = a2…) /\p(X) • Unique names assumption:if ground terms cannot be proved equal, assume they can be assumed unequal. p(f1(a)) = p(f2(a)) where f1 and f2 are Skolem functions

  20. 2. Default rules and theories • Define a nonstandard, nonmonotonic set D of inference rules to augment the basic KB. The augmentation of KB with D, denotedE(KB,D) is the theorythatcontains the usualconclusions + those obtained by applying D on KB. • The default rules in D are of the form: bird(X) : flies(X) flies(X) “if X is a bird, and it is consistent to believe that X can fly, then it can be believed that X can fly”.

  21. Default rules semantics (X): (X) (X) • If there is an instance x of X for which the ground instance (x) follows fromE(KB,D) and for which(x) is consistent withE(KB,D), then include (x) inE(KB,D). • Default rules are useful to express beliefs that are usually but not necessarily true • In general, E(KB,D) is not unique!

  22. Example 1 • KB:bird(tweety) Xostrich(X) => ~flies(X) D: bird(X): flies(X) flies(X) thenflies(tweety)is in E(KB,D). • If we add ostrich(tweety), then we cannot deduceflies(tweety)because it is not consistent with KB.

  23. Example 1 (continued) KB: feathers(tweety) D: bird(X) : flies(X) feathers(X): bird(X) flies(X) bird(X) Default proof that flies(tweety). If we add ostrich(tweety) ostrich(X) => ~flies(X) ostrich(X) => feathers(X) we cannot (as expected) prove that flies(tweety).

  24. Example 2 • Is the default rule :~p(X) ~p(X) the same as CWA? No! • KB: p \/ q D: :~p and:~q ~p ~q • CWA(KB) is inconsistent • E(KB,D) can be either {p \/ q, ~p} or{p \/ q,~q} • However, the union of both is inconsistent!

  25. Properties of default theories • Default theories might have more than one augmentation (see previous example) • There are default theories with no augmentations KB = {p(X)}, D is:p(X)/~p(X) • Every normal default theory (only D statements of the form (X): (X)/ (X))hasan augmentation • IfD’ Dare sets of normal rulesthen for anyE(KB,D’) there is aE(KB,D) such thatE(KB,D’) E(KB,D). • Normal default rules are semi-monotonic.

  26. Example 3: anomalities (1) • Typically, drug dealers are adults • Typically, adults are employed dealer(X): adult(X) adult(X):employed(X) adult(X) employed(X) dealer(joe) adult(joe) (from default rule 1) employed(joe) (from default rule 2) Question: how to fix this anomality?

  27. Example 3: anomalities (2) • Exchange the second rule by: adult(X) : ~dealer(X) /\ employed(X) employed(X) but it is not in normal form! • Consider instead the new rules: dealer(X): adult(X) adult(X) /\ ~dealer(X) :employed(X) adult(X) employed(X) adult(X): ~dealer(X) ~dealer(X)

  28. Default rules: observations • The difference between CWA(KB) and E(KB,D) CWA: add ~p if consistent with KB Default: add ~p if consistent with E(KB,D) => the order matters!! • Inference with normal defaults: (X): (X) (X) Forward: check (X) at the time of the application Backward: two passes. First, ignore consistency checks and them verify them on the resulting chain

  29. More on nonmonotonic logics • Many different formalisms to deal with inferences of this type • circumscription: extension of predicate completion • Truth Maintenance Systems • To learn more, see advanced courses • deduction systems • advanced logics and AI courses

More Related