Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanzx33033 committed Aug 17, 2022
2 parents f502ade + 4389ec8 commit 9d39aec
Show file tree
Hide file tree
Showing 168 changed files with 29 additions and 5,916,859 deletions.
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
# CURL
# Learning to Walk with Dual Agents for Knowledge Graph Reasoning

Pytorch Implementation for AAAI' 2022 paper: Learning to Walk with Dual Agents for Knowledge Graph Reasoning

## Framework Overview
<<<<<<< HEAD
This paper proposed a dual-agent based reinforcement learning approach to tackle the KG reasoning problem. Existing RL-based learning to walk methods rely solely on one entity-level agent to explore large KGs, which works well on finding short reasoning paths, but usually succumb to longer patterns. Hence, we propose to divide large KGs into semantic clusters first, then utilize a cluster-level agent (named Giant) to assist entity-level agent (named Dwarf) and co-explore KG reasoning. To fulfill the purpose, we design a Collaborative Policy Network and Mutual Reinforcement Reward system to train two agents synchronously.
=======
This paper proposed a dual-agent based reinforcement learning approach (CURL) to tackle the KG reasoning problem. Existing RL-based learning to walk methods rely solely on one entity-level agent to explore large KGs, which works well on finding short reasoning paths, but usually succumb to longer patterns. Hence, we propose to divide large KGs into semantic clusters first, then utilize a cluster-level agent (named Giant) to assist entity-level agent (named Dwarf) and co-explore KG reasoning. To fulfill the purpose, we design a Collaborative Policy Network and Mutual Reinforcement Reward system to train two agents synchronously.
>>>>>>> 4389ec8d8b09a06bf1a174a5a415e994a4c12154
<p align="center">
<img width="800" height="200.5" src="./figs/framework.png" align=center>
</p>


## Requirements
To install the various python dependencies (including pytorch)
<!-- To install the various python dependencies (including pytorch) -->
```
pip install -r requirements.txt
```
- python 3.8.5
- scipy 1.6.2
- tqdm 4.62.3
- torch 1.7.1
- numpy 1.19.2


## Training & Testing
The hyperparam configs for each experiments are included in the [configs](https://github.com/RutgersDM/DKGR/tree/master/configs) directory. To start a particular experiment, just do
Expand Down Expand Up @@ -42,7 +52,16 @@ The code outputs the evaluation of CURL on the datasets provided. The metrics us
publisher = {ACL}
}
``` -->

## Citation
If you find our paper useful or use our code, please kindly cite the paper.
```
@article{zhang2021learning,
title={Learning to Walk with Dual Agents for Knowledge Graph Reasoning},
author={Zhang, Denghui and Yuan, Zixuan and Liu, Hao and Lin, Xiaodong and Xiong, Hui},
journal={arXiv preprint arXiv:2112.12876},
year={2021}
}
```

## Acknowledgement
* [MINERVA implementation](https://github.com/shehzaadzd/MINERVA)
6 changes: 5 additions & 1 deletion configs/agentbelongstoorganization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ base_output_dir="output/agentbelongstoorganization/"
load_model=0
model_load_dir="saved_models/agentbelongstoorganization"
nell_evaluation=1
learning_rate=1e-3
<<<<<<< HEAD
learning_rate=1e-3
=======
learning_rate=1e-3
>>>>>>> 4389ec8d8b09a06bf1a174a5a415e994a4c12154
382 changes: 0 additions & 382 deletions datasets/data_preprocessed/athleteplaysforteam_100/dev.txt

This file was deleted.

Loading

0 comments on commit 9d39aec

Please sign in to comment.