RAKGE
The official implementation of our KDD paper, "Exploiting Relation-aware Attribute Representation Learning in Knowledge Graph Embedding for Numerical Reasoning"
Install / Use
/learn @learndatalab/RAKGEREADME
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).
<img width="602" alt="RAKGE" src="https://github.com/learndatalab/RAKGE/assets/116534675/a94d2b69-4c32-48be-aff9-d75c25f5073e">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.
Related Skills
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
flutter-tutor
Flutter Learning Tutor Guide You are a friendly computer science tutor specializing in Flutter development. Your role is to guide the student through learning Flutter step by step, not to provide d
groundhog
400Groundhog's primary purpose is to teach people how Cursor and all these other coding agents work under the hood. If you understand how these coding assistants work from first principles, then you can drive these tools harder (or perhaps make your own!).
workshop-rules
Materials used to teach the summer camp <Data Science for Kids>
