-
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
Add support for projecting features before aggregation in SAGEConv
#4437
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4437 +/- ##
==========================================
- Coverage 82.69% 82.63% -0.06%
==========================================
Files 313 313
Lines 16240 16259 +19
==========================================
+ Hits 13429 13435 +6
- Misses 2811 2824 +13
Continue to review full report at Codecov.
|
9e4f67b
to
a804b4a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR. I am not sure I fully understand this. How does that differ from aggr=mean
and aggr=max
? IMO, these already implement the linked Equation (we just added LSTM support to make SAGEConv
finally support all proposed aggregations).
Thanks for your comment @rusty1s . As you know, the mean/max aggregator directly applies the mean/max reduction to all neighboring nodes. While the mean/max pool aggregator first applies an additional linear layer (+ bias) followed by an activation function, and only then, performs the element-wise mean/max reduction. |
f4bc063
to
3b96491
Compare
Thanks for the clarification. How about we add an option to apply the transformation before aggregation rather than after it? This way, there would be no need to modify the underlying aggregation scheme. |
That would be much cleaner indeed and would work with all existing aggregators, I will update my PR accordingly, by adding a |
Sounds good to me, thank you very much! I am wondering if |
SAGEConv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This pull request adds the implementation for Max and Mean Pool aggregations for SAGEConv which were implemented in the original study Inductive Representation Learning on Large Graphs, it's a sequel to PR #4379, which in turn is related to issue #1147.
The implementation is a direct application of the Eq 3 of the original paper (for both
mean
andmax
):cc @hunarbatra