GuangyuWangLab2021 / cellDancer

Predict RNA velocity through deep learning
https://guangyuwanglab2021.github.io/cellDancer_website/
BSD 3-Clause "New" or "Revised" License
60 stars 11 forks source link

Inquiry about model initialization #6

Closed QiangweiPeng closed 1 year ago

QiangweiPeng commented 1 year ago

Dear GuangyuWangLab members,

When I use the cellDancer, I noticed that the initialization of the neural network is done by loading the saved parameters. Could you please share how these parameters are generated? Because the initialization of the model might affect the direction of the final RNA velocity.

Abclisy commented 1 year ago

Thank you for reaching out to us. To optimize the training time, we offer two pre-trained models. The first model is pre-trained on gene Sulf2 in mouse pancreatic endocrinogenesis. The second model is pre-trained on gene Ntrk2 in mouse hippocampal dentate gyrus during neurogenesis.

QiangweiPeng commented 1 year ago

Thank you for your reply! This is indeed a reasonable option to optimize training time. However, this doesn't seem to ensure that the RNA velocity is in the right direction. For example, the value of the loss function for the direction exactly opposite to the correct direction is also very low. And when the initial direction is closer to the wrong opposite direction, the model will converge to the wrong direction.

Abclisy commented 1 year ago

Actually, this is a general limitation of all parameter-inferring algorithms. As far as I know, no existing algorithm can guarantee to converge to a global minimum from any initial start. For example, EM algorithm also has the same limitation. Please see this discussion: https://stats.stackexchange.com/questions/83387/why-is-the-expectation-maximization-algorithm-guaranteed-to-converge-to-a-local.

QiangweiPeng commented 1 year ago

Yes, I agree that convergence to the global optimum is difficult. My confusion is that in the current setup the exact opposite wrong direction and the exact correct direction both seem to be global optimum?

Abclisy commented 1 year ago

In our model, although each cell has its own specific kinetic rates, the rates are not totally independent. They are predicted from the same neural network. We didn't observe the scenario that all cells have the exact opposite wrong direction at the same time during testing cellDancer on both simulation datasets and five case studies. We are happy to discuss more if you get the opposite direction of all cells in your datasets.

QiangweiPeng commented 1 year ago

Ok, got it. cellDancer is indeed performing very well, I haven't found the exact opposite direction yet. Thank you very much for your patient reply.