1 / 33

L ogics for D ata and K nowledge R epresentation

L ogics for D ata and K nowledge R epresentation. ClassL (part 2): Reasoning with a TBox. Outline. Terminology (TBox) Normalization of a TBox Reasoning with the TBox Some definitions Primitive and defined concepts Use and directly use Cyclic and acyclic terminologies

kenley
Download Presentation

L ogics for D ata and K nowledge R epresentation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Logics for Data and Knowledge Representation ClassL (part 2): Reasoning with a TBox

  2. Outline • Terminology (TBox) • Normalization of a TBox • Reasoning with the TBox • Some definitions • Primitive and defined concepts • Use and directly use • Cyclic and acyclic terminologies • Expansion of a TBox • Eliminating the TBox: Reducing to DPLL reasoning

  3. Terminological axioms TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • Two new logical symbols ⊑ (subsumption), with σ ⊨ C⊑D iff σ(C)⊆ σ(D) ≡ (equivalence), with σ ⊨ C≡D iff σ(C) = σ(D) Inclusion axioms C ⊑ D has to be read “C is subsumed by (more specific than / less general than) D” Equality axioms C ≡ D has to be read “C is equivalent to D” NOTE: C ≡ D holds iff both C ⊑ D and D ⊑ C hold NOTE: ⊑ and ≡ in CLassL are the alter ego of the → and ↔ in PL NOTE: if C ⊑ D,we can use the symbol ⊒ to say thatD ⊒ C to be read “D subsumes (less specific than / more general than) C” 3

  4. Semantics: Venn diagrams to represent axioms TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • σ(A ⊑ B) • σ(A ≡ B) B A A B 4

  5. Examples of terminological axioms TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • Inclusion Axioms (inclusions) Master ⊑ Student Woman ⊑ Person Woman ⊔ Father ⊑ Person • Equality Axioms (equalities) Student ≡ Pupil Parent ≡ Mother ⊔ Father Woman ≡ Person ⊓ Female

  6. Definitions and specializations TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • A definition is an equality with an atomic concept on the left hand • A specialization is an inclusion with an atomic concept on the left hand Bachelor ≡ Student ⊓ Undergraduate Woman ≡ Person ⊓ Female Parent ≡ Mother ⊔ Father Student ⊑ Person ⊓Study PhD⊑ Student ⊓ Lecturer

  7. Terminology (TBox) TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • A terminology (or TBox) is a set of definitions and specializations • Terminological axioms express constraints on the concepts of the language, i.e. they limit the possible models • The TBox is the set of all the constraints on the possible models Woman ≡ Person ⊓ Female Man ≡ Person ⊓¬Woman Student ⊑ Person ⊓Study Bachelor ≡ Student ⊓ Undergraduate PhD⊑ Student ⊓Lecturer 7

  8. Normalization of a TBox TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • It is always possible to transform a specialization into a definition by introducing an auxiliary symbol as follows: • If from a TBox we transform all specializations into definitions we say we have normalized the TBox • A TBox with definitions only is called a regular terminology Woman ⊑ Person (the specialization) Woman ≡ Person ⊓ Female (the normalized specialization) 8

  9. Reasoning with a TBox T TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • Given two class-propositions P and Q, we want to reason about the following relations between them: • Satisfiability w.r.t. T T⊨P ? • SubsumptionT⊨ P ⊑ Q?T ⊨ Q ⊑ P? • EquivalenceT⊨ P ⊑ Q and T⊨ Q ⊑ P? • DisjointnessT⊨ P ⊓ Q ⊑ ⊥? 9

  10. Satisfiability with respect to a TBox T TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • A concept P is satisfiable w.r.t. a terminology T, if there exists (or for all) an interpretationI with I⊨θ for all θ∈T, and such that I⊨P, namely I(P) is not empty • In this case we also say that I is a model for P • In other words, the interpretation I not only satisfies P, but also complies with all the constraints in T NOTE: Instead of σ in DL literature the symbol I (interpretation) is preferred. Therefore, from now on we use it instead of σ.

  11. Satisfiability with respect to a TBox T Teach Master Bachelor Assistant PhD Research Student Undergraduate TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • Suppose we describe the students/listeners in a course: • The TBox is satisfiable. A possible model is: Undergraduate ⊑  Teach Bachelor ≡ Student ⊓ Undergraduate Master ≡ Student ⊓  Undergraduate PhD ≡ Master ⊓ Research Assistant ≡ PhD ⊓ Teach TBox T In this modelthe two concepts Bachelor and Assistant are satisfiable w.r.t. T, while the concept Assistant ⊓ Bachelor is not. 11

  12. TBox reasoning: subsumption TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • 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)  I(Q) for every model I of T NOTE: subsumption is a property of all models. Used to implement entailment and validity (when T empty)

  13. Subsumption with respect to a TBox T (1) Teach Master Bachelor Assistant PhD Research Student Undergraduate TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • Suppose we describe the students/listeners in a course: • T ⊨ PhD ⊑ Student Undergraduate ⊑  Teach Bachelor ≡ Student ⊓ Undergraduate Master ≡ Student ⊓  Undergraduate PhD ≡ Master ⊓ Research Assistant ≡ PhD ⊓ Teach TBox T 13

  14. Subsumption with respect to a TBox T (2) TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX PhD ⊑ Student Proof: PhD ≡ Master ⊓ Research ≡ (Student ⊓  Undergraduate) ⊓ Research ⊑ Student 14

  15. TBox reasoning: equivalence TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • Let T be a TBox. Equivalence (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: equivalence is a property of all models.

  16. Equivalence with respect to a TBox T (1) Teach Master Bachelor Assistant PhD Research Student Undergraduate TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • Suppose we describe the students/listeners in a course: • T ⊨ Student Bachelor ⊔Master Undergraduate ⊑  Teach Bachelor ≡ Student ⊓ Undergraduate Master ≡ Student ⊓  Undergraduate PhD ≡ Master ⊓ Research Assistant ≡ PhD ⊓ Teach TBox T 16

  17. Equivalence with respect to a TBox T (2) TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX Student ≡ Bachelor ⊔ Master Proof: Bachelor ⊔ Master ≡ (Student ⊓ Undergraduate) ⊔ Master ≡ (Student ⊓ Undergraduate) ⊔ (Student ⊓  Undergraduate) ≡ Student ⊓ (Undergraduate ⊔ Undergraduate) ≡ Student ⊓⊤ ≡ Student 17

  18. TBox reasoning: disjointness TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • Let T be a TBox. Disjointness (with respect to T): T ⊨ P ⊓ Q ⊑ ⊥ (P ⊓ Q ⊑T ⊥) Two concepts P and Q are disjoint with respect to T if their intersection is empty, I(P)  I(Q) = ∅, for every model I of T. NOTE: disjointness is a property of all models

  19. Disjointness with respect to a TBox T (1) Teach Master Bachelor Assistant PhD Research Student Undergraduate TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • Suppose we describe the students/listeners in a course: • T ⊨ Undergraduate ⊓ Assistant ⊑ ⊥ Undergraduate ⊑  Teach Bachelor ≡ Student ⊓ Undergraduate Master ≡ Student ⊓  Undergraduate PhD ≡ Master ⊓ Research Assistant ≡ PhD ⊓ Teach TBox T 19

  20. Disjointness with respect to a TBox T (2) TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • It can be proved showing that: T ⊨ Undergraduate ⊓ Assistant ⊑ ⊥ Proof: Undergraduate ⊓ Assistant ⊑  Teach ⊓ Assistant ≡  Teach ⊓ PhD ⊓ Teach ≡ ⊥ ⊓ PhD ≡ ⊥ 20

  21. Exercise TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX Suppose we describe the students/attendees in a course: • Is Bachelor ⊓ PhD satisfiable? NO! • Consider the following propositions: Assistant,Student, Bachelor, Teach, PhD, Master ⊓ Teach • Which pairs are subsumed/supersumed? • Which pairs are disjoint? Undergraduate ⊑  Teach Bachelor ≡ Student ⊓ Undergraduate Master ≡ Student ⊓  Undergraduate PhD ≡ Master ⊓ Research Assistant ≡ PhD ⊓ Teach TBox T

  22. TBox: primitive and defined concepts TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • In a TBox there are two kinds of concepts (symbols): • Primitive concepts (or base symbols), which occur only on the right hand of axioms • Defined concepts (or name symbols) which occur on the left hand of axioms A ⊑ B ⊓ (C ⊔ D) B, C and D are primitive concepts. A is a defined concept Undergraduate ⊑  Teach Bachelor ≡ Student ⊓ Undergraduate Master ≡ Student ⊓  Undergraduate PhD ≡ Master ⊓ Research Assistant ≡ PhD ⊓ Teach Teach, Student and Research are primitive concepts. Undergraduate, Bachelor, Master, PhD and Assistant are defined. 22

  23. Use and direct use TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE 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 of the defintion of A. • We say that A uses B in T if B appears in the right hand 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 A ⊑ B ⊓ (C ⊔ D) A directly uses B, C, D A ⊑ B ⊓ (C ⊔ D) ---> A ⊑ (C ⊔ E) ⊓ (C ⊔ D) B ⊑ C ⊔ E A directly uses B; A uses E (because B is defined in terms of E) 23

  24. Cyclic and acyclic terminologies TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • A terminology T contains a cycle (is cyclic) if it contains a concept which uses itself. • A terminilogy is acyclic otherwise Father ≡ Male ⊓ hasChild hasChild ≡ Father ⊔ Mother Is cyclic Parent ≡ Father ⊔ Mother Father ⊑ Male Mother ⊑ Female Male ≡ Person ⊓  Female Is acyclic 24

  25. Expansion and equivalent terminologies TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE 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 primitive • T and T’ are equivalent when they have the same expansion. • Reasoning with T’ will yield the same results as reasoning with T. • If T’ is the expansion of T then they are equivalent. NOTE: it is possible to expand also a cyclic TBox. In some cases some models exist even if the TBox is cyclic. These models are called fixpoints and there are some methods to find them and break the recursion (we will not see them). T T’ A ⊑ B ⊓ (C ⊔ D) A ⊑ (C ⊔ E) ⊓ (C ⊔ D) B ⊑ (C ⊔ E) B ⊑ (C ⊔ E) 25

  26. Expansion requires normalization TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • To expand a terminology we should first normalize it. Otherwise, if we use a specialization to expand a definition, the definition reduces to a specialization • From now on we deal with regular terminologies only (see next slide for the regular version of the terminology T above) T Parent ≡ Father ⊔ Mother Father ⊑ Male Mother ⊑ Female Male ≡ Person ⊓  Female T’ Parent ⊑ (Person ⊓  Female) ⊔ Female Father ⊑ Person ⊓  Female Mother ⊑ Female Male ≡ Person ⊓  Female 26

  27. Concept expansion TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE 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 T Parent ≡ Mother ⊔ Father Father ≡ Male ⊓ hasChild Mother ≡ Female ⊓ hasChild Male ≡ Person ⊓  Female The expansion of Parent w.r.t. T is: (Female ⊓ hasChild) ⊔ (Person ⊓  Female ⊓ hasChild) 27

  28. Expansion, final considerations TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • As we are going to see, expanding a TBox is an important step to reason on it. • The expansion of T to T’ or C to C’ can be costly: In the worst case T’ is exponential in the size of T, and this propagates to single concepts. 28

  29. PL and ClassL: table of the symbols TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • RECALL: A proposition P is true iff it is satisfiable 29

  30. PL and ClassL are notational variants TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX INTRODUCTION :: SYNTAX :: SEMANTICS :: PL AND CLASSL :: CLASSL REASONING • Theorem: P is satisfiable w.r.t. an intensional interpretation νif and only if P is satifisfiable w.r.t. an extensional interpretationσ (already seen in ClassL without the TBox) 30

  31. Reduction to subsumption and unsatisfiability TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • Reduction to subsumption. Given two concepts C and D, • C is unsatisfiable ⇔ C ⊑ ⊥ • C ≡ D ⇔ C ⊑ D and D ⊑ C • C ⊥D ⇔ C ⊓ D ⊑ ⊥ • Reduction to unsatisfiability. Given two concepts C and D, • C ⊑ D ⇔ C ⊓ D is unsatisfiable • C ≡ D ⇔ both (C ⊓ D) and (C ⊓ D) are unsatisfiable • C ⊥D ⇔ C ⊓ D is unsatisfiable 31

  32. Eliminating the TBox using expansion TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX Assume C’ expansion of C w.r.t. T. For all σ satisfying all the axioms in T we have: • T ⊨ C iff σ ⊨ C’ (Satisfiability) • T ⊨ C ⊑ D iff σ ⊨ C’ ⊑ D’ (Subsumption, Equivalence) • T ⊨ C ⊓ D ⊑ ⊥ iff σ ⊨ C’ ⊓ D’ ⊑ ⊥(Disjointness) T Person ≡ Male ⊓ Female Male ≡ Person ⊓  Female Is Person satisfiable? NO! The expansion of Person w.r.t. T is: (Person ⊓  Female) ⊓ Female which is equivalent to ⊥ and therefore unsatisfiable 32

  33. Eliminating the TBox: the algorithm TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX • With acyclic TBoxes T it is always possible to reduce reasoning problems w.r.t. T to problems without T. See for instance the algorithm for subsumption (all the others can be reduced to it). • Input: a TBox T, the two concepts C and D • Output: true if C ⊑ D holds or false otherwise boolean function IsSubsumedBy(T, C, D) { T’ = Normalize(T); C’ = Expand(C, T’); D’ = Expand(D, T’); C’ = RewriteInPL(C’); D’ = RewriteInPL(D’); return DPLL(C’ → D’); } Normalization Expansion, TBox elimination Conversion in PL DPLL Reasoning 33

More Related