Giter Site home page Giter Site logo

pr-mpnn's Introduction

Probabilistically Rewired Message-Passing Neural Networks

drawing

Reference implementation of our rewiring method as proposed in

Probabilistically Rewired Message-Passing Neural Networks
Chendi Qian*, Andrei Manolache*, Kareem Ahmed, Zhe Zeng, Guy Van den Broeck, Mathias Niepert, Christopher Morris

*These authors contributed equally.
Co-senior authorship.

Environment setup

conda create -y -n prmpnn python=3.10
conda activate prmpnn

conda install pytorch  pytorch-cuda=11.7 -c pytorch-nightly -c nvidia
conda install openbabel fsspec rdkit -c conda-forge
pip install cmake
pip install --verbose git+https://github.com/pyg-team/pyg-lib.git
pip install --verbose torch_scatter
pip install --verbose torch_sparse
pip install --verbose torch_geometric

pip install ogb
pip install ml-collections
pip install numba
pip install sacred
pip install PyYAML
pip install wandb
pip install matplotlib
pip install seaborn
pip install GraphRicciCurvature
pip install gdown

Datasets

We empirically evaluate our rewiring method on multiple datasets.

Real-world datasets

TUDatasets: PyG class, paper

  • ZINC
  • Alchemy
  • MUTAG
  • PRC_MR
  • PROTEINS
  • NCI1
  • NCI109
  • IMDB-B
  • IMDB-M

OGB: website, paper

  • ogbg-molhiv

WebKB: PyG class

  • Cornell
  • Texas
  • Wisconsin

LRGB: code, paper

  • peptides-func
  • peptides-struct

QM9 used in DRew and SP-MPNN. Note there are different versions of QM9, e.g., PPGN

Synthetic datasets

EXP: code, paper

CSL: code, paper

Trees-NeighborsMatch: code, paper

Trees-LeafColor: Our own ⭐ ⭐ ⭐

Rewire options

We provide rewiring options as following:

  • Add edges / remove edges

  • Directed / undirected: meaning adding or deleting edges in a directed way or not. If not, will add and remove undirected edges.

  • Separated / merged: if separated, will sample 2 graphs, one with edges added and the other with edges removed. If merged, will merge the 2 graphs as one.

  • In-place / not in-place: if in-place, will add the edges based on the original edges, otherwise will return a graph with only the added edges.

Samplers that we use

To replicate experiments

We provide yaml files under configs, run e.g. python run.py with configs/zinc/edge_candidate/best.yaml

pr-mpnn's People

Contributors

chendiqian avatar andreimano 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.