DeepGraphLearning / torchdrug

A powerful and flexible machine learning platform for drug discovery
https://torchdrug.ai/
Apache License 2.0
1.42k stars 199 forks source link

softmax instead of sigmoid in G2G #119

Closed DimGorr closed 2 years ago

DimGorr commented 2 years ago

It seems like in the source code for G2G center identification (https://torchdrug.ai/docs/_modules/torchdrug/tasks/retrosynthesis.html#CenterIdentification) log softmax and cross-entropy function are used instead of the sigmoid function and cross-entropy for sigmoid function. See https://arxiv.org/pdf/2003.12725.pdf equations (4) and (5). Please let me know if I misunderstood smth.

shichence commented 2 years ago

Hey, You are right. In this codebase, we formulate the center identification as a multi-class classification problem instead of a binary classification problem. This trick is inspired by https://arxiv.org/pdf/2006.07038.pdf, and it is way much better than the sigmoid version.

DimGorr commented 2 years ago

I see. Thank you so much for your help!