Giter Site home page Giter Site logo

adrianarnaiz / diffwire Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 0.0 12.41 MB

DiffWire: Inductive Graph Rewiring via the Lovász Bound. In Proceedings of the First Learning on Graphs Conference. 2022. Adrian Arnaiz-Rodriguez, Ahmed Begga, Francisco Escolano and Nuria Oliver.

Home Page: https://proceedings.mlr.press/v198/arnaiz-rodri-guez22a.html

Python 9.01% Shell 0.57% Jupyter Notebook 90.42%
gnn graph graphneuralnetwork rewiring commute-times graph-neural-networks

diffwire's Introduction

DiffWire: Inductive Graph Rewiring via the Lovász Bound

Accepted at the First Learning on Graphs Conference 2022

LoG PWC

image

$$ \left| \frac{1}{vol(G)}CT_{uv}-\left(\frac{1}{d_u} + \frac{1}{d_v}\right)\right|\le \frac{1}{\lambda_2}\frac{2}{d_{min}} $$

@InProceedings{arnaiz2022diffwire,
  title = 	 {{DiffWire: Inductive Graph Rewiring via the Lov{\'a}sz Bound}},
  author =       {Arnaiz-Rodr{\'i}guez, Adri{\'a}n and Begga, Ahmed and Escolano, Francisco and Oliver, Nuria M},
  booktitle = 	 {Proceedings of the First Learning on Graphs Conference},
  pages = 	 {15:1--15:27},
  year = 	 {2022},
  editor = 	 {Rieck, Bastian and Pascanu, Razvan},
  volume = 	 {198},
  series = 	 {Proceedings of Machine Learning Research},
  month = 	 {09--12 Dec},
  publisher =    {PMLR},
  pdf = 	 {https://proceedings.mlr.press/v198/arnaiz-rodri-guez22a/arnaiz-rodri-guez22a.pdf},
  url = 	 {https://proceedings.mlr.press/v198/arnaiz-rodri-guez22a.html}
}

Dependencies

Conda environment

conda create --name <env> --file requirements.txt

or

conda env create -f environment_experiments.yml
conda activate DiffWire

Code organization

  • datasets/: script for creating synthetic datasets. For non-synthetic ones: we use PyG in train.py
  • layers/: Implementation of the proposed GAP-Layer, CT-Layer, and the baseline MinCutPool (based on his repo).
  • tranforms/: Implementation og graph preprocessing baselines DIGL and SDRF, both based on the official repositories of the work.
  • trained_models/: files with the weight of some trained models.
  • nets.py: Implementation of GNNs used in our experiments.
  • train.py: Script with inline arguments for running the experiments.

Run experiments

python train.py --dataset REDDIT-BINARY --model CTNet --cuda cuda:0
python train.py --dataset REDDIT-BINARY --model GAPNet --derivative laplacian --cuda cuda:0
python train.py --dataset REDDIT-BINARY --model GAPNet --derivative normalizeed --cuda cuda:0

experiments_all.sh list all the experiments.

Code Examples

See jupyter notebook examples at the tutorial presented at The First Learning on Graphs Conference: Graph Rewiring: From Theory to Applications in Fairness

  • CT-Layer Open In Colab

diffwire's People

Contributors

adrianarnaiz avatar ahmedbegggaua avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

diffwire's Issues

Preprocess method

In train.py file, I guess there exists 3 main preprocessing methods.
However, the only one working mehtod is digl.
Are you willing to update the version of "sdrf" and "knn"?

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.