Home

Awesome

TransAt:Translating Embeddings for Knowledge Graph Completion with Relation Attention Mechanism

TransAt is a translation based embedding model for Knowledge Graph Completion. It implements the algorithm of our IJCAI2018 paper: Translating Embeddings for Knowledge Graph Completion with Relation Attention Mechanism

Benchmark datasets

Datasets are required in the folder data/ in the following format, containing five files:

Link prediction performance on WN18

ModelMeanRank(Raw)MeanRank(Filter)Hit@10(Raw)Hit@10(Filter)
TransE26325175.489.2
TransH(unif/bern)318/401303/38875.4/73.086.7/82.3
TransR(unif/bern)232/238219/22578.3/79.891.7/92.0
CTransR (unif/bern)243/231230/21878.9/79.492.3/92.3
TransD (unif/bern)242/224229/21279.2/79.692.5/92.2
TranSparse (share, S, unif/bern)248/237236/22479.7/80.493.5/93.6
TranSparse (share, US, unif/bern)242/233229/22179.8/80.593.7/93.9
TranSparse (separate, S, unif/bern)235/224223/22179.0/79.892.3/92.8
TranSparse (separate, US, unif/bern)233/223221/21179.6/80.193.4/93.2
TransAt (bern)21420281.495.1
TransAt (asy,bern)16915781.495.0

How to use (require tensorflow 1.1.0 and python 2.7 with numpy, sklearn, cPickle)

train on WN18:

  1. change "phase" variable in conf/TransAll_v1_WN18.cfg to be "train".
  2. run "./scripts/TransAll_v1/TransAll_v1_WN18.sh" test on WN18:
  3. change "phase" variable in conf/TransAll_v1_WN18.cfg to be "test".
  4. run "./scripts/TransAll_v1/TransAll_v1_WN18.sh"

Reference

Reference to cite when you use TransAt in a research paper

@inproceedings{qian2018translating,
  title={Translating Embeddings for Knowledge Graph Completion with Relation Attention Mechanism.},
  author={Qian, Wei and Fu, Cong and Zhu, Yu and Cai, Deng and He, Xiaofei},
  booktitle={IJCAI},
  pages={4286--4292},
  year={2018}