This is the code we used in our paper
Decompressing Knowledge Graph Representations for Link Prediction
Xiang Kong*, Xianyang Chen*, Eduard Hovy (*: equal contribution)
Python 3
PyTorch >= 1.0
This repo supports Linux and Python installation via Anaconda.
- Install the requirements
pip install -r requirements.txt
- Download the default English model used by spaCy, which is installed in the previous step
python -m spacy download en
- Run the preprocessing script for WN18RR, FB15k-237:
sh preprocess.sh
CUDA_VISIBLE_DEVICES=0 python main.py model DistMultDecompress dataset FB15k-237 lr 0.001 hidden_drop 0.2 epochs 30
will run a model DistMultDecompress on FB15k-237. More models are listed in model.py
ToDo: right now, only models on FB15k-237 are uploaded and those on WN18RR will uploaded soon.
This repo is adapted from ConvE (https://github.com/TimDettmers/ConvE). Thanks!
If you found this codebase or our work useful please cite us:
@article{kong2019decompressing,
title={Decompressing Knowledge Graph Representations for Link Prediction},
author={Kong, Xiang and Chen, Xianyang and Hovy, Eduard},
journal={arXiv preprint arXiv:1911.04053},
year={2019}
}