• Stars
    star
    258
  • Rank 158,189 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created over 4 years ago
  • Updated almost 2 years ago

Reviews

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

Repository Details

Experimental results obtained with the MinCutPool layer as presented in the 2020 ICML paper "Spectral Clustering with Graph Neural Networks for Graph Pooling"

Spectral Clustering with Graph Neural Networks for Graph Pooling

This code reproduces the experimental results obtained with the MinCutPool layer as presented in the ICML 2020 paper

Spectral Clustering with Graph Neural Networks for Graph Pooling
F. M. Bianchi*, D. Grattarola*, C. Alippi

The official Tensorflow implementation of the MinCutPool layer is in Spektral.

The PyTorch implementation of MinCutPool is in Pytorch Geometric.

Setup

The code is based on Python 3.5, TensorFlow 1.15, and Spektral 0.1.2. All required libraries are listed in requirements.txt and can be installed with

pip install -r requirements.txt

Image segmentation

Run Segmentation.py to perform hyper-segmentation, generate a Region Adjacency Graph from the resulting segments, and then cluster the nodes of the RAG graph with the MinCutPool layer.

Clustering

Run Clustering.py to cluster the nodes of a citation network. The datasets cora, citeseer, and pubmed can be selected. Results are provided in terms of homogeneity score, completeness score, and normalized mutual information (v-score).

Pytorch

Clustering_pytorch.py contains a basic implementation in Pytorch based on Pytorch Geometric.

Autoencoder

Run Autoencoder.py to train an autoencoder with bottleneck and compute the reconstructed graph. It is possible to switch between the ring and grid graphs, but also any other point clouds from the PyGSP library are supported. Results are provided in terms of the Mean Squared Error.

Graph Classification

Run Graph_Classification.py to train a graph classifier. Additional classification datasets are available here (drop them in data/classification/) and here (drop them in data/). Results are provided in terms of classification accuracy averaged over 10 runs.

Pytorch

A basic Pytorch implementation of the graph classification task can be found in this example from Pytorch Geometric.

Citation

Please, cite the original paper if you are using MinCutPool in your research

@inproceedings{bianchi2020mincutpool,
    title={Spectral Clustering with Graph Neural Networks for Graph Pooling},
    author={Bianchi, Filippo Maria and Grattarola, Daniele and Alippi, Cesare},
    booktitle={Proceedings of the 37th international conference on Machine learning},
    pages={2729-2738},
    year={2020},
    organization={ACM}
}

License

The code is released under the MIT License. See the attached LICENSE file.

More Repositories

1

Time-series-classification-and-clustering-with-Reservoir-Computing

Library for implementing reservoir computing models (echo state networks) for multivariate time series classification and clustering.
Python
330
star
2

python-time-series-handbook

Material for the course "Time series analysis with Python"
Jupyter Notebook
85
star
3

Ensemble-Conformalized-Quantile-Regression

Valid and adaptive prediction intervals for probabilistic time series forecasting
Jupyter Notebook
79
star
4

Diffusion_models_tutorial

Jupyter Notebook
62
star
5

Benchmark_dataset_for_graph_classification

This repository contains a dataset for testing graph classification algorithms, such as Graph Kernels and Graph Neural Networks.
Python
42
star
6

The-expressive-power-of-pooling-in-GNNs

Code and dataset to test empirically the expressive power of graph pooling operators.
Python
30
star
7

Simplifying-Clustering-with-Graph-Neural-Networks

Tensorflow and Pytorch implementation of "Just Balance GNN" for graph clustering.
Python
29
star
8

Bidirectional-Deep-readout-Echo-State-Network

Multi-variate time series classification with a bi-directional ESN with a readout implemented as a deep neural network.
Python
25
star
9

Total-variation-graph-neural-networks

Pytorch and Tensorflow implementation of TVGNN, presented at ICML 2023.
Python
20
star
10

TCK_AE

MATLAB
17
star
11

Physics-Informed-Neural-Networks-tutorial

Hands-on tutorial for implementing Physics Informed Neural Networks in Pytorch
Jupyter Notebook
14
star
12

Variational-Graph-Auto-encoders-Tensorflow-2-Spektral-

Python
14
star
13

Pyramidal-Reservoir-Graph-Neural-Networks

Software implementation of Pyramidal Reservoir Graph Neural Networks
Python
9
star
14

Time-Series-Cluster-Kernel

Kernel similarity for classification and clustering of multi-variate time series with missing values
Jupyter Notebook
3
star
15

Learning-representations-for-multivariate-time-series-with-missing-data

Encoding of real valued time series with missing data with an autoencoder regularized with TCK
Python
2
star
16

lecture_RNN_phase_space

Jupyter Notebook
2
star
17

Autoencoder-Tensorflow

Autoencoer in Tensorflow with most of the basic functionalities and options for training. Multiple models can be handled and trained at the same time.
Python
2
star
18

Tutorial_GNN_explainability

Jupyter Notebook
2
star
19

Recognition-of-polar-lows-in-Sentinel-1-SAR-images-with-deep-learning

Code implementation for the paper "Recognition of polar lows in Sentinel-1 SAR images with deep learning"
Jupyter Notebook
1
star