Understanding Expressivity of GNN in Rule Learning
Haiquan Qiu, Yongqi Zhang, Yong Li, Quanming Yao
TL;DR
The paper addresses how expressive modern GNNs are for learning logical rules in knowledge graphs by unifying tail-entity–scoring GNNs under the QL-GNN framework and analyzing their rule-learning capacity through graded modal logic. It shows QL-GNN can learn rule formulas in the class $ ext{CML}[G,\mathsf{h}]$, with examples like chain-like and inductive rules, and provides a Corollary for constructive rule formation. To overcome limitations, it introduces EL-GNN, which labels additional entities using a degree-based scheme to capture more complex rule structures, at linear time cost, and demonstrates improved expressivity. Empirical results on synthetic and real KG datasets validate the theory and illustrate that EL-GNN often outperforms strong baselines (NBFNet, RED-GNN), providing a principled approach to designing labeling strategies for rule learning in KG reasoning.
Abstract
Rule learning is critical to improving knowledge graph (KG) reasoning due to their ability to provide logical and interpretable explanations. Recently, Graph Neural Networks (GNNs) with tail entity scoring achieve the state-of-the-art performance on KG reasoning. However, the theoretical understandings for these GNNs are either lacking or focusing on single-relational graphs, leaving what the kind of rules these GNNs can learn an open problem. We propose to fill the above gap in this paper. Specifically, GNNs with tail entity scoring are unified into a common framework. Then, we analyze their expressivity by formally describing the rule structures they can learn and theoretically demonstrating their superiority. These results further inspire us to propose a novel labeling strategy to learn more rules in KG reasoning. Experimental results are consistent with our theoretical findings and verify the effectiveness of our proposed method. The code is publicly available at https://github.com/LARS-research/Rule-learning-expressivity.
