Fig: Pipeline of the policy learning algorithm in INDUCE. δ indicates the maximum number of allowed perturbations.
We use Python 3.9.12 to run each file. We use Pytorch '1.11.0' with cuda '10.2.0'. Use ENV.yml file to create the environment required to run the source code.
conda env create --file=ENV.yml
cd source
Train:
python ./src/train.py --dataset <syn4/syn1/syn5> --use_onehot --use_degree --use_entropy --ent 0.1 --policynet gat --maxbudget 15 --maxepisodes 500 --seed 42 --train_on_correct_only --k 4 --train_on_non_zero --verbose --save_prefix inductive_non0_correct_only
Test:
python ./src/test.py --dataset <syn4/syn1/syn5> --use_onehot --use_degree --use_entropy --ent 0.1 --policynet gat --maxbudget 15 --seed 42 --k 4 --verbose --save_prefix inductive_non0_correct_only
python ./src/train_transductive.py --dataset <syn4/syn1/syn5> --use_onehot --use_degree --use_entropy --ent 0.1 --policynet gat --maxbudget 15 --maxepisodes 500 --seed 37 --train_on_non_zero --train_on_correct_only --k 4 --verbose --save_prefix transductive_non0_correct_only
*NOTE:
- For deletion version: use flag --del_only
- For checking usage of arguments refer to cmd_args.py