GithubHelp home page GithubHelp logo

atong01 / trainable_symmetry Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 879 KB

Implementation of learnable generalized geometric scattering transforms on graphs

Shell 0.81% Makefile 0.71% Python 50.23% Jupyter Notebook 48.26%
gnn graph-neural-networks scattering-networks scattering-transform

trainable_symmetry's Introduction

Trainable Symmetry

PyTorch Lightning Config: Hydra Template
Paper

This is code for the paper ``Understanding Graph Neural Networks with Generalized Geometric Scattering Transforms''. For tables presented in the paper see notebooks/results_eval.ipynb.

Description

This code implements a generalized geometric scattering transform implemented in pytorch and pytorch lightning and configured by hydra.

How to run

Install dependencies

# clone project
git clone https://github.com/atong01/trainable_symmetry
cd trainable_symmetry

# [OPTIONAL] create conda environment
conda create -n myenv python=3.9
conda activate myenv

# install pytorch according to instructions
# https://pytorch.org/get-started/

# install requirements
pip install -r requirements.txt

Copy .env.example to .env and configure directories in .env as needed.

To reproduce experiments in paper (also in scripts/basic.sh):

python src/train.py -m datamodule.transform_args.alpha=-0.5,-0.25,0.0,0.25,0.5 \
  datamodule.dataset=NCI1,NCI109,DD,PROTEINS,MUTAG,PTC_MR,REDDIT-BINARY,REDDIT-MULTI-5K,COLLAB,IMDB-BINARY,IMDB-MULTI \
  logger=wandb \
  datamodule.transform_args.power=1,2 \
  seed=0,1,2,3,4,5,6,7,8,9

python src/train.py -m datamodule.transform_args.alpha=-0.5,-0.25,0.0,0.25,0.5 \
  datamodule.dataset=NCI1,NCI109,DD,PROTEINS,MUTAG,PTC_MR,REDDIT-BINARY,REDDIT-MULTI-5K,COLLAB,IMDB-BINARY,IMDB-MULTI \
  logger=wandb \
  datamodule.transform_args.power=1 \
  +datamodule.transform_args.cheb_order=10,100\
  seed=0,1,2,3,4,5,6,7,8,9
# train on CPU
python src/train.py trainer=cpu

# train on GPU
python src/train.py trainer=gpu

You can override any parameter from command line like this

python src/train.py trainer.max_epochs=20

BibTex Citation

@misc{perlmutter_understanding_2019,
  doi = {10.48550/ARXIV.1911.06253},
  url = {https://arxiv.org/abs/1911.06253},
  author = {Perlmutter, Michael and Gao, Feng and Wolf, Guy and Hirn, Matthew},
  keywords = {Machine Learning (stat.ML), Machine Learning (cs.LG), FOS: Computer and information sciences, FOS: Computer and information sciences},
  title = {Understanding Graph Neural Networks with Asymmetric Geometric Scattering Transforms},
  publisher = {arXiv},
  year = {2019},
}

trainable_symmetry's People

Contributors

atong01 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.