This is the code repo for Controllable Logical Hypothesis Generation for Abductive Reasoning in Knowledge Graphs
conda create -n ctrlhgen python=3.9
conda activate ctrlhgen
pip install -r requirements.txt
As described in the paper, you can run the code in the following steps:
- Sampling
- Supervised training
- Reinforcement learning
bash scripts/sample/sample_full.sh
- Without condition
bash scripts/train/wn-g2.sh
- With condition
bash scripts/cond-train/wn-g2-pattern.sh
Example scripts:
bash scripts/optim/wn-g2.sh
For training with multi-gpu:
bash scripts/optim/wn-g2-multi.sh
Example scripts:
bash scripts/test/wn-g2.sh
bash scripts/optim-test/wn-g2.sh
Welcome to cite our work!