New Research Clarifies Path Query Complexity in Knowledge Bases.

Jean-Fran\c{c}ois Baget (LIRMM, Inria, University of Montpellier, CNRS, France), Meghyn Bienvenu (Univ. Bordeaux, CNRS, Bordeaux INP, LaBRI, France), Marie-Laure Mugnier (LIRMM, Inria, University of Montpellier, CNRS, France), Micha\"el Thomazo (Inria, DIENS, ENS, PSL University, CNRS, France)· July 28, 2026 View original

Summary

This paper investigates the computational complexity of answering two-way regular path queries (RPQs) and conjunctive regular path queries (CRPQs) over knowledge bases governed by guarded existential rules. It shows that for linear existential rules, data complexity matches plain graph databases, and provides complexity bounds for various scenarios.

Ontology-mediated query answering involves querying knowledge bases that combine a database instance with an ontology. While much research has focused on conjunctive queries, navigational queries, particularly regular path queries (RPQs), are gaining importance. This study delves into the complexity of answering two-way RPQs and conjunctive RPQs (CRPQs) within knowledge bases where the ontology is defined by guarded existential rules. The researchers first examine the subclass of linear existential rules, demonstrating that the data complexity for (C)RPQ answering is NL-complete, which is consistent with RPQ answering over simple graph databases without an ontology. For combined complexity, both tasks are ExpTime-complete generally, but drop to PTime-complete for RPQ and PSpace-complete for CRPQ if predicate arity is bounded. The paper then extends these findings to guarded rules, showing that (C)RPQ answering maintains the same complexity as conjunctive queries: 2ExpTime-complete in combined complexity (ExpTime-complete with bounded arity) and PTime-complete in data complexity.

Why it matters

Understanding the computational complexity of path queries in knowledge bases is crucial for designing efficient and scalable systems that can reason over complex, interconnected data, especially in domains like semantic web and enterprise data integration.

How to implement this in your domain

  1. 1Evaluate current knowledge graph query performance, especially for complex navigational queries.
  2. 2Consult with knowledge engineering teams to understand the implications of different rule types (linear, guarded existential) on query complexity.
  3. 3Optimize database schema and indexing strategies based on the identified complexity bounds for specific query patterns.
  4. 4Consider using specialized query engines or reasoning systems designed to handle expressive ontologies and path queries efficiently.

Who benefits

Data ManagementSemantic WebEnterprise ITKnowledge Representation

Key takeaways

  • The paper analyzes the complexity of regular path queries in ontology-mediated knowledge bases.
  • For linear existential rules, data complexity for RPQs matches plain graph databases.
  • Combined complexity varies, with bounds on predicate arity reducing it.
  • For guarded rules, (C)RPQ answering complexity aligns with conjunctive queries.

Original post by Jean-Fran\c{c}ois Baget (LIRMM, Inria, University of Montpellier, CNRS, France), Meghyn Bienvenu (Univ. Bordeaux, CNRS, Bordeaux INP, LaBRI, France), Marie-Laure Mugnier (LIRMM, Inria, University of Montpellier, CNRS, France), Micha\"el Thomazo (Inria, DIENS, ENS, PSL University, CNRS, France)

"arXiv:2607.22636v1 Announce Type: new Abstract: Ontology-mediated query answering is concerned with the problem of answering queries over knowledge bases consisting of a database instance and an ontology. While most work in the area focuses on conjunctive queries (CQs), navigatio…"

View on X

Originally posted by Jean-Fran\c{c}ois Baget (LIRMM, Inria, University of Montpellier, CNRS, France), Meghyn Bienvenu (Univ. Bordeaux, CNRS, Bordeaux INP, LaBRI, France), Marie-Laure Mugnier (LIRMM, Inria, University of Montpellier, CNRS, France), Micha\"el Thomazo (Inria, DIENS, ENS, PSL University, CNRS, France) on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses