You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Spectral Clustering with Graph Neural Networks for Graph Pooling
2
-
Experimental results obtained with the MinCutPool layer as presented in the 2020 ICML paper [Spectral Clustering with Graph Neural Networks for Graph Pooling](https://arxiv.org/abs/1907.00481)
This repository is based on [MinCutPool implementation](https://graphneural.network/layers/pooling/#mincutpool) provided by [Spektral](https://graphneural.network/), the Keras/TensorFlow library for Graph Neural Networks. A Pytorch implementation of MinCutPool is also available in the [Pytorch Geometric](https://pytorch-geometric.readthedocs.io/en/latest/modules/nn.html#torch_geometric.nn.dense.mincut_pool.dense_mincut_pool) library.
5
+
This code reproduces the experimental results obtained with the MinCutPool layer
6
+
as presented in the ICML 2020 paper
7
7
8
-
**Required libraries**
8
+
[Spectral Clustering with Graph Neural Networks for Graph Pooling](https://arxiv.org/abs/1907.00481)
9
+
F. M. Bianchi, D. Grattarola, C. Alippi
9
10
10
-
- spektral (tested on v.1.2)
11
-
- tensorflow (tested on v.1.14)
12
-
- keras (tested on v.2.2.4)
13
-
- scikit-learn (tested on v.0.22.1)
14
-
- scikit-image (tested on v.0.16.2)
15
-
- networkx (tested on v.2.4)
16
-
- pygsp (tested on v.0.5.1 )
17
-
- pandas
18
-
- scipy
19
-
- tqdm
20
-
- numpy
21
-
- matplotlib
11
+
The official implementation of the MinCutPool layer can be found in
Run [Segmentation.py](https://github.com/FilippoMB/Spectral-Clustering-with-Graph-Neural-Networks-for-Graph-Pooling/blob/master/Segmentation.py) to perform hyper-segmentation, generate a Region Adjacency Graph from the resulting segments, and then cluster the nodes of the RAG graph by means of a GNN equipped with the MinCutPool layer.
30
+
Run [Segmentation.py](https://github.com/FilippoMB/Spectral-Clustering-with-Graph-Neural-Networks-for-Graph-Pooling/blob/master/Segmentation.py)
31
+
to perform hyper-segmentation, generate a Region Adjacency Graph from the
32
+
resulting segments, and then cluster the nodes of the RAG graph with the
Run [Clustering.py](https://github.com/FilippoMB/Spectral-Clustering-with-Graph-Neural-Networks-for-Graph-Pooling/blob/master/Clustering.py) to cluster the nodes of a citation network. The datasets ````cora````, ````citeseer````, and ````pubmed```` can be selected.
34
-
Resutls are provided in terms of homogeneity score, completeness score, and normalized mutual information (v-score).
39
+
Run [Clustering.py](https://github.com/FilippoMB/Spectral-Clustering-with-Graph-Neural-Networks-for-Graph-Pooling/blob/master/Clustering.py)
40
+
to cluster the nodes of a citation network. The datasets `cora`, `citeseer`, and
41
+
`pubmed` can be selected.
42
+
Results are provided in terms of homogeneity score, completeness score, and
Run [Autoencoder.py](https://github.com/FilippoMB/Spectral-Clustering-with-Graph-Neural-Networks-for-Graph-Pooling/blob/master/Autoencoder.py) to compute the reconstruction from an Autoencoder with bottleneck. It is possible to switch between the ````ring```` and ````grid````, but also the other [point-clouds datasets](https://pygsp.readthedocs.io/en/stable/reference/graphs.html?highlight=bunny#graph-models) from the [PyGSP](https://pygsp.readthedocs.io/en/stable/index.html) library are supported. Results are provided in terms of Mean Squared Error.
50
+
Run [Autoencoder.py](https://github.com/FilippoMB/Spectral-Clustering-with-Graph-Neural-Networks-for-Graph-Pooling/blob/master/Autoencoder.py)
51
+
to train an autoencoder with bottleneck and compute the reconstructed graph. It
52
+
is possible to switch between the `ring` and `grid` graphs, but also any other
from the [PyGSP](https://pygsp.readthedocs.io/en/stable/index.html) library
55
+
are supported. Results are provided in terms of the Mean Squared Error.
42
56
43
57
## Graph Classification
44
58
45
59
Run [Classification.py](https://github.com/FilippoMB/Spectral-Clustering-with-Graph-Neural-Networks-for-Graph-Pooling/blob/master/Classification.py) to train a graph classifier. Additional classification datasets are available [here](https://chrsmrrs.github.io/datasets/) (drop them in ````data/classification/````) and [here](https://github.com/FilippoMB/Benchmark_dataset_for_graph_classification) (drop them in ````data/````).
46
-
Results are provided in terms of classification accuray averaged over 10 folds.
60
+
Results are provided in terms of classification accuracy averaged over 10 runs.
47
61
48
62
## Citation
49
63
50
-
Please, cite the original paper if you are using MinCutPool in your reasearch
64
+
Please, cite the original paper if you are using MinCutPool in your research
51
65
52
66
@inproceedings{bianchi2020mincutpool,
53
67
title={Spectral Clustering with Graph Neural Networks for Graph Pooling},
@@ -58,6 +72,6 @@ Please, cite the original paper if you are using MinCutPool in your reasearch
58
72
organization={ACM}
59
73
}
60
74
61
-
62
75
## License
76
+
63
77
The code is released under the MIT License. See the attached LICENSE file.
0 commit comments