ldk r logics for data and knowledge representation classl (propositional description logic with...

43
L Logics for D Data and K Knowledge R Representation ClassL (Propositional Description Logic with Individuals) 1

Upload: donald-poole

Post on 18-Jan-2016

234 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

LLogics for DData and KKnowledge RRepresentation

ClassL (Propositional Description Logic with Individuals)

1

Page 2: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Outline

Terminology (TBox)

2

Page 3: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Terminological AxiomsInclusion Axiom

C⊑D (intended meaning: σ(C)⊆ (D))Examples:

Master ⊑ Student,Woman ⊑ Person

Woman ⊔ Father ⊑ Person

Equivalence (Equality) Axiom C≡D (intended meaning σ(C)= σ(D))

Examples:Student ≡ Pupil,

Parent ≡ Mather⊔ Father

3

Page 4: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Definitions A definition is an equality with an atomic

concept on the left hand.

Examples

Bachelor ≡ Student ⊓ UndergraduateWoman ⊑ Person ⊓ Female

4

Page 5: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Terminology (TBox)

A terminology (or Tbox) is a set of a (terminological) axioms

Example: T is

{Woman ⊔ Father ⊑ Person, Parent ≡ Mather⊔ Father}

5

Page 6: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Outlines

TerminologyWorld DescriptionsReasoning with the TBox

6

Page 7: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Satisfiability with respect to T (no ABox))

A concept P is satisfiable with respect to T, if

there exists an interpretation I, with if I |= θ for all θ ∈ T, such that

I |= P.In other words, I(P) non empty.

In this case we say also that I is a model of P

7

Page 8: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Validity with respect to T

A (possibly empty) Tbox T of class-propositions entails (subsumes) a class-proposition P (written: T |= P) (similarly: a concept P is valid with respect to T) if forall interpretations I, with if I |= θ for all θ ∈ T, we have that I |= P.

In other words, I(P) non empty in all Interpretations.

If T |= P, then we say that P is a logical consequence of T, and also that T logically implies P.

8

Page 9: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

TBox reasoningLet T be a Tbox

Satisfiability:(with respect to T):T satisfies P?

Subsumption (with respect to T): T |= P ⊑ Q?

Equivalence (with respect to T): :(T|= P ≡ Q) T|= P ⊑ Q and T |= P ⊑ Q?

Disjointness: (with respect to T): T|= P ⊓ Q ⊑ ⊥?

9

Page 10: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

TBox reasoning

Let T be a TboxSatisfiability:(with respect to T):

T satisfies P?

A concept P is satisfiable with respect to T if there exists a model I of T such that I(P) is not empty. In this case we say that I is a model of P

NOTE: a property of a single model. Used to implement SAT or Eval (model checking)

EXAMPLE!!!

10

Page 11: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

TBox reasoning

Let T be a Tbox Subsumption (with respect to T):

T |= P ⊑ Q (P ⊑T Q)

A concept P is subsumed by a concept Q with respect to T if I(P) is a subset of I(Q) for every model I of T.

NOTE: a property of all models. Used to implement Entailment and validity (with T empty)

EXAMPLE!!!

11

Page 12: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

TBox reasoning

Let T be a TboxEquivalence (with respect to T):

(T|= P ≡ Q) (P ≡T Q)Two concepts P and Q are equivalent with respect to T if

I(P) = I(Q) for every model I of T.

NOTE: a property of all models.

EXAMPLE!!!

12

Page 13: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

TBox reasoning

Let T be a TboxDisjointness: (with respect to T):

T|= P ⊓ Q ⊑ ⊥?Two concepts P and Q are disjoint with respect to T if I(P)

intersection with I(Q) is empty, for every model I of T.

NOTE: a property of all models.

EXAMPLE!!!

13

Page 14: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

ExampleSuppose we describe the students/listeners in

LDKR course:

T= {Bachelor ≡ Student ⊓ Undergraduate, Master ≡ Student ⊓ Undergraduate,

PhD ≡ Master ⊓ Research, Assistant ≡ PhD ⊓ Teach,

Undergraduate ⊑ Teach}

T is satisfiable (build model)

14

Page 15: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Example cont. EquivalenceProve the following equivalence:

Student ≡ Bachelor ⊔ MasterProof:Bachelor ⊔ Master≡ (Student ⊓ Undergraduate) ⊔ Master≡ (Student ⊓ Undergraduate) ⊔ (Student ⊓

Undergraduate)≡ Student ⊓(Undergraduate ⊔ Undergraduate) ≡ Student ⊓⊤≡ Student

15

Page 16: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Example cont.(Exercise) Let’s see the following propositions,

Assistant, StudentBachelor, Teach

PhD, Master ⊓ Teach

1. Which pairs are subsumed/supersumed?

2. Which pairs are disjoint?

16

Page 17: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

ExampleSuppose we describe the students/listeners in

LDKR course in TBox as follows:T ={Bachelor ≡ Student ⊓ Undergraduate,

Master ≡ Student ⊓ Undergraduate,PhD ≡ Master ⊓ Research,Assistant ≡ PhD ⊓ Teach,Undergraduate ⊑ Teach}

Is Bachelor⊓PhD satisfiable?Are Assistant and Bachelor disjoint?

17

Page 18: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Class-Values and Truth-Values

The intentional interpretation Ii of a proposition P determines a truth-value Ii(P).

The extensional interpretation of Ie of P determines a class of objects Ie(P).

What is the relation between Ii(P) and Ie(P)?

18

Page 19: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

PL vs. ClassL (PL, ClassL notational variants)PL ClassL

Syntax ∧ ⊓

∨ ⊔

⊤ ⊤

⊥ ⊥

→ ⊑

↔ ≡

P, Q... P, Q...

Semantics ∆={true, false} ∆={o, …} (compare models)

19

Page 20: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Class-Values and Truth-Values

Intersection: Ie |=P, Ie |= Q may not imply Ie |=P⊓Q: subsumption in an extensional interpretation is “richer” than in an intensional interpretation (subsumption is not preserved by intersection) .. but Ie |=P⊑C, Ie |=Q⊑C always implies Ie |=P⊓Q ⊑C, namely,

subsumption, satisfiability and validity (empty TBox) are preserved by intersection with the TBox axioms.

Negation: We may have Ie |=P and Ie |= P, and Ie |= Q⊓P and Ie |= Q⊓P (satisfiability is preserved using two models in place of one) … but always not Ie |= P⊓P … and always not Ie |= (Q⊓P)⊓(Q⊓P) … and always Ie |= P⊔P, namely satisfiability, validity are

preserved by negation.

20

Page 21: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Class-Values and Truth-ValuesP is satisfiable with respect an intensional interpretation

Ii(P) if and only if it is satifisfiable with respect to an extensional interpretation Ie(P).

Ii(P) implies Ie(P): Build Ie(P) from Ii(P) by substituting true with U and false with empty set.

Ie(P) implies Ii(P): less trivial. Idea: build first a Ie’(P) which is equivalent to Ie(P) and which uses only U and empty set.

TO BE REFINED

21

Page 22: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

From TBox reasoning to PL reasoningLet T be a Tbox, T= {θ1, …, θn }

Satisfiability:(with respect to T):

T satisfies P? Reduces to PL satisfiability of θ1 ∧ … ∧ θn →P

Validity, entailment with respect to T:

T |= P? Reduces to PL validity of θ1 ∧ … ∧ θn →P

Subsumption (with respect to T):

T |= P ⊑ Q? Reduces to validity of θ1 ∧ … ∧ θn →(P →Q)

Equivalence (with respect to T): :

T|= P ⊑ Q and T |= P ⊑ Q? Reduces to subsumption

Disjointness: (with respect to T):

T|= P ⊓ Q ⊑ ⊥? Reduces to unsatisfiability of P ⊓ Q

NOTICE: ClassL reasoning can be implemented using DPLL

22

Page 23: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Outline

Terminology (TBox)World Descriptions (ABox))Reasoning with TBoxEliminating the TboxReasoning with the AboxClosed vs. Open world semanticsProperties

23

Page 24: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Terminology (TBox)

Two kinds of symbols:

base symbols (or primitive concepts), which occur only on the right hand side of axioms, and

name symbols (or defined concepts) which occur on the left hand side of axioms

Example:

A ⊑ B ⊓ (C ⊔ D)

A defined concept; B, C, D primitive concepts

24

Page 25: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Terminology (TBox)

Let A and B be atomic concepts in a terminology T.

We say that A directly uses B in T if B appears in the right-hand side of the defintion of A.

Example:

A ⊑ B ⊓ (C ⊔ D)

A directly uses B,C,D

We say that A uses B if B appears in the right hand side after the definition of A has been unfolded so that there are only primitive concepts in the left hand side of the definition of A

Example:

{A ⊑ B ⊓ (C ⊔ D), B ⊑ (C ⊔ E)}

A uses E, and directly uses B

25

Page 26: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Terminology (TBox)

A terminology contains a cycle (is cyclic) if it contains a concept which uses itself. A terminilogy is acyclic otherwise

Example:

A ⊑ B ⊓ (C ⊔ D), B ⊑ (C ⊔ E)

is acyclic.

A ⊑ B ⊓ (C ⊔ A), B ⊑ (C ⊔ E)

A ⊑ B ⊓ (C ⊔ D), B ⊑ (C ⊔ A)

are cyclic.

NOTE: NEED NICE EXAMPLE

26

Page 27: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Terminology (TBox)

The expansion T’ of an acyclic terminology T is a terminology obtained from T by unfolding all definitions until all concepts occurring on the right hand side of definitions are base symbols

Example:

T is:

A ⊑ B ⊓ (C ⊔ D), B ⊑ (C ⊔ E)

T’ is

A ⊑ (C ⊔ E) ⊓ (C ⊔ D), B ⊑ (C ⊔ E)

