Skip to main content
QUICK REVIEW

[Paper Review] DGL-KE: Training Knowledge Graph Embeddings at Scale

Da Zheng, Xiang Song|arXiv (Cornell University)|Apr 18, 2020
Advanced Graph Neural NetworksComputer Science17 references36 citations
TL;DR

DGL-KE introduces novel optimizations for scalable training of knowledge graph embeddings on large graphs, achieving substantial speedups over GraphVite and Pytorch-BigGraph across multi-GPU, many-core CPU, and distributed setups.

ABSTRACT

Knowledge graphs have emerged as a key abstraction for organizing information in diverse domains and their embeddings are increasingly used to harness their information in various information retrieval and machine learning tasks. However, the ever growing size of knowledge graphs requires computationally efficient algorithms capable of scaling to graphs with millions of nodes and billions of edges. This paper presents DGL-KE, an open-source package to efficiently compute knowledge graph embeddings. DGL-KE introduces various novel optimizations that accelerate training on knowledge graphs with millions of nodes and billions of edges using multi-processing, multi-GPU, and distributed parallelism. These optimizations are designed to increase data locality, reduce communication overhead, overlap computations with memory accesses, and achieve high operation efficiency. Experiments on knowledge graphs consisting of over 86M nodes and 338M edges show that DGL-KE can compute embeddings in 100 minutes on an EC2 instance with 8 GPUs and 30 minutes on an EC2 cluster with 4 machines with 48 cores/machine. These results represent a 2x~5x speedup over the best competing approaches. DGL-KE is available on https://github.com/awslabs/dgl-ke.

Motivation & Objective

  • Motivate scalable embedding training for huge knowledge graphs with millions of nodes and billions of edges.
  • Develop and implement optimizations to improve data locality, reduce communication, and overlap computation for KGE training.
  • Provide an open-source package (DGL-KE) built on DGL, PyTorch/MXNet, and a distributed KVStore to enable large-scale training.

Proposed method

  • Partition the knowledge graph across computing units to minimize cross-partition data movement.
  • Use METIS-based graph partitioning to co-locate embeddings with triplets and reduce inter-machine communication.
  • Implement joint and degree-based negative sampling to reduce memory movement and produce harder negatives.
  • Partition relation embeddings and propagate sparse reads/updates to minimize data transfer for many relations.
  • Overlap gradient updates with batch processing to hide CPU-GPU latency and improve throughput.
  • Introduce periodic synchronization and a distributed key-value store to coordinate training across machines.

Experimental results

Research questions

  • RQ1How can knowledge graph embeddings be trained efficiently at scale on graphs with tens of millions of nodes and hundreds of millions of edges?
  • RQ2What combination of graph partitioning, negative sampling, and data placement optimizations yields the best trade-offs between speed and embedding quality?
  • RQ3Can asynchronous, multi-processing and distributed training achieve competitive embedding quality while reducing data transfer and memory bottlenecks?
  • RQ4How does DGL-KE’s performance compare to existing tools (GraphVite, PBG) on large-scale knowledge graphs?
  • RQ5What are the practical impacts of relation partitioning and overlapping gradient updates on training throughput and model accuracy?

Key findings

  • DGL-KE achieves substantial speedups, e.g., 100 minutes on an 8-GPU EC2 instance and 30 minutes on a 4-machine cluster with 48 cores per machine for a graph with 86M nodes and 338M edges, compared to competing approaches.
  • Joint negative sampling reduces data movement by up to ~40x in multi-GPU setups and improves tensor operation efficiency.
  • Degree-based negative sampling improves model accuracy on large graphs like Freebase, even though it may not increase training speed.
  • Overlapping gradient updates between CPUs and GPUs yields around 40% speedup for many models on large graphs while maintaining accuracy.
  • Relation partitioning substantially reduces data movement and yields significant speedups, particularly for models with large relation-related parameters (e.g., TransR).
  • Overall, DGL-KE scales nearly linearly with the number of GPUs and can train complex KGE models within hours on large graphs, outperforming GraphVite and PBG in reported experiments.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.