Acyclicity Notions for Existential Rules and Their Application to Query Answering in Ontologies

Bernardo Cuenca Grau, Ian Horrocks, Markus Krötzsch, Clemens Kupke, Despoina Magka, Boris Motik, Zhe WangJAIR 2013 · DOI

In the field of Knowledge Representation and Reasoning (KRR), the ability to query complex data structures is fundamental. A particularly powerful tool for this is the use of existential rules (also known as Datalog+/- or Tuple-Generating Dependencies). These rules allow for the expression of rich relationships, such as "every person has a parent who is also a person." However, this power comes with a significant computational risk: the potential for infinite reasoning loops during the materialization process.

A landmark paper from the University of Oxford, published in the Journal of Artificial Intelligence Research, introduces two powerful new "acyclicity notions" that act as safety checks, determining exactly when these reasoning processes are guaranteed to stop. By establishing a complete taxonomy of these safety checks and testing them on hundreds of real-world ontologies, the authors prove that materialization-based query answering is far more practical than previously thought.

The Problem: The Infinite Chase

To answer conjunctive queries (CQs) over a set of facts extended with existential rules, researchers often use the chase algorithm. The chase works by iteratively applying rules to the data, "materializing" new facts until all rules are satisfied. In our example, if the data only contains "Alice is a person," the chase would add "Alice has a parent, Bob," then "Bob is a person," then "Bob has a parent, Charlie," and so on.

If this process terminates, the resulting set of facts (the universal model) can be used to answer queries directly. The problem is that the chase does not always stop. Worse, checking whether the chase terminates on a given set of rules and facts is undecidable—there is no universal program that can provide a definitive "yes" or "no" for every case.

New Safety Checks: MFA and MSA

To circumvent this undecidability, researchers use "acyclicity notions"—syntactic or semantic conditions that are sufficient to guarantee termination. Historically, these notions, such as Weak Acyclicity, were often too restrictive, failing to recognize that many complex, real-world ontologies are actually safe to process.

The authors move beyond simple syntactic checks to model-based analysis, introducing two new notions:

  1. Model-Faithful Acyclicity (MFA): This is the "gold standard" of the new notions. It simulates the chase more accurately by tracking how existential quantifiers trigger one another within the actual structure of a "canonical model." If a cycle of dependencies that creates increasingly deep terms is detected, it signals that the chase may not terminate.
  2. Model-Summarising Acyclicity (MSA): Recognizing that MFA is computationally expensive (2-EXPTIME-complete), the authors developed MSA as a more efficient approximation. It "summarizes" the model by reusing constants, effectively turning the safety check into a Datalog entailment problem, which is much faster to solve in practice.

A Unified Taxonomy of Safety Checks

Beyond introducing new notions, the paper provides a rigorous mathematical comparison of nearly a dozen existing acyclicity notions, including Joint Acyclicity (JA), Super-Weak Acyclicity (SWA), and acyclic Graph of Rule Dependencies (aGRD).

The authors established a complete taxonomy, proving that MFA is the most general notion known, strictly subsuming almost all others. This hierarchy allows developers to choose the most appropriate safety check based on the complexity of their ontology and the computational resources available. On the theoretical side, the paper also demonstrates that query answering for acyclic ontologies often has lower computational complexity than for general ontologies, making these safety checks even more valuable for optimizing performance.

Empirical Evaluation: Real-World Ontologies

The authors evaluated their theories using a massive repository of 336 real-world Horn OWL 2 ontologies. These included the Gardiner ontology corpus, the Lehigh University Benchmark (LUBM), and large-scale biological datasets from the Open Biomedical Ontology (OBO) corpus. These datasets represent "in the wild" logic used by scientists and engineers, rather than simplified theoretical examples.

The results were highly encouraging:

  • Broad Applicability: 63.4% of the 336 tested ontologies were found to be MSA-acyclic.
  • Manageable Materialization: A common fear in the OWL community is that materializing facts will lead to a "state explosion." However, for the majority of MSA ontologies, the number of facts only increased by a factor of about 8x during materialization.
  • Performance: While MFA is theoretically complex, MSA proved to be highly efficient, suggesting that materialization-based reasoners are a viable alternative to more complex tableau-based systems.

Conclusion and Future Directions

This research suggests that principled development of materialization-based OWL 2 reasoners is practically feasible. By moving from purely syntactic checks to model-based analysis like MFA and MSA, we can unlock the power of existential rules for a wider range of real-world applications.

While handling the equality predicate (≈) remains a challenge due to the potential for terms to "collapse" into one another, the authors' use of "singularisation" techniques provides a path forward. Future work will likely focus on modularizing these approaches—combining different safety checks for different parts of a massive knowledge base to achieve the optimal balance of speed and reasoning power.

Summary updated

BibTeX
@article{grau2013acyclicity,
  author = {Bernardo Cuenca Grau and Ian Horrocks and Markus Krötzsch and Clemens Kupke and Despoina Magka and Boris Motik and Zhe Wang},
  title = {{Acyclicity Notions for Existential Rules and Their Application to Query Answering in Ontologies}},
  journal = {J. Artif. Intell. Res.},
  year = {2013},
  doi = {10.1613/jair.3949},
}
Figure