Graph Pooling/Coarsening

Hello,

Is there a straightforward way for graph pooling? I.e. cluster nodes together and generate a new graph based on the aforementioned clusters (where features can be averaged or maxed). If not, are there plans for doing so in the future?

Thanks

Currently we have no interface to handle pooling unless you write one, and we do have plan to support graph pooling layers.

1 Like

One question, what kind of clustering/coarsening algorithm would you like to see?
Currently my plan is to support spectral clustering and diffpool-like models.

Hi,

Speaking of graph pooling, are you referring to clustering nodes purely based on graph structure? Or take node feature into consideration? It would also be very helpful if you could share with us your thoughts of potential usecase of a graph pooling module.

@zihao, @HQ01 thanks both for your responses!

As far as clustering algorithms go, spectral clustering was the first thing I had in mind. What is perhaps just as important would be functionality to aggregate a graph according to the output of the clustering (whether by mean- or max-pool) and ideally disaggregating the graph as well (i.e. pass the features from the aggregate/cluster nodes to the initial nodes).

I’m more referring to clustering purely by graph structure. For the use case, the primary one would be a Unet-like model that can make node-level predictions and take into account higher-resolution properties of the input graph. A secondary one could be making graph level predictions (whether regression or classification) where going progressively to a smaller graph would be beneficial.

I wanted to follow up on this. I see now there are a number of global pooling methods in the library which pool a graph down to a single node, but can these methods be adapted for coarsening/local pooling?

I’m thinking of pooling operations similar to the ones presented here:

I saw there’s a number of modules in the library related to DiffPool (DiffPoolBatchedGraphLayer, BatchedDiffPool, etc), but there isn’t much documentation. Can any of these modules be used for coarsening?

@karl, thanks for your attention. No, global pooling can not be used for coarsening. And we are working on sequential(coarsening/local) pooling layers: see enhancement section at dgl 0.5 roadmap.

In sequential pooling layers, we would use new bipartite graph API to describe the message passing between nodes at level n and nodes at level n+1 for clarity, do you have any concern about it?