Deductive rules over graph data are a commonly accepted way to address complex reasoning tasks; among them, we mention the company control problem, which consists of determining who exercises control – directly or indirectly, through aggregation and recursion – over ownership graphs. Solving this and similar problems is crucial for the Central Bank of Italy; the Bank uses Vadalog, a state-of-the-art proprietary reasoner based on an extended Datalog, to routinely manage changes (insertions and deletions) of ownership in large graphs covering all Italian companies. However, at a smaller scale, similar activities are also relevant in more targeted activities, e.g., for financial intelligence tasks in the public and private sectors. In this paper, we present a general scheme for generating active rules that correctly handle recursion, aggregation, and stratified negation, so as to deploy reactive reasoners over graph data managers. We show how to convert high-level reasoning rules expressed in Datalog into triggers as Cypher statements, the most aligned language with the recently standardized Graph Query Language. We discuss how Cypher triggers can be managed by a dedicated controller that replicates the reasoning capabilities of a deductive reasoner engine within a graph database system. We implement the controller within Neo4j, the most widespread open-source graph database, demonstrating that our implementation achieves adequate performance over small-to-medium property graphs. We also show that our approach is general and applicable to other domains (e.g., laws), directly allowing reasoning with deductive rules over graph databases. Finally, we discuss how the translation process from Datalog to Cypher can be facilitated by state-of-the-art pre-trained Large Language Models, capable of accurately performing the translation task.

Enabling Light-Weight Reasoning via Cypher Triggers

D. Magnanimi;A. Colombo;A. Bernasconi;S. Ceri;D. Martinenghi
2025-01-01

Abstract

Deductive rules over graph data are a commonly accepted way to address complex reasoning tasks; among them, we mention the company control problem, which consists of determining who exercises control – directly or indirectly, through aggregation and recursion – over ownership graphs. Solving this and similar problems is crucial for the Central Bank of Italy; the Bank uses Vadalog, a state-of-the-art proprietary reasoner based on an extended Datalog, to routinely manage changes (insertions and deletions) of ownership in large graphs covering all Italian companies. However, at a smaller scale, similar activities are also relevant in more targeted activities, e.g., for financial intelligence tasks in the public and private sectors. In this paper, we present a general scheme for generating active rules that correctly handle recursion, aggregation, and stratified negation, so as to deploy reactive reasoners over graph data managers. We show how to convert high-level reasoning rules expressed in Datalog into triggers as Cypher statements, the most aligned language with the recently standardized Graph Query Language. We discuss how Cypher triggers can be managed by a dedicated controller that replicates the reasoning capabilities of a deductive reasoner engine within a graph database system. We implement the controller within Neo4j, the most widespread open-source graph database, demonstrating that our implementation achieves adequate performance over small-to-medium property graphs. We also show that our approach is general and applicable to other domains (e.g., laws), directly allowing reasoning with deductive rules over graph databases. Finally, we discuss how the translation process from Datalog to Cypher can be facilitated by state-of-the-art pre-trained Large Language Models, capable of accurately performing the translation task.
2025
2025 IEEE 41st International Conference on Data Engineering (ICDE)
graph data management
graph database engines
Datalog rules
reactive reasoning
company control
File in questo prodotto:
File Dimensione Formato  
360300e277.pdf

Accesso riservato

: Publisher’s version
Dimensione 1.24 MB
Formato Adobe PDF
1.24 MB Adobe PDF   Visualizza/Apri

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11311/1291227
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 0
  • ???jsp.display-item.citation.isi??? ND
social impact