snap-stanford / GEARS

GEARS is a geometric deep learning model that predicts outcomes of novel multi-gene perturbations
MIT License
200 stars 39 forks source link

A question about directional loss. #52

Closed Bunnybeibei closed 7 months ago

Bunnybeibei commented 7 months ago

Thank you for your impressive work, especially some designs on losses. However, I found the sign function used in the directional loss to be non-derivable, resulting in zero gradients. How does this loss work in the final result?

yhr91 commented 7 months ago

Thanks for your comments. Yes, you are correct that the sign function is not differentiable and this is an error. One way to circumvent this is to use the tanh function. We plan to update the repo once we've done some systematic tests but so far it looks like this improves performance slightly.

More discussion here: https://github.com/snap-stanford/GEARS/issues/36