NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Explaining Link Predictions in Knowledge Graph Embedding Models with Influential Examples

Adrianna Janik, Luca Costabello

TL;DR

Knowledge Graph Embedding (KGE) models can predict missing facts with high accuracy, but they operate as opaque black boxes that are ill-suited for high-stakes domains like medicine and drug discovery. ExamplE is a post-hoc, example-based interpretability framework that identifies the most influential training triples behind a prediction by searching the latent embedding space. It cuts explanation runtime from several minutes down to roughly five seconds per triple compared to existing gradient-tracing methods.

What Problem Does This Paper Address?

Knowledge Graph Embedding models (such as TransE, DistMult, and ComplEx) learn low-dimensional vector representations of entities and relations to predict missing links. However, these models lack transparency: when a model predicts a connection between two nodes, it cannot inherently explain why.

Prior interpretability methods face steep trade-offs:

  • Retraining-based brute force (removing links one by one to observe impact) is computationally impossible on large graphs.
  • Gradient-tracking methods (like GradientRollback) require custom training regimes and consume vast amounts of memory to store per-triple gradient updates, taking minutes per explanation.
  • Standard prediction metrics are rank-based rather than calibrated probabilities, making slight changes difficult to interpret quantitatively.

The authors set out to answer: How can we produce human-understandable, pertinent explanations for link predictions on large knowledge graphs under realistic time and memory budgets?

Methods

The authors introduce ExamplE, a fast, post-hoc heuristic inspired by case-based reasoning. Rather than recalculating gradients across training history, ExamplE reverse-engineers the latent space representation of a target triple $t = (s, p, o)$ through four stages:

  1. Latent Space Sampling: Using nearest-neighbor search, it identifies the $m$ closest entities to head $s$ and tail $o$ in the embedding space.
  2. Candidate Filtering: It takes the Cartesian product of the nearest heads and tails, filtering down to triples that actually exist in the training graph under the target relation $p$.
  3. Neighborhood Aggregation (Prototype Graph): It extracts $n$-hop neighborhoods around the retrieved example triples and aggregates them into a sub-graph using either strict (intersection) or permissive (union + intersection) rules.
  4. Explanation Graph Assembly & Scoring: The method pools the prototype graph, the candidate examples, and the target triple. Each candidate triple is scored by its average latent distance to the target's subject, object, and predicate. Lower distances denote higher influence.

The framework requires calibrated probabilities (so model predictions reflect true likelihoods rather than unbounded scores) and works independently of the underlying KGE architecture.

Datasets

The authors evaluated their method using standard knowledge graph benchmarks:

  • FB15k-237: A widely used subset of Freebase with inverse relations removed (14,541 entities).
  • WN18RR: A hierarchical, lexical graph derived from WordNet.
  • CoDEX-M: Used to illustrate qualitative, human-readable explanations.

Key Insights and Ideas

  • Analogous cases as intuitive explanations: Grounding explanations in existing training instances (analogous to past clinical cases in medicine) offers a much more natural conceptual model for human users than node-weight attribution scores.
  • Latent proximity mirrors influence: Triples that cluster near the target in latent space with the same predicate serve as reliable stand-ins for full influence functions, avoiding expensive gradient rollbacks.
  • Evaluation dynamics change across training epochs: Through "Remove-and-Retrain" protocols, the authors found that probability drops caused by removing influential triples are sharpest early in retraining (e.g., epoch 10) before the model gradually recovers predictive power by epoch 100. Evaluating interpretability via retraining must account for this temporal training trajectory.

Key Results

  • Massive Speedup: On FB15k-237, ExamplE generates explanations in 5.09 seconds per triple, compared to $6 \pm 7$ minutes required by GradientRollback—reducing computation from minutes to seconds.
  • Remove-and-Retrain (ROAR): On FB15k-237, removing all identified explanation triples reduced target triple probability by 5.7% at epoch 10. On WN18RR, removing explanation triples caused an immediate probability drop of 1.7% at epoch 10.
  • Reversed ROAR (rev-ROAR): When all triples of a given relation were stripped from the dataset except the single most influential triple identified by ExamplE, the model recovered from an initial 70% probability drop at epoch 10 down to just a 0.23% difference by epoch 100 on FB15k-237.
  • Complexity: Best-case inference complexity scales efficiently at $\mathcal{O}(m \log e)$ using KD-Trees, where $e$ is the entity count and $m$ is the neighbor count.

Limitations and Future Work

  • Heuristic Nature: The method relies on heuristic latent-space similarity rather than provable influence bounds. The authors note ongoing research to provide theoretical estimation guarantees.
  • Limited Scope of Comparison: Quantitative retraining experiments in this extended abstract focused primarily on TransE, leaving systematic comparisons against other baselines and models across all settings to future work.
  • Extension to GNNs: The current implementation is tailored to standard KGE models; the authors plan to evaluate and adapt the framework to Graph Neural Networks (GNNs).

Summary updated

BibTeX
@inproceedings{janik2023explaining,
  author = {Adrianna Janik and Luca Costabello},
  title = {{Explaining Link Predictions in Knowledge Graph Embedding Models with Influential Examples}},
  booktitle = {LoG},
  year = {2023},
  url = {https://openreview.net/forum?id=eOwYHXDaHn},
}
Figure