pyg-team / pytorch_geometric

Graph Neural Network Library for PyTorch
https://pyg.org
MIT License
20.94k stars 3.61k forks source link

DHYPR model in PyG nn library #7279

Open advil64 opened 1 year ago

advil64 commented 1 year ago

🚀 The feature, motivation and pitch

DHYPR is a new model developed by @hongluzhou, and myself focused on directed graph representation learning and can be used for several tasks such as link prediction, link sign prediction, and node classification you can read the rest of the paper here: https://arxiv.org/pdf/2112.11734.pdf.

Implementation: implementing this project would involve writing a transform to create a k-order matrix such as the implementation I've written here: https://github.com/advil64/dhypr-lib/blob/main/dhypr/datasets/custom_transforms.py as well as functions to perform message passing in hyperbolic space (these are still a work in progress to integrate into PyTorch geometric). The functions to perform hyperbolic message passing will likely be similar to the euclidian message passing classes already implemented in PyG but will obviously have different mathematical properties involving converting vectors to the hyperbolic space.

As you can see from the paper, our method is very effective in learning embeddings for directed graphs, especially those with cycles, compared to previous methods such as GCN and HGCN. We hope you'll find this work useful enough to add to PyG so that more people can use our methodologies.

Alternatives

No response

Additional context

Work on this is still underway; this issue was created to gauge interest and see if it's something that the maintainers would be interested in adding to the PyG repo. I am trying my best to make sure that our functions work seamlessly with other features, such as data loading and mini batching in PyG; if you want to take a look at the initial model's GitHub you can find it here: https://github.com/hongluzhou/dhypr. If you have done something similar and would like to help, please email me at advith.chegu@rutgers.edu or find me on the PyG slack!

wsad1 commented 1 year ago

Thanks for sharing @advil64. We don't have the bandwidth to implement this currently. But happy to accept PRs.

Dsantra92 commented 6 months ago

Would love to take it up.

advil64 commented 6 months ago

Hey, thanks for your interest, I haven't been active on the pyg slack but feel free to shoot me an email at advith.chegu@rutgers.edu, I'd love to help out in any way I can and explain any of the pre-existing code if needed. I think to start off a review on Hyperbolic Graph Representation learning would be useful since that's the framework that would need to be implemented to make DHYPR work. Here's a good resource I found after a good search https://github.com/marlin-codes/Awesome-Hyperbolic-Representation-and-Deep-Learning