Inductive Relation Prediction by Subgraph Reasoning

Komal K. Teru, Etienne G. Denis, William L. HamiltonICML 2020

TL;DR

GraIL (Graph Inductive Learning) is a novel framework that enables Knowledge Graph (KG) models to predict relationships between entirely unseen entities. By shifting the focus from learning specific entity embeddings to reasoning over local subgraph structures, GraIL achieves state-of-the-art results in inductive settings and demonstrates that Graph Neural Networks (GNNs) can effectively learn entity-independent logical rules.

The Challenge: Transductive vs. Inductive Learning

Most modern Knowledge Graph completion methods rely on transductive learning. They represent entities (like "LeBron James" or "Los Angeles") as high-dimensional vectors (embeddings). While powerful, these models suffer from a major limitation: they only work for the specific entities encountered during training. If a new user is added to a social network or a new molecule to a biomedical database, a transductive model is blind to them unless the entire system is retrained.

Transductive vs. Inductive Inference

The field's ongoing challenge is moving toward inductive learning—the ability to reason about relationships based on the structure of the graph rather than the identity of the nodes. For example, if a model learns the rule, "If X is married to Y and Y lives in Z, then X likely lives in Z," it should be able to apply that logic to any X, Y, and Z, even if it has never encountered those specific entities before.

Methodology: GraIL's Subgraph Reasoning

To solve this, the authors introduce GraIL, which treats relation prediction as a subgraph reasoning problem. Instead of looking at the whole graph or relying on global embeddings, GraIL follows a three-step pipeline for any candidate triplet $(u, r, v)$:

  1. Subgraph Extraction: GraIL extracts an "enclosing subgraph" consisting of all nodes that lie on paths between the head node $u$ and tail node $v$. This limits the search space to the local evidence most likely to contain logical clues.
  2. Double Radius Node Labeling: Because GraIL cannot use entity names or IDs (which would break inductivity), it needs a way to tell the GNN "where" it is in the subgraph. It labels each node with a tuple $(d(i, u), d(i, v))$, representing its shortest distance to the two target nodes. This provides a purely structural coordinate system.
  3. GNN Scoring: The labeled subgraph is processed by a Relational Graph Convolutional Network (R-GCN) featuring an edge-attention mechanism. This allows the model to weigh different paths dynamically. The final output is a score representing the likelihood of the relation $r$ existing between $u$ and $v$.

Datasets and Evaluation

The authors evaluated GraIL on three standard Knowledge Graph benchmarks: WN18RR, FB15k-237, and NELL-995.

Crucially, they produced new inductive versions of these datasets (v1 through v4). In these versions, the entities in the test set are entirely disjoint from those in the training set. This strict separation ensures the model is forced to generalize based on relational patterns rather than memorizing entity positions.

Key Insights and Results

  • Relational Semantics over Entity Identity: The core insight of GraIL is that the logic of a graph is often independent of its specific nodes. By stripping away entity IDs and using distance-based labeling, the model is forced to learn "relational semantics"—the underlying rules of the domain.
  • GNNs as Logic Engines: The paper provides a theoretical proof showing that GraIL’s architecture can represent a useful subset of first-order logic (specifically, Horn clauses). This helps bridge the gap between deep learning and symbolic logic.
  • Parameter Efficiency: Because GraIL doesn't store a massive table of embeddings for every entity in the graph, it is incredibly lean. It uses orders of magnitude fewer parameters than previous inductive methods like Neural-LP or DRUM.
Parameter Efficiency Comparison
  • Inductive Superiority: GraIL outperformed existing rule-induction baselines across almost all inductive benchmarks, achieving an average relative increase of 5.25% in AUC-PR and 6.75% in Hits@10. It successfully predicted relations in graphs where it had seen 0% of the entities during training.
  • Complementary Strengths (Transductive Boost): The authors found that GraIL captures different information than traditional embedding models. When ensembled with models like TransE or RotatE in a standard transductive setting, GraIL significantly boosted performance, suggesting it provides a "structural" perspective that embeddings miss.

Limitations and Future Work

  • Inference Complexity: Unlike embedding models where prediction is a simple dot product, GraIL requires extracting a subgraph and running a GNN for every candidate edge. This makes it computationally heavier during inference.
  • Interpretability: While GraIL learns logical rules implicitly, it doesn't output human-readable rules (e.g., "X is the spouse of Y"). Extracting these interpretable rules remains a promising future direction.
  • Scalability: While the subgraphs are local, very dense graphs might result in large subgraphs that slow down the GNN. Future work could involve more aggressive subgraph pruning or sampling techniques.

Summary updated

BibTeX
@inproceedings{teru2020inductive,
  author = {Komal K. Teru and Etienne G. Denis and William L. Hamilton},
  title = {{Inductive Relation Prediction by Subgraph Reasoning}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
}
Figure