Knowledge Representation Chapter 12 1 Outline n n

  • Slides: 30
Download presentation
Knowledge Representation Chapter 12 1

Knowledge Representation Chapter 12 1

Outline n n n n Ontological engineering Categories and objects Actions, situations and events

Outline n n n n Ontological engineering Categories and objects Actions, situations and events The internet shopping world Reasoning systems for categories Reasoning with default information Truth maintenance systems 2

Ontology n An ontology consists of a set of concepts, axioms, and relationships that

Ontology n An ontology consists of a set of concepts, axioms, and relationships that describe a domain of interest. n Ontological Engineering Create more general and flexible representations - Concepts like actions, time, physical object and beliefs - Operates on a bigger scale than K. E. 3

Upper ontology n Limited to concepts that are meta, generic, abstract and philosophical, and

Upper ontology n Limited to concepts that are meta, generic, abstract and philosophical, and therefore are general enough to address (at a high level) a broad range of domain areas. n Provides a structure and a set of general concepts upon which domain specific ontologies (e. g. medical, financial, engineering, etc. ) could be constructed. 4

In an ontology, what do we need to express? ¨ Categories, Measures, Composite objects,

In an ontology, what do we need to express? ¨ Categories, Measures, Composite objects, Time, Space, Change, Events, Processes, Physical Objects, Substances, Mental Objects, Beliefs 5

Categories and objects n KR requires the organization of objects into categories Interaction at

Categories and objects n KR requires the organization of objects into categories Interaction at the level of the object Reasoning at the level of categories n Categories play a role in predictions about objects Based on perceived properties n Category = set of its members 6

Category organization n Relation = inheritance: All instances of food are edible, fruit is

Category organization n Relation = inheritance: All instances of food are edible, fruit is a subclass of food and apples is a subclass of fruit then an apple is edible. n Defines a taxonomy 7

FOL and categories n An object is a member of a category Member. Of(BB,

FOL and categories n An object is a member of a category Member. Of(BB, Basketballs) n A category is a subclass of another category Subset. Of(Basketballs, Balls) n All members of a category have some properties x (Member. Of(x, Basketballs) Round(x)) n All members of a category can be recognized by some properties x (Orange(x) Round(x) Diameter(x)=9. 5 in Member. Of(x, Balls) Member. Of(x, Basket. Balls)) n A category as a whole has some properties Member. Of(sheeps, Domesticated. Species) 8

Relations between categories n Two or more categories are disjoint if they have no

Relations between categories n Two or more categories are disjoint if they have no members in common: ¨ n Disjoint(s) ( c 1, c 2 c 1 s c 2 s c 1 ¹ c 2 Intersection(c 1, c 2) ={}) Example: Disjoint({animals, vegetables}) A set of s categories constitutes an exhaustive decomposition of a category c if all members of the set c are covered by categories in s: ¨ E. D. (s, c) ( i i c c 2 s i c 2) Example: Exhaustive. Decomposition({Americans, Canadians, Mexicans}, North. Americans). 9

Relations between categories n A partition is a disjoint exhaustive decomposition: Partition(s, c) Disjoint(s)

Relations between categories n A partition is a disjoint exhaustive decomposition: Partition(s, c) Disjoint(s) E. D. (s, c) Example: Partition({Males, Females}, Persons) n Is ({Americans, Canadians, Mexicans}, North. Americans) a partition? n Categories can be defined by providing necessary and sufficient conditions for membership x Bachelor(x) Male(x) Adult(x) Unmarried(x) 10

Natural kinds n Many categories have no clear-cut definitions (chair, bush, book). Tomatoes: sometimes

Natural kinds n Many categories have no clear-cut definitions (chair, bush, book). Tomatoes: sometimes green, red, yellow, black, mostly round. One solution: category Typical(Tomatoes) x, x Typical(Tomatoes) Red(x) Spherical(x) We can write down useful facts about categories without providing exact definitions 11

Physical composition n One object may be part of another: Part. Of(Bucharest, Romania) Part.

Physical composition n One object may be part of another: Part. Of(Bucharest, Romania) Part. Of(Romania, Eastern. Europe) Part. Of(Eastern. Europe, Europe) n n The Part. Of predicate is transitive (and irreflexive), so we can infer that Part. Of(Bucharest, Europe) More generally: x Part. Of(x, x) x, y, z Part. Of(x, y) Part. Of(y, z) Part. Of(x, z) 12

Physical composition n Often characterized by structural relations among parts. E. g. Biped(a) 13

Physical composition n Often characterized by structural relations among parts. E. g. Biped(a) 13

Measurements n n Objects have height, mass, cost, . . Values that we assign

Measurements n n Objects have height, mass, cost, . . Values that we assign to these are measures Some measures have no scale: Beauty, Difficulty, etc. Most important aspect of measures: is that they are orderable. ¨ Don't care about the actual numbers. (An apple can have deliciousness. 9 or. 1. ) ¨ 14

Actions, events and situations • • • Reasoning about outcome of actions is central

Actions, events and situations • • • Reasoning about outcome of actions is central to KB-agent. How can we keep track of locations in FOL? Representing time by situations (states resulting from the execution of actions). • Situation calculus 15

Actions, events and situations n Situation calculus: Actions are logical terms ¨ Situations are

Actions, events and situations n Situation calculus: Actions are logical terms ¨ Situations are logical terms consiting of ¨ n n ¨ Fluents are functions and predicates that vary from one situation to the next. n ¨ The initial situation I All situations resulting from the action on a situation Result(a, s) E. g. Holding(G 1, S 0) Eternal predicates are also allowed n E. g. Gold(G 1) 16

Actions, events and situations n n n Results of action sequences are determined by

Actions, events and situations n n n Results of action sequences are determined by the individual actions. Projection task: an SC agent should be able to deduce the outcome of a sequence of actions. Planning task: find a sequence that achieves a desirable effect 17

Actions, events and situations 18

Actions, events and situations 18

Describing change n Simple Situation calculus requires two axioms to describe change: ¨ Possibility

Describing change n Simple Situation calculus requires two axioms to describe change: ¨ Possibility axiom: when is it possible to do the action At(Agent, x, s) Adjacent(x, y) Poss(Go(x, y), s) ¨ Effect axiom: describe changes due to action Poss(Go(x, y), s) At(Agent, y, Result(Go(x, y), s)) n What stays the same? Frame problem: how to represent all things that stay the same? ¨ Frame axiom: describe non-changes due to actions ¨ At(o, x, s) (o Agent) Holding(o, s) At(o, x, Result(Go(y, z), s)) 19

Representational frame problem n If there are F fluents and A actions then we

Representational frame problem n If there are F fluents and A actions then we need A*F frame axioms to describe other objects are stationary unless they are held. ¨ n We write down the effect of each actions Solution; describe how each fluent changes over time ¨ Successor-state axiom: Pos(a, s) (At(Agent, y, Result(a, s)) (a = Go(x, y)) (At(Agent, y, s) a Go(y, z)) Note that next state is completely specified by current state. ¨ Each action effect is mentioned only once. ¨ 20

Other problems n How to deal with secondary (implicit) effects? If the agent is

Other problems n How to deal with secondary (implicit) effects? If the agent is carrying the gold and the agent moves then the gold moves too ¨ Ramification problem ¨ n Extensions: ¨ Event calculus (when actions have a duration) 21

The internet shopping world n n A Knowledge Engineering example An agent that helps

The internet shopping world n n A Knowledge Engineering example An agent that helps a buyer to find product offers on the internet. IN = product description (precise or precise) OUT = list of webpages that offer the product for sale. n n Environment = WWW Percepts = web pages (character strings) Extracting useful information required 22

The internet shopping world n Find relevant product offers Relevant. Offer(page, url, query) Relevant(page,

The internet shopping world n Find relevant product offers Relevant. Offer(page, url, query) Relevant(page, url, query) Offer(page) ¨ Write axioms to define Offer(x) ¨ Find relevant pages: Relevant(x, y, z) ? n n n Start from an initial set of stores What is a relevant category? What are relevant connected pages? ¨ Require rich category vocabulary ¨ Synonymy and ambiguity Retrieve pages: Get. Page(url) n n Compare offers (information extraction) 23

Reasoning systems for categories n How to organize and reason with categories? ¨ Semantic

Reasoning systems for categories n How to organize and reason with categories? ¨ Semantic networks Visualize knowledge-base n Efficient algorithms for category membership inference n ¨ Description logics Formal language for constructing and combining category definitions n Efficient algorithms to decide subset and superset relationships between categories. n 24

Semantic Networks n n Logic vs. semantic networks Many variations ¨ n All represent

Semantic Networks n n Logic vs. semantic networks Many variations ¨ n All represent individual objects, categories of objects and relationships among objects Allows for inheritance reasoning Female persons inherit all properties from person ¨ Similar to OO programming ¨ n Inference of inverse links ¨ Sister. Of vs. Has. Sister 25

Semantic network example 26

Semantic network example 26

Reasoning with Default Information n A form of common sense reasoning - Assume information

Reasoning with Default Information n A form of common sense reasoning - Assume information is complete - Answer set programming is a form of default reasoning, which is also closely related to constraint programming 27

n n n n cs 101, cs 102, cs 103, ee 101 RDB: Course(cs,

n n n n cs 101, cs 102, cs 103, ee 101 RDB: Course(cs, 101), course(cs, 102), course(cs, 103), cou rse(ee, 101). Count * from course CWA UNA ﺗکﻤیﻞ کﻼﺭک course(d, n)⟷ [d, n]=[cs, 101] ⋁ …⋁[d, n]=[ee, 101]. 28

Truth maintenance systems n n Using default status (same as default info in CWA)

Truth maintenance systems n n Using default status (same as default info in CWA) [e. g. p is false iff can’t prove it] Many of the inferences have default status rather than being absolutely certain Inferred facts can be wrong and need to be retracted = BELIEF REVISION. ¨ Assume KB contains sentence P and we want to execute TELL(KB, P) ¨ n n n To avoid contradiction: RETRACT(KB, P) But what about sentences inferred from P? Truth maintenance systems are designed to handle these complications. 29

Summary n n Complex KR problems require the construction of an ontology to express

Summary n n Complex KR problems require the construction of an ontology to express categories, time, actions, belief, etc. A good KR system is general enough to represent the domain knowledge of the underlying problem, and specific enough to allow efficient computation. 30