today recall
play

Today Recall Given a KB written in first-order logic, we augment KB - PowerPoint PPT Presentation

1 2 Today Recall Given a KB written in first-order logic, we augment KB to get a bigger set of Closed World Assumption ctd formulas CWA ( KB ) ; the extra formulas we add are: Reasoning with defaults X KB = { p ( t 1 , . . . , t n ) :


  1. 1 2 Today Recall Given a KB written in first-order logic, we augment KB to get a bigger set of • Closed World Assumption ctd formulas CWA ( KB ) ; the extra formulas we add are: • Reasoning with defaults X KB = { ¬ p ( t 1 , . . . , t n ) : not KB ⊢ p ( t 1 , . . . , t n ) } See Brachman and Levesque, Ch 11 a formula Q follows from KB using the CWA iff KB ∪ X KB | = Q Alan Smaill KRI l7 Jan 28 2008 Alan Smaill KRI l7 Jan 28 2008 3 4 CWA and Definite Clauses CWA may be inconsistent! Remember: a definite clause is a formula of the shape Beware that CWA of KB may be inconsistent, even when KB is consistent. For example, take the KB to have a single statement british ( louise ) ∨ french ( louise ) , and look at the augmented KB: P 1 ∧ · · · ∧ P n → Q we cannot show british ( louise ) , so ¬ british ( louise ) is in X KB . where the P i and Q are atomic statements, maybe with variables; we cannot show french ( louise ) , so ¬ french ( louise ) is in X KB . there may be any number (even none) of P i , and Q is always there. So CWA [ KB ] has three statements One reason why CWA is often used with KB expressed in a Prolog-like way is the following result. { british ( louise ) ∨ french ( louise ) , ¬ british ( louise ) , ¬ french ( louise ) } If KB consists of definite clauses, then the augmented KB CWA [ KB ] is and it is impossible for all three to be true. consistent; that is, there is some interpretation of the language under Note that the initial KB is not made of definite clauses. which all the formulas in CWA [ KB ] are true. Alan Smaill KRI l7 Jan 28 2008 Alan Smaill KRI l7 Jan 28 2008

  2. 5 6 CWA: use with care Evaluating CWA queries CWA is a strong assumption to make. We have described the effect of CWA logically, but not given an effective way of computing whether a query holds using CWA. It should only be used where it is reasonable to think that all basic positive information is derivable: british ( louise ) ∨ french ( louise ) is not good enough, Write KB | = cwi Q if Q follows using standard semantics from the enlarged KB. because one of the possibilities is true, but not derivable. For standard entailment, it is easy to show that: It should not be used wherever it introduces inconsistency. • KB | = P ∧ Q iff KB | = P and KB | = Q • KB | = ¬¬ P iff KB | = P • KB | = ¬ ( P ∨ Q ) iff KB | = ¬ P and KB | = ¬ Q Since these hold for | = , they also hold for | = cwi (why?) Alan Smaill KRI l7 Jan 28 2008 Alan Smaill KRI l7 Jan 28 2008 7 8 CWA queries ctd CWA queries ctd Suppose we are interested in queries that contain no variables (so they are If the enlarged CWA is consistent (as we saw this may fail even for a consistent boolean combinations of atomic statements). For these statements, we can show KB), then we also have that • KB | = cwi ¬ Q iff KB � cwi Q either KB | = cwi Q or KB | = cwi ¬ Q where KB � cwi Q means that not KB | = cwi Q Using this fact, we can show • KB | = cwi P ∨ Q iff KB | = cwi P or KB | = cwi Q • KB | = cwi ¬ ( P ∧ Q ) iff KB | = cwi ¬ P or KB | = cwi ¬ Q Alan Smaill KRI l7 Jan 28 2008 Alan Smaill KRI l7 Jan 28 2008

  3. 9 10 Evaluating queries Default reasoning Putting all this together, this allows us to break down such queries to a Some everyday reasoning uses default inference – some conclusions are reached combination of queries about the atoms in the query. Each fact noted above by default when we do not have full information available. For example: allows us to replace a query about a compound formula into one or more queries Tweety is a bird. about simpler formulas; just continue recursively. Typically, birds can fly. eg, for (( P ∧ Q ) ∨ ¬ ( R ∧ ¬ S )) follows with CWA iff either P and Q both follow, In the absence of other information, we conclude that Tweety can fly. or R does not follow, or S does follow. So: if we can deal with the atomic statements, boolean combinations can be Note that this is not an argument using probability (though probabilistic dealt with also. arguments are also possible). This does not in general give us a decision procedure for these queries, however. Alan Smaill KRI l7 Jan 28 2008 Alan Smaill KRI l7 Jan 28 2008 11 12 Recall: taxonomic hierarchy Example We can take a very small subset of FOL and use it to represent hierarchies. Just Tweety is a bird. use All birds are things. Ostriches are birds. • predicates with one argument (for the classes of the hierarchy) Flying ostriches are ostriches. Represent as: • all statements are either bird ( tweety ) – atomic : for objects of the class, or – of the form A ( x ) → B ( x ) , saying that one class is a sub-class of another. bird ( X ) → thing ( X ) ostrich ( X ) → bird ( X ) There is implicitly a universal quantifier in the sub-class rule. flying ostrich ( X ) → ostrich ( X ) . Alan Smaill KRI l7 Jan 28 2008 Alan Smaill KRI l7 Jan 28 2008

  4. 13 14 What can we conclude? Default Rules Default rules are used to deal with the situation where we want to say that Using standard logic, what can we conclude from the statements we have? something C follows from something else A by default, provided that as far as We can conclude thing ( tweety ) ; “thing” is the most general class, and usually we know something else again B may be true. the hierarchy is arranged so that every entity is a thing. We write We cannot conclude flies ( tweety ) , or ¬ flies ( tweety ) ; we should not add A ( X ) : B ( X ) bird ( X ) → flies ( X ) to the hierarchy, because some birds do not fly. Default C ( X ) logic was proposed by Ray Reiter to deal with this situation. to say that if A holds (for some object(s)), and we do not know that B is false, then we can conclude that C holds. More precisely, if there is a term (without variables) such that A ( t ) can be derived and ¬ B ( t ) cannot be derived, then we conclude C ( t ) . So in our example, use the rule bird ( X ) : flies ( X ) flies ( X ) Alan Smaill KRI l7 Jan 28 2008 Alan Smaill KRI l7 Jan 28 2008 15 16 Defaults for . . . More default examples We may want defaults for different reasons. • Persistence Fred got married yesterday, so he is married today. • General statements I put the book in the bookshelf, so it is there now. – apples are red – people work close to where they live The problem is to characterise when it is appropriate to draw a default conclusion, given it should fail sometimes . • Lack of contrary information – no nation has a leader more than 7 feet tall This sort of reasoning is sometimes called defeasible reasoning . – it is easy for children to acquire natural languages • Conventional usage – if the office door is open, the occupant is happy to be disturbed – natural language implicature Alan Smaill KRI l7 Jan 28 2008 Alan Smaill KRI l7 Jan 28 2008

  5. 17 18 Using default rules Default reasoning is non-monotonic We now have: Recall that standard logic is monotonic : if we add new assumptions to a theory, we never invalidate any conclusions we could already make: • bird ( tweety ) by assumption If KB | = Q , then KB ∪ X | = Q • we cannot derive ¬ flies ( tweety ) , as we saw before Default reasoning does not have this property; we say it is non-monotonic . • therefore we conclude flies ( tweety ) . Adding extra information can invalidate earlier conclusions. This sort of rule is called a normal default rule , since it has the shape A ( X ) : C ( X ) C ( X ) This is the most common use of default rules. Alan Smaill KRI l7 Jan 28 2008 Alan Smaill KRI l7 Jan 28 2008 19 20 Non-monotonic example Example continued Let’s take a starting KB: Now suppose we add to the KB (we find out that) Tweety is an ostrich: ostrich ( tweety ) bird ( tweety ) bird ( X ) → thing ( X ) Now we can no longer conclude that flies ( tweety ) – that’s just as well, ostrich ( X ) → bird ( X ) otherwise the KB would have become inconsistent. flying ostrich ( X ) → ostrich ( X ) We can no longer use the default rule ostrich ( X ) → ¬ flies ( X ) bird ( X ) : flies ( X ) flies ( X ) and the default rule bird ( X ) : flies ( X ) since now we can show ¬ flies ( tweety ) . flies ( X ) We can still deduce that flies ( tweety ) (check this) So, default logic is a non-monotonic logic. Alan Smaill KRI l7 Jan 28 2008 Alan Smaill KRI l7 Jan 28 2008

  6. 21 22 Warning on Inconsistent Theories Default Reasoning Ambiguous? Given the semantics we are using, inconsistent KBs are Bad News, because So far we have not addressed what happens when defaults are in conflict (an anything at all follows from such a KB; eg entity has two properties, which allow conflicting default steps), nor how exactly to use this default reasoning in to characterise a reasonable set of beliefs, given some default rules. P ( a ) , ¬ P ( a ) | = Q, It turns out that there are several possible answers to these questions; to be discussed in next lecture. regardless of what Q is. So we want to avoid such KBs; but in real life KBs can easily end up like this. Note that a sound inference engine should return that the query follows in this situation. Detection of inconsistency in the KB (ie that for some statement S we can derive both S and ¬ S ) is grounds for warning of a problem with the KB, but not for denying that the derivations exist! Alan Smaill KRI l7 Jan 28 2008 Alan Smaill KRI l7 Jan 28 2008 23 Summary • Non-monotonic inference • Closed World Assumption • Default rules Alan Smaill KRI l7 Jan 28 2008

Recommend


More recommend