[Paper Review] ParaGraphE: A Library for Parallel Knowledge Graph Embedding
ParaGraphE is a parallel library that accelerates knowledge graph embedding by distributing training across multiple threads using a unified lock-free framework, achieving up to 8x speedup on large-scale datasets like FB15k and WN18 without sacrificing accuracy, while supporting multiple embedding methods including TransE, TransH, TransR, TransD, and SphereE.
Knowledge graph embedding aims at translating the knowledge graph into numerical representations by transforming the entities and relations into continuous low-dimensional vectors. Recently, many methods [1, 5, 3, 2, 6] have been proposed to deal with this problem, but existing single-thread implementations of them are time-consuming for large-scale knowledge graphs. Here, we design a unified parallel framework to parallelize these methods, which achieves a significant time reduction without influencing the accuracy. We name our framework as ParaGraphE, which provides a library for parallel knowledge graph embedding. The source code can be downloaded from https://github.com/LIBBLE/LIBBLE-MultiThread/tree/master/ParaGraphE .
Motivation & Objective
- Address the high computational cost of training single-threaded knowledge graph embedding methods on large-scale knowledge graphs.
- Design a unified, extensible framework to parallelize existing margin-based knowledge graph embedding methods without altering their core learning objectives.
- Achieve significant speedups in training time while preserving the accuracy of state-of-the-art models.
- Enable efficient, scalable training for knowledge graph embedding through a lock-free multi-threaded implementation.
- Provide a general-purpose library that supports multiple embedding models and can be extended to other graph-based learning tasks.
Proposed method
- Implement a unified parallel training framework based on lock-free thread scheduling to avoid synchronization bottlenecks during embedding updates.
- Use a margin-based hinge loss function formulated as $\mathcal{L} = \sum_{(h,r,t)\in S} \sum_{(h',r,t')\in S'} [s(h,r,t) + \gamma - s(h',r,t')]_+$, where $S$ is the set of positive triples and $S'$ the set of corrupted negatives.
- Distribute training samples across $p$ threads, with each thread independently sampling positive and negative triples, computing gradients, and updating embeddings in parallel.
- Enforce normalization constraints (e.g., $\|\mathbf{h}\|_2 = 1$) after each update to maintain model stability and consistency across methods.
- Support multiple score functions and constraints per method (e.g., TransE uses $s(h,r,t) = \|\mathbf{h} + \mathbf{r} - \mathbf{t}\|$; TransH uses projection via relation-specific normal vectors).
- Integrate with existing embedding models by abstracting differences into score functions and constraints, enabling plug-and-play support for TransE, TransH, TransR, TransD, and SphereE.
Experimental results
Research questions
- RQ1Can a unified parallel framework significantly reduce training time for knowledge graph embedding models without degrading performance?
- RQ2How does multi-threaded training affect convergence and model accuracy compared to single-threaded baselines?
- RQ3To what extent can ParaGraphE scale across different knowledge graph sizes and complexities, such as WN18 and FB15k?
- RQ4Can the same framework efficiently support diverse knowledge graph embedding methods with varying score functions and constraints?
- RQ5What is the achievable speedup of ParaGraphE when scaling from 1 to 10 threads on standard benchmark datasets?
Key findings
- ParaGraphE achieves up to 8x speedup on both WN18 and FB15k when using 10 threads, with minimal impact on convergence as shown by stable epoch loss curves.
- Training time is drastically reduced: TransR completes in 165.0 seconds on FB15k with ParaGraphE, compared to significantly longer times in original implementations.
- Model accuracy remains highly competitive—results on WN18 and FB15k are very close to those reported in original papers, with SphereE on FB15k achieving 0.464 MRR (filter) and 0.699 hits@10.
- The framework maintains consistent performance across all supported models: TransE, TransH, TransR, TransD, and SphereE, with minimal accuracy drop.
- The loss curves across different thread counts (1 to 10) show stable convergence, indicating that parallelization does not compromise the optimization process.
- The library supports efficient, scalable training with minimal synchronization overhead due to its lock-free design, enabling high throughput on multi-core systems.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.