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

It seems that the code does not just do softmax for the neighbor nodes, but just adds a bias_mat. I don't understand this step very well. #42

Open
HelloCxz opened this issue Dec 8, 2019 · 1 comment

Comments

@HelloCxz
Copy link

HelloCxz commented Dec 8, 2019

It seems that the code does not just do softmax for the neighbor nodes, but just adds a bias_mat. I don't understand this step very well.

@PetarV-
Copy link
Owner

PetarV- commented Dec 8, 2019

Hello,

Thanks for your issue.

The bias matrix has entries of 0 in cells (i, j) where there exists an edge, and entries of -1e9 (approximation to negative infinity) when there does not exist an edge. When a softmax is applied to such a sum of logits and bias, this will effectively "mask out" non neighbouring nodes, as softmax of negative infinity is zero.

Hope that helps!

Thanks,
Petar

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

No branches or pull requests

2 participants