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.shExample scripts:
bash scripts/optim/wn-g2.shFor training with multi-gpu:
bash scripts/optim/wn-g2-multi.shExample scripts:
bash scripts/test/wn-g2.shbash scripts/optim-test/wn-g2.shWelcome to cite our work!