320 likes | 518 Views
Semantics and Reasoning Algorithms for a Faithful Integration of Description Logics and Rules. Boris Motik, University of Oxford. Contents. Why Combine DLs with LP? Main Challenge: OWA vs. CVA Existing Approaches Minimal Knowledge and Negation as Failure MKNF Knowledge Bases
E N D
Semantics and Reasoning Algorithmsfor a Faithful Integration ofDescription Logics and Rules Boris Motik, University of Oxford
Contents • Why Combine DLs with LP? • Main Challenge: OWA vs. CVA • Existing Approaches • Minimal Knowledge and Negation as Failure • MKNF Knowledge Bases • Reasoning and Complexity • Conclusion
UK cities are in UK regions. UKCity v9 isIn.UKRgn 8 x : UKCity(x) !9 y : isIn(x,y) Æ UKRgn(y) UK regions are EU regions. UKRgn v EURgn 8 x : UKRgn(x) ! EURgn(x) 8 x : [9 y : isIn(x,y) Æ EURgn(y)] ! EUPart(x) Things in EU are parts of EU. 9 isIn.EURgn v EUPart We can conclude: 8 x : UKCity(x) ! EUPart(x) UK cities are parts of EU. UKCity v EUPart Description Logics and OWL • OWL (Web Ontology Langage) • language for ontology modeling in the Semantic Web • standard of the W3C (http://www.w3.org/2004/OWL/) • OWL is based on Description Logics (DLs) • inspired by semantic networks • DLs have a precise semantics based on first-order logics • well-understood computational properties • What can we say in DLs?
x S x1 R R x2 x3 Missing Features (I) • Relational expressivity • OWL can express onlytree-like axioms • Polyadic predicates • e.g., Flight(From, To, Airline) • Can be addressed by rules (LP or ASP) 9S.(9 R.C u9 R.D) v Q , 8x:{[9 y: S(x,y) Æ (9 x: R(y,x) Æ C(x)) Æ (9 x: R(y,x) Æ D(x))] ! Q(x)} , 8x,x1,x2,x3:{ S(x,x1) Æ R(x1,x2) Æ C(x2) Æ R(x1,x3) Æ D(x3) ! Q(x) }
Missing Features (II) – Closed Worlds Question: is there a flight from MAN to MUC? flight(MAN,STR) flight(MAN,LHR) flight(MAN,FRA) flight(FRA,ZAG) Open worlds (=OWL): Don’t know! We did not specify thatwe know information aboutall possible flights. Closed worlds (=LP): No. If we cannot prove something, it must be false. • Partial solution: close off flight 8 x,y: flight(x,y) $ (x ¼ MAN Æ y ¼ STR) Ç (x ¼ MAN Æ y ¼ LHR) Ç … • cannot express many things (e.g., transitive closure) • Closed-world is orthogonal to closed-domain reasoning • Person v9 father.Person Person(Peter) >v { Peter,Paul } • CWA is available in various LP formalisms (e.g., ASP)
Missing Features (III) – Constraints • “Each person must have an SSN” • naïve attempt: Person u:(9 hasSSN.SSN) v? • in FOL, this is equivalent to: Person v9 hasSSN.SSN • assume that only Person(Peter) is given • we expect the constraint to be violated (no SSN) • but KB is satisfiable: Peter has some unknown SSN • FOL formulae… • …speak about the general properties of worlds • …cannot reason about their own knowledge • Constraints can be expressed in LP
Missing Features (IV) • “The heart is usually on the left, but in some cases it is on the right” • Naïve approach: • Human v HeartOnLeftDextrocardiac v HumanDextrocardiac v:HeartOnLeft the class Dextrocardiac is unsatisfiable • “with no contrary evidence, the heart is on the left” • Exceptions… • …cannot be expressed in FOL • …can be expressed in ASP
The Magic Formula DLs (= taxonomical reasoning) + LP Rules (= relational expressivity + nonmonotonic inferences) = The Winning Combination!
Contents • Why Combine DLs with LP? • Main Challenge: OWA vs. CVA • Existing Approaches • Minimal Knowledge and Negation as Failure • MKNF Knowledge Bases • Reasoning and Complexity • Conclusion
In DLs we derive Person(a) The formula is equivalent to 8x : [Father(x) ! Person(x)] eliminates all models in which x is a father and not a person In LP, : is interpreted as defaultnegation read as “is not provable” The example is unsatisfiable Negation defined using minimal knowledge Open vs. Closed Worlds • “It is illegal to state that someone is a father without stating that he is a person” 8x : [Father(x) Æ:Person(x) !?] Father(a)
DLs LP Idea of Minimal Knowledge Father(a) This is the only minimal model. (There is no model M’ ½ M.) All models are of equal “quality”. M1 Father(a) M Father(a) M2 Father(a), Person(a) 8x : [Father(x) Æ:Person(x) !?] • kills all models in which the formula does not hold • We are left with models that contain Person(a) • We are left with no model
DLs Rules Minimal Knowledge and Negation Father(a) M1 Father(a) , Cat(a) M Father(a) , Cat(a) M2 Father(a), Person(a) 8x : [Father(x) Æ:Person(x) ! Cat(x)] • esures Cat(x) in each model where x is a father and not a person • Does not entail Cat(a) • Does entail Cat(a) Nonmonotonic semantics typically prefer certain models.
Contents • Why Combine DLs with LP? • Main Challenge: OWA vs. CVA • Existing Approaches • Minimal Knowledge and Negation as Failure • MKNF Knowledge Bases • Reasoning and Complexity • Conclusion
First-Order Rule Formalisms • First-order combinations of DLs and rules: • SWRL, CARIN, AL-log, DL-safe rules • A1Æ … Æ Anà B1Æ … Æ Bm • concepts (classes) = unary predicates • roles (properties) = binary predicates • interpreted as first-order clauses • Semantics is standard first-order • Woman(x) ! Person(x) and :Person(Lassie) imply :Woman(Lassie) • Easily undecidable • decidability achieved by syntactic restrictions; e.g., DL-safety • Issues addressed: • relational expressivity and polyadic predicates • nonmonotonic features
Loose Integration • dl-programs • [Eiter, Ianni, Lukasiewicz, Schindlauer, Tompits, AIJ 2008] • A Ã B1Æ … Æ Bm Æ not Bm+1 Æ … Æ not Bn • A and Bi are first-order atoms over non-DL-predicates • Bi can additionally be a query atom of the form DL[ S1[ p1, S2[ p2, S3Å p3; Q ] • Si – DL predicates • pi – non-DL-predicates • Q – a DL query • understand as conditional queries over a DL ontology • Rules are layered over a DL KB • they do not contribute to DL consequences - - +
Strong Integration • A1Ç … Ç Akà B1Æ … Æ Bm Æ not Bm+1 Æ … Æ not Bn • DL+log [Rosati, KR2006] • DL-atoms cannot occur under negation as failure • semantics: • DL-predicates interpreted under OWA • non-DL-predicates interpreted under CWA no nonmonotonic reasoning over DL-predicates • dl-programs [Lukasiewicz, ESWC2007] • no classical negation cannot capture ASP • faithful extension of LP and DLs only w.r.t. entailment of positive ground atoms • unclear how to extend the semantics to make if faithful w.r.t. arbitrary consequences
Autoepistemic Logics • LP can be encoded into first-order AEL • AEL by [Konolige, Fund. Inf. 1991] Use AEL as a framework for integrating FOL and LP • [de Bruijn, Eiter, Polleres, Tompits, IJCAI 2007] • Various encodings proposed with different levels of faithfulness • considers disjunctive datalog and not ASP • No proof theory yet
Contents • Why Combine DLs with LP? • Main Challenge: OWA vs. CVA • Existing Approaches • Minimal Knowledge and Negation as Failure • MKNF Knowledge Bases • Reasoning and Complexity • Conclusion
K allows us to reason about FO consequences • KB ² K A iff KB ² A • KB ²:K A iff KB ² A Knowledge Operator K (Researcher t Programmer)(Boris) Researcher v Employed Programmer v Employed ² Employed(Boris) ² Researcher(Boris) ² Programmer(Boris) ² K Employed(Boris) ² :KResearcher(Boris) ² :K Programmer(Boris) • K is nonmonotonic • if we assert Researcher(Boris), then… • K Researcher(Boris) holds • :K Researcher(Boris) does not hold any more • Used in an algebra-like query language EQL-Lite • [Calvanese, De Giacomo, Lembo, Lenzerini, Rosati, IJCAI 2007]
Default Negation Operator not • Interpreted as not consequence Bird(Tweety) K Bird(Tweety) Æ not:Flies(Tweety) !K Flies(Tweety) • Read as: • if • “Tweety is a bird” is a consequence • and • “Tweety cannot fly” is not a consequence • then • “Tweety can fly” should be a consequence
Minimal Knowledge and Negation as Failure • Satisfiability defined w.r.t. an MKNF structure (I,M,N) • I – a FOL interpretation • M and N – sets of FOL interpretations • M is a model of if: • (I,M,M) ² with I 2 M and • for each M’ ¾ M, there is some I’ 2 M’ such that (I’,M’,M) ² • [Lifschitz, IJCAI 91; Artificial Intelligence 94] • MKNF explains many nonmonotonic formalisms Gelfond-Lifschitz reduct!
Contents • Why Combine DLs with LP? • Main Challenge: OWA vs. CVA • Existing Approaches • Minimal Knowledge and Negation as Failure • MKNF Knowledge Bases • Reasoning and Complexity • Conclusion
MKNF Knowledge Bases • MKNF Rule: • DL-safety: • the rules are applicable only to explicitly named objects H1Ç … Ç Hnà B1, …, Bm • Hi are first-order or K-atoms • Bi are first-order, K-, or not-atoms P(t1, …, tn) - first-order atom K P(t1, …, tn) - K-atom not P(t1, …, tn) - not-atom • MKNF Knowledge Base K = (O, P) • O – a FOL KB in some language DL • P – a finite set of MKNF rules • Semantics by translation into MKNF (K) = K (O) ÆÆr 2 P8 x1,…,xn : H1Ç … Ç Hn½ B1Æ … Æ Bm
Example (I) default rule • We derive seasideCity(Barcelona) • assuming it does not lead to contradiction • deriving seasideCity(Hamburg) would cause a contraction • We derive Suggest(Barcelona) • this involves standard DL reasoning • we do not know the name of the beach in Barcelona
Example (II) • We treat ¼ in a special way • we minimize equality along with other predicates • this yields intuitive consequences • The constraint is satisfied • HolyFamily is a church, • the architect of SagradaFamilia has been specified, and • HolyFamily and SagradaFamilia are synonyms constraint
Faithfulness • MKNF KBs are fully faithful w.r.t. DLs (O, ;) ² iff O² for any FOL formula • to achieve this, we modified MKNF slightly • we must treat equality in a special way • MKNF KBs arefully faithful w.r.t. ASP (;, P) ² (:)A iff P² (:)A for A a ground atom • already shown by Lifschitz • The combination seems quite intuitive
Contents • Why Combine DLs with LP? • Main Challenge: OWA vs. CVA • Existing Approaches • Minimal Knowledge and Negation as Failure • MKNF Knowledge Bases • Reasoning and Complexity • Conclusion
How to Represent Models • A MKNF model is a set of interpretations • = typically infinite! • we need a finite representation • Idea: represent models by FOL formulae • find a first-order formula such that M = { I | I ² } • We represent using K-atoms • (P,N) – a partition of all K-atoms into positive and negative • defines the consequences that must hold in an MKNF model • objective knowledge: obK,P = O[ { A | K A 2 P } • our main task is to find a partition (P,N) that defines a model
Characterization of MKNF Models Grounding Guess a partition that defines an MKNF model Check whether the rules are satisfied in this model. Check whether this model is consistent with the DL KB. Check whether this is the model of minimal knowledge. Check whether the query does not hold in the model. These are the extensions to the standard algorithm for disjunctive datalog.
Data Complexity • Reasoning is undecidable without DL-safety • different sources of undecidability than in the FO case • If rules have special form, we can… • …find (P,N) in an easier way (e.g. deterministically) and/or • …check the minimality condition easier • Data complexity of ground atom entailment:
Contents • Why Combine DLs with LP? • Main Challenge: OWA vs. CVA • Existing Approaches • Minimal Knowledge and Negation as Failure • MKNF Knowledge Bases • Reasoning and Complexity • Conclusion
Conclusion • MKNF rules… • …generalize many known combinations of DLs and rules • …are fully compatible with both DLs and LP • …are intuitive • think of K as consequence • think of not as not consequence • …have nice complexity • defined by the DL and the LP fragment (in most cases) • Future challenges • implementation • use in applications