-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpgexplainer.sh
76 lines (69 loc) · 6.04 KB
/
pgexplainer.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
gnn_type=gcn
device=3
cpus=16-31
# collect explanations from datasets
taskset -c $cpus python source/pgexplainer.py --dataset Mutagenicity --gnn_type $gnn_type --device $device
taskset -c $cpus python source/pgexplainer.py --dataset Proteins --gnn_type $gnn_type --device $device
taskset -c $cpus python source/pgexplainer.py --dataset IMDB-B --gnn_type $gnn_type --device $device
taskset -c $cpus python source/pgexplainer.py --dataset AIDS --gnn_type $gnn_type --device $device
taskset -c $cpus python source/pgexplainer.py --dataset Mutag --gnn_type $gnn_type --device $device
taskset -c $cpus python source/pgexplainer.py --dataset NCI1 --gnn_type $gnn_type --device $device
taskset -c $cpus python source/pgexplainer.py --dataset Graph-SST2 --gnn_type $gnn_type --device $device
taskset -c $cpus python source/pgexplainer.py --dataset REDDIT-B --gnn_type $gnn_type --device $device
taskset -c $cpus python source/pgexplainer.py --dataset DD --gnn_type $gnn_type --device $device
taskset -c $cpus python source/pgexplainer.py --dataset ogbg_molhiv --gnn_type $gnn_type --device $device
# collect explanations from noisy datasets
taskset -c $cpus python source/pgexplainer.py --dataset Mutagenicity --gnn_type $gnn_type --device $device --robustness topology_random
taskset -c $cpus python source/pgexplainer.py --dataset Proteins --gnn_type $gnn_type --device $device --robustness topology_random
taskset -c $cpus python source/pgexplainer.py --dataset IMDB-B --gnn_type $gnn_type --device $device --robustness topology_random
taskset -c $cpus python source/pgexplainer.py --dataset AIDS --gnn_type $gnn_type --device $device --robustness topology_random
# collect explanations from noisy features datasets
taskset -c $cpus python source/pgexplainer.py --dataset Mutagenicity --gnn_type $gnn_type --device $device --robustness feature
taskset -c $cpus python source/pgexplainer.py --dataset Proteins --gnn_type $gnn_type --device $device --robustness feature
# collect explanations from topology adversarial attacked datasets
taskset -c $cpus python source/pgexplainer.py --dataset Mutagenicity --gnn_type $gnn_type --device $device --robustness topology_adversarial
taskset -c $cpus python source/pgexplainer.py --dataset Proteins --gnn_type $gnn_type --device $device --robustness topology_adversarial
taskset -c $cpus python source/pgexplainer.py --dataset IMDB-B --gnn_type $gnn_type --device $device --robustness topology_adversarial
taskset -c $cpus python source/pgexplainer.py --dataset AIDS --gnn_type $gnn_type --device $device --robustness topology_adversarial
# stability seeds
seeds="2 3"
for seed in $seeds; do
taskset -c $cpus python source/pgexplainer.py --dataset Mutagenicity --gnn_type $gnn_type --device $device --explainer_run $seed
taskset -c $cpus python source/pgexplainer.py --dataset Proteins --gnn_type $gnn_type --device $device --explainer_run $seed
taskset -c $cpus python source/pgexplainer.py --dataset IMDB-B --gnn_type $gnn_type --device $device --explainer_run $seed
taskset -c $cpus python source/pgexplainer.py --dataset AIDS --gnn_type $gnn_type --device $device --explainer_run $seed
taskset -c $cpus python source/pgexplainer.py --dataset Mutag --gnn_type $gnn_type --device $device --explainer_run $seed
taskset -c $cpus python source/pgexplainer.py --dataset NCI1 --gnn_type $gnn_type --device $device --explainer_run $seed
done
## stability base
gnn_types="gat gin sage"
for gnn_type in $gnn_types; do
taskset -c $cpus python source/pgexplainer.py --dataset Mutagenicity --gnn_type $gnn_type --device $device
taskset -c $cpus python source/pgexplainer.py --dataset Proteins --gnn_type $gnn_type --device $device
taskset -c $cpus python source/pgexplainer.py --dataset IMDB-B --gnn_type $gnn_type --device $device
taskset -c $cpus python source/pgexplainer.py --dataset AIDS --gnn_type $gnn_type --device $device
taskset -c $cpus python source/pgexplainer.py --dataset Mutag --gnn_type $gnn_type --device $device
taskset -c $cpus python source/pgexplainer.py --dataset NCI1 --gnn_type $gnn_type --device $device
done
# generate results
#gnn_type=gcn
#explainers="pgexplainer"
#metrics="faithfulness faithfulness_with_removal stability_noise stability_seed stability_base"
#for metric in $metrics; do
# for explainer in $explainers; do
# taskset -c $cpus python source/result_generator.py --explainer_name "$explainer" --dataset Mutagenicity --gnn_type "$gnn_type" --device $device --explanation_metric "$metric"
# taskset -c $cpus python source/result_generator.py --explainer_name "$explainer" --dataset Proteins --gnn_type "$gnn_type" --device $device --explanation_metric "$metric"
# taskset -c $cpus python source/result_generator.py --explainer_name "$explainer" --dataset IMDB-B --gnn_type "$gnn_type" --device $device --explanation_metric "$metric"
# taskset -c $cpus python source/result_generator.py --explainer_name "$explainer" --dataset AIDS --gnn_type "$gnn_type" --device $device --explanation_metric "$metric"
# if ! (("$metric" = "stability_noise")); then
# taskset -c $cpus python source/result_generator.py --explainer_name "$explainer" --dataset Mutag --gnn_type "$gnn_type" --device $device --explanation_metric "$metric"
# taskset -c $cpus python source/result_generator.py --explainer_name "$explainer" --dataset NCI1 --gnn_type "$gnn_type" --device $device --explanation_metric "$metric"
# fi
# if [ "$metric" = "faithfulness" ]; then
# taskset -c $cpus python source/result_generator.py --explainer_name "$explainer" --dataset Graph-SST2 --gnn_type "$gnn_type" --device cpu --explanation_metric "$metric"
# taskset -c $cpus python source/result_generator.py --explainer_name "$explainer" --dataset ogbg_molhiv --gnn_type "$gnn_type" --device cpu --explanation_metric "$metric"
# taskset -c $cpus python source/result_generator.py --explainer_name "$explainer" --dataset REDDIT-B --gnn_type "$gnn_type" --device cpu --explanation_metric "$metric"
# taskset -c $cpus python source/result_generator.py --explainer_name "$explainer" --dataset DD --gnn_type "$gnn_type" --device cpu --explanation_metric "$metric"
# fi
# done
#done