Skip to content

The official implementation of our KDD paper, "Exploiting Relation-aware Attribute Representation Learning in Knowledge Graph Embedding for Numerical Reasoning"

License

Notifications You must be signed in to change notification settings

learndatalab/RAKGE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAKGE

This repository provides PyTorch implementations of RAKGE as described in the paper: Exploiting Relation-aware Attribute Representation Learning in Knowledge Graph Embedding for Numerical Reasoning (KDD 2023).

RAKGE

Citing

If you want to mention RAKGE for your research, please consider citing the following paper:

@inproceedings{RAKGE,
author = {Kim, Gayeong and Kim, Sookyung and Kim, Ko Keun and Park, Suchan and Jung, Heesoo and Park, Hogun},
title = {Exploiting Relation-aware Attribute Representation Learning in Knowledge Graph Embedding for Numerical Reasoning},
booktitle = {Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
year = {2023}
}

Experiment Environment

  • python 3.7+
  • torch 1.9+
  • dgl 0.7+

Basic Usage

Download the datasets

Download the datasets from the following link: https://drive.google.com/drive/folders/1ecUQvVTSDqUdY3_PVDeNUvg5LDaTwxZ7?usp=sharing

and save them in the '/dataset' directory.

Preprocess the datasets

To preprocess their numeric attributes, please execute the following command:

python preprocess_kg_num_lit.py --dataset {credit, spotify, US-cities}

Reproduce the results

Now you are ready to train and evaluate RAKGE and other baselines. To reproduce the results provided in the paper, please execute the corresponding command for each model as follows:

RAKGE

python run.py --gpu 0 --n_layer 0  --literal --init_dim 200 --att_dim 200 --head_num 5 --name RAKGE --scale 0.25 --order 0.25 --data {credit, spotify, US-cities} --drop 0.7 

TransE

python run.py --gpu 0 --n_layer 0 --init_dim 200 --name lte --score_func transe --opn mult --x_ops "d" --hid_drop 0.7  --data {credit, spotify, US-cities}

LiteralE

python run.py --gpu 0 --n_layer 0 --literal --init_dim 200 --name TransELiteral_gate --data {credit, spotify, US-cities} --input_drop 0.7 

R-GCN

python run.py --gpu 0 --n_layer 1 --score_func transe --opn mult --gcn_dim 150 --init_dim 150 --num_base 5 --encoder rgcn --name repro --data {credit, spotify, US-cities} --hid_drop 0.7

Miscellaneous

Please send any questions you might have about the code and/or the algorithm to gayeongkim@o365.skku.edu.

Acknowledgement

We refer to the code of LTE-KGC and LiteralE. Thanks for their contributions.

About

The official implementation of our KDD paper, "Exploiting Relation-aware Attribute Representation Learning in Knowledge Graph Embedding for Numerical Reasoning"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published