# TorchKGE: Knowledge Graph Embedding in Python and PyTorch

arXiv: https://arxiv.org/abs/2009.02963 · HTML: https://mlsanity.com/paper/2009.02963/

## Key facts

- Cited by 9 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 7 Sep 2020.

## Built on by (most cited first, 9 of 9)

- [NeuralKG: An Open Source Library for Diverse Representation Learning of Knowledge Graphs](https://mlsanity.com/paper/2202.12571/) (2022)
- [Causal Lifting and Link Prediction](https://mlsanity.com/paper/2302.01198/) (2023)
- [μKG: A Library for Multi-source Knowledge Graph Embeddings and Applications](https://mlsanity.com/paper/2207.11442/) (2022)
- [Context-Dependent Anomaly Detection with Knowledge Graph Embedding Models](https://mlsanity.com/paper/2203.09354/) (2022)
- [KG-NSF: Knowledge Graph Completion with a Negative-Sample-Free Approach](https://mlsanity.com/paper/2207.14617/) (2022)
- [NeuralKG-ind: A Python Library for Inductive Knowledge Graph Representation Learning](https://mlsanity.com/paper/2304.14678/) (2023)
- [Enhancing PyKEEN with Multiple Negative Sampling Solutions for Knowledge Graph Embedding Models](https://mlsanity.com/paper/2508.05587/) (2025)
- [Effects of Locality and Rule Language on Explanations for Knowledge Graph Embeddings](https://mlsanity.com/paper/2302.06967/) (2023)
- [SparseTransX: Efficient Training of Translation-Based Knowledge Graph Embeddings Using Sparse Matrix Operations](https://mlsanity.com/paper/2502.16949/) (2025)

## Abstract (arXiv)

TorchKGE is a Python module for knowledge graph (KG) embedding relying solely on PyTorch. This package provides researchers and engineers with a clean and efficient API to design and test new models. It features a KG data structure, simple model interfaces and modules for negative sampling and model evaluation. Its main strength is a very fast evaluation module for the link prediction task, a central application of KG embedding. Various KG embedding models are also already implemented. Special attention has been paid to code efficiency and simplicity, documentation and API consistency. It is distributed using PyPI under BSD license. Source code and pointers to documentation and deployment can be found at https://github.com/torchkge-team/torchkge.
