/graph_restructure

Primary LanguageJupyter NotebookMIT LicenseMIT

Restructuring Graph for Higher Homophily via Learnable Spectral Clusterin

Installation

The following dependencies are required

jupyter>=1.0.0
networkx=2.7.1
numpy=1.21.2
pandas=1.4.1
pyg=2.0.4
python=3.9.7
pytorch=1.11.0
scikit-learn=1.0.2
scipy=1.7.3
seaborn=0.11.2
torchaudio=0.11.0
torchvision=0.12.0

Pre-processing

Run run_rewirer.sh, this may take some time

Main results

To reproduce results in Table 1, Figure 5 and Figure 6, open the relevant run_gcn.sh file, uncomment the lines you want to run and execute the script

Appendix

To reproduce results of Figure 7, Table 3 and Figure 8, run spectral_analysis.py in the appendix directory.