This repository is the official implementation of DiGRAF: Diffeomorphic Graph-Adaptive Activation Function.
Create a virtual environment in python (recommended to use Python 3.10):
conda create -n digraf python=3.10Activate the virtual environment:
conda activate digrafClone the repository:
git clone git@github.com:ipsitmantri/dynamic-graph-activation.gitDo a local install of the repository :
cd dynamic-graph-activation
pip install -e .Now install other requirements:
pip install -r requirements.txtThe hyperparameter sweep config files are defined in conf/wandb_sweep directory. Follow the below instructions to reproduce our main results.
To obtain a <sweep-id> for node classification datasets, run
wandb sweep conf/wandb_sweep/<variant>_nodecls_<dataset>.yamlwhere <dataset> can be choosen from [cora, citeseer, pubmed, flickr, blog] and <variant> can be chosen from [digraf, digraf_wo]
Then run wandb agent <sweep-id> to launch the sweep.
To obtain a <sweep-id> for OGB datasets, run
wandb sweep conf/wandb_sweep/<variant>_ogb_<dataset>.yamlwhere <dataset> can be choosen from [molhiv, molbace, molesol, moltox] and <variant> can be chosen from [digraf, digraf_wo]
Then run wandb agent <sweep-id> to launch the sweep.
To obtain a <sweep-id> for ZINC dataset, run
wandb sweep conf/wandb_sweep/<variant>_zinc.yamlwhere <variant> can be chosen from [digraf, digraf_wo]
Then run wandb agent <sweep-id> to launch the sweep.
To obtain a <sweep-id> for TU datasets, run
wandb sweep conf/wandb_sweep/<variant>_graphcls_tud_<dataset>.yamlwhere <dataset> can be choosen from [mutag, proteins, nci1, nci109, ptcmr] and <variant> can be chosen from [digraf, digraf_wo]
Then run wandb agent <sweep-id> to launch the sweep.
The hyperparameter sweep config files can be found at conf/wandb_sweep/baseline_*. To run different baseline activations i.e [relu, identity, sigmoid, tanh, gelu, elu, leakyrelu, tanh, prelu, maxout, swish, max, median, grelu], you have to change the parameters.activation value in the respective config file.
Follow the steps below to get <sweep-id>:
wandb sweep conf/wandb_sweep/baseline_nodecls_<dataset>.yamland choose <dataset> from [cora, citeseer, pubmed, flickr, blog]
wandb sweep conf/wandb_sweep/baseline_ogb_<dataset>.yamland choose <dataset> from [molhiv, molbace, molesol, moltox]
wandb sweep conf/wandb_sweep/baseline_zinc.yamlwandb sweep conf/wandb_sweep/baseline_graphcls_tud_<dataset>.yamland choose <dataset> from [mutag, proteins, nci1, nci109, ptcmr]
After obtaining a <sweep-id>, launch the agent using wandb agent <sweep-id>. By default, all baselines use relu activation.
@inproceedings{
mantri2024digraf,
title={Di{GRAF}: Diffeomorphic Graph-Adaptive Activation Function},
author={Krishna Sri Ipsit Mantri and Xinzhi Wang and Carola-Bibiane Sch{\"o}nlieb and Bruno Ribeiro and Beatrice Bevilacqua and Moshe Eliasof},
booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
year={2024},
url={https://openreview.net/forum?id=ZZoW4Z3le4}
}