Code for the ICML 2022 paper "SpeqNets: Sparsity-aware Permutation-equivariant Graph Networks".
Python 3.9
eigen3
numpy
pandas
scipy
sklearn
torch 1.10.x
torch-geometric 2.0.x
pybind11
libsvm
All results in the paper and the appendix can be reproduced by the following the steps below.
You first need to build the Python package:
cd k_s_wl_cpp/implementation/tud_benchmark/kernel_baselines
- You might need to adjust the path to
pybind
inkernel_baselines.cpp
, then run- MaxOS: c++ -O3 -shared -std=c++11 -undefined dynamic_lookup
python3 -m pybind11 --includes
kernel_baselines.cpp src/*cpp -o ../kernel_baselinespython3-config --extension-suffix
- Linux: c++ -O3 -shared -std=c++11 -fPIC
python3 -m pybind11 --includes
kernel_baselines.cpp src/*cpp -o ../kernel_baselinespython3-config --extension-suffix
- MaxOS: c++ -O3 -shared -std=c++11 -undefined dynamic_lookup
cd ..
- Run
python main_kernel.py
andpython main_gnn.py
You first need to build the Python package:
-
cd neural_graph/preprocessing
-
You might need to adjust the path to
pybind
inpreprocessing.cpp
, then run- MaxOS: c++ -O3 -shared -std=c++11 -undefined dynamic_lookup
python3 -m pybind11 --includes
preprocessing.cpp src/*cpp -o ../preprocessingpython3-config --extension-suffix
- Linux: c++ -O3 -shared -std=c++11 -fPIC
python3 -m pybind11 --includes
preprocessing.cpp src/*cpp -o ../preprocessingpython3-config --extension-suffix
- MaxOS: c++ -O3 -shared -std=c++11 -undefined dynamic_lookup
-
Run the Python scripts
- For example:
python main_2_2_alchemy_10K.py
,python main_1_1_QM9.py
, ...
- For example:
cd neural_node
- Run
python gnn_1.py
,python simple_node_2_1.py
, ...