-
Notifications
You must be signed in to change notification settings - Fork 1
/
tageexplainer.sh
94 lines (87 loc) · 6.97 KB
/
tageexplainer.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
gnn_type=gcn
device=0
cpus=0-31
# collect explanations from datasets
stages="1 2"
for stage_no in $stages; do
taskset -c $cpus python source/tagexplainer.py --dataset Mutagenicity --gnn_type $gnn_type --device $device --stage $stage_no
taskset -c $cpus python source/tagexplainer.py --dataset Proteins --gnn_type $gnn_type --device $device --stage $stage_no
taskset -c $cpus python source/tagexplainer.py --dataset IMDB-B --gnn_type $gnn_type --device $device --stage $stage_no
taskset -c $cpus python source/tagexplainer.py --dataset AIDS --gnn_type $gnn_type --device $device --stage $stage_no
taskset -c $cpus python source/tagexplainer.py --dataset Mutag --gnn_type $gnn_type --device $device --stage $stage_no
taskset -c $cpus python source/tagexplainer.py --dataset NCI1 --gnn_type $gnn_type --device $device --stage $stage_no
taskset -c $cpus python source/tagexplainer.py --dataset Graph-SST2 --gnn_type $gnn_type --device $device --stage $stage_no
taskset -c $cpus python source/tagexplainer.py --dataset REDDIT-B --gnn_type $gnn_type --device cpu --stage $stage_no
taskset -c $cpus python source/tagexplainer.py --dataset DD --gnn_type $gnn_type --device cpu --stage $stage_no
taskset -c $cpus python source/tagexplainer.py --dataset ogbg_molhiv --gnn_type $gnn_type --device cpu --stage $stage_no
done
# collect explanations from noisy datasets
stages="1 2"
for stage_no in $stages; do
taskset -c $cpus python source/tagexplainer.py --dataset Mutagenicity --gnn_type $gnn_type --device $device --stage $stage_no --robustness topology_random
taskset -c $cpus python source/tagexplainer.py --dataset Proteins --gnn_type $gnn_type --device $device --stage $stage_no --robustness topology_random
taskset -c $cpus python source/tagexplainer.py --dataset IMDB-B --gnn_type $gnn_type --device $device --stage $stage_no --robustness topology_random
taskset -c $cpus python source/tagexplainer.py --dataset AIDS --gnn_type $gnn_type --device $device --stage $stage_no --robustness topology_random
done
# collect explanations from noisy features datasets
stages="1 2"
for stage_no in $stages; do
taskset -c $cpus python source/tagexplainer.py --dataset Mutagenicity --gnn_type $gnn_type --device $device --stage $stage_no --robustness feature
taskset -c $cpus python source/tagexplainer.py --dataset Proteins --gnn_type $gnn_type --device $device --stage $stage_no --robustness feature
done
# collect explanations from topology adversarial attacked datasets
stages="1"
for stage_no in $stages; do
taskset -c $cpus python source/tagexplainer.py --dataset Mutagenicity --gnn_type $gnn_type --device $device --stage $stage_no --robustness topology_adversarial
taskset -c $cpus python source/tagexplainer.py --dataset Proteins --gnn_type $gnn_type --device $device --stage $stage_no --robustness topology_adversarial
taskset -c $cpus python source/tagexplainer.py --dataset IMDB-B --gnn_type $gnn_type --device $device --stage $stage_no --robustness topology_adversarial
taskset -c $cpus python source/tagexplainer.py --dataset AIDS --gnn_type $gnn_type --device $device --stage $stage_no --robustness topology_adversarial
done
# stability seeds
stages="1 2"
seeds="2 3"
for stage_no in $stages; do
for seed in $seeds; do
taskset -c $cpus python source/tagexplainer.py --dataset Mutagenicity --gnn_type $gnn_type --device $device --stage $stage_no --explainer_run $seed
taskset -c $cpus python source/tagexplainer.py --dataset Proteins --gnn_type $gnn_type --device $device --stage $stage_no --explainer_run $seed
taskset -c $cpus python source/tagexplainer.py --dataset IMDB-B --gnn_type $gnn_type --device $device --stage $stage_no --explainer_run $seed
taskset -c $cpus python source/tagexplainer.py --dataset AIDS --gnn_type $gnn_type --device $device --stage $stage_no --explainer_run $seed
taskset -c $cpus python source/tagexplainer.py --dataset Mutag --gnn_type $gnn_type --device $device --stage $stage_no --explainer_run $seed
taskset -c $cpus python source/tagexplainer.py --dataset NCI1 --gnn_type $gnn_type --device $device --stage $stage_no --explainer_run $seed
done
done
# stability base
stages="1 2"
gnn_types="gat gin sage"
for stage_no in $stages; do
for gnn_type in $gnn_types; do
taskset -c $cpus python source/tagexplainer.py --dataset Mutagenicity --gnn_type $gnn_type --device $device --stage $stage_no
taskset -c $cpus python source/tagexplainer.py --dataset Proteins --gnn_type $gnn_type --device $device --stage $stage_no
taskset -c $cpus python source/tagexplainer.py --dataset IMDB-B --gnn_type $gnn_type --device $device --stage $stage_no
taskset -c $cpus python source/tagexplainer.py --dataset AIDS --gnn_type $gnn_type --device $device --stage $stage_no
taskset -c $cpus python source/tagexplainer.py --dataset Mutag --gnn_type $gnn_type --device $device --stage $stage_no
taskset -c $cpus python source/tagexplainer.py --dataset NCI1 --gnn_type $gnn_type --device $device --stage $stage_no
done
done
# generate results
#gnn_type=gcn
#explainers="tagexplainer_1 tagexplainer_2"
#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