Scaling Knowledge Graph Embedding Models

Nasrullah Sheikh, Xiao Qin, Berthold Reinwald, Chuan Lei

Introduction

Knowledge Graphs (KGs) represent complex relationships between entities at massive scales, such as Facebook’s social graph or Freebase. While Graph Neural Networks (GNNs) are the state-of-the-art for link prediction in these graphs, they are notoriously difficult to scale. The "n-hop" dependency—where calculating one node's embedding requires data from its neighbors and their neighbors—creates a massive communication bottleneck in distributed systems.

A Distributed Architecture for Scalability

Researchers from IBM and Instacart have introduced a framework that achieves a 16x speedup on large-scale datasets like ogbl-citation2 without sacrificing accuracy. The core of their approach is a distributed training loop designed to eliminate inter-worker data transfer by prioritizing data replication over real-time communication.

The high-level architecture consists of a K-hop message passing encoder and a knowledge graph embedding decoder.

The Three Pillars of the Framework

  1. Self-Sufficient Partitions: The system uses vertex-cut partitioning to divide the graph. By replicating the necessary $n$-hop neighborhood for each partition (neighborhood expansion), each worker becomes "self-sufficient." This upfront replication removes the need for data requests during the training process.
  2. Constraint-Based Negative Sampling: Instead of global sampling, negative edges are sampled locally within each partition. This reduces communication costs and forces the model to learn from more challenging local structures rather than "easy" global negatives.
  3. Edge Mini-Batch Training: Unlike standard vertex-based batching used for classification, this framework uses an edge-centric strategy. This ensures that both head and tail embeddings for a triplet are computed efficiently within the same batch.

Results and Performance

The framework was tested on the FB15k-237 and ogbl-citation2 benchmarks. On the latter, which contains 30 million training edges, the system scaled linearly, reaching a 16x speedup using 8 trainers across 4 nodes. Crucially, metrics like Mean Reciprocal Rank (MRR) and Hits@k remained identical to non-distributed baselines, proving that localized sampling does not incur an "accuracy tax."

Memory Overhead and Future Work

The primary trade-off for this speedup is memory. To ensure self-sufficiency, the number of "support nodes" grows significantly as the number of hops increases.

The average number of nodes grows exponentially (log scale) with the number of hops in the neighborhood expansion.

As shown in the figure above, a 3-hop neighborhood expansion involves orders of magnitude more nodes than a 1-hop expansion. This memory footprint is a key constraint for very dense graphs or deep GNN architectures. Future research will likely focus on more efficient sampling within these partitions to mitigate this overhead while retaining vital structural information.

Summary updated

BibTeX
@inproceedings{sheikh2022scaling,
  author = {Nasrullah Sheikh and Xiao Qin and Berthold Reinwald and Chuan Lei},
  title = {{Scaling Knowledge Graph Embedding Models}},
  booktitle = {EuroMLSys@EuroSys},
  year = {2022},
  url = {https://openreview.net/forum?id=e32l2xrAOgX},
}
Figure