The source code of Paper "Query Structure Modeling for Inductive Logical Reasoning Over Knowledge Graphs".
If you find this paper useful, please cite this paper:
@misc{wang2023query,
title={Query Structure Modeling for Inductive Logical Reasoning Over Knowledge Graphs},
author={Siyuan Wang and Zhongyu Wei and Meng Han and Zhihao Fan and Haijun Shan and Qi Zhang and Xuanjing Huang},
year={2023},
eprint={2305.13585},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
- To set up the environment, please install the packages in the
requirements.txt
.
pip install -r requirements.txt
- You can first download the raw data to
Data
directory and run scripts inDataProcessing
to get data for experiments.
- For inductive datasets, please refer to Project QE-TEMP to download the dataset Ind-FB15k-237-V2 and dataset Ind-NELL-V3. Then
- For transductive datasets, please refer to Project Query2Box to download the dataset FB15k, FB15k-237 and NELL995. Then you can run the following scripts:
cd DataProcessing
python load_reasoning_data.py
python load_reasoning_data_ind.py