Official repository of the paper "The expressive power of pooling in Graph Neural Networks" by F. M. Bianchi and V. Lachi presented at NeurIPS 2023.
In a nutshell, a graph pooling operator can be expressed as the composition of 3 functions:
-
$\texttt{SEL}$ : defines how to form the vertices of the coarsened graph; -
$\texttt{RED}$ : computes the vertex features in the coarsened graph; -
$\texttt{CON}$ : computes the edges in the coarsened graphs.
More details about the Select-Reduce-Connect framework can be found here.
If certain conditions are met on the GNN layers before pooling, on the
This repository contains the EXPWL1 dataset and the code to test empirically the expressivity of existing graph pooling operators, which is their ability to generate coarsened graphs that are still distinguishable.
Run python main.py --pooling 'method'
to perform graph classification on the EXPWL1 dataset, where 'method'
can be one of the following:
None, 'diffpool', 'mincut', 'dmon', 'edgepool', 'graclus', 'kmis', 'topk', 'panpool',
'asapool', 'sagpool', 'dense-random', 'sparse-random', 'comp-graclus'
The code is based on Pytorch Geometric and was tested on:
- torch v2.0.0
- torch_geometric v2.3.0
The dataset contains 1500 pairs of graphs
The dataset can be downloaded here and the Pytorch Geometric loader is in utils.py.
Please, consider citing our paper if you use this code or EXPWL1 dataset in your research:
@article{bianchi2023expressive,
title={The expressive power of pooling in Graph Neural Networks},
author={Filippo Maria Bianchi and Veronica Lachi},
journal={Advances in neural information processing systems},
volume={36},
year={2023}
}