Abstract
Querying inconsistent data within Ontology-Based Data Access (OBDA) presents significant computational challenges. This paper establishes a comprehensive complexity map for Consistent Query Answering (CQA) under AR semantics for various classes of existential rules. By developing generic "transfer" theorems, the authors demonstrate how the complexity of querying inconsistent data relates to standard query answering, identifying both "complexity jumps" for simpler rule sets and "complexity ceilings" for more expressive ones.
Introduction
In OBDA, ontologies consisting of existential rules (also known as Datalog+/- or TGDs) are used to provide a conceptual view over data sources. However, real-world data often violates these rules. In classical logic, such inconsistencies lead to the derivation of arbitrary facts. To maintain meaningful query results, Consistent Query Answering (CQA) is employed. The AR semantics is a prominent approach where an answer is considered consistent if it can be derived from every "repair"—a maximal subset of the data that satisfies the ontology.
While the complexity of CQA is well-documented for Description Logics, it has remained largely unexplored for the more expressive framework of existential rules. This paper fills that gap by providing a complete complexity landscape.
Methodology
The authors adopt a theoretical, proof-based approach to establish generic complexity results. Their primary contribution lies in two "master" transfer theorems:
- Theorem 1 (Combined Complexity): Connects the complexity of standard query answering to AR-semantics based on whether the underlying rule class is in $NP$ or exceeds $PSPACE$.
- Theorem 2 (Data Complexity): Proves that if standard querying is in $PTIME$, the corresponding AR-semantics query answering becomes $coNP$-complete.
These theorems allow for the derivation of complexity bounds across various rule classes—such as Guarded, Sticky, and Acyclic rules—without requiring individual proofs for every case. Membership in complexity classes was established via "guess-and-check" algorithms, while hardness was proven through logical reductions.
Comparative Complexity Analysis
The research highlights a systematic relationship between classical query answering and CQA. This relationship is characterized by two distinct behaviors depending on the expressivity of the rule class.
The Complexity Jump
For rule classes where classical query answering is computationally efficient (e.g., in $PTIME$ for data complexity), transitioning to CQA typically results in a "complexity jump." For instance, as seen in Table 1 and Table 2, the data complexity for Guarded and Sticky rules moves from $PTIME$ or $AC_0$ to $coNP$. This jump is due to the necessity of considering all possible maximal consistent subsets (repairs) of the data.
The Complexity Ceiling
In contrast, for rule classes that are already highly complex (e.g., $PSPACE$-hard or higher), the complexity of CQA often remains the same as classical answering. For example, Weakly-Guarded rules maintain an $EXPTIME$ data complexity in both settings. In these cases, the inherent difficulty of the rules "absorbs" the overhead of inconsistency tolerance.
Key Results
The paper provides a definitive map of complexity results, filling several gaps in the literature. A notable finding is the "bounded-arity combined complexity" for acyclic rules, which the authors identify as $NEXPTIME$-complete. Overall, the results show that for many complex rule sets, querying inconsistent data is no harder than standard querying, while for simpler sets, the complexity typically settles at $coNP$ (data) or $\Pi^p_2$ (combined).
Limitations and Future Work
The study focuses exclusively on AR semantics. While AR is a standard for consistency, it is computationally demanding. Future research could explore IAR semantics (Intersection of All Repairs), which offers a more efficient, though approximate, alternative. Additionally, as this is a theoretical work, the average-case performance and practical optimization of these algorithms on real-world datasets remain open questions. Further work is also needed to refine the complexity nuances within the acyclic rule category.
Summary updated