Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
LibKGE - A knowledge graph embedding library for reproducible research
| Date | Stars |
|---|---|
| 2026-07-31 | 836 |
| 2026-08-05 | 836 |
| 2026-08-06 | 836 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# <img src="docs/source/images/logo/libkge-header-2880.png" alt="LibKGE: A knowledge graph embedding library" width="80%">
LibKGE is a PyTorch-based library for efficient training, evaluation, and
hyperparameter optimization of [knowledge graph
embeddings](https://ieeexplore.ieee.org/document/8047276) (KGE). It is highly
configurable, easy to use, and extensible. Other KGE frameworks are [listed
below](#other-kge-frameworks).
The key goal of LibKGE is to foster *reproducible research* into (as well as
meaningful comparisons between) KGE models and training methods. As we argue in
our [ICLR 2020 paper](https://github.com/uma-pi1/kge-iclr20)
(see [video](https://iclr.cc/virtual_2020/poster_BkxSmlBFvr.html)), the choice
of training strategy and hyperparameters are very influential on model performance,
often more so than the model class itself. LibKGE aims to provide *clean
implementations* of training, hyperparameter optimization, and evaluation
strategies that can be used with any model. Every potential knob or heuristic
implemented in the framework is exposed explicitly via *well-documented*
configuration files (e.g., see [here](kge/config-default.yaml) and
[here](kge/model/embedder/lookup_embedder.yaml)). LibKGE also provides the most
common KGE models and new ones can be easily added (contributions welcome!).
For link prediction tasks, rule-based systems such as
[AnyBURL](http://web.informatik.uni-mannheim.de/AnyBURL/) are a competitive
alternative to KGE.
**UPDATE**: LibKGE now includes [GraSH](https://arxiv.org/pdf/2207.04979.pdf), an
efficient multi-fidelity hyperparameter optimization algorithm for large-scale
KGE models. See [here](#hyperparameter-optimization) for an example on how to use it.
## Quick start
```sh
# retrieve and install project in development mode
git clone https://github.com/uma-pi1/kge.git
cd kge
pip install -e .
# download and preprocess datasets
cd data
sh download_all.sh
cd ..
# train an example model on toy dataset (you can omit '--job.device cpu' when you have a gpu)
kge start examples/toy-complex-train.yaml --job.device cpu
```
## Table of contents
1. [Features](#features)
2. [Results and pretrained models](#results-and-pretrained-models)
3. [Using LibKGE](#using-libkge)
4. [Currently supported KGE models](#currently-supported-kge-models)
5. [Extending LibKGE](#extending-libkge)
6. [FAQ](#faq)
7. [Known issues](#known-issues)
8. [Changelog](CHANGELOG.md)
9. [Other KGE frameworks](#other-kge-frameworks)
10. [How to cite](#how-to-cite)
## Features
- **Training**
- Training types: negative sampling, 1vsAll, KvsAll
- Losses: binary cross entropy (BCE), Kullback-Leibler divergence (KL),
margin ranking (MR), squared error (SE)
- All optimizers and learning rate schedulers of PyTorch supported and can be
chosen individually for different parameters (e.g., different for entity
and for relation embeddings)
- Learning rate warmup
- Early stopping
- Checkpointing
- Stop (e.g., via `Ctrl-C`) and resume at any time
- Automatic memory management to support large batch sizes (see config key `train.subbatch_auto_tune`)
- **Hyperparameter tuning**
- Grid search, manual search, quasi-random search (using
[Ax](https://ax.dev/)), Bayesian optimization (using [Ax](https://ax.dev/))
- Resource-efficient multi-fidelity search for large graphs (using [GraSH](https://arxiv.org/pdf/2207.04979.pdf))
- Highly parallelizable (multiple CPUs/GPUs on single machine)
- Stop and resume at any time
- **Evaluation**
- Entity ranking metrics: Mean Reciprocal Rank (MRR), HITS@k with/without filtering
- Drill-down by: relation type, relation frequency, head or tail
- **Extensive logging and tracing**
- Detailed progress information about training, hyper-parameter tuning, and evaluation
is recorded in machine readable formats
- Quick export of all/selected parts of the traced data into CSV or YAML files to
facilitate analysis
- **KGE modeExcerpt of 39,798 characters
Read on GitHub561
225
220
158
82
15
12
9
5
3
3
3
Charles Tapley Hoyt · RWTH Aachen University · Germany
3
1
1
Sanxing Chen · Duke University
1
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:7226622ad7816e15, desc:reproducible