Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[WWW 2023] The source code of "Learning Long- and Short-term Representations for Temporal Knowledge Graph Reasoning"

Notifications You must be signed in to change notification settings

CRIPAC-DIG/HGLS

Open more actions menu

Repository files navigation

HGLS

model

This repository contains the code for the ACM Web Conference (WWW') 2023 paper titled "Learning Long- and short-term representations for Temporal Knowledge Graph Reasoning".

Usage

Generate data

You need to run the file generate_data.py to generate the graph data needed for our model:

python generate_data.py --data=DATA_NAME

In order to speed up training and testing, for ICEWS18, ICEWS05-15, and GDELT datasets, data in the required format can be constructed in advance before training and testing:

python save_data.py --data=DATA_NAME

Training and Testing

Then you can run the file main.py to train and test our model. The detailed commands can be found in {dataset}.sh. Some important hyper-parameters can be found in long_config.yaml and short_config.yaml.

Requirements

Make sure you have the following dependencies installed:

  • Python~=3.7
  • dgl~=0.9.1
  • torch~=1.12.1
  • numpy~=1.21.5
  • tqdm~=4.64.1
  • pandas~=1.3.5
  • scipy~=1.7.3

Citation

Please cite our paper if you use the code:

@inproceedings{zhang2023learning,
  title={Learning Long-and Short-term Representations for Temporal Knowledge Graph Reasoning},
  author={Zhang, Mengqi and Xia, Yuwei and Liu, Qiang and Wu, Shu and Wang, Liang},
  booktitle={Proceedings of the ACM Web Conference 2023},
  pages={2412--2422},
  year={2023}
}

Acknowledge

Some of our code is also referenced from RE-GCN: https://github.com/Lee-zix/RE-GCN.

About

[WWW 2023] The source code of "Learning Long- and Short-term Representations for Temporal Knowledge Graph Reasoning"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.