Presentation is loading. Please wait.

Presentation is loading. Please wait.

Description logics (book, page 456)

Similar presentations


Presentation on theme: "Description logics (book, page 456)"— Presentation transcript:

1 Description logics (book, page 456)
Description logics are decidable fragments of FOL intended to represent categories (classes/concepts), the relations between classes (roles) and individuals. Example: Consider category “Student”. One possible definition of this category is Student  And(takes-classes, does-homeworks, is-responsible) Note that this definition can be translated into the following FOL sentence  x (Student(x) <=> Takes-classes(x) & Does-homeworks(x) & & Is-responsible(x)) Example: Consider category of men with at least three sons who are all unemployed and married to doctors, and at most two daughters who are all professors in physics or chemistry departments. Man3SS2SD  And(Man, At-Least(3, Son), At-Most(2, Daughter), All(Son, And(Unemployed, Married, All(Spouse, Doctor))), All(Daughter, And(Professor, Fills(Department, Physics, Chemistry)))). DLs is a family of logics which defer by their expressivity depending on the constructors employed to build complex descriptions from simple ones. They are used primarily to describe declarative knowledge.

2 General Architecture of Description Logics
DL knowledge base consists of 3 parts: The TBox, which contains terminological knowledge, i.e. knowledge about concepts in a domain). Examples: Student  Person ⊓  takesCourse . Course In FOL, x (Student(x) <==> Person(x) &  y (takesCourse(x, y) & Course(y))) Student ⊑ Person In FOL, x (Student(x)  Person(x)). The ABox, which contains assertion knowledge, i.e. knowledge about individuals. Example: Student (Bob), takesCourse (Bob, ComputerScience) The RBox, which contains role-centric knowledge, i.e. knowledge about interdependences between roles/properties Example: teachesGradCourse ⊑ teachesAtUniv RBox is not required; only more expressive DLs have constructors to handle RBoxes. The smallest deductively complete DL is called ALC (Attributive Language with Complements). ALC -- Attributive Language with Complements

3 ALC: Syntax ALC Atomic types: Concept names: A, B, C, …
Top and bottom concepts, ᴛ and  Role names: R, S, … ALC Constructors: ⊓, ⊔, ,  R . C and  R . C Class inclusion and equivalence axioms: ⊑,  Example: Student ⊑ Person, PhDThesis  Dissertation Complex class relations are built from atomic types and ⊓, ⊔,  Example: Instructor ⊑ (Staff ⊓ Professor) ⊔ Lecturer In FOL: x Instructor(x)  (Staff(x)  Professor(x))  Lecturer(x) Quantifiers on Roles: Strict binding of a role to a class. Example: A thesis must be authored by a student, i.e. Thesis ⊑  author . Student In FOL: x (Thesis(x)  y(author(x, y)  Student(y))) Open binding of a role to a class. Example: Every student has at least one advisor, i.e. Student ⊑  advisor . Professor In FOL: x (Student(x)  y (advisor(x, y)  Professor(y)))

4 ALC: Formal Syntax Production rules for creating classes in ALC :
C, D ::= A | T | | C | C ⊓ D | C ⊔ D |  R . C |  R . C where A is an atomic class, C and D are complex classes, and R is a role. An ALC TBox contains assertions of the forms C ⊑ D and C  D An ALC ABox contains assertions of the form C(a) and R(a, b), where a and b are individuals. An ALC Knowledge Base = {TBox, ABox}.

5 ALC: Semantics An interpretation, I = (I, .I), is defined by:
A domain of individuals, I An interpretation function .I which maps Individual names, a, to domain elements aI  I Class names, C, to a set of domain elements CI  I Role names, R, to a set of pairs of domain elements RI  I  I An interpretation, I, for axioms: C(a) holds iff aI  CI R(a, b) holds iff (aI, bI)  RI C ⊑ D holds iff CI  DI C  D holds iff CI = DI An interpretation, I, for complex classes is defined as follows: TI = I and I =  (C ⊓ D)I = CI  DI , (C ⊔ D)I = CI  DI , ( C)I = I \ CI  R . C = {a  I |(  b  I ) ((a, b)  RI  b  CI )}  R . C = {a  I | (b  I ) ((a, b)  RI  b  CI )} The Model-theoretic semantics for ALC is defined via interpretaions

6 More DL constructors that are beyond ALC
Number restrictions for roles. Example:  20 hasStudent Qualified number restrictions for roles. Example: 6 hasStudent . Graduate Nominals (definition by enumeration): {CS151, CS152, CS253} Concrete domains (datatypes): hasStudent . ( 20) Inverse roles: hasChild-  hasParent Transitive roles: has Ancestor ⊑+ has Ancestor Role composition: hasParent . hasBrother (uncle) Constructors allowed to define the specific DL. Examples S: ALC + Transitive roles; R: Role constructors; O: Nominals; I: Inverse roles; Q: Qualified number restrictions; (D): datatypes. SROIQ(D) is the DL behind the latest version of OWL 2.

7 Questions DLs inference must address
Does the knowledge base make sense? Are there empty classes? Are two classes equivalent? Does one class subsume another class? Are two classes disjoined? Is a given individual a member of a specified class? Find all individuals of a given class. The so-called tableaux algorithm (initially developed for FOL) is adapted to DLs to guarantee that these questions are answered in finite time. Tableaux algorithm proves unsatisfiability of a KB using the refutation method and transformation rules similar to Wang’s algorithm (called here tableaux extension rules)

8 Tableaux algorithm: PL example
Given an expression in disjunctive normal form, construct the tableaux / decision tree where each node is a logical formula, each path from the root note to a leaf note is a conjunction of formulas, and each branch of a path is a disjunction of formulas. To build the tree, we apply the following rules: -- -Rules: (A & B) => A, B Example: (A  B) => A, B (A  B) => A, B (A & B & C)  (D & A)  (B & D) -Rules: A -rule A  B B (A & B & C) (D & A)  (B & D) A -rule -rule (A & B) B A (D & A) (B & D) A A  B B D B B -- Double negation rule: A => A C A D True => False, False => True

9 Tableaux Algorithm for ALC
Step 1: Translate the DL KB to a negation normal form (NNF) using the following transformations: Substitute C  D by C ⊑ D and D ⊑ C Substitute C ⊑ D by C ⊔ D Apply all possible NNF transformations to complex classes: NNF ( C)  NNF (C) NNF (C ⊔ D)  NNF (C) ⊔ NNF (D) NNF (C ⊓ D)  NNF (C) ⊓ NNF (D) NNF ((C ⊔ D))  NNF (C) ⊓ NNF (D) NNF ((C ⊓ D))  NNF (C) ⊔ NNF (D) NNF ( R . C)  ( R) . NNF (C) NNF ( R . C)  ( R) . NNF (C) NNF ( R . C)  ( R) . NNF (C) NNF ( R . C)  ( R) . NNF (C)

10 Tableaux Algorithm for ALC (contd.)
Step 2: Apply the following tableaux expansion rules to derive new ABox facts until no more rules can be applied (in which case we say that the tableaux is fully expanded). ⊓ -Rule if (C ⊓ D) (a)  ABox and {C(a), D(a)}  ABox, then ABox’ = Abox  {C(a), D(a)} ⊔ -Rule if (C ⊔ D) (a)  ABox and {C(a), D(a)}  ABox = , then ABox’ = ABox  {C(a)} and ABox” = ABox  {D(a)} -Rule if  R . C(a)  ABox and there is no b such that C(b)  ABox and R(a, b)  ABox then Abox ‘ = Abox  {C(z), R(a, z)} for a new individual z  ABox -Rule if R . C(a)  ABox and R(a, b)  Abox, but C(b) ABox then Abox ‘ = Abox  {C(b)} The algorithm returns TRUE if there is a clash-free tableaux and FALSE if the tableaux is closed. The tableaux is closed if all its paths are closed, where a path is closed if a formula and its negation occur along that path, or if false occurs. To prove X, we must obtain a closed tableaux for X.

