Exploring the Limits of Few-Shot Link Prediction in Knowledge Graphs

Dora Jambor, Komal Teru, Joelle Pineau, William L. Hamilton

TL;DR

Few-shot link prediction models for knowledge graphs are designed to learn new relations from just a few examples. This paper reveals a surprising truth: current state-of-the-art models largely ignore relational logic and instead exploit coarse-grained entity positions (community structures). In fact, a simple zero-shot baseline that completely ignores relation-specific examples performs remarkably well, challenging the implicit assumptions of prior meta-learning approaches.

What Problem Does This Paper Address?

Knowledge graphs (KGs) are structured representations of real-world facts, composed of entities (nodes) and relations (edges). Because real-world KGs are notoriously incomplete and often contain many low-frequency relations, researchers use few-shot link prediction to predict missing links for newly introduced relations given only a tiny "support set" of $K$ example facts.

Figure 1: The few-shot link prediction task

While complex meta-learning frameworks have recently shown promising results on this task, the authors of this paper ask a fundamental question: Are these models actually learning fine-grained relational semantics (like logical rules), or are they just exploiting shortcuts in the graph's topology?

Methods

To probe the limits of few-shot learning in KGs, the authors systematically strip down a state-of-the-art meta-learning model (MetaR) into progressively simpler baselines:

  1. MetaR (State of the Art): Uses a neural network (RelLearner) to extract relation embeddings from the support set and refines them using meta-gradients.
  2. SharedEmbed: Replaces relation-specific initial embeddings with a single shared global embedding ($r_g$), relying only on the meta-gradient step for relation-specific information.
  3. ZeroShot: Completely removes the support set and meta-gradients, using the exact same global embedding ($r_g$) for all test relations.
  4. R-GCN: Integrates a Graph Convolutional Network to explicitly test if injecting structural neighborhood bias improves performance.

To isolate what kind of information these models actually utilize, the authors also introduce Null Models to generate synthetic relations of two distinct types:

  • Structural Null Relations: Synthetic edges that strictly follow simple logical rules (symmetry or transitivity).
  • Positional Null Relations: Synthetic edges based entirely on the global community structure of the graph (nodes belonging to the same cluster).

Datasets

The models were evaluated on two standard real-world few-shot KG benchmarks:

  • Nell-One
  • Wiki-One

Additionally, the authors evaluated the models on synthetic datasets generated by applying their structural and positional null models to the largest connected components of Nell-One and Wiki-One.

Key Insights and Ideas

  • The Zero-Shot Surprise: A baseline that completely ignores the few-shot examples (ZeroShot) performs remarkably well on standard benchmarks. This implies that pre-existing entity embeddings carry the vast majority of the predictive power.
  • Position Over Structure: When tested on synthetic data, models excel at predicting links based on community structure (positional closeness) but fail completely at learning logical rules like symmetry or transitivity.
  • Information Scarcity: In a standard $K$-shot setup, $K$ randomly sampled examples are mathematically and practically insufficient to provide conclusive evidence of logical properties like transitivity.
  • Entity Popularity Bias: In datasets like Nell-One, model performance heavily correlates with how frequently the support set entities appear in the training graph, indicating a reliance on node popularity rather than relational understanding.

Key Results

  • Real Data Performance: On Nell-One (5-shot), the stripped-down SharedEmbed baseline achieves a 49.5% Hits@10, nearly identical to MetaR's 50.0%. Even the ZeroShot baseline achieves a solid 36.5% Hits@10 without seeing a single example of the relation.
  • Synthetic Data Performance: As shown in the null model experiments, all models score near zero on symmetric and transitive relations but perform exceptionally well on positional relations.
Figure 2: Average Hits@10 on synthetically generated relations using our proposed null models.
  • Entity Frequency Correlation: The authors found a strong Pearson correlation between a model's performance (MRR) and the log frequency of support set entities in Nell-One, confirming that the models exploit entity popularity shortcuts.
Figure 3: Pearson’s R between MRR and the log fre- quency of support set entities in training graph. We ob- serve strong correlation for Nell-One, but not for Wiki- One. For more details on this, see Appendix C.

Limitations and Future Work

The authors acknowledge that the lack of correlation between entity frequency and performance in Wiki-One is likely due to "hub nodes" (highly connected entities) adding noise to the embeddings.

The core takeaway is a critique of the current task formulation: randomly sampling $K$ support examples fundamentally limits a model's ability to infer logical rules. The authors argue that future research in few-shot link prediction must move away from random sampling and instead focus on a more careful, structured construction of the support set to scaffold the learning of actual logical patterns.

Summary updated

Abstract

Real-world knowledge graphs are often characterized by low-frequency relations - a challenge that has prompted an increasing interest in few-shot link prediction methods. These methods perform link prediction for a set of new relations, unseen during training, given only a few example facts of each relation at test time. In this work, we perform a systematic study on a spectrum of models derived by generalizing the current state of the art for few-shot link prediction, with the goal of probing the limits of learning in this few-shot setting. We find that a simple zero-shot baseline - which ignores any relation-specific information - achieves surprisingly strong performance. Moreover, experiments on carefully crafted synthetic datasets show that having only a few examples of a relation fundamentally limits models from using fine-grained structural information and only allows for exploiting the coarse-grained positional information of entities. Together, our findings challenge the implicit assumptions and inductive biases of prior work and highlight new directions for research in this area.
BibTeX
@inproceedings{jambor2021exploring,
  author = {Dora Jambor and Komal Teru and Joelle Pineau and William L. Hamilton},
  title = {{Exploring the Limits of Few-Shot Link Prediction in Knowledge Graphs}},
  booktitle = {EACL},
  year = {2021},
  doi = {10.18653/v1/2021.eacl-main.245},
}
Figure