Skip to content

Commit

Permalink
Added all experiments for Graph Extended Filtration Learning, readout…
Browse files Browse the repository at this point in the history
… ablation study, filtration convolution length experiment, and the standard GNN baseline.
  • Loading branch information
simonzhang00 committed Jul 18, 2022
1 parent aed9ba9 commit d6d8b2d
Show file tree
Hide file tree
Showing 282 changed files with 24,844 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/GraphExtendedFiltrationLearning.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions 2cycles_average.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

for iter in {0..0}
do
dataset="2cycles"
name=${dataset}-${iter}
python3 -m train.2cycles_train_eval --readout average --num_epochs 100 --batch_size 128 --output_dir ./results --device 0 --exp_name ${name} #&> imdb-multi-slurmfiles/slurm-${SLURM_JOB_ID}.out
done
8 changes: 8 additions & 0 deletions 2cycles_extpers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

for iter in {0..0}
do
dataset="2cycles"
name=${dataset}-${iter}
python3 -m train.2cycles_train_eval --readout extph --num_epochs 100 --batch_size 128 --output_dir ./results --device 0 --exp_name ${name} #&> imdb-multi-slurmfiles/slurm-${SLURM_JOB_ID}.out
done
8 changes: 8 additions & 0 deletions 2cycles_max.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

for iter in {0..0}
do
dataset="2cycles"
name=${dataset}-${iter}
python3 -m train.2cycles_train_eval --readout max --num_epochs 100 --batch_size 128 --output_dir ./results --device 0 --exp_name ${name} #&> imdb-multi-slurmfiles/slurm-${SLURM_JOB_ID}.out
done
8 changes: 8 additions & 0 deletions 2cycles_sum.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

for iter in {0..0}
do
dataset="2cycles"
name=${dataset}-${iter}
python3 -m train.2cycles_train_eval --readout sum --num_epochs 100 --batch_size 128 --output_dir ./results --device 0 --exp_name ${name} #&> imdb-multi-slurmfiles/slurm-${SLURM_JOB_ID}.out
done
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#Graph Extended Filtration Learning

## Summary
It is impossible for a standard message passing GNN with finite receptive field to distinguish arbitrary cycle lengths for graph classification. We address this problem by using extended persistence in the readout function. Extended persistence is a quantifiable multiscale method to capture the relative prominence of cycles and connected components. We also improve the computation of extended perisistence by using a link-cut tree data structure to dynamically maintain cycle information and introduce parallelism.

## Installation
* python==3.9.1
* torch==1.10.1
* CUDA==11.2
* GCC==7.5.0
* torch-geometric==2.0.5
* torch-scatter==2.0.9
* torch-sparse==0.6.13

## Running Experiments
Replace "proteins" with any of dd/mutag/imdb-multi/molbace/molbbbp/2cycles/pinwheels below to run experiment on any dataset

To run the proteins readout ablation experiment run the following commands (in parallel):

```
source proteins_extpers.sh
source proteins_sum.sh
source proteins_max.sh
source proteins_average.sh
```

In general, change the --readout flag to the readout function of choice in the shell file.

To run the proteins filtration convolution length experiment, run the following commands (in parallel):
```
source proteinslen1_sup.sh
source proteinslen2_sup.sh
source proteinslen3_sup.sh
source proteinslen4_sup.sh
source proteinslen5_sup.sh
```

To run the standard message passing graph neural network baseline, run the command:

```
cd external_experiments/sup_baseline
source run_sup_baseline.sh
```

Binary file added data/__pycache__/data.cpython-38.pyc
Binary file not shown.
Binary file added data/__pycache__/utils.cpython-38.pyc
Binary file not shown.
Loading

0 comments on commit d6d8b2d

Please sign in to comment.