Dichotomies in Ontology-Mediated Querying with the Guarded Fragment

André Hernich, Carsten Lutz, Fabio Papacchini, Frank Wolter

Abstract

This paper investigates the computational boundaries of Ontology-Mediated Querying (OMQ) within the Guarded Fragment (GF) of first-order logic. By focusing on data complexity, the authors identify fragments that exhibit a PTIME/CONP-hard dichotomy, effectively sidestepping the Feder-Vardi conjecture for significant sub-languages. An empirical evaluation of the BioPortal repository demonstrates that over 98% of real-world ontologies fall within these well-behaved fragments.

Introduction

In the paradigm of Ontology-Mediated Querying (OMQ), a database is augmented with an ontology—a set of logical rules—to provide more complete answers to queries. While this enhances expressivity, it introduces significant computational challenges. This research explores the "data complexity" of OMQ: determining whether query answering is efficient (PTIME) or inherently difficult (CONP-hard) as the database size increases.

The Search for Dichotomies

A central goal in this field is to establish "dichotomies"—proofs that every ontology within a specific class is either tractable or hard, with no intermediate complexity. Proving such a dichotomy for the full Guarded Fragment is a major challenge in theoretical computer science, as it is tied to the Feder-Vardi conjecture regarding Constraint Satisfaction Problems (CSPs). This paper identifies large, practically relevant sub-fragments where such dichotomies can be proven and tractability can be decided.

Methodology

The researchers utilized several advanced theoretical techniques to classify these fragments:

  • Materializability: Determining if an ontology supports a "universal model" that can represent all possible answers.
  • Unraveling Tolerance: Analyzing if an ontology can distinguish between a standard database and its tree-like "unraveled" counterpart. If it cannot, it is often rewritable into Datalog.
  • Ladner’s Theorem Variation: Developing a new version of Ladner’s Theorem to prove the absence of dichotomies in certain fragments, identifying cases of intermediate difficulty.
  • Mosaic Techniques: Proving the decidability of whether a specific ontology's query evaluation is in PTIME.

Key Results and the Complexity Landscape

The authors mapped the complexity of various GF sub-languages, identifying a "frontier" where dichotomies break down or become as difficult as the Feder-Vardi conjecture.

Figure 1: The complexity landscape of Guarded Fragment sub-languages, categorizing them by the existence of a PTIME/CONP-hard dichotomy.

As illustrated in the figure above, fragments such as $uGF(1)$ and $ALCHIF$ depth 2 exhibit a clear dichotomy. In these cases, PTIME complexity is equivalent to "Datalog-rewritability," meaning queries can be executed using standard database engines. Conversely, adding features like functional roles in depth-2 rules can lead to "NP-intermediate" complexity, where no dichotomy exists.

Practical Impact: The BioPortal Study

To bridge theory and practice, the authors analyzed 411 ontologies from the BioPortal repository. Their findings were striking: 405 out of 411 ontologies (over 98%) belonged to the fragments for which a dichotomy was established. This suggests that the "hard" cases that resist classification are rare in practical applications, and the paper's theoretical results cover the vast majority of real-world use cases.

Conclusion

This work provides a roadmap for understanding the complexity of OMQ in the Guarded Fragment. By identifying fragments that are "unraveling tolerant," the authors established dichotomies without needing to solve the full Feder-Vardi conjecture. Future work remains to address the full GF, transitivity axioms, and the complex interactions between high quantifier depth and counting constraints.

Summary updated

BibTeX
@article{hernich2017dichotomies,
  author = {André Hernich and Carsten Lutz and Fabio Papacchini and Frank Wolter},
  title = {{Dichotomies in Ontology-Mediated Querying with the Guarded Fragment}},
  journal = {ACM Trans. Comput. Log.},
  year = {2017},
}
Figure