Skip to content

xiongsiheng/TEILP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

How to run

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}

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}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages