isyangshu / MambaMIL

[MICCAI 2024] Official Code for "MambaMIL: Enhancing Long Sequence Modeling with Sequence Reordering in Computational Pathology"
58 stars 5 forks source link

Run MambaMIL multiple times, and each time the results were different on Camelyon16 #11

Closed haiqinzhong closed 4 months ago

haiqinzhong commented 4 months ago

@wyhsleep @isyangshu
Hello, did you test your model on Camelyon16? I ran it multiple times, and the results were different. When I run the setup.py to install mamba_ssm, the result of acc and AUC will be around 92% and 95%. But when I put it locally (just like the form you provided, put the folder directly in the project), the acc and AUC results were only around 87% and 93%. Of course, whether install it or just put it locally, the results between different run times, the results also different, even if the random_seed is the same. The code I'm using is the MambaMIL.py and mamba folders you uploaded the first time. The train code uses the TransMIL code. Looking forward to your reply.

isyangshu commented 4 months ago

For the first question, you mean that you attempt two ways to employ SRMamba?

For the instability of Mamba, you can refer to https://github.com/state-spaces/mamba/issues/137. You can use a smaller learning rate, which may allow you to reach the same local optimum before the backpropagation divergence occurs when you run the code multiple times.

haiqinzhong commented 4 months ago

Thank you for your reply. I just use your provided folder and run the setup.py After that, I can use two ways to employ SRMamba.

And for the problem of the instability of Mamba, thank you for your link. Now I know that when running the code multiple times, it can get different results is normal. The reason I got a lower result may be the split datasets are different.