First Order-Rewritability and Containment of Conjunctive Queries in Horn Description Logics

Meghyn Bienvenu, Peter Hansen, Carsten Lutz, Frank Wolter

Introduction

In the field of Knowledge Representation and Reasoning, Ontology-Mediated Query (OMQ) answering serves as a bridge between structured knowledge bases and relational databases. This research, conducted by a collaborative team from CNRS, the University of Bremen, and the University of Liverpool, investigates the theoretical boundaries of OMQ. Specifically, it addresses the conditions under which complex queries over an ontology can be simplified into standard First-Order (FO) logic queries—essentially SQL—and the computational difficulty of determining query containment.

The Challenge of FO-Rewritability

The primary goal in "Data Access with Ontologies" is to leverage rich, logic-based ontologies to query data efficiently. While industrial data typically resides in relational databases using SQL, ontological reasoning often requires more expressive power. The "holy grail" of this field is FO-rewritability: the ability to transform a query involving ontological reasoning into a standard SQL query that a database engine can execute efficiently.

While FO-rewritability is guaranteed for simpler logics like DL-Lite, it is not a given for more expressive "Horn" Description Logics, such as $\mathcal{EL}$ or Horn-$\mathcal{SHIF}$. This paper focuses on two fundamental questions:

  1. Decidability: Is it possible to determine if a specific query has an FO-rewriting?
  2. Containment: How can we prove that every answer to one query is also an answer to another in the presence of an ontology?

Methodology and Technical Approach

The authors provide a rigorous theoretical complexity analysis, extending previous work on "Atomic Queries" (simple concept lookups) to "Conjunctive Queries" (CQs), which involve complex joins. Their approach utilizes:

  • Pseudo-tree ABoxes: Data structures characterized by a tree-like shape with a small, unstructured core, used to characterize when a query is rewritable.
  • Complexity Mapping: The researchers mapped these problems to complexity classes such as ExpTime, 2ExpTime, and coNExpTime through reductions and algorithmic construction.
  • Relativization: A fine-grained analysis was performed to distinguish the computational impact of the query size versus the ontology size.

Key Insights

The "Inverse Role" Penalty

A significant finding is the impact of "inverse roles"—the ability of a logic to navigate relationships in both directions (e.g., parentOf and childOf). Adding inverse roles to the logic ($\mathcal{ELI}$) causes the complexity of determining FO-rewritability to jump from ExpTime-complete to 2ExpTime-complete.

Query Size vs. Ontology Size

Despite the daunting 2ExpTime complexity, the authors offer a practical insight regarding "relativized" complexity. They demonstrate that the double-exponential growth is primarily driven by the size of the query, which is typically small in real-world applications. In contrast, the complexity relative to the ontology size—which can be massive—remains single-exponential. This suggests that the problem is more computationally feasible in practice than the raw complexity class might imply.

The Role of Query Structure

The research highlights that "rooted" queries (those that are connected and contain at least one answer variable) are significantly easier to process, with complexity dropping to coNExpTime. In contrast, disconnected or Boolean queries are the primary drivers of higher computational costs.

Summary of Results

The paper establishes several critical bounds and proofs:

  • Logic Complexity: FO-rewritability is ExpTime-complete for $\mathcal{EL}$ (without inverse roles) and 2ExpTime-complete for $\mathcal{ELI}$ (with inverse roles).
  • Effective Construction: For Horn-$\mathcal{SHIF}$, the authors prove that if an FO-rewriting exists, a Union of Conjunctive Queries (UCQ) rewriting can be effectively constructed.
  • Datalog Impact: The results provide tighter lower bounds for monadic Datalog, showing that containment and boundedness are 2ExpTime-hard even under strict syntactic constraints.

Conclusion and Future Directions

While this work is primarily theoretical and does not include empirical benchmarks, it provides the mathematical foundation necessary for future software tools. By establishing these complexity bounds and characterizations, the authors pave the way for developing efficient algorithms for computing actual rewritings, mirroring the evolution of Atomic Query research into practical implementations.

Summary updated

BibTeX
@inproceedings{bienvenu2016first,
  author = {Meghyn Bienvenu and Peter Hansen and Carsten Lutz and Frank Wolter},
  title = {{First Order-Rewritability and Containment of Conjunctive Queries in Horn Description Logics}},
  booktitle = {Description Logics},
  year = {2016},
}
Figure