Abstract
In Ontology-Based Data Access (OBDA), large-scale ontologies provide a conceptual layer over databases, but often contain vast amounts of information irrelevant to a specific data schema. This paper introduces the formal concepts of query emptiness and predicate emptiness to identify terms that can never contribute to query results. We provide a comprehensive complexity analysis of these problems across several Description Logic families and demonstrate their utility in "pruning" massive ontologies like SNOMED CT. Our results show that ontologies can be reduced to a small fraction of their original size—down to 5% in clinical case studies—without losing query-answering capabilities for a given data signature.
Introduction
Ontology-Based Data Access (OBDA) allows users to query databases using high-level conceptual terms (e.g., "DiabetesPatient") rather than low-level database schemas. However, modern ontologies such as SNOMED CT are enormous, often containing hundreds of thousands of terms, while a specific database might only utilize a tiny fraction of that vocabulary. This discrepancy leads to two critical static analysis challenges:
- Query Emptiness: Determining if a query is fundamentally "broken" such that it will never return a result, regardless of the database's content, given the ontology and the data signature.
- Predicate Emptiness: Identifying "dead weight" terms in the ontology that can never contribute to a non-empty query result.
Identifying these allows for better user interfaces (graying out useless terms) and significant performance optimizations through ontology pruning.
Theoretical Framework
The study covers three major families of Description Logics (DLs): $\mathcal{EL}$ (common in medicine), DL-Lite (the basis for OWL 2 QL), and $\mathcal{ALC}$ (more expressive logics). The syntax and semantics of these logics are summarized in the table below.
The authors develop techniques to construct "canonical" witness databases—minimal examples that prove non-emptiness. For more complex logics like Horn-$\mathcal{ALCIF}$, they employ tree automata to decide emptiness, establishing upper bounds on computational costs.
Complexity Mapping
A key contribution of this work is the definitive mapping of the computational complexity of checking emptiness. Interestingly, the complexity of emptiness does not always mirror the complexity of standard query answering. For instance, in $\mathcal{EL}_\bot$, query answering is in PTIME, but checking query emptiness is EXPTIME-complete.
As shown in the table above, while basic $\mathcal{EL}$ and DL-Lite remain efficient (PTIME/NLOGSPACE), more expressive logics like $\mathcal{ALC}$ and $\mathcal{ALCI}$ jump to NEXPTIME or 2EXPTIME. Furthermore, the problem becomes undecidable when functional roles are added to $\mathcal{ALC}$.
Practical Application: Pruning SNOMED CT
The authors evaluated their approach using SNOMED CT (approx. 370,000 concepts) and a real-world clinical signature from an Australian hospital (8,858 concepts).
Key findings include:
- Massive Redundancy: Only 17,339 terms (out of 370,000) were found to be non-empty for conjunctive queries relative to the hospital's data signature.
- Efficient Modules: The authors defined the $CQ_\Sigma$-core, a subset of the ontology containing only necessary axioms. For the clinical signature, this core contained only about 5% of the original SNOMED CT axioms, outperforming existing state-of-the-art pruning methods.
Conclusion and Future Work
This research provides the mathematical foundation for identifying useless components in OBDA systems. While algorithms for $\mathcal{EL}$ and DL-Lite are highly efficient, future work is needed to develop optimized heuristics for the harder $\mathcal{ALC}$ logics. Additionally, extending this framework to handle nominals and complex role hierarchies remains an open challenge. Integrating these results into graphical query builders could significantly improve the user experience by filtering out irrelevant ontological terms.
Summary updated