This repository includes code for BiQE and the datasets introduced in Answering Complex Queries in Knowledge Graphs with Bidirectional Sequence Encoder
Bhushan Kotnis, Carolin Lawrence and Mathias Niepert. 2021. Answering Complex Queries in Knowledge Graphs with Bidirectional Sequence Encoder In Proceedings of the AAAI Conference on Artificial Intelligence 2021,
- Run pip install -r requirements.txt
- Run python setup.py install
- Note that the code requires an older version of hugging face transformers.
- The CQ datasets along with the filters for filtered setting can be found in ./scripts/data/
- Linux with at least 2 GPUs each with 11GB or 1 GPU > 20G B, set CUDA_VISIBLE_DEVICES appropriately.
- run train.sh for training a model
- run test.sh for evaluation
- Set hyperparameters and dataset directories in train.sh and test.sh
- For wn18rr simply change the directory name from fb15k-237 to wn18rr in train.sh/test.sh