-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
feat: Add ComplEx
KGE
#6898
feat: Add ComplEx
KGE
#6898
Conversation
Co-authored-by: David Kuo <davidekuo@users.noreply.github.com>
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## master #6898 +/- ##
==========================================
- Coverage 91.80% 91.51% -0.30%
==========================================
Files 428 429 +1
Lines 23254 23257 +3
==========================================
- Hits 21348 21283 -65
- Misses 1906 1974 +68
... and 38 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Co-authored-by: David Kuo <davidekuo@users.noreply.github.com>
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.
This looks great. I suggest we add an argument parser to the initial TransE
example to support a variety of models. Would that work for you?
Co-authored-by: David Kuo <davidekuo@users.noreply.github.com>
for more information, see https://pre-commit.ci
Adagrad as suggested by the paper worked significantly better than Adam. Achieves Hits@10 of ~.37. Record on PapersWithCode for ComplEx Hits@10 for FB15k is .42.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Co-authored-by: David Kuo <davidekuo@users.noreply.github.com>
Hi Matthias! I think this is ready for review again. The PapersWithCode metric for ComplEx for Hits@10 on fb15k-237 is .42, and our current optimizer settings in the example are consistently about .36-37 (we didn't want to increase the hidden size when tuning though to keep it fast as an example). If you'd like us to find a better hyperparameter set please let us know! In the current set, we used Adagrad which ended up performing much better than Adam and which was the suggested optimizer in the paper, and we added some L2 weight regularization as also suggested by the paper. We have also updated the loss function to use BCELogits since that is more numerically stable |
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.
This is very clean. Thank you :)
Hello! we are hoping to add the ComplEx knowledge graph embedding to PyG as part of our CS224W final project at Stanford.
Our implementation largely follows that of TransE. We implemented complex vectors by breaking the real and imaginary components into separate vectors, but are open to other approaches.
We'd also like to seek input on whether an example is necessary like for TransE here, and if so, whether it would be preferred to be in the same file or a new one.