34
74.419 Artificial Intelligence Description Logics see references last slide

74.419 Artificial Intelligence Description Logics see references last slide

Embed Size (px)

Citation preview

Page 1: 74.419 Artificial Intelligence Description Logics see references last slide

74.419 Artificial Intelligence

Description Logics

see references last slide

Page 2: 74.419 Artificial Intelligence Description Logics see references last slide

Description Logics

• Background and Motivation for DL

• Relation between DL and FOPL (extensional Semantics)

• Example Definitions

• The horrible truth of DL

• T-Box, A-Box

• LOOM

Page 3: 74.419 Artificial Intelligence Description Logics see references last slide

Description Logics - Background

• Prevent flaws of Semantic Networks; provide clear semantics of nodes and links

• Derived from Inheritance Hierarchies (IS-A hierarchies; taxonomies; terminologies) and Frame Systems Concepts, Roles, Features

• Series of KR Languages starting with KL-ONE, later KL-TWO, LOOM, CLASSIC, ...

• Relate to FOPL via extensional semantics• Applied e.g. in Semantic Web Languages

(DAML+OIL)

Page 4: 74.419 Artificial Intelligence Description Logics see references last slide

Description Logics - Overview• DL provide language constructs to define

concepts. • Concepts are interpreted as sets of individuals

(extensional semantics).• Concept definitions are linear expressions,

combining concepts, roles, etc. to express constraints on the fillers of the concept.

• The IS-A hierarchy is reflected in the subsumption relation (super-class–sub-class relation), interpreted through set-inclusion.

Page 5: 74.419 Artificial Intelligence Description Logics see references last slide

Description Logic Notation

The examples on the following slides are based on Ian Horrocks' and Ulrike Sattler's notation for Description Logic (see references at the end of the presentation).

A conversion of these examples into PowerLoom notation is given on the last slides.

Page 6: 74.419 Artificial Intelligence Description Logics see references last slide

Description Logics – Basic Elements

Concepts Roles Features / Attributes Definition of concepts e.g. father(AND (Parent Man)), Biped (AND

(Animal (exactly 2 has-legs Legs))) Primary / Atomic Concepts and Roles (not

completely defined) Individual Concepts (define singletons) Instances (entities)

Page 7: 74.419 Artificial Intelligence Description Logics see references last slide

Description Logics – Principles

Concepts correspond to unary predicates or setsRoles correspond to binary predicates / relationsFeatures correspond to functionsConcept-Definitions constrain filler-sets composed of concepts, roles, role restrictions

