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

The train data and valid data have no intersection. Then how does the valid data get the embedding for downstream model? #111

Closed
guotong1988 opened this issue Nov 19, 2019 · 5 comments

Comments

@guotong1988
Copy link

@guotong1988 guotong1988 commented Nov 19, 2019

Based on my understanding, it seems that train nodes are [1,2,3,4,5] and valid nodes are [6,7]. We are training on [1,2,3,4,5], then how does [6,7] get the embedding for downstream model?

Thank you very much!

@RexYing

This comment has been minimized.

Copy link
Collaborator

@RexYing RexYing commented Nov 19, 2019

Hi, the embeddings for [6,7] are computed as a function of the input feature of [6, 7]. The learned function is parameterized by the GraphSAGE neural network that was learned from [1, 2, 3, 4, 5] and their connectivity.

If there is no node features, constant/degree features can be used for all nodes [1 .. 7]

@guotong1988

This comment has been minimized.

Copy link
Author

@guotong1988 guotong1988 commented Nov 19, 2019

Thank you very much.
Could you please point out the code lines corresponding to your answer.
Thank you again!

@guotong1988

This comment has been minimized.

Copy link
Author

@guotong1988 guotong1988 commented Nov 20, 2019

From the code https://github.com/williamleif/GraphSAGE/blob/master/graphsage/models.py

image

It seems that no info is shared between training and predicting.

@kameshso01

This comment has been minimized.

Copy link

@kameshso01 kameshso01 commented Nov 20, 2019

Hey could you tell me how can I get the embeddings in supervised mode, SAVED!

@guotong1988

This comment has been minimized.

Copy link
Author

@guotong1988 guotong1988 commented Nov 20, 2019

I understand now.
The graph connections/topology info is somehow re-used for predict unseen nodes' final embedding.
The init embedding is from Glove wordvec or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.