NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

OWL Query Answering Based on Query Extension

Birte Glimm, Yevgeny Kazakov, Ilianna Kollia, Giorgos B. StamouOWLED 2014

TL;DR

This paper tackles the challenge of efficiently answering SPARQL queries over complex OWL ontologies. They introduce a "query extension" technique that leverages the ontology's schema (TBox) to add new, equivalent query atoms. These added atoms help prune the search space of potential answers, significantly speeding up query execution.

What Problem Does This Paper Address?

Answering queries against knowledge bases described by expressive ontologies (like OWL 2 DL) is computationally challenging. Standard SPARQL query answering often relies on approximate methods that return both "known" (certain) and "possible" answers. While known answers are guaranteed to be correct, checking the validity of possible answers can be extremely time-consuming, especially with complex ontologies that have high worst-case reasoning complexities (like SROIQ, which is 2-NEXPTIME). The core problem is to reduce the number of these costly checks for possible answers without losing any certain answers.

Methods

The paper proposes a "query extension" approach. The core idea is to transform the original query q into an equivalent query ĝ by adding new atoms derived from the ontology's schema (TBox). This is done by:

  1. Creating a Query ABox: A small ABox is constructed by mapping query variables to fresh individuals.
  2. Materializing Implicit Assertions: This query ABox is then "materialized" against the TBox to infer implicit class and property assertions.
  3. Forming the Extended Query: The original query atoms are combined with these inferred assertions (after mapping individuals back to variables) to form the extended query ĝ.

Crucially, the paper proves that this extended query ĝ is equivalent to the original query q in terms of their answers over any ABox. The added atoms in ĝ are then used to identify "restricting atoms." These are atoms that can help prune the set of possible answers for the original query q without affecting the set of certain answers. The authors present an algorithm (evaluateExtensionQans) that uses these restricting atoms to optimize query answering by reducing the number of consistency checks needed for possible answers.

Datasets

The evaluation uses the University Ontology Benchmark (UOBM). Specifically, they used a subset of UOBM containing 3,043 individuals and 15,250 ABox assertions. They also created custom queries to highlight the effect of their technique.

Key Insights and Ideas

  • Leveraging the TBox for Optimization: The TBox (schema) of an OWL ontology, often overlooked in basic query answering, holds valuable information that can be used to prune the search space for query answers.
  • Query Equivalence through Extension: By carefully constructing an extended query ĝ, it's possible to add atoms that don't change the query's answer set but provide new opportunities for optimization.
  • Restricting Atoms as Pruning Tools: Identifying "restricting atoms" within the extended query is key. These atoms, when combined with the original query, can significantly reduce the number of "possible" answers that need costly validation.
  • Empirical Speedups: The proposed method can lead to dramatic improvements in query answering times, demonstrating the practical impact of schema-aware query optimization.

Key Results

The paper demonstrates significant performance improvements through experimental evaluation. For the tested UOBM queries, their evaluateExtensionQans algorithm achieved:

  • Reduced Consistency Checks: A substantial reduction in the number of performed consistency checks (EntNo) compared to baseline algorithms (Static and evaluateIntersecQans). For example, query q4 saw checks drop from 1694 to 1332.
  • Dramatic Speedups: Query answering times were reduced by up to two orders of magnitude. For instance, query q5 went from 2198.66 seconds (Static) to 18.36 seconds (evaluateExtensionQans).
  • The query extension phase itself was very fast, taking around 0.3 seconds for the tested queries.

Limitations and Future Work

  • Pre-model Assumption: The evaluation relies on extracting known and possible instances from a pre-model generated by a reasoner. The paper notes that complex class expressions might only have "possible" instances, which are assumed to be all individuals in the ontology's signature.
  • Nominals Handling: The paper mentions that nominals (individuals used as class/property values) can be tricky and were removed for some experiments to reduce reasoning time. Handling nominals more robustly could be a future direction.
  • Generalization: While the paper focuses on SPARQL instance queries with variables, future work could explore extending this approach to more general SPARQL query types.
  • Algorithm Complexity: The paper implicitly suggests that further optimization of the ordering of query atoms and the selection of restricting atoms could lead to even better performance.

Summary updated

BibTeX
@inproceedings{glimm2014owl,
  author = {Birte Glimm and Yevgeny Kazakov and Ilianna Kollia and Giorgos B. Stamou},
  title = {{OWL Query Answering Based on Query Extension}},
  booktitle = {OWLED},
  year = {2014},
  url = {https://openreview.net/forum?id=cVh4dSMz4cC},
}
Figure