TLDR: This paper introduces a novel approach to enhance the explainability of Graph Neural Networks (GNNs) used for link prediction in knowledge graphs. By adapting GNNs and their scoring functions to be ‘monotonic’ (meaning outputs don’t decrease with increased inputs), the researchers enable the extraction of sound and faithful Datalog rules. These rules provide clear explanations for GNN predictions without significantly compromising performance, as demonstrated through experiments on various datasets.
In the rapidly evolving landscape of artificial intelligence, Graph Neural Networks (GNNs) have emerged as powerful tools, particularly for tasks involving complex, interconnected data like knowledge graphs. Knowledge graphs (KGs) are essentially vast networks of facts, representing relationships between entities. A common application for GNNs in this domain is ‘link prediction’ – identifying missing connections or facts within these graphs. However, a significant challenge with GNNs, like many advanced AI models, is their ‘black box’ nature: it’s often difficult to understand *why* they make a particular prediction.
The Explainability Challenge
Traditional GNNs, especially those that use a ‘scoring function’ to translate their internal computations into predictions, lack inherent explainability. When a GNN predicts a new link, it’s hard to trace back the reasoning behind that decision. This is a critical limitation in many real-world applications where trust, verification, and interpretability are paramount. While some earlier works attempted to extract logical rules from GNNs, they often focused on simpler models or restricted forms of link prediction, not encompassing the popular and more general approach involving scoring functions.
A Novel Approach: Monotonic GNNs and Scoring Functions
A recent research paper, “Logical Expressivity and Explanations for Monotonic GNNs with Scoring Functions”, tackles this very problem. Authored by Matthew Morris, David J. Tena Cucala, and Bernardo Cuenca Grau, the paper introduces a groundbreaking method to make GNNs with scoring functions more transparent and explainable. Their core idea revolves around making both the GNN and its scoring function ‘monotonic’.
What does ‘monotonic’ mean in this context? Simply put, a monotonic model ensures that if you add more information (facts) to the input knowledge graph, the model’s output values will never decrease. This property is crucial because it allows for the extraction of ‘sound’ Datalog rules. Datalog is a declarative logic programming language, and rules extracted in this format can serve as clear, verifiable explanations for the GNN’s predictions. These rules are ‘faithful’ to the model, meaning they accurately reflect the model’s behavior.
The researchers show how many popular scoring functions, which are mathematical functions used to assign a score to a potential link, can be adapted to be monotonically increasing. This involves restricting their parameters (like weights in a neural network) to be non-negative and ensuring any non-linear activation functions are also monotonically increasing and non-negative (e.g., using ReLU).
Extracting Sound Rules and Understanding Expressivity
A key contribution of the paper is providing a concrete method for checking whether a given Datalog rule is ‘sound’ for a monotonic GNN with a monotonic scoring function. This allows them to systematically identify rules that accurately explain the model’s behavior. Furthermore, they explore how the choice of scoring function family (e.g., RESCAL, DistMult) influences the logical patterns or types of rules that the combined GNN-scoring function model can capture. This helps in understanding the inherent expressive power and limitations of different model architectures.
For certain classes of monotonic GNNs (specifically, those using ‘max aggregation’ or ‘max-sum aggregation’ with non-negative bilinear scoring functions), the paper also defines procedures to obtain ‘equivalent Datalog programs’. This means they can generate a finite set of Datalog rules that perfectly mimic the behavior of the GNN and scoring function, providing a complete logical characterization of the model’s expressivity.
Experimental Validation
The theoretical advancements are backed by practical experiments on standard link prediction datasets like WN18RRv1, fb237v1, and nellv1, as well as specialized LogInfer datasets designed to test rule learning. The results are highly encouraging: restricting the GNNs and scoring functions to be monotonic generally did not lead to a significant drop in performance. In some cases, it even led to an increase in accuracy, suggesting that monotonicity might help prevent overfitting. Crucially, the experiments demonstrated that a substantial number of sound Datalog rules could indeed be extracted from these monotonic models, validating the proposed methodology for explainability.
Also Read:
- Refining Knowledge Graph Searches with User-Defined Preferences
- Guiding Multi-Agent Planning with Graph Neural Networks
Conclusion
This research marks a significant step towards building more transparent and trustworthy AI systems. By demonstrating how to adapt GNNs and scoring functions to be monotonic, and by providing methods to extract faithful Datalog rules, Matthew Morris, David J. Tena Cucala, and Bernardo Cuenca Grau have opened new avenues for understanding, verifying, and explaining complex GNN predictions in knowledge graphs. This work not only enhances the interpretability of GNNs but also offers insights into their logical expressivity, paving the way for more reliable and accountable AI applications.


