MCPcopy Index your code
hub / github.com/AaltoPML/Rethinking-pooling-in-GNNs

github.com/AaltoPML/Rethinking-pooling-in-GNNs @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
99 symbols 363 edges 29 files 3 documented · 3% updated 5y ago★ 623 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Rethinking pooling in graph neural networks

image info

This repo contains code for Rethinking pooling in graph neural networks (NeurIPS 2020).

In our work, we build upon representative GNNs (Graclus, DiffPool, GMN, MinCutPool) and introduce variants that challenge the need for locality-preserving representations, either using randomization or clustering on the complement graph. Results show that using these variants does not result in any decrease in performance.

Authors: - Diego Mesquita (diego.mesquita@aalto.fi) --- corresponding author. - Amauri H. Souza - Sami Kaski

Requirements

We have built this implementation using: - PyTorch v1.4.0 - PyTorch Geometric v1.4.3 - OGB v1.2.1

Usage

There is a folder and a main file for each model (diffpool, gmn, graclus and mincut). As an example, the code below runs Graclus and its non-local variant (Complement) on NCI1:

$ python main_graclus.py --dataset NCI1 --reproduce --pooling_type graclus
$ python main_graclus.py --dataset NCI1 --reproduce --pooling_type complement

Each main file includes optional arguments.

Cite

@inproceedings{rethinkpooling2020,
  title={Rethinking pooling in Graph Neural Networks},
  author={D. Mesquita and A. H. Souza and S. Kaski},
  booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
  year={2020}
}

Acknowledgement

To avoid implementation biases, we have closely followed available code. In doing so, we have either re-used or modified code from gnn-comparison, pytorch-geometric, and benchmarking-gnns.

Core symbols most depended-on inside this repo

evaluate
called by 8
gmn/train.py
fetch_assign_matrix
called by 5
utils.py
set_seed
called by 4
utils.py
graph_permutation
called by 4
utils.py
get_data
called by 4
data/datasets.py
train
called by 4
gmn/train.py
get_params
called by 4
gmn/params.py
bn
called by 3
diffpool/diffpool_v2.py

Shape

Method 44
Function 39
Class 16

Languages

Python100%

Modules by API surface

data/datasets.py15 symbols
utils.py10 symbols
diffpool/diffpool_v2.py10 symbols
diffpool/diffpool.py9 symbols
gmn/GMN.py8 symbols
gmn/train.py6 symbols
data/smnist.py6 symbols
data/mod_zinc.py6 symbols
mincut/train.py4 symbols
graclus/train.py4 symbols
graclus/graclus.py4 symbols
diffpool/train.py4 symbols

For agents

$ claude mcp add Rethinking-pooling-in-GNNs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page