OpenKE is an open-source package for knowledge embedding developed by the NLP lab at Tsinghua University (THUNLP). Published on GitHub, it has gathered about 4,057 stars, with the codebase most recently updated in 2024. Knowledge embeddings represent entities and relations from a knowledge graph as dense vectors, enabling machines to reason over structured facts โ and OpenKE provides efficient, ready-to-use implementations of the field’s most influential models.
The toolkit implements classic and modern embedding methods such as TransE, TransH, TransR, TransD, RESCAL, DistMult, HolE, and ComplEx, along with the training and evaluation pipelines needed to use them properly. It is built for both speed and research flexibility, supporting standard benchmark datasets like FB15K and WN18, negative sampling, and link prediction evaluation with standard metrics. Pretrained embeddings and clear examples make it a common starting point for academic work on knowledge graph completion and representation learning. For many students, OpenKE is the first hands-on toolkit they use when learning how knowledge graph embeddings work, thanks to its documentation and runnable examples, and its modular design makes it straightforward to add a new model or loss function.
OpenKE is free and open source: the code is available on GitHub for research and commercial exploration at no charge. There are no paid tiers, hosted versions, or licensing fees attached to the package.
OpenKE is for researchers, students, and engineers working with knowledge graphs โ anyone who needs reliable implementations of knowledge embedding algorithms for link prediction, graph completion, or as a foundation for downstream AI systems.