Skip to main content

Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

  • Article
  • Published:

Topological velocity inference from spatial transcriptomic data

Abstract

Incorporating space and time into models of cell fate transition will be a key step toward characterizing how interactions among neighboring cells, local niche factors and cell migration contribute to tissue development. Here we propose Topological Velocity Inference (TopoVelo), a model for jointly inferring spatial and temporal dynamics of cell fate transition from spatial transcriptomic data. TopoVelo extends the RNA velocity framework to model single-cell gene expression dynamics of an entire tissue with spatially coupled differential equations. TopoVelo estimates cell velocity from developing mouse cerebral cortex, learns interpretable spatial cell state dependencies that correlate with the expression of ligand–receptor genes and reveals spatial signatures of mouse neural tube closure. Finally, we generate Slide-seq data from an in vitro model of human development and use TopoVelo to study the spatial patterns of early differentiation. Our work introduces a new dimension into the study of cell fate transitions and lays a foundation for modeling the collective dynamics of cells comprising an entire tissue.

This is a preview of subscription content, access via your institution

Access options

Buy this article

USD 39.95

Prices may be subject to local taxes which are calculated during checkout

Fig. 1: Diagram of TopoVelo model.
Fig. 2: Incorporating spatial position improves velocity inference from spatial transcriptomic data.
Fig. 3: Cell velocity from TopoVelo on Slide-tags mouse brain captures spatial patterns of embryonic brain development.
Fig. 4: TopoVelo analysis of mouse neural tube closure.
Fig. 5: TopoVelo analysis of human EBs.

Similar content being viewed by others

Data availability

Raw and processed Curio Seeker data from human embryoid bodies are available from the Gene Expression Omnibus (GEO) under accession code GSE291200. The Slide-tags mouse brain data are from previous work by Russell et al.12, and raw data can be accessed via GEO under accession code GSE244355. The Slide-seq E9 3D mouse embryo data are from previous work by Kumar et al.49, and raw data can be accessed via GEO under accession code GSE197353. Metadata can be downloaded from CELLxGENE (https://cellxgene.cziscience.com/collections/d74b6979-efba-47cd-990a-9d80ccf29055) and figshare at https://doi.org/10.6084/m9.figshare.21695879.v1 (ref. 70). Stereo-seq data are available from the China National GeneBank: https://db.cngb.org/stomics/mosta/. Human thymus Visium data were downloaded from the European Nucleotide Archive (accession code PRJEB77091). We also uploaded all AnnData files with preprocessed count matrices (https://doi.org/10.6084/m9.figshare.28516139.v2) (ref. 71) and with TopoVelo results (https://doi.org/10.6084/m9.figshare.28516184.v1) (ref. 72) to figshare.

Code availability

The source code is available via GitHub at https://github.com/welch-lab/TopoVelo (ref. 73).

References

  1. Lane, S. W., Williams, D. A. & Watt, F. M. Modulating the stem cell niche for tissue regeneration. Nat. Biotechnol. 32, 795–803 (2014).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  2. Rock, J. R. et al. Basal cells as stem cells of the mouse trachea and human airway epithelium. Proc. Natl Acad. Sci. USA 106, 12771–12775 (2009).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  3. Angevine, J. B. J. & Sidman, R. L. Autoradiographic study of cell migration during histogenesis of cerebral cortex in the mouse. Nature 192, 766–768 (1961).

    Article  PubMed  Google Scholar 

  4. Berry, M. & Rogers, A. W. The migration of neuroblasts in the developing cerebral cortex. J. Anat. 99, 691 (1965).

    CAS  PubMed  PubMed Central  Google Scholar 

  5. Rakic, P. Mode of cell migration to the superficial layers of fetal monkey neocortex. J. Comp. Neurol. 145, 61–83 (1972).

    Article  CAS  PubMed  Google Scholar 

  6. Pleasure, S. J. et al. Cell migration from the ganglionic eminences is required for the development of hippocampal GABAergic interneurons. Neuron 28, 727–740 (2000).

    Article  CAS  PubMed  Google Scholar 

  7. Wonders, C. P. & Anderson, S. A. The origin and specification of cortical interneurons. Nat. Rev. Neurosci. 7, 687–696 (2006).

    Article  CAS  PubMed  Google Scholar 

  8. Butt, S. J. B. et al. The temporal and spatial origins of cortical interneurons predict their physiological subtype. Neuron 48, 591–604 (2005).

    Article  CAS  PubMed  Google Scholar 

  9. Rodriques, S. G. et al. Slide-seq: a scalable technology for measuring genome-wide expression at high spatial resolution. Science 363, 1463–1467 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  10. Chen, A. et al. Spatiotemporal transcriptomic atlas of mouse organogenesis using DNA nanoball-patterned arrays. Cell 185, 1777–1792 (2022).

    Article  Google Scholar 

  11. Cho, C.-S. et al. Microscopic examination of spatial transcriptome using Seq-Scope. Cell 184, 3559–3572 (2021).

    Article  Google Scholar 

  12. Russell, A. J. C. et al. Slide-tags enables single-nucleus barcoding for multimodal spatial genomics. Nature 625, 101–109 (2024).

    Article  CAS  PubMed  Google Scholar 

  13. Ståhl, P. L. et al. Visualization and analysis of gene expression in tissue sections by spatial transcriptomics. Science 353, 78–82 (2016).

    Article  PubMed  Google Scholar 

  14. Thrane, K., Eriksson, H., Maaskola, J., Hansson, J. & Lundeberg, J. Spatially resolved transcriptomics enables dissection of genetic heterogeneity in stage III cutaneous malignant melanoma. Cancer Res. 78, 5970–5979 (2018).

    Article  CAS  PubMed  Google Scholar 

  15. Moncada, R. et al. Integrating microarray-based spatial transcriptomics and single-cell RNA-seq reveals tissue architecture in pancreatic ductal adenocarcinomas. Nat. Biotechnol. 38, 333–342 (2020).

    Article  CAS  PubMed  Google Scholar 

  16. Chen, K. H., Boettiger, A. N., Moffitt, J. R., Wang, S. & Zhuang, X. Spatially resolved, highly multiplexed RNA profiling in single cells. Science 348, aaa6090 (2015).

    Article  PubMed  PubMed Central  Google Scholar 

  17. Wang, X. et al. Three-dimensional intact-tissue sequencing of single-cell transcriptional states. Science 361, eaat5691 (2018).

    Article  PubMed  PubMed Central  Google Scholar 

  18. Janesick, A. et al. High resolution mapping of the tumor microenvironment using integrated single-cell, spatial and in situ analysis. Nat. Commun. 14, 8353 (2022).

    Article  Google Scholar 

  19. Welch, J. D., Hartemink, A. J. & Prins, J. F. SLICER: inferring branched, nonlinear cellular trajectories from single cell RNA-seq data. Genome Biol. 17, 106 (2016).

    Article  PubMed  PubMed Central  Google Scholar 

  20. Haghverdi, L., Büttner, M., Wolf, F. A., Buettner, F. & Theis, F. J. Diffusion pseudotime robustly reconstructs lineage branching. Nat. Methods 13, 845–848 (2016).

    Article  CAS  PubMed  Google Scholar 

  21. Qiu, X. et al. Reversed graph embedding resolves complex single-cell trajectories. Nat. Methods 14, 979–982 (2017).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  22. Schiebinger, G. et al. Optimal-transport analysis of single-cell gene expression identifies developmental trajectories in reprogramming. Cell 176, 928–943 (2019).

    Article  Google Scholar 

  23. Klein, D. et al. Mapping cells through time and space with moscot. Nature 638, 1065–1075 (2025).

  24. Bergen, V., Lange, M., Peidli, S., Wolf, F. A. & Theis, F. J. Generalizing RNA velocity to transient cell states through dynamical modeling. Nat. Biotechnol. 38, 1408–1414 (2020).

    Article  CAS  PubMed  Google Scholar 

  25. Gao, M., Qiao, C. & Huang, Y. UniTVelo: temporally unified RNA velocity reinforces single-cell trajectory inference. Nat. Commun. 13, 6586 (2022).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  26. Gu, Y., Blaauw, D. T. & Welch, J. Variational mixtures of ODEs for inferring cellular gene expression dynamics. In Proc. 39th International Conference on Machine Learning 162, 7887–7901 (PMLR, 2022); https://proceedings.mlr.press/v162/gu22a.html

  27. Cui, H. et al. DeepVelo: deep learning extends RNA velocity to multi-lineage systems with cell-specific kinetics. Genome Biol. 25, 27 (2024).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  28. Qin, Q., Bingham, E., La Manno, G., Langenau, D. M. & Pinello, L. Pyro-Velocity: probabilistic RNA velocity inference from single-cell data. Preprint at bioRxiv https://doi.org/10.1101/2022.09.12.507691 (2022).

  29. Li, S. et al. A relay velocity model infers cell-dependent RNA velocity. Nat. Biotechnol. 42, 99–108 (2024).

  30. Gayoso, A. et al. Deep generative modeling of transcriptional dynamics for RNA velocity analysis in single cells. Nat. Methods 21, 50–59 (2024).

  31. Qiu, X. et al. Spatiotemporal modeling of molecular holograms. Cell 187, 7351–7373 (2024).

    Article  CAS  PubMed  Google Scholar 

  32. Qiu, X. et al. Mapping transcriptomic vector fields of single cells. Cell 185, 690–711 (2022).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  33. Aivazidis, A. et al. Model-based inference of RNA velocity modules improves cell fate prediction. Preprint at bioRxiv https://doi.org/10.1101/2023.08.03.551650 (2023).

  34. Zhou, P., Bocci, F., Li, T. & Nie, Q. Spatial transition tensor of single cells. Nat. Methods 21, 1053–1062 (2024).

  35. Chitra, U. et al. Mapping the topography of spatial gene expression with interpretable deep learning. Nat. Methods 22, 298–309 (2025).

  36. Kingma, D. P. & Welling, M. Auto-encoding variational Bayes. In. Proc. 2nd International Conference on Learning Representations https://openreview.net/forum?id=33X9fd2-9FyZd (OpenReview, 2014).

  37. Yayon, N. et al. A spatial human thymus cell atlas mapped to a continuous tissue axis. Nature 635, 708–718 (2024).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  38. Lodato, S. & Arlotta, P. Generating neuronal diversity in the mammalian cerebral cortex. Annu. Rev. Cell Dev. Biol. 31, 699–720 (2015).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  39. Wells, J. M. & Spence, J. R. How to make an intestine. Development 141, 752–760 (2014).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  40. Kolev, H. M. & Kaestner, K. H. Mammalian intestinal development and differentiation—the state of the art. Cell. Mol. Gastroenterol. Hepatol. 16, 809–821 (2023).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  41. Spits, H. Development of αβ T cells in the human thymus. Nat. Rev. Immunol. 2, 760–772 (2002).

    Article  CAS  PubMed  Google Scholar 

  42. Pearse, G. Normal structure, function and histology of the thymus. Toxicol. Pathol. 34, 504–514 (2006).

    Article  PubMed  Google Scholar 

  43. Sullivan, D. K. et al. kallisto, bustools and kb-python for quantifying bulk, single-cell and single-nucleus RNA-seq. Nat. Protocols 20, 587–607 (2024).

  44. Anselin, L. Local indicators of spatial association—LISA. Geogr. Anal. 27, 93–115 (1995).

    Article  Google Scholar 

  45. Qu, F. et al. Three-dimensional molecular architecture of mouse organogenesis. Nat. Commun. 14, 4599 (2023).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  46. Bergen, V., Soldatov, R. A., Kharchenko, P. V. & Theis, F. J. RNA velocity—current challenges and future perspectives. Mol. Syst. Biol. 17, e10282 (2021).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  47. Britto, J. M. et al. Altered speeds and trajectories of neurons migrating in the ventricular and subventricular zones of the reeler neocortex. Cereb. Cortex 21, 1018–1027 (2010).

    Article  PubMed  Google Scholar 

  48. Liu, J. et al. CytoSignal detects locations and dynamics of ligand-receptor signaling at cellular resolution from spatial transcriptomic data. Preprint at bioRxiv https://doi.org/10.1101/2024.03.08.584153 (2024).

  49. Kumar, S. et al. Spatiotemporal transcriptomic maps of whole mouse embryos at the onset of organogenesis. Nat. Genet. 55, 1176–1185 (2023).

    Article  Google Scholar 

  50. Copp, A. J., Greene, N. D. E. & Murdoch, J. N. The genetic basis of mammalian neurulation. Nat. Rev. Genet. 4, 784–793 (2003).

    Article  PubMed  Google Scholar 

  51. Zeevaert, K., Elsafi Mabrouk, M. H., Wagner, W. & Goetzke, R. Cell mechanics in embryoid bodies. Cells 9, 2270 (2020).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  52. Brickman, J. M. & Serup, P. Properties of embryoid bodies. Wiley Interdiscip. Rev. Dev. Biol. 6, e259 (2017).

    Article  Google Scholar 

  53. Rhodes, K. et al. Human embryoid bodies as a novel system for genomic studies of functionally diverse cell types. eLife 11, e71361 (2022).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  54. Barr, K. A., Rhodes, K. L. & Gilad, Y. Embryoid bodies facilitate comparative analysis of gene expression in humans and chimpanzees across dozens of cell types. Preprint at bioRxiv https://doi.org/10.1101/2022.07.20.500831 (2022).

  55. Ogawa, S. et al. Crucial roles of mesodermal cell lineages in a murine embryonic stem cell–derived in vitro liver organogenesis system. Stem Cells 23, 903–913 (2005).

    Article  CAS  PubMed  Google Scholar 

  56. Magli, A. et al. Pax3 and Tbx5 specify whether PDGFRα+ cells assume skeletal or cardiac muscle fate in differentiating embryonic stem cells. Stem Cells 32, 2072–2083 (2014).

    Article  CAS  PubMed  Google Scholar 

  57. Lee, M. S. et al. Selection of neural differentiation-specific genes by comparing profiles of random differentiation. Stem Cells 24, 1946–1955 (2006).

    Article  CAS  PubMed  Google Scholar 

  58. Fehling, H. J. et al. Tracking mesoderm induction and its specification to the hemangioblast during embryonic stem cell differentiation. Development 130, 4217–4227 (2003).

  59. Cable, D. M. et al. Robust decomposition of cell type mixtures in spatial transcriptomics. Nat. Biotechnol. 40, 517–526 (2022).

    Article  CAS  PubMed  Google Scholar 

  60. Gordeeva, O., Gordeev, A. & Erokhov, P. Archetypal architecture construction, patterning, and scaling invariance in a 3D embryoid body differentiation model. Front. Cell Dev. Biol. 10, 852071 (2022).

    Article  PubMed  PubMed Central  Google Scholar 

  61. La Manno, G. et al. RNA velocity of single cells. Nature 560, 494–498 (2018).

    Article  PubMed  PubMed Central  Google Scholar 

  62. Li, C., Virgilio, M., Collins, K. L. & Welch, J. D. Multi-omic single-cell velocity models epigenome-transcriptome interactions and improves cell fate prediction. Nat. Biotechnol. 41, 387–398 (2023).

    Article  CAS  PubMed  Google Scholar 

  63. Kipf, T. N. & Welling, M. Variational graph auto-encoders. Preprint at https://arxiv.org/abs/1611.07308 (2016).

  64. Märtens, K. & Yau, C. BasisVAE: translation-invariant feature-level clustering with variational autoencoders. In Proc. 23rd International Conference on Artificial Intelligence and Statistics 108, 2928–2937 (PMLR, 2020); https://proceedings.mlr.press/v108/martens20b.html

  65. Kipf, T. N. & Welling, M. Semi-supervised classification with graph convolutional networks. In Proc. 5th International Conference on Learning Representations https://openreview.net/forum?id=SJU4ayYgl (OpenReview, 2017).

  66. Veličković, P. et al. Graph attention networks. In Proc. 6th International Conference on Learning Representations https://openreview.net/forum?id=rJXMpikCZ (OpenReview, 2018).

  67. Kingma, D. P. & Ba, J. Adam: a method for stochastic optimization. Preprint at https://arxiv.org/abs/1412.6980 (2014).

  68. Hastie, T. & Stuetzle, W. Principal curves. J. Am. Stat. Assoc. 84, 502–516 (1989).

    Article  Google Scholar 

  69. Faure, L., Soldatov, R., Kharchenko, P. V. & Adameyko, I. scFates: a scalable python package for advanced pseudotime and bifurcation analysis from single-cell data. Bioinformatics 39, btac746 (2022).

    Article  PubMed Central  Google Scholar 

  70. Sampath Kumar, A. E9.0_Embryo.h5ad. figshare https://doi.org/10.6084/m9.figshare.21695879.v1 (2022).

  71. Gu, Y. et al. Preprocessed AnnData for TopoVelo. figshare https://doi.org/10.6084/m9.figshare.28516139.v2 (2025).

  72. Gu, Y. et al. AnnData with TopoVelo results. figshare https://doi.org/10.6084/m9.figshare.28516184.v1 (2025).

  73. Gu, Y. et al. TopoVelo. GitHub https://github.com/welch-lab/topovelo (2025).

Download references

Acknowledgements

This work was supported by the University of Michigan Rackham Predoctoral Fellowship to J.L., Ruth L. Kirschstein Predoctoral Fellowship F31AI177258 to C.L., and National Institutes of Health grants R01 HG010883 and UM1 MH130966 to J.D.W. We thank M. Karikomi and C. Gao for helpful discussions. We thank the University of Michigan Genomics Core for their help in generating the human embryoid data. We also thank N. Yayon for help with access to the mouse thymus data.

Author information

Authors and Affiliations

Authors

Contributions

J.D.W. conceived the idea of Topological Velocity Inference. K.H.L., J.M. and R.G. generated the human embryoid body spatial transcriptomic data. Y.G. and J.L. implemented the method. Y.G., J.L., K.H.L. and J.D.W. performed data analyses and wrote the manuscript. J.L., C.L., K.H.L. and L.L. performed data preprocessing. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Joshua D. Welch.

Ethics declarations

Competing interests

The authors declare no competing interests.

Peer review

Peer review information

Nature Biotechnology thanks Kenji Kamimoto and Guangyu Wang for their contribution to the peer review of this work.

Additional information

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Extended data

Extended Data Fig. 1 TopoVelo accurately models spatial dynamics in simulated datasets.

(a) Simulated datasets with layered(top) and radial(bottom) growth patterns. The true velocity stream is plotted over spatial coordinates colored by the true time values. Note that these stream plots indicate cell velocity in physical coordinates, not RNA velocity in abstract UMAP coordinates. (b) Quantitative performance. The top row shows six metrics used for benchmarking. Higher values are better for all metrics except for reconstruction error. The bottom row contains line plots showing k-CBDir using k-step neighbors with k up to five. Note that we computed two versions of k-CBDIR, one using spatial nearest neighbors and one using nearest neighbors in gene expression space. (c) Comparison of inferred cell velocity. Coordinates are colored by inferred time values. Note that all 2D stream plot visualizations in this paper, including (a) and (c), represent ‘cell velocity’ in physical coordinates, not abstract coordinates computed from UMAP as in previous RNA velocity papers.

Extended Data Fig. 2 Comparison of cell velocity.

Each velocity stream plot visualizes the cell velocity inferred from a dataset (row) by a method (column). The stream plots, from top to bottom, are generated from Slide-seq E15 mouse brain cortex, Slide-seq E13.5 mouse gut and mouse lung, and Visium postnatal 3-month mouse thymus. Each column is a separate RNA velocity method shown at the top. ‘N/A’ means a method failed to run on a certain dataset.

Extended Data Fig. 3 Comparison of inferred cell time.

Each heatmap visualizes the cell time inferred from a dataset (row) by a method (column). The stream plots, from top to bottom, are generated from Slide-seq E15 mouse brain cortex, Slide-seq E13.5 mouse gut and mouse lung, and Visium postnatal 3-month mouse thymus. Each column is a separate RNA velocity method shown at the top. ‘N/A’ means a method failed to run on a certain dataset.

Extended Data Fig. 4 TopoVelo robustly models spatial dynamics in simulated datasets with low spatial resolution.

Simulated datasets with layered growth patterns (a) and radial growth patterns (b). The true velocity stream is plotted over spatial coordinates colored by the true time values. Note that these stream plots indicate cell velocity in physical coordinates, not RNA velocity in abstract UMAP coordinates.

Extended Data Fig. 5 Sensitivity of TopoVelo performance to epsilon-ball graph radius.

(a) Bar plots comparing time correlation, cross-boundary direction correctness, spatial velocity consistency and spatial time consistency from TopoVelo with trained with different radii. (b) Line plots showing the k-step CBDir (k-CBDir) metric. Each line with distinct marker and color represents one radius choice. x-axis is the step number and y-axis is the k-CBDir value.

Extended Data Fig. 6 Sensitivity of inferred cell time to epsilon-ball graph radius.

Each panel is a heatmap showing the inferred cell time using an epsilon-ball graph with the given radius shown at the top. For the Visium thymus dataset, a different set of radius values are used due to a lower spatial resolution.

Extended Data Fig. 7 Sensitivity of cell velocity to epsilon-ball graph radius.

Each panel is a velocity stream plot showing the cell velocity on the physical coordinates. The radius is shown at the top. For the Visium thymus dataset, a different set of radius values are used due to a lower spatial resolution.

Extended Data Fig. 8 Results on Visium data (part 1).

Results from the first (a), fourth (b) and fifth (c) slices from a 10X Visium mouse embryo dataset. Each panel shows the spatial coordinates colored by cell type annotations, cell velocity stream plot and a heatmap plot showing the developmental time inferred by TopoVelo.

Extended Data Fig. 9 Quantifying mouse neural tube closure with cell velocity.

Top: 2D quiver plot showing cell velocity on the transformed anterior-posterior(A-P) axis of a E9 mouse neural tube. Bottom: 1D divergence of cell velocity on the A-P axis.

Extended Data Fig. 10 RCTD clustering and cell type compositions of spatial transcriptomic data of human embryoid bodies (EBs).

(a) Cell type assignments of each location inferred by RCTD. (b) EB identity assignments of each location. (c) Cell type composition within each whole EB.

Supplementary information

Supplementary information (download PDF )

Supplementary Sections 1–4, Tables 1–3 and Figs. 1–6.

Reporting Summary (download PDF )

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Gu, Y., Liu, J., Lee, K.H. et al. Topological velocity inference from spatial transcriptomic data. Nat Biotechnol (2025). https://doi.org/10.1038/s41587-025-02688-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • Version of record:

  • DOI: https://doi.org/10.1038/s41587-025-02688-8

Search

Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing