from classical to consistent query answering under
play

From Classical to Consistent Query Answering under Existential Rules - PowerPoint PPT Presentation

From Classical to Consistent Query Answering under Existential Rules Andreas Pieris Institute of Information Systems, Vienna University of Technology, Austria Joint work with Thomas Lukasiewicz, Maria Vanina Martinez and Gerardo I. Simari


  1. From Classical to Consistent Query Answering under Existential Rules Andreas Pieris Institute of Information Systems, Vienna University of Technology, Austria Joint work with Thomas Lukasiewicz, Maria Vanina Martinez and Gerardo I. Simari OntoLP, Argentina, Buenos Aires, July 25, 2015

  2. Ontology-based Query Answering (OBQA) database (or ABox) knowledge base D h D , O i ontology (or TBox) D Ο Query = 9 X ( ' ( X )) h D , Ο i ² Query , D Æ Ο ² Query

  3. A Simple Example D = O = 8 X ( professor ( X )  9 Y ( faculty ( X ) Æ teaches ( X , Y ))) professor (John) 8 X ( fellow ( X )  faculty ( X )) fellow ( John ) 8 Μ ² h D , O i : Μ = … teaches (John, # ) … {John ! John, X ! #} 9 X ( teaches (John, X )) 

  4. A Simple Example D = O = 8 X ( professor ( X )  9 Y ( faculty ( X ) Æ teaches ( X , Y ))) professor (John) 8 X ( fellow ( X )  faculty ( X )) fellow ( John ) 8 X ( professor ( X ) Æ fellow ( X )  ? ) no model ) every query is entailed

  5. Handling Data Inconsistencies • The data are likely to be inconsistent with the ontology • Standard semantics fails: everything is inferred - not meaningful answers • Two approaches to inconsistency-handling: o Resolve the inconsistencies - ideal, but not always possible o Live with the inconsistencies - inconsistency-tolerant semantics

  6. ABox Repair (AR) Semantics • Standard inconsistency-tolerant semantics • IDEA: The query must be entailed by every database repair µ -maximal consistent subsets of the database [Lembo et al., RR 2010]

  7. ABox Repair (AR) Semantics h D , Ο i inconsistent KB D consistent KBs h R 1 , Ο i h R 2 , Ο i h R n , Ο i . . . R 1 R n R 2 Query h D , Ο i ² AR Query , 8 R 2 { R 1 ,…, R n }: h R , Ο i ² Query

  8. ABox Repair (AR) Semantics: Example D = O = 8 X ( professor ( X )  9 Y ( faculty ( X ) Æ teaches ( X , Y ))) professor (John) 8 X ( fellow ( X )  faculty ( X )) fellow ( John ) 8 X ( professor ( X ) Æ fellow ( X )  ? ) h D , Ο i ² AR faculty (John)  h R 1 , Ο i ² faculty (John)  R 1 = professor (John) h R 2 , Ο i ² faculty (John)  R 2 = fellow (John)

  9. ABox Repair (AR) Semantics: Example D = O = 8 X ( professor ( X )  9 Y ( faculty ( X ) Æ teaches ( X , Y ))) professor (John) 8 X ( fellow ( X )  faculty ( X )) fellow ( John ) 8 X ( professor ( X ) Æ fellow ( X )  ? ) h D , Ο i ² AR 9 X ( teaches (John, X ))  h R 1 , Ο i ² 9 X ( teaches (John, X )) R 1 =  professor (John) h R 2 , Ο i ² 9 X ( teaches (John, X ))  R 2 = fellow (John)

  10. AR Semantics • Lots of recent work and complexity results for description logics [Lembo et al., RR 2010 / Rosati, IJCAI 2011 / Bienvenu, AAAI 2012 / Bienvenu & Rosati, IJCAI 2013] • This talk is about existential rules + negative constraints [Lukasiewicz, Martinez & Simari, ODBASE 2013 / Lukasiewicz, Martinez, P. & Simari, AAAI 2015] 8 X ( ' ( X )  9 Υ ( Ã ( X , Υ ))) + 8 X ( ' ( X )  ? )

  11. Our Goal Perform an in-depth complexity analysis of consistent query answering under the main classes of existential rules + negative constraints • Combined • Bounded-arity combined • Fixed-program combined • Data generic complexity results - from classical to consistent query answering

  12. Combined Complexity class of 9 -rules complexity class combined or ba-combined or fp-combined M complexity of classical query answering under L is C -complete + M complexity of consistent query answering under L [ ? ] is: C = NP Π P ,2 -complete if C -complete C ¶ PSPACE & C is deterministic if

  13. Combined Complexity: Upper Bounds Guess and check algorithm (for the complement of the problem) Input: D , O 2 L [ ? ], Q Guess R µ D - a possible repair 1. Verify that R is a repair, i.e., h R , Ο i is consistent and R is µ -maximal 2. Verify that h R , Ο i does not entail Q 3. no harder than classical query answering under L coNP NP = co Σ P ,2 = Π P ,2 C = NP if ) our problem is in coNP C ) in C ¶ PSPACE coNP C = co C = C if C is deterministic

  14. Combined Complexity class of 9 -rules complexity class combined or ba-combined or fp-combined M complexity of classical query answering under L is C -complete + M complexity of consistent query answering under L [ ? ] is: C = NP Π P ,2 -complete if C -complete C ¶ PSPACE & C is deterministic if

  15. A Strong Π P ,2 -hardness Result Consistent query answering under the single constraint 8 X 8 Y 8 Z 8 W ( p ( X , Y , Z ) Æ p ( W , X , Z )  ? ) while the database and the query use only binary and ternary predicates (by reduction from satisfiability of 2QBF formulas) + For every class L of existential rules, the fp-combined complexity of consistent query answering under L [ ? ] is Π P ,2 -hard

  16. Combined Complexity class of 9 -rules complexity class combined or ba-combined or fp-combined M complexity of classical query answering under L is C -complete + M complexity of consistent query answering under L [ ? ] is: C = NP Π P ,2 -complete if C -complete C ¶ PSPACE & C is deterministic if

  17. Data Complexity class of 9 -rules complexity class data complexity of classical query answering under L is C -complete + data complexity of consistent query answering under L [ ? ] is: C µ PTIME coNP-complete if

  18. Data Complexity: Upper Bounds Guess and check algorithm (for the complement of the problem) Input: D , O 2 L [ ? ], Q Guess R µ D - a possible repair 1. Verify that R is a repair, i.e., h R , Ο i is consistent and R is µ -maximal 2. Verify that h R , Ο i does not entail Q 3. no harder than classical query answering under L ) our problem is in coNP C ) in coNP (since NP PTIME = NP)

  19. A Strong coNP-hardness Result Consistent query answering under the single constraint 8 X ( p ( X ) Æ s ( X )  ? ) while the query is fixed (by reduction from 2+2UNSAT) + For every class L of existential rules, the data complexity of consistent query answering under L [ ? ] is coNP-hard

  20. Data Complexity class of 9 -rules complexity class data complexity of classical query answering under L is C -complete + data complexity of consistent query answering under L [ ? ] is: C µ PTIME coNP-complete if

  21. From Classical to Consistent Query Answering (ba-/fp)combined complexity: Π P ,2 -complete ! in NP C -complete, C ¶ PSPACE & C is deterministic C -complete ! data complexity: in C µ PTIME ! coNP-complete an (almost) complete picture for the main classes of existential rules + negative constraints

  22. Existential Rules 8 X ( ' ( X )  9 Υ ( Ã ( X , Υ ))) conjunctions of atoms • Classical query answering under existential rules is undecidable see, e.g., [Beeri & Vardi, ICALP 1981] • Expressive decidable fragments - field of intense research • (e.g., Montpellier, Dresden, Calabria, Oxford, Vienna, …) • Main decidability paradigms: acyclicity, guardedness & stickiness

  23. Acyclic Existential Rules • The predicate graph is acyclic 8 X ( professor ( X )  9 Y ( faculty ( X ) Æ teaches ( X , Y )))  8 X ( fellow ( X ) faculty ( X )) faculty professor fellow teaches

  24. (Frontier-)Guarded Existential Rules • Frontier-guardedness: There exists a body-atom that contains the frontier 8 X 8 Y 8 Z ( supervisorOf ( X , Y ) Æ supervisorOf ( Y , Z )  manager ( X )) • Guardedness: There exists a body-atom that contains all the 8 -variables 8 X 8 Y ( supervisorOf ( X , Y ) Æ emp ( Y )  emp ( X )) • Linearity: There exists only one atom in the body 8 X ( employee ( X )  9 Y ( supervisorOf ( Y , X ) Æ employee ( Y )))

  25. Sticky Existential Rules • Join-variables stick to the inferred atoms 8 X 8 Y 8 Z ( q ( X , Y ) Æ p ( Y , Z )  9 W ( t ( X , Y , W ))) 8 X 8 Y 8 Z ( q ( X , Y ) Æ p ( Y , Z )  9 W ( t ( X , Y , W ))) 8 X 8 Y 8 Z ( t ( X , Y , Z )  9 W ( s ( Y , W ))) 8 X 8 Y 8 Z ( t ( X , Y , Z )  9 W ( s ( X , W )))  

  26. Existential Rules + Negative Constraints Bounded Treewidth Set Frontier-Guarded[ ? ] Finite Expansion Set Finite Unification Set Acyclic[ ? ] Guarded[ ? ] Sticky[ ? ] ELHI ? Linear[ ? ] DL-Lite R

  27. From Classical to Consistent Query Answering (ba-/fp)combined complexity: Π p ,2 -complete ! in NP C -complete, C ¶ PSPACE & C is deterministic C -complete ! data complexity: in C µ PTIME ! coNP-complete we simply need to exploit existing results on classical query answering

  28. Classical Query Answering Combined ba-combined fp-combined Data Acyclic[ ? ] NEXPTIME NEXPTIME NP in AC 0 Frontier-Guarded[ ? ] 2EXPTIME 2EXPTIME NP PTIME Guarded[ ? ] 2EXPTIME EXPTIME NP PTIME Linear[ ? ] PSPACE NP NP in AC 0 Sticky[ ? ] EXPTIME NP NP in AC 0

  29. Classical Query Answering Combined ba-combined fp-combined Data Acyclic[ ? ] NEXPTIME NEXPTIME NP in AC 0 Frontier-Guarded[ ? ] 2EXPTIME 2EXPTIME NP PTIME Guarded[ ? ] 2EXPTIME EXPTIME NP PTIME Linear[ ? ] PSPACE NP NP in AC 0 Sticky[ ? ] EXPTIME NP NP in AC 0 • Until recently, it was generally believed that it is EXPTIME • The obvious algorithm does not work - models of double-exponential size

  30. Classical Query Answering Combined ba-combined fp-combined Data Acyclic[ ? ] NEXPTIME NEXPTIME NP in AC 0 Frontier-Guarded[ ? ] 2EXPTIME 2EXPTIME NP PTIME Guarded[ ? ] 2EXPTIME EXPTIME NP PTIME Linear[ ? ] PSPACE NP NP in AC 0 Sticky[ ? ] EXPTIME NP NP in AC 0 • Upper bound: non-deterministically construct a proof of the query • Lower bound: by reduction from a TILING problem

Recommend


More recommend