11 Example Let TBox = {Professor ⊑ (Person ⊓ Staff) ⊔ (Person ⊓ Student)} Prove: Professor ⊑ Person Step 1: Negate the conclusion you want to prove.  (Professor ⊑ Person) Step 2: Convert all formulas in the NNF: TBox = { Professor ⊔ (Person ⊓ Staff) ⊔ (Person ⊓ Student)} NNF ( (Professor ⊑ Person)) = NNF ( (Professor ⊔ Person)) = = NNF (Professor) ⊓ NNF ( Person) = Professor ⊓  Person Step 3: Apply the tableaux extension rules to derive new ABox facts from the TBox extended with the negated theorem.

12 Example: step 3 (contd.) Professor(a) ⊓  Person(a) (Consider a new individual a for whom you are disproving the theorem) (2) Apply ⊓-rule to (1): Professor(a) closed path Apply ⊓-rule to (1):  Person(a) closed path Professor(a) ⊔ (Person(a) ⊓ Staff(a)) ⊔ (Person(a) ⊓ Student(a)) Apply ⊔-rule to (4): Professor(a) (6) Apply ⊔-rule to (4): (Person(a) ⊓ Staff(a)) ⊔ (Person(a) ⊓ Student(a)) (7) Apply ⊔-rule to (6): (Person(a) ⊓ Staff(a)) (8) Apply ⊔-rule to (6): (Person(a) ⊓ Student(a)) closed path (9) Apply ⊓-rule to (7): Person(a) (10) Apply ⊓-rule to (7): Staff(a) (11) Apply ⊔-rule to (8): Person(a) (12) Apply ⊔-rule to (8): Student(a) No more rules can be applied – the tableaux is fully expanded and closed. Therefore, the original theorem is proved.

13 Advantages and disadvantages of description logics
The two inference tasks in DLs, subsumption (i.e. checking if one category is a subset of another based on their descriptions) and classification (i.e. checking if an object belongs to a category) have polynomial complexity. Some DLs may include also consistency checking, i.e. whether a category definition is satisfiable. DLs have clear semantics, which makes them a good KR formalism for applications with large declarative component. The Semantic Web language OWL is build upon DLs. Disadvantages: Polynomial inference is assured by the definitions of categories. If they are small and correctly defined, then the inference tasks are easy to carry out. But, if categories are hard to define in a concise manner, then their descriptions may become (exponentially) large. Weak inference capabilities (to preserve decidability), which cannot handle imprecisely specified concepts and not fully enforced relations between them.

14 Subsumption example Given the following KB: Woman  Person ⊓ Female Man  Person ⊓ Woman Mother  Woman ⊓ hasChild . Person Father  Man ⊓ hasChild . Person Parent  Mother ⊔ Father Grandmother  Woman ⊓ hasChild . Parent Prove: Grandmother ⊑ Person. 1. Negate the goal and add it to the KB, i.e. add (Grandmother ⊓ Person). 2. Translate the KB into the negation normal form i.) substitute A  B with A ⊑ B and B ⊑ A Woman ⊑ Person ⊓ Female Person ⊓ Female ⊑ Woman Man ⊑ Person ⊓ Woman Person ⊓ Woman ⊑ Man Mother ⊑ Woman ⊓ hasChild . Person Woman ⊓ hasChild . Person ⊑ Mother Father ⊑ Man ⊓ hasChild . Person Man ⊓ hasChild . Person ⊑ Father Parent ⊑ Mother ⊔ Father Mother ⊔ Father ⊑ Parent Grandmother ⊑ Woman ⊓ hasChild.Parent Woman ⊓ hasChild.Parent ⊑ Grandmother

