PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
April 26, 2026Artificial Intelligence0 citationsOpen Access

From Monotonic Graph Neural Networks to Datalog and Back: Expressive Power and Practical Applications

View Full Paper
DCDavid Tena CucalaBGBernardo Cuenca GrauBMBoris Motik

Key Points

  • This study aims to explore the relationship between transformations by GNNs and Datalog rules in knowledge graphs.
  • Developed an algorithm to verify soundness of Datalog rules against GNNs.
  • Introduced an algorithm to justify facts derived by GNNs through corresponding rules.
  • Analyzed the expressive power of monotonic max-sum GNNs and their equivalence to Datalog programs.
  • Established soundness algorithms for verifying Datalog rules for any GNN input.
  • Identified that each monotonic max-sum GNN can be represented by a corresponding Datalog program.
  • Demonstrated successful training of monotonic max-sum GNNs on standard knowledge graph tasks.

Abstract

Many tasks over knowledge graphs, such as link prediction, can be conceptualised as a problem of learning a transformation of sets of relational facts. Machine learning models such as graph neural networks (GNNs) can be used to realise this transformation, allowing the transformation to be learned from examples. However, it is often difficult to verify formally the properties of such a transformation, or understand why it derives a specific fact. Alternatively, such a transformation can be realised using a set of rules expressed in a knowledge representation language such as Datalog. Formal properties of such a transformation can be verified using symbolic means, and each derived fact can be justified by a rule; however, writing and curating the rules is costly and requires expertise in both the application domain and the formal language. To bridge the gap between these two approaches, in this paper we study the relationship between transformations realised by monotonic max-sum GNNs , a subclass of GNNs with nonnegative weights and max and sum aggregation functions, and transformations realised by Datalog rules. First, we provide an algorithm that can verify whether a given Datalog rule is sound for a network, in the sense that the GNN always derives all consequences of the rule on any input dataset. Second, we provide an algorithm that allows us to justify any fact derived by a GNN by computing a rule that is sound for the GNN and that derives the fact. Third, we study the expressive power of monotonic max-sum GNNs and show that, for each such GNN, one can compute a Datalog program where applying the GNN to any dataset produces the same facts as a single round of application of the program’s rules to the dataset; we also sharpen our result to the subclass of monotonic max GNNs, which use only the max aggregation function, and identify a corresponding class of Datalog programs. Finally, we carry out a practical evaluation and show that monotonic max-sum GNNs can be successfully trained in practice on common knowledge graph tasks, and that extracting rules from max-sum GNNs is practically feasible.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Cucala et al. (2026) studied this question.

synapsesocial.com/papers/69edad8f4a46254e215b53cbhttps://doi.org/10.1016/j.artint.2026.104545
Ask AI
Helpful
Bookmark
Share
View Full Paper