using AND, OR, min-number, max-number etc. (Human (AND (Animal Biped Featherless))

Page 8: 74.419 Artificial Intelligence Description Logics see references last slide

Concept Definitions - Example

(defconcept Person primary-concept) I (Person) D

(defrole gender atomic-role) I (gender) DD

(defconcept Parent (AND Person (has-child.Person))I (Parent) I (Person) {xD | y: (x,y)

I (has-child) y I (Person) }

(defconcept Man (AND Person (gender.Male)) I (Man) I (Person) {xD | y: (x,y) I(gender)

y I (Male)}

Page 9: 74.419 Artificial Intelligence Description Logics see references last slide

Basic Architecture and Functions

T-Box – terminological knowledge (definition of concepts)

A-Box – assertional knowledge (statements about instances, concrete objects)

Classification - insert concept into hierarchy based on it's description / definition

TELL – insert knowledge into KB, e.g. define new concept or assert instance info

ASK – querying KB, e.g. ask about existence of instance

Page 10: 74.419 Artificial Intelligence Description Logics see references last slide

T-Box Example

T-Box (Concept Definitions)

(defconcept Person)

(defrelation has-child :domain Person :range Person)

(defconcept Male)

(defconcept Person-with-Sons:is (:and Person (:at-least 1 has-child Male)))

(defconcept Person-with-Two-Sons:is (and Person (:exactly 2 has-child Male)))

Page 11: 74.419 Artificial Intelligence Description Logics see references last slide

A-Box Example

A-Box (Assertions, Statements)

(tell (Person Fred))(tell (has-child Fred Sandy))(tell (Male Sandy))

Page 12: 74.419 Artificial Intelligence Description Logics see references last slide

Example KB

(defconcept Person)(defrelation has-child :domain Person :range Person)(defconcept Male)(defconcept Person-with-Sons

:is (:and Person (:at-least 1 has-child Male)))(defconcept Person-with-Two-Sons

:is (and Person (:exactly 2 has-child Male)))

(tell (Person Fred))(tell (has-child Fred Sandy))(tell (Male Sandy))

Page 13: 74.419 Artificial Intelligence Description Logics see references last slide

Example Reasoning

(defconcept Person)(defrelation has-child :domain Person :range Person)(defconcept Male)(defconcept Person-with-Sons

:is (:and Person (:at-least 1 has-child Male)))...(tell (Person Fred))(tell (has-child Fred Sandy))(tell (Male Sandy))

Conclude:(Person-with-Sons Fred)

Page 14: 74.419 Artificial Intelligence Description Logics see references last slide

LOOM - Program: Definitions

> (defconcept air-base :is-primitive (and Military-Installation (exactly 1 name) (at-least 1 runway-length) (exactly 1 service-branch)))

|C|AIR-BASE

> (defrelation name :range string) |R|NAME

> (defrelation runway-length :domain air-base :range number)

|R|RUNWAY-LENGTH

Page 15: 74.419 Artificial Intelligence Description Logics see references last slide

LOOM - Program: tell

> (tellm (create ab-1 air-base) (name ab-1 "Atlanta NAS") (runway-length ab-1 12050)))

Recognition changes at agent time 1: entry: AB-1 |C|MILITARY-INSTALLATION entry: AB-1 |C|AIR-BASE

> (tellm (create ab-2 air-base) (name ab-2 "Mainland NAS") (runway-length ab-2 9000))

Recognition changes at agent time 2: entry: AB-2 |C|MILITARY-INSTALLATION entry: AB-2 |C|AIR-BASE

inferred

Page 16: 74.419 Artificial Intelligence Description Logics see references last slide

LOOM - Program: retrieve

> (retrieve ?p (air-base ?p)) ( |I| AB-1 |I| AB-2 )

> (retrieve ?p (and (air-base ?p) (for-some (?l) (and (runway-length ?p ?l)

(> ?l 10000)))))

( |I| AB-1 )

Instances AB-1, AB-2

Instance AB-1

Page 17: 74.419 Artificial Intelligence Description Logics see references last slide

Loom ClassifierOne main task and purpose of Description Logics is to provide Classification algorithms, to insert newly defined concepts into the hierarchy, ensuring the correctness and consistency of the subsumption relation.

The LOOM Classifier uses a graph-like representation of definitions, which are firstly formulated as predicate expressions. Classification in LOOM is based on structural comparison of two graphs, and involves reasoning and inference mechanisms, like elaboration.

Page 18: 74.419 Artificial Intelligence Description Logics see references last slide

Definition At-Least-One-Son

At-Least-One-Son defines the set of all persons that have at least one son:

(defrelation At-Least-One-Son (?p)

:iff-def (and

(Person ?p)

(>= (cardinality

(setof (?c) (son ?p ?c)))

1))

Page 19: 74.419 Artificial Intelligence Description Logics see references last slide

Definition More-Sons-Than-Daughters

More-Sons-Than-Daughters defines the set of persons that have more sons than daughters:

(defrelation More-Sons-Than-Daughters (?pp)

:iff-def (and

(Person ?pp)

(> (cardinality (setof (?b) (son ?pp ?b)))

(cardinality (setof (?g) (daughter ?pp ?g)))

))

)

Page 20: 74.419 Artificial Intelligence Description Logics see references last slide

Structural SubsumptionThe PC classifier can prove that At-Least-One-Son subsumes More-Sons-Than-Daughters, i.e. it will classify More-Sons-Than-Daughters below At-Least-One-Son.

The PC classifier employs a structural subsumption test. Roughly speaking, to prove that a description A subsumes a description B, a structural subsumption prover attempts to demonstrate that for every structural “component” in (the internal representation for) the definition of A there exists a “corresponding component” in (the internal representation for) the definition of B.

Page 21: 74.419 Artificial Intelligence Description Logics see references last slide

Graph RepresentationThe PC classifier parses definitions phrased in the prefix predicate calculus into graph-based structures.

All subsequent reasoning involves operations on these graphs. Each of these graphs represents a set expression, consisting of a list of domain variables and a set membership test (the definition). A node can represent a variable, a constant, or another set expression. A predicate applied to a list of terms is represented by a (hyper) edge connecting the nodes corresponding to the terms in the list, together with a pointer to the node that corresponds to the predicate. Nodes representing skolem variables are introduced to represent function terms. Variables other than domain variables are assumed to be existentially quantified. This graph representation eliminates the use of (or need for) universal quantifiers.

Page 22: 74.419 Artificial Intelligence Description Logics see references last slide

Transformation 1: At-Least-One-Son

The At-Least-One-Son relation defined above is associated with a graph [1] representing the following set:

(setof (?p)

(and (Person ?p)

(>= (cardinality

(setof (?c) (son ?p ?c)))

1)

Page 23: 74.419 Artificial Intelligence Description Logics see references last slide

Transformation 2: At-Least-One-Son

Use set-of expressions and skolemization:

(setof (?p) (exists (?s1 ?card1)

(and (Person ?p)

(= ?s1 (setof (?c) (son ?p ?c)))

(cardinality ?s1 ?card1)

(>= ?card1 1))))

number of sons of person ?p

set of sons of person ?p

Page 24: 74.419 Artificial Intelligence Description Logics see references last slide

Transformation: More-Sons-Than-Daughters

Here is the “graph” [2] for More-Sons-Than-Daughters:

(setof (?pp) (exists (?s2 ?s3 ?card2 ?card3)

(and (Person ?pp)

(= ?s2 (setof (?b) (son ?pp ?b)))

(= ?s3 (setof (?g) (daughter ?pp ?g)))

(cardinality ?s2 ?card2)

(cardinality ?s3 ?card3)

(> ?card2 ?card3)))) more sons than daughters

Page 25: 74.419 Artificial Intelligence Description Logics see references last slide

Structural Mapping and Substitution

To prove that At-Least-One-Son subsumes More-Sons-Than-Daughters, we look for a substitution mapping nodes in [1] to nodes in [2] such that for each edge in the graph [1] there is a corresponding edge in the graph [2].

The correct substitution σ is

?p ⇒σ ?pp; ?s1 ⇒σ ?s2; ?card1 ⇒σ ?card2

except that there is a problem - no edge in graph [2] corresponds to the edge (>= ?card1 1) in graph [1].

set of sons number of sons

Page 26: 74.419 Artificial Intelligence Description Logics see references last slide

ElaborationHowever, a constraint representing the missing edge (>= ?card2 1) is logically derivable from the existing constraints/edges present in graph [2]

The addition of this missing edge would result in a set expression logically equivalent to the expression [2].

Using a process we call “elaboration”, the PC classifier applies forward chaining rules to augment each graph with edges that logically follow from the existence of other edges already present in the graph.

A graph is elaborated by applying elaboration rules (see Tables on following slides) repeatedly until no additional structure can be produced.

Page 27: 74.419 Artificial Intelligence Description Logics see references last slide

Result for Sons-and-DaughtersIn the case of graph [2], the following edges would be added during elaboration:

(Integer ?card2), (>= ?card2 0),

(Integer ?card3), (>= ?card3 0),

(>= ?card2 1)

This last edge represents our “missing edge”.

It is derived from the fact that ?card3 is non-negative, ?card2 is strictly greater than ?card3, hence greater than zero, and that ?card2 is an integer.

Page 28: 74.419 Artificial Intelligence Description Logics see references last slide

Inequality Rules

Page 29: 74.419 Artificial Intelligence Description Logics see references last slide

Cardinality Rules

Page 30: 74.419 Artificial Intelligence Description Logics see references last slide

Contained-in and Other Rules

Page 31: 74.419 Artificial Intelligence Description Logics see references last slide

PowerLoom Notation

A conversion of the DL examples given in the notes into PowerLoom notation is following on the next slides.

Page 32: 74.419 Artificial Intelligence Description Logics see references last slide

Examples in PowerLoom (PL) Notation

Slide 6:

father (AND (Parent Man))

PL: (defconcept father (and (Parent Man)))

Biped (AND (Animal (exactly 2 has-legs Legs)))

PL: (defconcept Biped (and (Animal (exactly 2 has-legs Legs))))

Slide 7:

(Human (AND (Animal Biped Featherless))PL: (defconcept Human (AND (Animal Biped Featherless)))

Page 33: 74.419 Artificial Intelligence Description Logics see references last slide

Examples in PowerLoom (PL) Notation

Slide 8:

(defconcept Parent (AND Person (has-child.Person))

PL: (defconcept Parent (?p) (and (?p Person) ((?p has-child):-> (?c

Person))))

Note: has-child has to be defined beforehand.

(defconcept Man (AND Person (gender.Male))

PL: (defconcept Man (?m) (and (?m Person) ((?m gender):-> (Male))))

Gender has to be defined beforehand.

Page 34: 74.419 Artificial Intelligence Description Logics see references last slide

References Description Logic Home Page, http://www.dl.kr.org/ J. Heinsohn

et al.: An Empirical Analysis of Terminological Representation Systems, Artificial Intelligence 68(2):367-397, 1994. http://www.cs.umanitoba.ca/~cs419/2004/Papers/ heinsohn-etal-aij-94.pdf

LOOM Home Page, http://www.isi.edu/isd/LOOM/LOOM-HOME.html

Robert M. MacGregor: A Description Classifier for the Predicate Calculus. Proc. Twelfth National Conference on Artificial Intelligence, (AAAI 94), pp. 213-220, 1994. http://www.isi.edu/isd/LOOM/papers/macgregor/aaai94.pdf

Ian Horrocks and Ulrike Sattler, DL Presentations, http://www.cs.man.ac.uk/~horrocks/Slides/index.html