Circuit Complexity Meets Ontology-Based Data Access

Vladimir V. Podolskii

Abstract

This research bridges the gap between database theory and computational complexity by establishing that the "rewriting" of queries in Ontology-Based Data Access (OBDA) is fundamentally equivalent to constructing Boolean circuits. By mapping specific logical theories and queries to established complexity classes, such as $NC^1$ and $NP/poly$, the study provides a unified framework for determining the lower and upper bounds of query size. The results demonstrate that in many common scenarios, the size of a rewritten query must grow exponentially, providing a theoretical explanation for the computational challenges encountered in practical OBDA implementations.

Introduction

In modern data management, Ontology-Based Data Access (OBDA) has emerged as a powerful paradigm for querying heterogeneous data sources. By augmenting databases with an ontology—a set of logical rules describing domain-specific relationships—users can query data at a conceptual level without needing to understand the underlying physical schema.

The standard mechanism for executing these queries is query rewriting. In this process, a user's query and the associated ontology are transformed into a new, expanded query that can be executed directly by a standard relational database management system (RDBMS). However, a significant bottleneck exists: the rewritten query can become gargantuan, often growing exponentially relative to the original input. This paper addresses the fundamental theoretical question: How large must these rewritings be? By leveraging the tools of Boolean circuit complexity, the research establishes rigorous bounds on the size of these reformulations.

Methodology: Mapping Logic to Circuits

The core contribution of this work is a reduction-based framework that encodes Boolean functions into queries and ontologies. This allows the authors to translate problems in database theory into well-studied problems in circuit complexity. The mapping follows three primary correspondences:

  1. First-Order (FO) Rewritings correspond to Boolean formulas.
  2. Positive Existential (PE) Rewritings correspond to monotone Boolean formulas.
  3. Nonrecursive Datalog (NDL) Rewritings correspond to monotone Boolean circuits.

To formalize these connections, the authors introduced an intermediate computational model known as Hypergraph Programs. In this model, a hypergraph outputs a value of "1" if all its vertices labeled "0" can be covered by a set of disjoint hyperedges. By demonstrating that different structural restrictions on these hypergraphs (such as degree or "tree-likeness") correspond to specific circuit complexity classes, the authors can import known lower bounds from circuit complexity directly into the field of database theory.

Key Insights: The Mechanics of Rewriting

The "Tree Witness" Mechanism

The paper identifies that query answers in OBDA often rely on "tree witnesses." These are specific components of a query that can be satisfied by "virtual" objects—entities that are not explicitly in the database but are inferred to exist by the ontology's rules. The process of query rewriting is essentially a systematic search for these witnesses within the data structure.

The Impact of Theory Depth

A critical discovery in this research is the sensitivity of query complexity to the "depth" of the ontology. The depth refers to the number of layers of inferred objects the rules can generate. The study reveals a sharp transition in complexity based on this parameter:

  • Depth-1 Theories: Often lead to $NC^1$ complexity (logarithmic depth circuits).
  • Depth-2 Theories: Can cause a jump to $NP/poly$, indicating a significantly higher computational hurdle.

Results and Complexity Classes

The research establishes a definitive "cheat sheet" for the power of functions that can be encoded in various OBDA settings. The following table summarizes the mapping between query shapes, theory depths, and their corresponding complexity classes:

Query Type Depth 1 Theory Depth $d > 1$ Theory Arbitrary Depth
Linear $NC^1$ $NL/poly$ $NL/poly$
Tree-like $NC^1$ $SAC^1$ $NP/poly$
General $NL/poly$ $NP/poly$ $NP/poly$

These findings imply that for general queries over theories of arbitrary depth, polynomial-sized rewritings are impossible unless $NP \subseteq P/poly$. Given that this inclusion is considered highly unlikely in complexity theory, the results provide a formal justification for the "size explosion" observed in practice.

Discussion and Future Directions

While this framework provides a robust theoretical foundation, several areas remain open for exploration. The current survey focuses primarily on unary and binary predicates, which are standard in Description Logics. The implications for $n$-ary relations (higher-arity predicates) require further investigation. Additionally, while the link between NDL-rewritings and monotone circuits is well-defined, the relationship involving non-monotone rewritings (which utilize negation) remains an active area of interest.

Finally, there is a recognized gap between these theoretical bounds and practical application. While the paper explains why rewritings are large, it does not propose new algorithms for generating the most compact rewritings possible. Bridging this gap remains a primary challenge for researchers focused on the implementation of efficient OBDA systems.

Summary updated

BibTeX
@inproceedings{podolskii2015circuit,
  author = {Vladimir V. Podolskii},
  title = {{Circuit Complexity Meets Ontology-Based Data Access}},
  booktitle = {CSR},
  year = {2015},
  doi = {10.1007/978-3-319-20297-6\_2},
}
Figure