★ wanayoo — archive 1999 https://github.com/DeepGraphLearning/graphvite/issues/41Nouvelle recherche | Portail wanayoo
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

Could you explain what are vertex matrix and context matrix? #41

Open
HenryYihengXu opened this issue Feb 12, 2020 · 6 comments
Open

Could you explain what are vertex matrix and context matrix? #41

HenryYihengXu opened this issue Feb 12, 2020 · 6 comments

Comments

@HenryYihengXu
Copy link

@HenryYihengXu HenryYihengXu commented Feb 12, 2020

I'm reading your paper and have a question about section 3.2. Could you explain what are the vertex matrix and context matrix? Are they simply the source and the destination of edges?

@KiddoZhu
Copy link
Collaborator

@KiddoZhu KiddoZhu commented Feb 14, 2020

Yes. Every node has a vertex and a context embedding. Vertex embedding is used when it acts as a source node, and context embedding is used for destination node.

@HenryYihengXu
Copy link
Author

@HenryYihengXu HenryYihengXu commented Feb 15, 2020

Are you saying each node will have two embedding vectors? So the number of embeddings will be twice as the number of nodes?

I don't quite understand the figure 2 in your Graphvite paper. In the figure, you have 4 GPUs and you divide the sample pool into 4x4 grids. Grid (i,j) contains edges with source in vertex i and dest in context j right? So what is the episode size here? Does it indicate that it takes many episodes to compute a single grid?

@HenryYihengXu
Copy link
Author

@HenryYihengXu HenryYihengXu commented Feb 15, 2020

And by your sampling method, each grid could contain different numbers of edges right?

@KiddoZhu
Copy link
Collaborator

@KiddoZhu KiddoZhu commented Feb 21, 2020

For the embedding, yes.

The episode size is the number of batch in a grid, e.g. 500 for Youtube dataset. Each grid contains episode size * batch size positive samples. The is mainly because a sufficiently large grid is needed to reduce swap of embedding parameters across GPUs.

@razrLeLe
Copy link

@razrLeLe razrLeLe commented Mar 2, 2020

@KiddoZhu What's the purpose of setting two embedding vectors for each node?

@KiddoZhu
Copy link
Collaborator

@KiddoZhu KiddoZhu commented Mar 7, 2020

One vector is called vertex representation, the other is called context representation. This is mainly borrowed from the distributional hypothesis in NLP.

Empirically it works better than tied vertex and context parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.