15 Subsumption example (contd.)
ii.) substitute A ⊑ B with A ⊔ B and then apply all possible transformations to complex classes to bring negation down to atomic classes (see Lecture 7): Woman ⊔ (Person ⊓ Female) (Person ⊓ Female) ⊔ Woman  Person ⊔ Female ⊔ Woman Man ⊔ (Person ⊓ Woman)  (Person ⊓ Woman) ⊔ Man  Person ⊔ Woman ⊔ Man Mother ⊔ (Woman ⊓ hasChild . Person)  (Woman ⊓ hasChild . Person) ⊔ Mother  Woman ⊔ hasChild.Person ⊔ Mother Father ⊔ (Man ⊓ hasChild . Person)  (Man ⊓ hasChild . Person) ⊔ Father  Man ⊔ hasChild.Person ⊔ Father Parent ⊔ (Mother ⊔ Father)  Parent ⊔ Mother ⊔ Father  (Mother ⊔ Father) ⊔ Parent  (Mother ⊓ Father) ⊔ Parent Grandmother ⊔ (Woman ⊓ hasChild.Parent) (Woman ⊓ hasChild.Parent) ⊔ Grandmother  Woman ⊔ hasChild.Parent ⊔ Grandmother Note:  means “equivalent” / “becomes”

16 The (beginning of the) proof
Grandmother(a) ⊓ Person(a) # An individual a for whom we are disproving the # theorem. (2) Apply ⊓-rule to (1): Grandmother(a) (3) Apply ⊓-rule to (1): Person(a) closed path (4) Grandmother ⊔ (Woman ⊓ hasChild.Parent) (5) Apply ⊔-rule to (4) : Grandmother(a) (6) Apply ⊔-rule to (4) : Woman ⊓ hasChild.Parent (7) Apply ⊓-rule to (6): Woman(a) (8) Apply ⊓-rule to (6): hasChild.Parent (9) Woman ⊔ (Person ⊓ Female) closed path (10) Apply ⊔-rule to (9): Woman(a) (11) Apply ⊔-rule to (9): Person ⊓ Female closed path (12) Apply ⊓-rule to (11): Person(a) (12) Apply ⊓-rule to (11): Female(a) (13) Person ⊔ Female ⊔ Woman all three paths (14) Apply ⊔-rule to (13): Person(a) are closed (14) Apply ⊔-rule to (13): Female(a) (14) Apply ⊔-rule to (13): Woman(a)

17 Other reasoning tasks Note: the tableau above is not fully expanded. There are more formulas that can be transformed by means of ⊓-rule, ⊔-rule, -rule and -rule. To prove the original goal, we must show that all paths of the fully expanded tableau are closed. Although fully mechanical, this process is very tedious for a human – automated theorem provers like Pellet and Fact++ (both employed in Protégé) do a much better job. The classification task can be reduced to inconsistency checking as well. To prove that individual x is a member of class A, we can prove that A(x) is inconsistent instead. To find all members of a class (task called instance generation/retrieval), we must show A(x) for all x. To prove that a class A is inconsistent (i.e. has no members), we can add A(x) to the KB and show that the resulting set is inconsistent (i.e. assume that there is a member x  A and proof a contradiction). To prove A ⊔ B (class disjointness), we can prove that adding A ⊓ B to the KB makes it inconsistent.

18 Inconsistency example
Consider the following KB: Bear  Animal ⊓ Omnivore Omnivore  eat . Animal Panda  Bear ⊓ Vegetarian Vegetarian  eat . Animal It is easy to see that this KB is inconsistent. Assume that there exists an individual x which is a member of the class Panda. Then: Panda(x)  Bear(x) AND Vegetarian(x) Vegetarian(x)  x does not eat animals Bear(x)  Animal(x) AND Omnivore(x) Contradiction, Omnivore(x)  x eats animals therefore class Panda must be empty. Note: reasoning over defined classes ONLY!


Download ppt "Description logics (book, page 456)"

Similar presentations


Ads by Google