Learning Rule-Induced Subgraph Representations for Inductive Relation Prediction

Tianyu Liu, Qitan Lv, Jie Wang, Shuling Yang, Hanzhu Chen · DOI

Abstract

Inductive relation prediction (IRP) — where entities can be different during training and inference — has shown great power for completing evolving knowledge graphs. Existing works mainly focus on using graph neural networks (GNNs) to learn the representation of the subgraph induced from the target link, which can be seen as an implicit rule-mining process to measure the plausibility of the target link. However, these methods cannot differentiate the target link and other links during message passing, hence the final subgraph representation will contain irrelevant rule information to the target link, which reduces the reasoning performance and severely hinders the applications for real-world scenarios. To tackle this problem, we propose a novel single-source edge-wise GNN model to learn the Rule-inducEd Subgraph represenTations (REST), which encodes relevant rules and eliminates irrelevant rules within the subgraph. Specifically, we propose a single-source initialization approach to initialize edge features only for the target link, which guarantees the relevance of mined rules and target link. Then we propose several RNN-based functions for edge-wise message passing to model the sequential property of mined rules. REST is a simple and effective approach with theoretical support to learn the rule-induced subgraph representation. Moreover, REST does not need node labeling, which significantly accelerates the subgraph preprocessing time by up to 11.66x. Experiments on inductive relation prediction benchmarks demonstrate the effectiveness of our REST.

Introduction

Knowledge Graphs (KGs) like Wikidata or Freebase are dynamic, with new entities and relations emerging constantly. Inductive Relation Prediction (IRP) is the task of predicting links between entities that were not present in the dataset during training. The current state-of-the-art involves extracting a local subgraph around a potential link and using Graph Neural Networks (GNNs) to determine if the surrounding structure supports that link.

However, standard GNN approaches suffer from a "noise" problem: they treat every edge in the subgraph with equal importance. This leads the model to learn "irrelevant rules"—patterns in the graph that exist but have no logical connection to the specific target link. Furthermore, previous methods relied on complex "node labeling" schemes that made data preprocessing computationally expensive and slow.

Figure 1: Illustration of relevant vs. irrelevant rules. Relevant rules form cycles containing the target link, while irrelevant rules do not.

Methodology: The REST Framework

We propose REST (Rule-inducEd Subgraph represenTations), which shifts the focus from nodes to edges and introduces two primary innovations to isolate relevant logical rules.

Single-source Initialization

Instead of initializing every edge or node in the subgraph, REST only initializes the "target link" (the link being predicted) with a non-zero embedding. Every other edge starts at zero. This ensures that any information flowing through the GNN must originate from the target link, effectively "tagging" only the paths (rules) that are logically relevant to it. This naturally discovers cycles that include the target link while ignoring "floating" cycles elsewhere in the subgraph.

Edge-wise Message Passing

While conventional GNNs update node features, REST updates edge features directly. It treats paths in the graph as sequences. To capture the sequential nature of logical rules (e.g., A is the father of B AND B is the father of C implies A is the grandfather of C), REST uses RNN-based functions, such as Gated Recurrent Units (GRUs) for message passing and LSTMs for updating edge states. This is significantly more powerful for modeling path-like logic than standard graph operators.

Figure 5: Comparison between (b) conventional node-based message passing and (c) the proposed edge-wise message passing framework with single-source initialization.

Crucially, REST completely skips the "node labeling" step used by predecessors like GraIL, which is the primary driver of its massive speedup.

Experimental Evaluation

REST was evaluated on standard inductive benchmarks derived from three major KGs: WN18RR (lexical relations), FB15k-237 (general knowledge), and NELL-995 (language learning data).

  • Performance: REST achieved significant improvements in Hits@10. On the WN18RR dataset, it outperformed the previous best subgraph-based methods by an average of 17.89%.
  • Efficiency: By eliminating node labeling, REST reduced subgraph preprocessing time by up to 11.66x on the FB15k-237 dataset.
  • Interpretability: The model can score specific cycles, allowing researchers to see which logical chains (e.g., identifying that "similar_to" and "hypernym" relations form a strong logical chain) the model used to make a prediction.

Conclusion

REST offers a simple yet effective approach to learning rule-induced subgraph representations. By utilizing single-source initialization and edge-wise RNN message passing, it filters out irrelevant noise and focuses on the logical structure of the target link. This results in superior performance and dramatic improvements in preprocessing efficiency, making it a viable candidate for real-world, evolving knowledge graph applications.

Summary updated

BibTeX
@inproceedings{liu2023learning,
  author = {Tianyu Liu and Qitan Lv and Jie Wang and Shuling Yang and Hanzhu Chen},
  title = {{Learning Rule-Induced Subgraph Representations for Inductive Relation Prediction}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=RHDXkRPNQa},
}
Figure