CarloLucibello / GraphNeuralNetworks.jl

Graph Neural Networks in Julia
https://carlolucibello.github.io/GraphNeuralNetworks.jl/dev/
MIT License
210 stars 47 forks source link

Local pooling in graph regression/classification problems #307

Closed msainsburydale closed 1 year ago

msainsburydale commented 1 year ago

Is it possible to use local pooling between the layers of a graph neural network, so that clusters of nodes are aggregated between graph convolution layers?

CarloLucibello commented 1 year ago

Do you have a specific paper in mind?

msainsburydale commented 1 year ago

Thanks for your quick reply. Understanding Pooling in Graph Neural Networks sparked my interest. The authors introduce a framework "SRC" for unifying local pooling operators discussed in the literature: (S)elect K subsets of nodes that will be aggregated, (R)educe over these node subsets (i.e., pool over them), and (C)onnect the aggregated nodes to form a new graph with K nodes.

Personally, I'm interested in applying a local pooling layer that is as similar as possible to conventional pooling found in CNNs. For context, my graph input is a spatial data set, edge features are the spatial distance between observations, and I'm performing a graph-level regression task. So, I thought a simple K-means clustering approach would be effective, or the Graclus algorithm referenced in the above paper:

Graclus halves the node set by iteratively collapsing a randomly selected node with its most strongly connected neighbour. The method is equivalent to more expensive approaches based on the eigendecomposition of the adjacency matrix.

Thanks in advance for any comments you may have.

CarloLucibello commented 1 year ago

It seems hard to produce a gpu-friendly implementation of some of those operators, but one can start with cpu-only implementations. I made a list of some of those pooling operators in #308