pykeen / pykeen

🤖 A Python library for learning and evaluating knowledge graph embeddings
https://pykeen.readthedocs.io/en/stable/
MIT License
1.66k stars 187 forks source link

Inductive learning #545

Closed flpgrz closed 2 years ago

flpgrz commented 3 years ago

Please also take a look at the main discussion on inductive link prediction at https://github.com/pykeen/pykeen/issues/720


It would be amazing to have an inductive learning pipeline.

Ideally, it would allow triples in val/test with entities which don't belong to the training set.

To make it work, one would probably need feature vectors for all train/val/test entities, instead of computing embeddings for the node IDs with e.g. torch.nn.Embedding.

I'll try to make a minimal implementation. I'm new to the library though. Do you have suggestions on what classes I should especially pay attention to, apart for adapting the models?

Thanks.

mberr commented 3 years ago

Hi @flpgrz ,

thanks for your interest in pykeen!

Since we also interested in inductive settings, we already started to properly modularize the components to easily allow this in the future. I'll go through some high-level components and try to point out where we need to make modifications.

P.S.: @mali-git and @migalkin have been working on inductive settings with pykeen. For this project, we did not fully integrate it into pykeen yet, but we will release code soon here. So stay tuned :wink:

cthoyt commented 2 years ago

Inductive NodePiece was added in https://github.com/pykeen/pykeen/pull/722. We'll make a 1.8 release soon!