-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graph Pooling Framework 🚀 #6455
Comments
Would it be useful to add a
|
Yes, definitely :) |
#6455 Adds base classes `Select`, `Connect` and `Pooling` for the Graph pooling framework. TODO in this PR 1. Implement `TopkPooling` with this framework to verify the interface. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: rusty1s <matthias.fey@tu-dortmund.de>
Hey, first author of the paper here! This is super, if help is still wanted (as I see on the tags) I'd be happy to participate! Worth mentioning that there is an implementation of SRC in Spektral and a few layers implemented with it, it might be possible to translate the implementation from TF to Torch/PyG. |
@danielegrattarola firstly great paper. Sorry for the late reply. |
Towards #6455. This PR makes the following changes 1. Removes the `Pooling` base class. The current implementation isn't flexible enough to support all pooling operators. Instead pooling operators will implement their own forward method, using `Select` , `Connect` and `Aggregate` operators. 2. Updated the `Select` operator. It now returns `SelectOutput` which contains `node_index`, `cluster_index`, `num_clusters` and `weight`. Where `weight` is the weight given to a node assignment to a cluster. --------- Co-authored-by: rusty1s <matthias.fey@tu-dortmund.de>
benchmark of topK function |
topk microbench PR: |
diff pool microbench PR: |
#7361 |
🚀 The feature, motivation and pitch
The "Understanding Pooling in Graph Neural Networks" paper introduces a simple framework to unify (most) graph pooling approaches:
Currently, the pooling operators included in PyG are implemented isolated from each other, and there exists a lot of repetitive code and different interfaces, which makes their application confusing and challenging. By following the above approach, we can unify existing implementations and can accelerate new research on graph pooling. For example, we can introduce base classes for each of the aforementioned steps:
With this, e.g.,
graclus
can be moved to aSelect
operator andTopK
pooling can be moved to aConnect
operator.Relevant twitter thread: https://twitter.com/riceasphait/status/1447867635442585601
Tasks:
Select
andConnect
base classes [Pooling
: Base classes for Graph Pooling framework #6540]Pooling
base class [Pooling
: Base classes for Graph Pooling framework #6540]Add concrete
Select
andConnect
classes and update implementations of.TopKPooling
[RefactorTopkPooling
intoSelectTopK
#7308]SAGPooling
,ASAPooling
,PANPooling
#7617The text was updated successfully, but these errors were encountered: