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

today recall
SMART_READER_LITE
LIVE PREVIEW

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 ) :


slide-1
SLIDE 1

1

Today

  • Closed World Assumption ctd
  • Reasoning with defaults

See Brachman and Levesque, Ch 11

Alan Smaill KRI l7 Jan 28 2008 2

Recall

Given a KB written in first-order logic, we augment KB to get a bigger set of formulas CWA(KB); the extra formulas we add are: XKB = { ¬p(t1, . . . , tn) : not KB ⊢ p(t1, . . . , tn) } a formula Q follows from KB using the CWA iff KB ∪ XKB | = Q

Alan Smaill KRI l7 Jan 28 2008 3

CWA and Definite Clauses

Remember: a definite clause is a formula of the shape P1 ∧ · · · ∧ Pn → Q where the Pi and Q are atomic statements, maybe with variables; there may be any number (even none) of Pi, and Q is always there. One reason why CWA is often used with KB expressed in a Prolog-like way is the following result. If KB consists of definite clauses, then the augmented KB CWA[KB] is consistent; that is, there is some interpretation of the language under which all the formulas in CWA[KB] are true.

Alan Smaill KRI l7 Jan 28 2008 4

CWA may be inconsistent!

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: we cannot show british(louise), so ¬british(louise) is in XKB. we cannot show french(louise), so ¬french(louise) is in XKB. So CWA[KB] has three statements { british(louise) ∨ french(louise), ¬british(louise), ¬french(louise) } and it is impossible for all three to be true. Note that the initial KB is not made of definite clauses.

Alan Smaill KRI l7 Jan 28 2008

slide-2
SLIDE 2

5

CWA: use with care

CWA is a strong assumption to make. 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, because one of the possibilities is true, but not derivable. It should not be used wherever it introduces inconsistency.

Alan Smaill KRI l7 Jan 28 2008 6

Evaluating CWA queries

We have described the effect of CWA logically, but not given an effective way of computing whether a query holds using CWA. Write KB | =cwi Q if Q follows using standard semantics from the enlarged KB. For standard entailment, it is easy to show that:

  • 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 7

CWA queries ctd

Suppose we are interested in queries that contain no variables (so they are boolean combinations of atomic statements). For these statements, we can show that either KB | =cwi Q or 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 8

CWA queries ctd

If the enlarged CWA is consistent (as we saw this may fail even for a consistent KB), then we also have

  • KB |

=cwi ¬Q iff KB cwi Q where KB cwi Q means that not KB | =cwi Q

Alan Smaill KRI l7 Jan 28 2008

slide-3
SLIDE 3

9

Evaluating queries

Putting all this together, this allows us to break down such queries to a combination of queries about the atoms in the query. Each fact noted above allows us to replace a query about a compound formula into one or more queries about simpler formulas; just continue recursively. eg, for ((P ∧ Q) ∨ ¬(R ∧ ¬S)) follows with CWA iff either P and Q both follow,

  • r R does not follow, or S does follow.

So: if we can deal with the atomic statements, boolean combinations can be dealt with also. This does not in general give us a decision procedure for these queries, however.

Alan Smaill KRI l7 Jan 28 2008 10

Default reasoning

Some everyday reasoning uses default inference – some conclusions are reached by default when we do not have full information available. For example: Tweety is a bird. Typically, birds can fly. In the absence of other information, we conclude that Tweety can fly. Note that this is not an argument using probability (though probabilistic arguments are also possible).

Alan Smaill KRI l7 Jan 28 2008 11

Recall: taxonomic hierarchy

We can take a very small subset of FOL and use it to represent hierarchies. Just use

  • predicates with one argument (for the classes of the hierarchy)
  • all statements are either

– atomic: for objects of the class, or – of the form A(x) → B(x), saying that one class is a sub-class of another. There is implicitly a universal quantifier in the sub-class rule.

Alan Smaill KRI l7 Jan 28 2008 12

Example

Tweety is a bird. All birds are things. Ostriches are birds. Flying ostriches are ostriches. Represent as: bird(tweety) bird(X) → thing(X)

  • strich(X)

→ bird(X) flying ostrich(X) →

  • strich(X).

Alan Smaill KRI l7 Jan 28 2008

slide-4
SLIDE 4

13

What can we conclude?

Using standard logic, what can we conclude from the statements we have? We can conclude thing(tweety); “thing” is the most general class, and usually the hierarchy is arranged so that every entity is a thing. We cannot conclude flies(tweety), or ¬flies(tweety); we should not add bird(X) → flies(X) to the hierarchy, because some birds do not fly. Default logic was proposed by Ray Reiter to deal with this situation.

Alan Smaill KRI l7 Jan 28 2008 14

Default Rules

Default rules are used to deal with the situation where we want to say that something C follows from something else A by default, provided that as far as we know something else again B may be true. We write A(X) : B(X) C(X) 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 15

Defaults for . . .

We may want defaults for different reasons.

  • General statements

– apples are red – people work close to where they live

  • Lack of contrary information

– no nation has a leader more than 7 feet tall – 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 16

More default examples

  • Persistence

Fred got married yesterday, so he is married today. I put the book in the bookshelf, so it is there now. The problem is to characterise when it is appropriate to draw a default conclusion, given it should fail sometimes. This sort of reasoning is sometimes called defeasible reasoning.

Alan Smaill KRI l7 Jan 28 2008

slide-5
SLIDE 5

17

Using default rules

We now have:

  • bird(tweety) by assumption
  • we cannot derive ¬flies(tweety), as we saw before
  • therefore we conclude flies(tweety).

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 18

Default reasoning is non-monotonic

Recall that standard logic is monotonic: if we add new assumptions to a theory, we never invalidate any conclusions we could already make: If KB | = Q, then KB ∪ X | = Q Default reasoning does not have this property; we say it is non-monotonic. Adding extra information can invalidate earlier conclusions.

Alan Smaill KRI l7 Jan 28 2008 19

Non-monotonic example

Let’s take a starting KB: bird(tweety) bird(X) → thing(X)

  • strich(X)

→ bird(X) flying ostrich(X) →

  • strich(X)
  • strich(X)

→ ¬flies(X) and the default rule bird(X) : flies(X) flies(X) We can still deduce that flies(tweety) (check this)

Alan Smaill KRI l7 Jan 28 2008 20

Example continued

Now suppose we add to the KB (we find out that) Tweety is an ostrich:

  • strich(tweety)

Now we can no longer conclude that flies(tweety) – that’s just as well,

  • therwise the KB would have become inconsistent.

We can no longer use the default rule bird(X) : flies(X) flies(X) since now we can show ¬flies(tweety). So, default logic is a non-monotonic logic.

Alan Smaill KRI l7 Jan 28 2008

slide-6
SLIDE 6

21

Warning on Inconsistent Theories

Given the semantics we are using, inconsistent KBs are Bad News, because anything at all follows from such a KB; eg P(a), ¬P(a) | = Q, 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 22

Default Reasoning Ambiguous?

So far we have not addressed what happens when defaults are in conflict (an 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. It turns out that there are several possible answers to these questions; to be discussed in next lecture.

Alan Smaill KRI l7 Jan 28 2008 23

Summary

  • Non-monotonic inference
  • Closed World Assumption
  • Default rules

Alan Smaill KRI l7 Jan 28 2008