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.
Convolutional 2D Knowledge Graph Embeddings resources
| Date | Stars |
|---|---|
| 2026-07-31 | 691 |
| 2026-08-02 | 691 |
| 2026-08-06 | 691 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# ConvE
Convolutional 2D Knowledge Graph Embeddings resources.
Paper: [Convolutional 2D Knowledge Graph Embeddings](https://arxiv.org/abs/1707.01476)
Used in the paper, but *do not use these datasets for your research*:
[FB15k and WN18](https://everest.hds.utc.fr/doku.php?id=en:transe). Please also note that the Kinship and Nations datasets have a high number of inverse relationships which makes them unsuitable for research. Nations has +95% inverse relationships and Kinship about 48%.
## ConvE key facts
### Predictive performance
Dataset | MR | MRR | Hits@10 | Hits@3 | Hits@1
:--- | :---: | :---: | :---: | :---: | :---:
FB15k | 64 | 0.75 | 0.87 | 0.80 | 0.67
WN18 | 504 | 0.94 | 0.96 | 0.95 | 0.94
FB15k-237 | 246 | 0.32 | 0.49 | 0.35 | 0.24
WN18RR | 4766 | 0.43 | 0.51 | 0.44 | 0.39
YAGO3-10 | 2792 | 0.52 | 0.66 | 0.56 | 0.45
Nations | 2 | 0.82 | 1.00 | 0.88 | 0.72
UMLS | 1 | 0.94 | 0.99 | 0.97 | 0.92
Kinship | 2 | 0.83 | 0.98 | 0.91 | 0.73
### Run time performance
For an embedding size of 200 and batch size 128, a single batch takes on a GTX Titan X (Maxwell):
- 64ms for 100,000 entities
- 80ms for 1,000,000 entities
### Parameter efficiency
Parameters | ConvE/DistMult MRR | ConvE/DistMult Hits@10 | ConvE/DistMult Hits@1
:--- | :---: | :---: | :---:
~5.0M | 0.32 / 0.24 | 0.49 / 0.42 | 0.24 / 0.16
1.89M | 0.32 / 0.23 | 0.49 / 0.41 | 0.23 / 0.15
0.95M| 0.30 / 0.22 | 0.46 / 0.39 | 0.22 / 0.14
0.24M | 0.26 / 0.16 | 0.39 / 0.31 | 0.19 / 0.09
ConvE with 8 times less parameters is still more powerful than DistMult. Relational Graph Convolutional Networks use roughly 32x more parameters to have the same performance as ConvE.
## Installation
This repo supports Linux and Python installation via Anaconda.
1. Install [PyTorch](https://github.com/pytorch/pytorch) using [Anaconda](https://www.continuum.io/downloads).
2. Install the requirements `pip install -r requirements.txt`
3. Download the default English model used by [spaCy](https://github.com/explosion/spaCy), which is installed in the previous step `python -m spacy download en_core_web_sm`
4. Run the preprocessing script for WN18RR, FB15k-237, YAGO3-10, UMLS, Kinship, and Nations: `sh preprocess.sh`
5. You can now run the model
## Running a model
Parameters need to be specified by white-space tuples for example:
```
CUDA_VISIBLE_DEVICES=0 python main.py --model conve --data FB15k-237 \
--input-drop 0.2 --hidden-drop 0.3 --feat-drop 0.2 \
--lr 0.003 --preprocess
```
will run a ConvE model on FB15k-237.
To run a model, you first need to preprocess the data once. This can be done by specifying the `--preprocess` parameter:
```
CUDA_VISIBLE_DEVICES=0 python main.py --data DATASET_NAME --preprocess
```
After the dataset is preprocessed it will be saved to disk and this parameter can be omitted.
```
CUDA_VISIBLE_DEVICES=0 python main.py --data DATASET_NAME
```
The following parameters can be used for the `--model` parameter:
```
conve
distmult
complex
```
The following datasets can be used for the `--data` parameter:
```
FB15k-237
WN18RR
YAGO3-10
umls
kinship
nations
```
And here a complete list of parameters.
```
Link prediction for knowledge graphs
optional arguments:
-h, --help show this help message and exit
--batch-size BATCH_SIZE
input batch size for training (default: 128)
--test-batch-size TEST_BATCH_SIZE
input batch size for testing/validation (default: 128)
--epochs EPOCHS number of epochs to train (default: 1000)
--lr LR learning rate (default: 0.003)
--seed S random seed (default: 17)
--log-interval LOG_INTERVAL
how many batches to wait before logging training
status
--data DATA Dataset to use: {FB15k-237, YAGO3-10, WN18RR, umls,
nations, kinship}, default: FB15k-237
--l2 L2 WeiExcerpt of 9,713 characters
Read on GitHubTim Dettmers · University of Washington · United States
57
2
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:40340b362b4cf040, desc:knowledge graph