Distributed Incremental Ontology Reasoning over Dynamic T-boxes
Bruno Rucy Carneiro Alves de Lima, Merlin Kramer, Victor Henrique Cabral Pinheiro · 2024
With the advent of Retrieval Augmented Generation (RAG), Knowledge Graphs (KGs) have yet again had a surge in interest in both Academia and Industry, as their use allows for extending the context of Large Language Models (LLMs) by combining traditional vector search with reasoning over Ontologies or Property Graphs encoded as KGs.RAG is a highly dynamic scenario, where the LLM agent might not only retrieve information from a KG or vector store but mutate it as well.This implies eventually there being a greater demand for equally-dynamic KG reasoning systems.We provide a solution to this for the popular ontology language RDF-Schema (RDFS) by showing that computing entailment as a bottom-up query over RDFS graphs with dynamic Terminological Boxes (TBox) and Assertional Boxes (ABox), those where edges and nodes belonging to both boxes can be freely added and removed, can be expressed as an incremental DBSP computation.This computation is then implemented with the distributed computation framework Differential Dataflow (DD), that subsumes DBSP, and compared with a state-of-the-art commercial ontology reasoner.We find that our approach provides more even performance across additions and deletions and a higher potential for scalability across benchmarks with up to 250 GBs of data.