Logics for Data and Knowledge Representation

Slides:



Advertisements
Similar presentations
CS848: Topics in Databases: Foundations of Query Optimization Topics covered  Introduction to description logic: Single column QL  The ALC family of.
Advertisements

Propositional and First Order Reasoning. Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p 
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Deciding a Combination of Theories - Decision Procedure - Changki pswlab Combination of Theories Daniel Kroening, Ofer Strichman Presented by Changki.
Tableau Algorithm.
LDK R Logics for Data and Knowledge Representation ClassL (part 3): Reasoning with an ABox 1.
Topics in artificial intelligence 1/1 Dr hab. inż. Joanna Józefowska, prof. PP Reasoning and search techniques.
Semantic web course – Computer Engineering Department – Sharif Univ. of Technology – Fall Description Logics: Logic foundation of Semantic Web Semantic.
Logics for Data and Knowledge Representation Exercises: DL.
LDK R Logics for Data and Knowledge Representation PL of Classes.
LDK R Logics for Data and Knowledge Representation Description Logics (ALC)
More on Description Logic(s) Frederick Maier. Note Added 10/27/03 So, there are a few errors that will be obvious to some: So, there are a few errors.
CompSci 102 Discrete Math for Computer Science
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Knowledge Representation in Description Logic. 1. Introduction Description logic denotes a family of knowledge representation formalisms that model the.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
DL Overview Second Pass Ming Fang 06/19/2009. Outlines  Description Languages  Knowledge Representation in DL  Logical Inference in DL.
LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1.
Logics for Data and Knowledge Representation Exercises: ClassL Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
LDK R Logics for Data and Knowledge Representation ClassL (part 2): Reasoning with a TBox 1.
Description Logics Dr. Alexandra I. Cristea. Description Logics Description Logics allow formal concept definitions that can be reasoned about to be expressed.
ece 627 intelligent web: ontology and beyond
LDK R Logics for Data and Knowledge Representation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Knowledge Repn. & Reasoning Lec #11+13: Frame Systems and Description Logics UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2004.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Knowledge Representation and Reasoning University "Politehnica" of Bucharest Department of Computer Science Fall 2011 Adina Magda Florea
Of 29 lecture 15: description logic - introduction.
CSE-291: Ontologies in Data Integration Department of Computer Science & Engineering University of California, San Diego CSE-291: Ontologies in Data Integration.
Logics for Data and Knowledge Representation Exercises: DL.
LDK R Logics for Data and Knowledge Representation Description Logics: family of languages.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
LDK R Logics for Data and Knowledge Representation Description Logics.
Logical Agents. Inference : Example 1 How many variables? 3 variables A,B,C How many models? 2 3 = 8 models.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
CENG 424-Logic for CS Introduction Based on the Lecture Notes of Konstantin Korovin, Valentin Goranko, Russel and Norvig, and Michael Genesereth.
Chapter 7. Propositional and Predicate Logic
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
ece 720 intelligent web: ontology and beyond
Knowledge Representation and Reasoning
Logics for Data and Knowledge Representation
The Propositional Calculus
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Artificial Intelligence
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Resolution Proofs for Combinational Equivalence
Back to “Serious” Topics…
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Presentation transcript:

Logics for Data and Knowledge Representation 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 Expansion of a TBox Eliminating the TBox: Reducing to DPLL reasoning

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 that D ⊒ C to be read “D subsumes (less specific than / more general than) C” 3

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

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

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

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

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

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 ? Subsumption T ⊨ P ⊑ Q? T ⊨ Q ⊑ P? Equivalence T ⊨ P ⊑ Q and T ⊨ Q ⊑ P? Disjointness T ⊨ P ⊓ Q ⊑ ⊥? 9

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 interpretation I 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 σ. ADD EXAMPLE

Satisfiability with respect to a TBox T 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 ADD EXAMPLE Student Undergraduate Bachelor Master Research PhD Teach Assistant In this model the two concepts Bachelor and Assistant are satisfiable w.r.t. T, while the concept Assistant ⊓ Bachelor is not. 11

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)

Subsumption with respect to a TBox T (1) 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 ADD EXAMPLE Student Undergraduate Bachelor Master Research PhD Teach Assistant 13

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 ADD EXAMPLE 14

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.

Equivalence with respect to a TBox T (1) 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 ADD EXAMPLE Student Undergraduate Bachelor Master Research PhD Teach Assistant 16

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 ADD EXAMPLE 17

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

Disjointness with respect to a TBox T (1) 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 ADD EXAMPLE Student Undergraduate Bachelor Master Research PhD Teach Assistant 19

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 ≡ ⊥ ADD EXAMPLE 20

Assistant, Student, Bachelor, Teach, PhD, Master ⊓ Teach 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

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

Use and direct use Let A and B be atomic concepts in a terminology T. 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

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

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

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

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

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

PL and ClassL: table of the symbols TBOX :: NORMALIZATION :: REASONING WITH A TBOX :: DEFINITIONS :: ELIMINATING THE TBOX PL ClassL Syntax ∧ ⊓ ∨ ⊔  ⊤ ⊥ → ⊑ ↔ ≡ P, Q... Semantics ∆={true, false} ∆={o, …} (compare models) RECALL: A proposition P is true iff it is satisfiable 29

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) MODIFIED 30

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

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 CHANGED AND MOVED 32

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