AstraZeneca / chemicalx

A PyTorch and TorchDrug based deep learning library for drug pair scoring. (KDD 2022)
https://chemicalx.readthedocs.io
Apache License 2.0
702 stars 89 forks source link

Add the SSI-DDI Model #11

Closed benedekrozemberczki closed 2 years ago

benedekrozemberczki commented 2 years ago
YuWVandy commented 2 years ago

Where can I find the contribution guideline and looks like the input of the original model in that paper only has two graph data and different interaction types without context features, do I need to incorporate also the context features into the current framework? Or do I need to find a way to transform the context features into a specific interaction type? Sorry that this is my first time using such a cooperative mode of GitHub and there might be some silly questions.

benedekrozemberczki commented 2 years ago
  1. Context features are unused in this model.
  2. There is a public reference implementation out.
YuWVandy commented 2 years ago
  1. Context features are unused in this model.
  2. There is a public reference implementation out.

Thanks! Where can I find the public reference implementation out? Is it the documentation of this ChemicalX or just the original code associated with this paper?

benedekrozemberczki commented 2 years ago

https://github.com/kanz76/SSI-DDI/blob/master/models.py

Do not rely on PyTorch Geometric.

YuWVandy commented 2 years ago

Sure, I will try to build myself the Graph Attention Layer, which is one of the most important building block for SSI-DDI

On Feb 2, 2022, at 12:22 PM, Benedek Rozemberczki @.**@.>> wrote:

https://github.com/kanz76/SSI-DDI/blob/master/models.pyhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkanz76%2FSSI-DDI%2Fblob%2Fmaster%2Fmodels.py&data=04%7C01%7Cyu.wang.1%40Vanderbilt.Edu%7Cb51098f241e14c071cba08d9e6790151%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C637794229648404353%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=EgYoJG2aVysTsNjx70olhWWrjJEEhEcCU2elXCjW93I%3D&reserved=0

Do not rely on PyTorch Geometric.

— Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAstraZeneca%2Fchemicalx%2Fissues%2F11%23issuecomment-1028226190&data=04%7C01%7Cyu.wang.1%40Vanderbilt.Edu%7Cb51098f241e14c071cba08d9e6790151%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C637794229648404353%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=l4aKvc6N%2BEQcYmZLGlfN8Pkd06SgAfAFbsIeqd5qCxQ%3D&reserved=0, or unsubscribehttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAM2OPGTDBC3QD6FZ6R6AEA3UZFY7HANCNFSM5LWMCK3A&data=04%7C01%7Cyu.wang.1%40Vanderbilt.Edu%7Cb51098f241e14c071cba08d9e6790151%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C637794229648404353%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=cGVinCCZ1bWUYhoSLd8Lv2Rl6xTbb5z7emK9WS1GOHM%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cyu.wang.1%40Vanderbilt.Edu%7Cb51098f241e14c071cba08d9e6790151%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C637794229648560567%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=TxAOv%2BXCkUZENlgTOT3L6IDSHX%2BWke2yO1M4OC5CFNw%3D&reserved=0 or Androidhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cyu.wang.1%40Vanderbilt.Edu%7Cb51098f241e14c071cba08d9e6790151%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C637794229648560567%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=oRJMMBAcD47UTfhmOaCAKyuJW%2BzhpJFIw2fZM%2FYgino%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

benedekrozemberczki commented 2 years ago

Torchdrug already has that layer.

YuWVandy commented 2 years ago

The original paper defines different M learnable matrices for different interaction types in Equation (11), I guess here in our problem, can we assume only one interaction type is considered since the input is only the leftmolecules and rightmolecules.

benedekrozemberczki commented 2 years ago

Yes.

YuWVandy commented 2 years ago

Just finished coding the model part, which is all based on torchdrug, pytorch and the current existing packages of chemicals, and currently working on testing the model. One question is that does the current pipeline support GPU training? If not, I guess I will just modify it a little bit on my end and try to train using GPU to test my implementation.

YuWVandy commented 2 years ago

For testing whether our implementation is right, can I directly write a testing case following the previous script written in the test folder on github? But one thing is since it currently does not support GPU training, it will take me so long time to get the results. Can someone help me with that?