Giter Site home page Giter Site logo

dlwbm123 / spectral-clustering-with-graph-neural-networks-for-graph-pooling Goto Github PK

View Code? Open in Web Editor NEW

This project forked from filippomb/spectral-clustering-with-graph-neural-networks-for-graph-pooling

0.0 1.0 0.0 3 MB

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

License: MIT License

Python 100.00%

spectral-clustering-with-graph-neural-networks-for-graph-pooling's Introduction

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 implementation of the MinCutPool layer can be found in Spektral.

An implementation of MinCutPool for PyTorch is also available 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).

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.

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={},
    year={2020},
    organization={ACM}
}

License

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

spectral-clustering-with-graph-neural-networks-for-graph-pooling's People

Contributors

danielegrattarola avatar filippomb 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.