🤖 AI Summary
Existing graph neural networks (GNNs) for knowledge graph link prediction lack interpretability—particularly under scoring-function-based decoding—making it difficult to extract faithful, verifiable logical rules.
Method: This work introduces monotonicity into the scoring-function framework for GNNs, proposing Monotonic GNNs that enforce a monotonic dependency between predictions and input subgraphs. Building on this, we design a formally verifiable Datalog rule extraction mechanism that systematically translates model predictions into equivalent logic programs. Our approach integrates knowledge graph embedding, formal verification, and logical expressivity analysis.
Contribution/Results: The method achieves high predictive accuracy and strong interpretability across multiple benchmarks. It generates numerous semantically clear and logically sound Datalog rules, and—crucially—establishes, for the first time, an expressivity correspondence between scoring-based GNNs and Datalog.
📝 Abstract
Graph neural networks (GNNs) are often used for the task of link prediction: predicting missing binary facts in knowledge graphs (KGs). To address the lack of explainability of GNNs on KGs, recent works extract Datalog rules from GNNs with provable correspondence guarantees. The extracted rules can be used to explain the GNN's predictions; furthermore, they can help characterise the expressive power of various GNN models. However, these works address only a form of link prediction based on a restricted, low-expressivity graph encoding/decoding method. In this paper, we consider a more general and popular approach for link prediction where a scoring function is used to decode the GNN output into fact predictions. We show how GNNs and scoring functions can be adapted to be monotonic, use the monotonicity to extract sound rules for explaining predictions, and leverage existing results about the kind of rules that scoring functions can capture. We also define procedures for obtaining equivalent Datalog programs for certain classes of monotonic GNNs with scoring functions. Our experiments show that, on link prediction benchmarks, monotonic GNNs and scoring functions perform well in practice and yield many sound rules.