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

Fast sLCWA #816

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Fast sLCWA #816

wants to merge 16 commits into from

Conversation

mberr
Copy link
Member

@mberr mberr commented Mar 7, 2022

This PR aims at adding fast sLCWA training to PyKEEN.

For this, we exploit that negative samples are created by corruption, and thus share some parts of the triple, e.g., (h, r), with the positive triple. This allows saving computation. Such optimizations already exist is other packages, e.g.,

  • DGL (and respective OGB), called, e.g., mode="tail-batch"
  • LibKGE, called, e.g., combine="_sp_"

Tasks

  • add score_{h,r,t}s to score multiple heads/relations/tails at once
  • group samples with same e.g. (h, r) -> problem: variable number -> no easy batching

Dependencies:

@mberr mberr mentioned this pull request Mar 7, 2022
src/pykeen/models/base.py Outdated Show resolved Hide resolved
@cthoyt
Copy link
Member

cthoyt commented May 28, 2022

@mberr related to #943?

@mberr
Copy link
Member Author

mberr commented May 28, 2022

@mberr related to #943?

Only marginally. For Fast sLCWA we group within a batch which includes positive and negative triples, while in #943, we group only over positive ones but across all training triples.

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

3 participants