290 likes | 599 Views
Tableau Algorithm. Presentation Outline. Description Logics Reasoning Tasks Structural Subsumption Tableau Algorithm Examples Q & A. DL Basics. Concepts (unary predicates/formulae with one free variable) E.g., Person , Doctor , HappyParent
E N D
Presentation Outline • Description Logics • Reasoning Tasks • Structural Subsumption • Tableau Algorithm • Examples • Q & A
DL Basics • Concepts (unary predicates/formulae with one free variable) • E.g., Person, Doctor, HappyParent • Roles (binary predicates/formulae with two free variables) • E.g., hasChild, loves, hasBrother,hasDaughter • Individuals (constants) • E.g., John, Mary, Italy • Operators (for forming concepts and roles) restricted so that: • Satisfiability/subsumption is decidable and, if possible, of low complexity
DL Semantics Interpretation function I Interpretation domain I IndividualsiI2I John Mary ConceptsCIµI Lawyer Doctor Vehicle RolesrIµI£I hasChild owns (Lawyer u Doctor)
DL Knowledge Base • A TBox is a set of “schema” axioms (sentences), e.g.: {Doctor v Person, HappyParent´Person u8hasChild.(Doctor t 9hasChild.Doctor)} • An ABox is a set of “data” axioms (ground facts), e.g.: {John:HappyParent, John hasChild Mary} • A Knowledge Base (KB) is just a TBox plus an ABox
Example of TBox Woman ≡ PersonFemale Man ≡ Person ¬Woman Mother ≡ Woman hasChild.Person Father ≡ Man hasChild.Person Parent ≡ Father Mother Grandmother ≡ Mother hasChild.Parent MotherWithManyChildren ≡ Mother 3 hasChild MotherWithoutDaughter ≡ Mother hasChild.¬Woman Wife ≡ Woman hasHusband.Man
Example of ABox MotherWithoutDaughter(mary) Father(peter) hasChild(mary, peter) hasChild(peter, harry) hasChild(mary, paul)
Reasoning Tasks • Whether a TBox description is satisfiable (i.e., non-contradictory) • Whether one description subsumes another one in a TBox - organize the concepts of a terminology into a hierarchy according to their generality • Find out whether the set of assertions in a ABox is consistent (has a model) • Whether the assertions in the ABox entail that a particular individual is an instance of a given concept description • A concept description can also be conceived as a query - retrieve the individuals that satisfy the query.
Types of Reasoning • The simplest form of reasoning involves computing the subsumption relation between two concept expressions, i.e., verifying whether one expression always denotes a subset of the objects denoted by another expression. • Parent is a specialization of Person, i.e., Person subsumes Parent A B
Types of Reasoning • A more complex reasoning task consists in checking whether a certain assertion is logically implied by a knowledge base. • For example, Bill is an instance of Parent
Structural Subsumption • Normalize descriptions • Compare syntactical structure of normal forms • Normal form of C: A1 ⊓ …⊓ Am ⊓ ∀R1.C1⊓…⊓∀Rn.Cn • Normal form of D: B1 ⊓ …⊓ Bk ⊓ ∀S1.D1⊓…⊓∀Sl.Dl • C ⊑ D iff: • For all i, 1 <= i <= k, there exists j, 1<=j<=m, such that Bi=Aj • For all i, 1 <= i <= l, there exists j, 1<=j<=n, such that Si=Rj and Ci⊑ Dj
Structural Subsumption • C ≡ Person PersonhasChild.(Lawyer Doctor Rockstar) • D ≡PersonhasChild.DoctorhasChild.Lawyer • C ⊑ D? Yes • C: PersonPersonhasChild.LawyerhasChild.DoctorhasChild.Rockstar • D: PersonhasChild.DoctorhasChild.Lawyer
Structural Subsumption • What if we introduce disjunction • C: A ⊔ (B ⊓ E) • D: A ⊔ E • C ⊑ D? • Cannot be handled with structural subsumption • Solution: Tableau
Tableau Algorithm • Instead of directly testing subsumption of concept descriptions, these algorithms use negation to reduce subsumption to (un)satisfiability of concept descriptions. • Steps • Check unsatisfiability of the concept (C ⊑ D -> C ⊓ ¬D) • Check whether you can construct an instance b of this concept • Try to build a tree like model of the input concept • Concept in Negation Normal Form • Decomposition using Tableau rules • Stop when clash occurs or no more rules are applicable • If each branch in tableau contains a clash, the concept is inconsistent
Negation Normal Form • Rewrite Description such that only atomic roles and concepts are negated • Rewrite Rules • ¬(C ⊓ D) -> ¬C⊔ ¬D • ¬(C ⊔ D) -> ¬C⊓ ¬D • ∀R.C -> ∃R.¬C • ∃R.C -> ∀R. ¬C Example ¬∃R.A⊓ ∃R.B ⊓ ¬ (A ⊓ B) ⊓ ¬∀R.(A ⊔ B) ∀R.¬A ⊓ ∃R.B ⊓ (¬A ⊔ ¬ B)⊓ ∃R. ¬ (A ⊔ B) then (¬A ⊓ ¬ B)
Transformation rules ⊓-rule Condition: A contains (C1 ⊓ C2)(x), but not both C1(x) and C2(x) Action: A’ = A ∪ {C1(x), C2(x)} T={Mother ≡ Female ⊓ ∃hasChild.Person} A={Mother(Anna)} Is ¬(∃hasChild.Person ⊓ ¬∃hasParent.Person)(Anna) satisfiable? Expand A w.r.t. T Mother(Anna) (Female ⊓ ∃hasChild.Person)(Anna) A’ = A ∪ {Female(Anna), (∃hasChild.Person)(Anna)} (¬∃hasChild.Person ⊓ ¬∃hasParent.Person)(Anna) A’ = A ∪ {¬∃hasChild.Person)(Anna), ¬∃hasParent.Person)(Anna)}
Transformation rules ⊔-rule Condition: A contains (C1 ⊔ C2)(x), but neither C1(x) or C2(x) Action: A’ = A ∪ {C1(x)} and A’’ = A ∪ {C2(x)} T={Parent≡∃hasChild.Female⊔∃hasChild.Male, Person≡Male⊔Female, Mother≡Parent ⊓Female} A={Mother(Anna)} Is ¬∃hasChild.Person(Anna) satisfiable? Expand A w.r.t. T A = {Mother(Anna)} A’ = A ∪ {Parent(Anna), Female(Anna)} Parent(Anna) (∃hasChild.Female⊔∃hasChild.Male)(Anna) (∃hasChild.Female)(Anna) or (∃hasChild.Male)(Anna) Both are in contradiction with ¬∃hasChild.Person, not satisfiable.
Transformation rules ∃-rule Condition: A contains (∃R.C)(x), but there is no z such that both C(z) and R(x,z) are in A Action: A’ = A ∪ {C(z), R(x,z)} T={Parent≡∃hasChild.Female⊔∃hasChild.Male, Person≡Male⊔Female, Mother≡Parent⊓Female} A={Mother(Anna), hasChild(Anna,Bob), ¬Female(Bob)} Is ¬∃hasChild.Person(Anna) satisfiable? Expand A w.r.t. T Mother(Anna) Parent(Anna) (∃hasChild.Female⊔∃hasChild.Male)(Anna) take (∃hasChild.Male)(Anna) hasChild(Anna,Bob), Male(Bob) …
Transformation rules ∀-rule Condition: A contains (∀R.C)(x) and R(x,z), but not C(z) Action: A’ = A ∪ {C(z)} T={DaughterParent≡∀hasChild.Female, Male⊓Female⊑⊥} A={hasChild(Anna,Bob), ¬Female(Bob)} Is DaughterParent(Anna) satisfiable? Expand A w.r.t. T DaughterParent(x) ∀hasChild.Female(x) Given that hasChild(Anna,Bob)A’ = A ∪ {Female(Bob)} but this in contradiction with ¬Female(Bob)
Examples • Example 1 • DL knowledge base • vegan ≐ person ⊓ ∀eats.plant • vegetarian ≐ person ⊓ ∀eats.(plants ⊔ dairy) • Query: vegan ⊑ vegetarian • Example 2 • Query: vegetarian ⋢ vegan
Example-1 • DL knowledge base • vegan ≐ person ⊓ ∀eats.plant • vegetarian ≐ person ⊓ ∀eats.(plants ⊔ dairy) • Query: vegan ⊑ vegetarian • Convert to • vegan ⊓ ¬vegetarian is unsatisfiable
Example-1 • Unfold and normalisevegan ⊓ ¬vegetarian • A0 =( person ⊓ ∀eats.plant⊓ (¬person ⊔ ∃eats.(¬plant ⊓ ¬dairy))(x) • Apply ⊓-rule and add to C0: • A1 = A0 U {person(x), ∀eats.plant(x), (¬person ⊔ ∃eats.(¬plant ⊓ ¬dairy))(x)}
Example-1 • Apply ⊔-rule to ¬person ⊔ ∃eats.(¬plant ⊓ ¬dairy): • A1 = {person(x), ∀eats.plant(x), (¬person ⊔ ∃eats.(¬plant ⊓ ¬dairy))(x)} • Add ¬person to A1: Clash • Go back and add ∃eats.(¬plant ⊓ ¬dairy) to A1 • A2= A1 U {∃eats.(¬plant ⊓ ¬dairy) (x)} • Apply ∃-rule to ∃eats.(¬plant ⊓ ¬dairy): • A3= A2 U {(¬plant ⊓ ¬dairy) (y), eats(x,y)} • Apply ∀-rule to ∀eats.plant (x) in A1 and eats(x, y) in A3 • Add plant(y) to A3
Example-1 • Apply ⊓-rule to ¬plant ⊓ ¬dairy in A3 • Add {¬plant(y), ¬dairy(y)} to A3: Clash • Conclusion • Both applications of the ⊔-rule have lead to clashes • So vegan ⊓ ¬vegetarian is unsatisfiable • So vegan ⊑ vegetarian
Example-2 • Query: vegetarian ⋢ vegan • Convert to • vegetarian ⊓ ¬ vegan is satisfiable • Unfold and normalisevegetarian ⊓ ¬ vegan • person ⊓ ∀eats.(plant ⊔ dairy) ⊓ (¬ person ⊔ ∃eats. ¬ plant) • A0 = {person ⊓ ∀eats.(plant ⊔ dairy) ⊓ (¬ person ⊔ ∃eats. ¬ plant)} (x)
Example-2 • Apply ⊓-rule and add to A0: • A1= A0 U {person(x), ∀eats.(plant ⊔ dairy) (x),(¬person ⊔ ∃eats.¬plant) (x)} • Apply ⊔-rule to ¬person ⊔ ∃eats.¬ plant: • Add ¬person (x) to A1: Clash • Go back and add ∃eats.¬plant to A1 • Apply ∃-rule to ∃eats.¬ plant: • A2 = A1 U{¬plant(y), eats(x,y)}
Example-2 • Apply ∀-rule to ∀eats.(plant ⊔ dairy) in A1 A2 = A1 U {(plant ⊔ dairy)(y)} • Apply ⊔-rule to plant ⊔ dairy in A2 • Add plant (y) to A2: Clash • Go back and add dairy(y) to A2 • Conclusion • No more rules are applicable • So vegetarian ⊓ ¬ vegan is satisfiable • So vegetarian ⋢ vegan