Skip to content

NAACL2021-Temporal Knowledge Graph Completion using a Linear TemporalRegularizer and Multivector Embeddings

License

Notifications You must be signed in to change notification settings

soledad921/TeLM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

Create a conda environment with pytorch and scikit-learn :

conda create --name telm_env python=3.7
source activate telm_env
conda install --file requirements.txt -c pytorch

Then install the kbc package to this environment

python setup.py install

Datasets

Once the datasets are downloaded, go to the tkbc/ folder and add them to the package data folder by running :

python process_icews.py
python process_timegran.py --tr 100 --dataset yago11k
python process_timegran.py --tr 1 --dataset wikidata12k
# For wikidata11k and yago12k, change the tr for changing time granularity

This will create the files required to compute the filtered metrics.

Reproducing results of TeLM

In order to reproduce the results of TeLM on the four datasets in the paper, go to the tkbc/ folder and run the following commands

python learner.py --dataset ICEWS14 --model TeLM --rank 2000 --emb_reg 0.0075 --time_reg 0.01 

python learner.py --dataset ICEWS05-15 --model TeLM --rank 2000 --emb_reg 0.0025 --time_reg 0.1

python learner.py --dataset yago11k --model TeLM --rank 2000 --emb_reg 0.025 --time_reg 0.001

python learner.py --dataset wikidata12k --model TeLM --rank 2000 --emb_reg 0.025 --time_reg 0.0025

License

TeLM is CC-BY-NC licensed, as found in the LICENSE file.

Acknowledgement

We refer to the code of TNTComplEx. Thanks for their great contributions!

Citation

If you use the codes, please cite the following paper:

    @inproceedings{xu2021temporal,
      title={Temporal Knowledge Graph Completion using a Linear Temporal Regularizer and Multivector Embeddings},
      author={Xu, Chengjin and Chen, Yung-Yu and Nayyeri, Mojtaba and Lehmann, Jens},
      booktitle={Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies},
      pages={2569--2578},
      year={2021}
    }

About

NAACL2021-Temporal Knowledge Graph Completion using a Linear TemporalRegularizer and Multivector Embeddings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages