iDylanCui / ARN

Source codes and datasets for the paper "Incorporating Anticipation Embedding into Reinforcement Learning Framework for Multi-hop Knowledge Graph Question Answering".

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Anticipation Reasoning Network

Source codes and datasets for the paper "Incorporating Anticipation Embedding into Reinforcement Learning Framework for Multi-hop Knowledge Graph Question Answering".

Train

cd /Code/RL_A3C
python main.py --train --dataset=<dataset> --KGE_model=<KGE> --strategy=<strategy>

dataset is the name of datasets. In our experiments, dataset could be PQ-2H, PQ-3H, PQ-mix, PQL-2H, PQL-3H, PQL-mix, MetaQA-1H, MetaQA-2H or MetaQA-3H.

KGE is the model of knowledge graph embedding. In our experiments, KGE could be DistMult, ComplEx, ConvE or TuckER.

strategy is the strategy to obtain anticipation embeddings. In our experiments, strategy could be sample, avg or top1.

Test

cd /Code/RL_A3C
python main.py --eval --dataset=<dataset>

Acknowledgements

We thank a lot for the following outstanding works:

About

Source codes and datasets for the paper "Incorporating Anticipation Embedding into Reinforcement Learning Framework for Multi-hop Knowledge Graph Question Answering".


Languages

Language:Python 100.0%