pykeen/pykeen

🤖 A Python library for learning and evaluating knowledge graph embeddings

What it solves

PyKEEN (Python KnowlEdge EmbeddiNgs) provides a standardized framework for training and evaluating knowledge graph embedding models. It simplifies the process of turning complex, multi-relational graph data into numerical representations that can be used for tasks like link prediction.

How it works

PyKEEN offers a high-level pipeline that allows users to select from dozens of built-in models and datasets. By using a consistent API, users can easily swap different models, training loops, or evaluation methods. It handles the heavy lifting of data preparation and model training, returning a structured result object containing the trained model, evaluation metrics, and the training history.

Who it’s for

It is designed for researchers and developers working with knowledge graphs who need a robust, extensible tool to experiment with various embedding models without writing boilerplate code for every new configuration.

Highlights

  • Includes 37 built-in datasets and 5 inductive datasets for immediate use.
  • Supports 40 different embedding models with a unified API.
  • Highly extensible: users can easily integrate custom datasets or drop in new model components.
  • Integrated with popular tools like Optuna for optimization and PyTorch Lightning for training.
  • Provides built-in support for rank-based evaluation and multiple training strategies.

Related

  • Project
  • Project
  • Project
  • Project
  • Project