|
| 1 | +# Geometric GNN Dojo |
| 2 | + |
| 3 | +*The Geometric GNN Dojo* is a pedagogical resource for beginners and experts to explore the design space of **Graph Neural Networks for geometric graphs**. |
| 4 | + |
| 5 | +<!--  --> |
| 6 | + |
| 7 | +<figure><center><img src="https://www.chaitjo.com/publication/joshi-2022-expressive/geometric-gnn-axes.png" width="70%"></center></figure> |
| 8 | + |
| 9 | +Check out the accompanying paper ['On the Expressive Power of Geometric Graph Neural Networks'](https://www.chaitjo.com/publication/joshi-2022-expressive/), which characterises the expressive power and theoretical limitations of geometric GNNs through the lens of geometric graph isomorphism. |
| 10 | +> Chaitanya K. Joshi*, Cristian Bodnar*, Simon V. Mathis, Taco Cohen, and Pietro Liò. On the Expressive Power of Geometric Graph Neural Networks. *NeurIPS 2022 Workshop on Symmetry and Geometry in Neural Representations.* |
| 11 | +> |
| 12 | +>[PDF]() | [Slides](https://www.chaitjo.com/publication/joshi-2022-expressive/Geometric_GNNs_Slides.pdf) | [Video](https://youtu.be/VKj5wzZsoK4) |
| 13 | +
|
| 14 | + |
| 15 | +## Architectures |
| 16 | + |
| 17 | +The `/src` directory provides unified implementations of several popular geometric GNN architectures: |
| 18 | +- Invariant GNNs: [SchNet](https://arxiv.org/abs/1706.08566), [DimeNet](https://arxiv.org/abs/2003.03123) |
| 19 | +- Equivariant GNNs using cartesian vectors: [E(n) Equivariant GNN](https://proceedings.mlr.press/v139/satorras21a.html), [GVP-GNN](https://arxiv.org/abs/2009.01411) |
| 20 | +- Equivariant GNNs using spherical tensors: [Tensor Field Network](https://arxiv.org/abs/1802.08219), [MACE](http://arxiv.org/abs/2206.07697) |
| 21 | + |
| 22 | +## Experiments |
| 23 | + |
| 24 | +The `/experiments` directory contains notebooks with synthetic experiments to highlight practical challenges in building powerful geometric GNNs: |
| 25 | +- `kchains.ipynb`: Distinguishing k-chains, which test a model's ability to propagate geometric information non-locally and demonstrate oversquashing with increased depth. |
| 26 | +- `rotsym.ipynb`: Rotationally symmetric structures, which test a layer's ability to identify neighbourhood orientation and highlight the utility of higher order tensors in equivariant GNNs. |
| 27 | +- `incompleteness.ipynb`: Counterexamples from [Pozdnyakov et al.](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.125.166001), which test a layer's ability to create distinguishing fingerprints for local neighbourhoods and highlight the need for higher order scalarisation. |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +## Installation |
| 32 | + |
| 33 | +```bash |
| 34 | +# Create new conda environment |
| 35 | +conda create -n pyg python=3.8 |
| 36 | + |
| 37 | +# Install PyTorch (Check CUDA version!) |
| 38 | +conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch |
| 39 | + |
| 40 | +# Install PyG |
| 41 | +conda install pyg -c pyg -c conda-forge |
| 42 | + |
| 43 | +# Install other dependencies |
| 44 | +pip3 install e3nn==0.4.4 |
| 45 | +conda install matplotlib pandas networkx |
| 46 | +pip3 install ipdb ase |
| 47 | +conda install jupyterlab -c conda-forge |
| 48 | +``` |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | +## Directory Structure and Usage |
| 53 | + |
| 54 | +``` |
| 55 | +. |
| 56 | +├── README.md |
| 57 | +| |
| 58 | +├── experiments # Synthetic experiments |
| 59 | +│ ├── incompleteness.ipynb # Experiment on counterexamples from Pozdnyakov et al. |
| 60 | +│ ├── kchains.ipynb # Experiment on k-chains |
| 61 | +│ └── rotsym.ipynb # Experiment on rotationally symmetric structures |
| 62 | +| |
| 63 | +└── src # Geometric GNN models library |
| 64 | + ├── models.py # Models built using layers |
| 65 | + ├── gvp_layers.py # Layers for GVP-GNN |
| 66 | + ├── egnn_layers.py # Layers for E(n) Equivariant GNN |
| 67 | + ├── tfn_layers.py # Layers for Tensor Field Networks |
| 68 | + ├── modules # Layers for MACE |
| 69 | + └── utils # Helper functions for training, plotting, etc. |
| 70 | +``` |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | +## Citation |
| 75 | + |
| 76 | +``` |
| 77 | +@article{joshi2022expressive, |
| 78 | + title={On the Expressive Power of Geometric Graph Neural Networks}, |
| 79 | + author={Joshi, Chaitanya K. and Bodnar, Cristian and Mathis, Simon V. and Cohen, Taco and Liò, Pietro}, |
| 80 | + journal={NeurIPS Workshop on Symmetry and Geometry in Neural Representations}, |
| 81 | + year={2022}, |
| 82 | +} |
| 83 | +``` |
0 commit comments