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.10
Activate the virtual environment:
conda activate digraf
Clone the repository:
git clone [email protected]:ipsitmantri/dynamic-graph-activation.git
Do a local install of the repository :
cd dynamic-graph-activation
pip install -e .
Now install other requirements:
pip install -r requirements.txt
The 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>.yaml
where <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>.yaml
where <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.yaml
where <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>.yaml
where <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>.yaml
and choose <dataset>
from [cora, citeseer, pubmed, flickr, blog]
wandb sweep conf/wandb_sweep/baseline_ogb_<dataset>.yaml
and choose <dataset>
from [molhiv, molbace, molesol, moltox]
wandb sweep conf/wandb_sweep/baseline_zinc.yaml
wandb sweep conf/wandb_sweep/baseline_graphcls_tud_<dataset>.yaml
and 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}
}