Home

Awesome

TorusE

An embedding model onto a torus for knowledge graph completion.

Paper: TorusE: Knowledge Graph Embedding on a Lie Group

@inproceedings{TorusE,
  author    = {Takuma Ebisu and
               Ryutaro Ichise},
  title     = {TorusE: Knowledge Graph Embedding on a Lie Group},
  booktitle = {Proceedings of the Thirtieth {AAAI} Conference on Artificial Intelligence},
  year      = {2018},
}

Accuracy

DatasetMRRHits@1Hits@3Hits@10
WN180.9470.9430.9500.954
FB15k0.7470.6900.7850.840

The results on FB15k is slightly better than the results in the paper. This is because there was a bug with the eL2 distance function in the original implementation. According to fix, we retuned hyperparameters for FB15k.

Requirement

Tensorflow Numpy

Data Format

Datasets for this implementation should have three files named as following: train, valid, and test. You need to put under the directory, data/datasets_name/. Each line in these files represent a triple. For example, a line in a file, "son sibling_of daughter", represents the triple (son, sibling_of, daughter).

Example data are in data/example/.

Reproduction of the results

  1. Put the datasets WN18 and FB15k under ./data/wn18 and ./data/fb15k.

2a. run the following command for FB15k

python run.py -reproduce transe-fb15k

2b. run the following command for WN18

python run.py -reproduce transe-wn18

Acknowledgement

I really appreciate Phuc Nguyen. He helped me to reconstruct my code for readability.