Inductive Relation Prediction Using Analogy Subgraph Embeddings

Jiarui Jin, Yangkun Wang, Kounianhua Du, Weinan Zhang, Zheng Zhang, David Wipf, Yong Yu, Quan GanICLR 2022

TL;DR

GraphANGEL is a novel framework for predicting relations in heterogeneous graphs that can generalize to unseen relation types—a feat most existing models cannot achieve. By treating relation prediction as a subgraph analogy problem rather than a vector-embedding task, it achieves state-of-the-art performance while providing human-readable explanations for its predictions.

The Challenge: Transductive vs. Inductive Relation Prediction

Most modern methods for relation prediction (such as those used in knowledge graphs or recommender systems) rely on learning latent representations—or embeddings—for specific nodes and relations. This creates a "transductive" limitation: the model can only predict relations it has already seen during training.

While some recent Graph Neural Networks (GNNs) have become "inductive" for nodes (meaning they can handle new users or items), they remain transductive for relations. If a new type of interaction or a new category of knowledge appears, these models typically need to be retrained from scratch. The underlying challenge is that, unlike nodes, it is topologically difficult to define a "neighborhood" for a relation type to facilitate inductive learning.

Methods: The GraphANGEL Framework

To overcome this limitation, the authors propose GraphANGEL (ANalogy SubGraph Embedding Learning). Instead of learning a fixed vector for a relation $r$, the model learns to identify graph patterns that act as logical rules.

Conceptual illustration of GraphANGEL comparing a target pattern to supporting and refuting subgraphs to predict a relation.

The core workflow involves extracting and comparing three types of patterns:

  1. Target Pattern: The local subgraph surrounding a node pair $(s, t)$ where we want to predict if relation $r$ exists.
  2. Supporting Pattern: Subgraphs elsewhere in the graph that are known to contain the relation $r$. These serve as "evidence" of what $r$ looks like topologically.
  3. Refuting Pattern: Subgraphs that share the same shape as the others but specifically do not contain relation $r$, serving as a negative baseline.

The "Aha!" Moment: The model predicts the existence of a relation by checking if the Target subgraph is more similar to the Supporting set than the Refuting set.

The GraphANGEL architecture, showing how target, supporting, and refuting patterns are extracted and encoded to compute similarity scores.

Technically, the model uses a single-layer R-GCN to encode subgraphs and a co-attention mechanism to measure similarity between sets of subgraphs. Because the model learns the process of comparing patterns rather than memorizing the relations themselves, it can be applied to entirely new relation types without further training.

Key Insights and Ideas

  • Logic as Topology: The authors bridge the gap between symbolic logic and GNNs. For example, a 3-cycle pattern can represent a rule like: If Person E watches Arsenal and Arsenal is based in London, then Person E lives in London.
  • Relation-Agnostic Architecture: By focusing on the analogy between subgraphs, the model avoids learning relation-specific parameters. This is why it generalizes so well to unseen categories.
  • Explainability via Attention: Because the model uses an attention mechanism over discovered patterns, it can produce "heat maps." These maps show exactly which logical rules (e.g., "Users who buy the same book") the model relied on to make a specific prediction.

Datasets and Key Results

The model was evaluated across two major domains: Heterogeneous Graph Recommendation (LastFM, Yelp, Amazon, Douban Book) and Knowledge Graph Completion (FB15k-237, WN18RR). To test inductive capabilities, the authors constructed new benchmarks by randomly removing 5% to 20% of relation types during training.

  • Superior Performance: GraphANGEL consistently outperformed strong baselines like HAN, HGT, and R-GCN. On the Douban Book dataset, it achieved an AUC of 0.9410, significantly higher than the best baseline (0.9253).
  • Robustness to New Relations: In the inductive tests (where 20% of relations were hidden during training), GraphANGEL's performance dropped by roughly 37-44%. In contrast, traditional models failed completely or dropped by over 50-60%, even when enhanced with external rule-estimation tools.
  • Efficiency: Despite subgraph matching being a historically slow process, the authors optimized the retrieval of 3-cycle and 4-cycle patterns, making the training and inference times comparable to or faster than complex transformers like HGT.

Limitations and Future Work

The authors acknowledge two primary limitations:

  1. Topological Distance: GraphANGEL relies on finding local cycles (3-cycles or 4-cycles). If the two nodes being queried are topologically far apart or disconnected, the model struggles to find the necessary patterns to make a prediction.
  2. Pattern Complexity: The current implementation focuses on simple 3-node and 4-node cycles. While effective, it may miss more complex, long-chain logical rules.

Moving forward, the team plans to extend GraphANGEL to handle more complex compositional logical rules and explore more sophisticated subgraph searching algorithms to accommodate extremely large-scale dynamic graphs.

Summary updated

BibTeX
@inproceedings{jin2022inductive,
  author = {Jiarui Jin and Yangkun Wang and Kounianhua Du and Weinan Zhang and Zheng Zhang and David Wipf and Yong Yu and Quan Gan},
  title = {{Inductive Relation Prediction Using Analogy Subgraph Embeddings}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=Z05KMWi8Eg},
}
Figure