T and T’ are equivalent. Reasoning with T’ will yield the same results as reasoning in T

27

Page 28: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Terminology (TBox)

For each concept C we define the expansion of C with respect to T as the concept C’ that is obtained from C by replacing each occurrence of a name symbol A in C by the concept D, where A≡D is the definition of A in T’, the expansion of T

Example: take previous Tbox (with Man defined ad being a person which is not a Woman)

C is:

Woman ⊓ Man

C’ is

Person ⊓ Female ⊓ Person ⊓ Female

C≡TC’, C is satisfiable with respect to C’, … subsumption, disjointness (write precisely)

28

Page 29: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Terminology (TBox)

The expansion of C to C’ can be costly, as in the worst case T’ is exponential in the size of T, and this propagates to C’

EXAMPLE: use DeMorgan laws

29

Page 30: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Outlines

Terminology (TBox)World Descriptions (ABox)

30

Page 31: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

ABoxThe second component of the knowledge base

is the world description, the ABox.In a ABox, one introduces individuals, by giving

them names, and one asserts properties about these individuals.

We denote individual names as a, b, c,…An assertion with concept C is called concept

assertion in the form:C(a), C(b), C(c), …

ExampleProfessor(fausto)

31

Page 32: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Semantics of the ABox

We give a semantics to ABoxes by extending interpretations to individual names.

An interpretation I =(∆I, .I) not only maps atomic concepts to sets, but in addition maps each individual name a to an element aI ∈∆I., namely

I (a) = aI ∈∆I

We assume that distinct individual names denote distinct objects, as unique name assumption (UNA).

32

Page 33: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Individuals in the TBox Sometimes, it is convenient to allow individual

names (also called nominals) not only in the ABox, but also in the description language.

The most basic one is the “set”constructor, written{a1,…,an}

Which defines a concept, without giving it a name, by enumerating its elements., with the semantics

{a1,…,an}I= {a1I,…,an

I}

Example: StudentsFaustoClass ≡ {chen, enzo, …, zhang}

33

Page 34: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Outline

Terminology (TBox)World Descriptions (ABox))Reasoning with TBoxEliminating the TboxReasoning with the AboxClosed vs. Open world semantics

34

Page 35: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Consistency

Consistency: An Abox A is consistent with respect to a Tbox T if there is an interpretation I which is a model of both A and T.

We simply say that A is consistent if it is consistent with respect to the empty Tbox

Example: {Mother (Mary), Father(Mary)} is consistent but Not consistent with respect the family TBox

… other examples in DBs

35

Page 36: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Consistency

Checking the consistency of an ABox with respect to an acyclic TBox can be reduced to checking an expanded ABox.

We define the expansion of an ABox A with respect to T as the ABox A’ that is obtained from A by replacing each concept assertion C(a) with the assertion C’(a), with C’ the expansion of C with respect to T.

A is consistent with respect to T iff its expansion A’ is consistent

A is consistent iff A is satisfiable (in PL, under the usual translation) with C(a) considered as a proposition (different from C(b))

NOTE: from now on let us drop TBox (via expansion)

36

Page 37: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

ExampleConsider the example of students in LDKR:1. Bachelor ≡ Student ⊓ Undergraduate

2. Master ≡ Student ⊓ Undergraduate

3. PhD ≡ Master ⊓ Research

4. Assistant ≡ PhD ⊓ Teach

5. Undergraduate ⊑ Teach

6.Plus that Master(Chen), PhD(Enzo), Assistant(Rui)

1.We can conclude that:

37

Page 38: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Example cont. Is the knowledge base consistent? Is α=Phd(Rui) entailed?Find all the instances of Undergraduate.Given an instance Rui, and a concept set

{Student, PhD, Assistant} find the most specific concept C that |=C(Rui)

38

Page 39: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Instance checking

Checking whether an assertion is entailed by an ABox (and TBox via expansion)

A |= C(a) if every interpretation which satisfies A also satisfies C(a).

A |= C(a) iff A conjunct with { C(a)} is inconsistent

39

Page 40: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Instance retrieval

Given an ABox A and a concept C retrieve all instance a which satisfy C.

A |= C(a) if every interpretation which satisfies A also satisfies C(a).

Non optimized implementation: do instance checking for all instances

40

Page 41: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Concept realization

Dual problem of Instance retrieval

Given an ABox A, a set of concepts and an individual a find the most specific concepts C such that A |= C(a)

Most specifi concept: more specific with respect the subsumption ordering.

Non optimized implementation: do instance checking for all concepts

41

Page 42: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Outline

Terminology (TBox)World Descriptions (ABox))Reasoning with TBoxEliminating the TboxReasoning with the AboxClosed vs. Open world semantics

42

Page 43: LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1

Closed and Open world semantics

Closed world Assumption CWA (Data bases): anything which is not explicitly asserted is false

Open World Assumption OWA (Abox): anything which is not explicitly asserted (positive or negative) is unknown

DB: has/ is one model: query answering is model checking

Abox: has a set of models: query answering is satisfiability (see above)

43