Code for our paper Towards Principled Graph Transformers.
We recommend to use the package manager conda
. Once installed run
conda create -n towards-principled-gts python=3.10
conda activate towards-principled-gts
Install all dependencies via
pip install -e .
We use hydra
for configuring experiments. See here for a tutorial on the hydra
override syntax.
NOTE: By default, logging with
wandb
is disabled. To enable it setwandb_project
in the command line. Optionally, setwandb_entity
andwandb_name
to configure your entity and run name, respectively.
For the BREC benchmark, run
python expressivity/main.py root=/path/to/data/root
respectively, where /path/to/data/root
specifies the path to your data folder. This folder will be created if it does not exist.
To run the ZINC, Alchemy or QM9 dataset, run
python molecular-regression/[zinc|alchemy|qm9].py root=/path/to/data/root
respectively, where /path/to/data/root
specifies the path to your data folder. This folder will be created if it does not exist.
To run the Cornell, Texas or Wisconsin dataset, run
python node-classification/webkb.py dataset=[Cornell|Texas|Wisconsin] root=/path/to/data/root
respectively, where /path/to/data/root
specifies the path to your data folder. This folder will be created if it does not exist.
For the CLRS experiments see our dedicated fork at https://github.com/ksmdnl/clrs.