Skip to content
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

Added GraphSAGE MaxPoolAggregator and MeanPoolAggregator and tests #278

Merged
merged 9 commits into from Nov 6, 2018

Conversation

adocherty
Copy link
Contributor

Two aggregators have been implemented:

MaxPoolAggregator (from the GraphSAGE paper)

MeanPoolAggregator (This is not quite the GCN aggregator, but similar)

@adocherty adocherty requested a review from youph October 19, 2018 00:05

self.has_bias = bias
self.act = activations.get(act)
self.w_neigh = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.w_neigh doesn't seem to be used

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True! I renamed what I used in build(...) and forgot to update the code in __init__.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So now that MeanPoolAggregator is changed to match the structure of MaxPoolAggregator, this no longer applies, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes – this no longer applies.

Copy link
Contributor

@youph youph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. The main concern I have though is different structure of the MeanPool and MaxPool aggregators - see the comments in the code.

@youph youph added the ml label Nov 1, 2018
@adocherty
Copy link
Contributor Author

Addressed review comments and checked the original GraphSAGE code. The implementations of MaxPoolAggregator and MeanPoolAggregator should now match the reference code, although the reference code allows multiple Dense layers to be stacked when calculating the neighbour activations, as they mention in the paper.

I don't think we should replicate this behaviour here. I have an idea to make our GraphSAGE more flexible and allow all aggregators to be implemented with less work. I'll make a new issue for it.

@youph
Copy link
Contributor

youph commented Nov 5, 2018

FYI: When experimenting with new aggregators, you've introduced a mismatch in the aggregators used in train() and test() in demos/node-classification-graphsage/graphsage-cora-example.py, which would throw an error upon loading a saved model. I've fixed that.

@adocherty
Copy link
Contributor Author

Thanks for catching the aggregator mismatch!

@adocherty adocherty merged commit 03da3d4 into develop Nov 6, 2018
@youph
Copy link
Contributor

youph commented Nov 14, 2018

@adocherty

  • please delete the merged branch
  • move the issue to Done (if it's really done)

@adocherty adocherty deleted the feature/pool_aggregators branch January 23, 2019 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants