Skip to content

Latest commit

 

History

History
88 lines (68 loc) · 2.44 KB

README.md

File metadata and controls

88 lines (68 loc) · 2.44 KB

TEILP: Time Prediction over Knowledge Graphs via Logical Reasoning

This repository contains the code for the paper TEILP: Time Prediction over Knowledge Graphs via Logical Reasoning.

Introduction

This is a follow-up work of TILP: Differentiable Learning of Temporal Logical Rules on Knowledge Graphs. We convert TKGs into a temporal event knowledge graph (TEKG) which equips us to develop a differentiable random walk approach. We also introduce conditional probability density functions, associated with the logical rules involving the query interval, using which we arrive at the time prediction.

Quick Start

The structure of the file folder should be like

TEILP/
│
├── src/
│
├── data/
│
├── exps/
│
└── output/

First step

cd src

For (interval-based) datasets: wiki, YAGO

Random walk:

python main_random_walk_for_interval_datasets.py --dataset {$dataset name}

Rule learning:

python main_rule_learning_interval_dataset.py --dataset {$dataset name} --train

Rule application:

python main_rule_learning_interval_dataset.py --dataset {$dataset name} --test --from_model_ckpt {$your_model_location}

For (timestamp-based) datasets: icews14, icews05-15, gdelt100

Random walk:

python main_random_walk_for_timestamp_datasets.py --dataset {$dataset name}

Rule learning:

python main_rule_learning_timestamp_dataset.py --dataset {$dataset name} --train

Rule application:

python main_rule_application_timestamp_dataset.py --dataset {$dataset name}
python main_rule_learning_timestamp_dataset.py --dataset {$dataset name} --test --from_model_ckpt {$your_model_location}

Contact

If you have any inquiries, please feel free to raise an issue or reach out to sxiong45@gatech.edu.

Citation

@inproceedings{xiong2024teilp,
  title={Teilp: Time prediction over knowledge graphs via logical reasoning},
  author={Xiong, Siheng and Yang, Yuan and Payani, Ali and Kerce, James C and Fekri, Faramarz},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  volume={38},
  number={14},
  pages={16112--16119},
  year={2024}
}