Skip to content

Non-Reproducible Results in LDDMM While Aligning Xenium Datasets #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
qu-bit1 opened this issue Feb 13, 2025 · 1 comment
Open

Non-Reproducible Results in LDDMM While Aligning Xenium Datasets #45

qu-bit1 opened this issue Feb 13, 2025 · 1 comment

Comments

@qu-bit1
Copy link

qu-bit1 commented Feb 13, 2025

Hey!

While aligning two Xenium datasets (V1 and Prime 5K) from 10x Genomics, we encountered non-reproducible results when running LDDMM with the same parameters. This issue persists across different hardware, including CPU and A40 GPU.

Observations:

  • Inconsistent Alignment Results: The initial run produced well-aligned images, but subsequent runs with the same parameters failed to do so.

First successful run:
Image

Random run with identical parameters:
Image

  • Non-Converging Runs: In some cases, the LDDMM process runs indefinitely without converging.

You can check out our implementation here: STalign.ipynb.

Any insights into potential causes or fixes would be greatly appreciated.
Thanks!

@JEFworks
Copy link
Contributor

Dear Sagar,

Thanks for reaching out and for your interest in STalign. Thanks for the useful notebook and well documented examples.

As you may recall from the original publication (https://www.nature.com/articles/s41467-023-43915-7), STalign uses a gradient descent that is stochastic in nature. This means, every run will be a little different; you will need to set a random seed if you want to fully reproduce results.

You are correct that not every run of LDDMM will converge to a stable global minimum. This is because the gradient descent may get stuck in a local minima. This is why it is important to use the diagnostic plots as you are doing.

Looking at your diagnostic plots, you may wish to use larger step sizes or use some anchoring points to initialize the affine component of your alignment for better convergence. This tutorial may be useful: https://jef.works/STalign/notebooks/xenium-xenium-alignment.html

Your weights also look a bit off; instead of highlighting just the tissue, the background is also being prioritized in the alignment. You may wish to change the following hyperparameters: 'sigmaM', 'sigmaB', and 'sigmaA' . This tutorial may be useful: https://jef.works/STalign/notebooks/merfish-allen3Datlas-alignment.html

Hope that helps,
Prof. Fan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants