• Stars
    star
    444
  • Rank 98,300 (Top 2 %)
  • Language
    Jupyter Notebook
  • License
    MIT License
  • Created almost 2 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Geometric GNN Dojo provides unified implementations and experiments to explore the design space of Geometric Graph Neural Networks.

โš”๏ธ Geometric GNN Dojo

Geometric GNN Dojo is a pedagogical resource for beginners and experts to explore the design space of Graph Neural Networks for geometric graphs.

Check out the accompanying paper 'On the Expressive Power of Geometric Graph Neural Networks', which studies the expressivity and theoretical limits of geometric GNNs.

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.

PDF | Slides | Video

โ“New to geometric GNNs: try our practical notebook on Geometric GNNs 101, prepared for MPhil students at the University of Cambridge.

Open In Colab

Architectures

The /src directory provides unified implementations of several popular geometric GNN architectures:

Experiments

The /experiments directory contains notebooks with synthetic experiments to highlight practical challenges in building powerful geometric GNNs:

  • kchains.ipynb: Distinguishing k-chains, which test a model's ability to propagate geometric information non-locally and demonstrate oversquashing with increased depth/longer chains.
  • 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.
  • incompleteness.ipynb: Counterexamples from Pozdnyakov et al., which test a layer's ability to create distinguishing fingerprints for local neighbourhoods and highlight the need for higher body order of local scalarisation (distances, angles, and beyond).

Installation

# Create new conda environment
conda create --prefix ./env python=3.8
conda activate ./env

# Install PyTorch (Check CUDA version for GPU!)
#
# Option 1: CPU
conda install pytorch==1.12.0 -c pytorch
#
# Option 2: GPU, CUDA 11.3
# conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch

# Install dependencies
conda install matplotlib pandas networkx
conda install jupyterlab -c conda-forge
pip install e3nn==0.4.4 ipdb ase

# Install PyG (Check CPU/GPU/MacOS)
#
# Option 1: CPU, MacOS
pip install torch-scatter torch-sparse torch-cluster torch-spline-conv -f https://data.pyg.org/whl/torch-1.12.0+cpu.html 
pip install torch-geometric
#
# Option 2: GPU, CUDA 11.3
# pip install torch-scatter torch-sparse torch-cluster torch-spline-conv -f https://data.pyg.org/whl/torch-1.12.1+cu113.html
# pip install torch-geometric
#
# Option 3: CPU/GPU, but may not work on MacOS
# conda install pyg -c pyg

Directory Structure and Usage

.
โ”œโ”€โ”€ README.md
|
โ”œโ”€โ”€ geometric_gnn_101.ipynb             # A gentle introduction to Geometric GNNs
| 
โ”œโ”€โ”€ experiments                         # Synthetic experiments
โ”‚   โ”œโ”€โ”€ incompleteness.ipynb            # Experiment on counterexamples from Pozdnyakov et al.
โ”‚   โ”œโ”€โ”€ kchains.ipynb                   # Experiment on k-chains
โ”‚   โ””โ”€โ”€ rotsym.ipynb                    # Experiment on rotationally symmetric structures
| 
โ””โ”€โ”€ src                                 # Geometric GNN models library
    โ”œโ”€โ”€ models.py                       # Models built using layers
    โ”œโ”€โ”€ gvp_layers.py                   # Layers for GVP-GNN
    โ”œโ”€โ”€ egnn_layers.py                  # Layers for E(n) Equivariant GNN
    โ”œโ”€โ”€ tfn_layers.py                   # Layers for Tensor Field Networks
    โ”œโ”€โ”€ modules                         # Layers for MACE
    โ””โ”€โ”€ utils                           # Helper functions for training, plotting, etc.

Contact

Authors: Chaitanya K. Joshi ([email protected]), Simon V. Mathis ([email protected]). We welcome your questions and feedback via email or GitHub Issues.

Citation

@article{joshi2022expressive,
  title={On the Expressive Power of Geometric Graph Neural Networks},
  author={Joshi, Chaitanya K. and Bodnar, Cristian and  Mathis, Simon V. and Cohen, Taco and Liรฒ, Pietro},
  journal={NeurIPS Workshop on Symmetry and Geometry in Neural Representations},
  year={2022},
}

More Repositories

1

efficient-gnns

Code and resources on scalable and efficient Graph Neural Networks
Python
526
star
2

graph-convnet-tsp

Code for the paper 'An Efficient Graph Convolutional Network Technique for the Travelling Salesman Problem' (INFORMS Annual Meeting Session 2019)
Python
292
star
3

learning-tsp

Code for the paper 'Learning TSP Requires Rethinking Generalization' (CP 2021)
Jupyter Notebook
198
star
4

geometric-rna-design

gRNAde: Geometric Deep Learning for 3D RNA inverse design
Jupyter Notebook
138
star
5

personalized-dialog

Code for the paper 'Personalization in Goal-oriented Dialog' (NeurIPS 2017 Conversational AI Workshop)
Python
132
star
6

markowitz-portfolio-optimization

Markowitz portfolio optimization on synthetic and real stocks
Python
73
star
7

lstm-context-embeddings

Augmenting word embeddings with their surrounding context using bidirectional RNN
Python
60
star
8

regression-stock-prediction

Predicting Googleโ€™s stock price using regression
Python
58
star
9

gated-graph-transformers

Transformers are Graph Neural Networks!
Python
49
star
10

learning-paradigms-for-tsp

Code for the paper 'On Learning Paradigms for the Travelling Salesman Problem' (NeurIPS 2019 Graph Representation Learning Workshop)
Python
29
star
11

auto-mate-for-tinder

Use Artificial Intelligence to find promiscuous Tinder matches
CSS
24
star
12

knowledge-graphs

Building Knowledge Graphs from Unstructured Text
Jupyter Notebook
22
star
13

structured-self-attention

Keras implementation of the Structured Self-Attentive Sentence Embedding model
Python
19
star
14

flask-mongodb

A simple REST Api using Flask-Restful and MongoDB
Python
17
star
15

working-women

Code for the paper 'Working Women and Caste in India' (ICLR 2019 AI for Social Good Workshop)
Jupyter Notebook
14
star
16

music-library-ocd-fixer

Automatically fetch metadata for your music collection and rename files accordingly
Python
13
star
17

mnist-cnn-autoencoder

Using deep CNNs and stacked autoencoders to classify images of digits from the MNIST dataset
Python
7
star
18

Perceptron

Perceptron algorithm implemented from scratch
Python
6
star
19

nn-classification-and-regression

Using deep neural networks for classification and regression problems
Python
5
star
20

NTUOSS-MachineLearningWorkshop

Introductory Machine Learning workshop for NTU Open Source Society
Python
5
star
21

transformers-are-gnns

4
star
22

Velocity

A 2D lane-switching game made using the graphics.h C++ library
C++
1
star
23

PreparedForU

A simple tool for university aspirants and students in Singapore to estimate and visualize their spending based on publicly available data
Vue
1
star