STODE: A Deep Generative Framework for Continuous Spatiotemporal Dynamics in Spatial Transcriptomics

Koichiro Majima, Yasuhiro Kojima, Teppei ShimamurabioRxiv 2025 · DOI

TL;DR

This paper introduces STODE, a novel deep generative framework that reconstructs continuous tissue development from discrete spatial transcriptomic snapshots. By combining a Variational Autoencoder (VAE) with a potential-guided Neural Ordinary Differential Equation (ODE), STODE can infer both forward and backward developmental trajectories, offering unprecedented insights into complex biological processes.

What Problem Does This Paper Address?

Spatial transcriptomics has revolutionized our understanding of tissue architecture by providing gene expression data with spatial context. However, current methods capture only static "snapshots" of tissues at discrete time points. This is a major limitation for studying dynamic biological processes like development, regeneration, or disease progression, which involve continuous changes in cell states and tissue morphology. Traditional methods for inferring temporal dynamics often struggle with the complexity of these processes, oversimplifying them or failing to adequately integrate spatial information. Specifically, optimal transport (OT) methods, while useful for aligning cell populations, can oversimplify complex dynamics and face challenges with cell proliferation or disappearance. This paper aims to bridge this gap by developing a model that can reconstruct continuous spatiotemporal dynamics from these discrete, destructive measurements.

Methods

STODE employs a two-pronged approach:

  1. Variational Autoencoder (VAE) for Latent Representation: A VAE is used to encode high-dimensional gene expression data from each spatial "particle" (e.g., a spot in the spatial transcriptomic data) into a lower-dimensional latent space. This latent space captures the essential variations in gene expression and spatial information, serving as a compressed representation of the tissue state.
  2. Potential-Guided Neural Ordinary Differential Equation (ODE): The core of STODE's dynamic modeling lies in a potential-guided neural ODE. This framework treats the evolution of each particle's state (combining its latent gene expression and spatial coordinates) as a continuous trajectory governed by a learned, time-varying potential energy landscape. The particles "flow" down the gradient of this potential, mimicking developmental processes. This approach allows for the modeling of smooth, continuous transitions in both gene expression and spatial organization.

The model is trained using a composite loss function that includes terms for:

  • Distribution Matching: Ensuring the predicted and observed distributions of particle states align.
  • Temporal Alignment: Encouraging the latent space to reflect biological time.
  • Force Consistency: Ensuring the learned dynamics are physically plausible by aligning the ODE's predicted velocity with the gradient of the potential.

Datasets

  • Synthetic Toy Dataset: A custom dataset designed to simulate anisotropic tissue growth driven by gene expression feedback. This dataset has a known ground truth, allowing for rigorous evaluation of the model's interpolation capabilities.
  • Mouse Midbrain Development Dataset: Used to evaluate the model's ability to reconstruct developmental trajectories and compare its performance against existing methods.
  • Mouse Organogenesis Spatiotemporal Transcriptomic Atlas (MOSTA) Dataset: A large-scale dataset (E9.5-E11.5) used to apply STODE to a complex biological system and reconstruct developmental processes.

Key Insights and Ideas

  • Bridging the Discrete-Continuous Gap: STODE effectively bridges the gap between discrete, static spatial transcriptomic data and the continuous nature of biological development.
  • Potential-Guided Dynamics: The use of a learned potential energy landscape provides a physically intuitive and powerful mechanism for guiding particle trajectories, mimicking how biological systems self-organize.
  • Unifying Spatial and Transcriptomic Dynamics: By integrating gene expression and spatial coordinates into a single latent state vector, STODE captures how molecular changes drive and are influenced by physical tissue movements.
  • Retrograde Inference for Hypothesis Generation: The ability to simulate backward trajectories allows for the reconstruction of unobserved intermediate states, generating testable hypotheses about developmental mechanisms.
  • Identifying Gene Drivers of Morphogenesis: The framework can directly link gene expression patterns to tissue movement, identifying potential genetic regulators of morphogenetic events.

Key Results

  • Superior Interpolation Accuracy: On both synthetic and mouse midbrain datasets, STODE significantly outperformed linear interpolation and Entropic Optimal Transport (OT) models in predicting gene expression and spatial coordinates for unobserved time points. For instance, on the toy dataset, STODE achieved a gene MSE of 0.62 and spatial RMSE of 1.05, compared to 0.85 and 1.25 for linear interpolation, and 0.21 and 0.35 for OT (Table 1).
  • Accurate Reconstruction of Developmental Processes: When applied to the mouse organogenesis dataset, STODE accurately reconstructed known developmental events, including early pharyngeal arch development and the differentiation of various cell types.
  • Identification of Morphogenetic Regulators: The model identified genes like Prrx1 (a regulator of cell migration) and cytoskeletal proteins (Actc1, Acta2) as being strongly correlated with inferred particle movement, suggesting their roles in tissue morphogenesis.
  • Analysis of Tissue Dynamics: STODE's analysis of vector field divergence provided quantitative insights into tissue expansion and contraction, highlighting regions of growth and consolidation during development.

Limitations and Future Work

  • Computational Resources: STODE, like many deep generative models, requires significant computational resources and careful hyperparameter tuning, which might limit its accessibility for extremely large datasets.
  • Inference vs. Observation: The model infers temporal continuity rather than directly observing it, meaning errors in data preprocessing can propagate.
  • Hypotheses Require Validation: Retrograde reconstructions are computational hypotheses that need experimental validation (e.g., through lineage tracing).
  • Smooth Dynamics Assumption: The current framework assumes smooth dynamics, which might not fully capture rare, abrupt developmental transitions or stochastic events.

Future Work: The authors suggest extending the model to integrate multi-modal data (e.g., epigenomics, proteomics), incorporate uncertainty quantification for more robust inference, and potentially model more complex dynamic behaviors.

Summary updated

Abstract

Abstract Motivation Spatial transcriptomics offers detailed molecular insights but struggles to capture continuous tissue dynamics due to experimental constraints and destructive sampling. Traditional optimal transport (OT) methods attempt to link time points but often rely on unimodal data and oversimplify complex developmental processes. We propose a spatiotemporal deep generative model that captures the continuous evolution of tissue, integrating both spatial and gene-expression dynamics. We first embed spatial transcriptomic particles into a latent space using a VAE and then learn time-dependent dynamics with a potential-guided neural ODE. This framework reveals diverse tissue behaviors, including growth patterns, spatial reorganization, and temporal gene-expression changes. A neural decoder estimates key behaviors like growth, disappearance, movement, and clustering, while a differentiable growth module models region appearance and disappearance. Results STODE is a deep generative model that reconstructs continuous spatiotemporal dynamics from discrete spatial transcriptomics measurements collected at multiple time points. On a complex synthetic dataset simulating gene-driven tissue morphogenesis and mouse midbrain development dataset, STODE significantly outperformed both linear interpolation and Entropic Optimal Transport models in predicting gene expression and spatial coordinates for a excluded timepoint. When applied to a mouse organogenesis dataset, the model’s backward simulations from late-stage embryos to early progenitors accurately reconstructed known developmental processes. The simulations correctly identified early pharyngeal arch derivatives as the populations occupying the largest area and captured the progressive differentiation of diverse cell types from multipotent neural crest and mesenchymal progenitors, demonstrating the model’s capability to reconstruct continuous and meaningful biological trajectories from discrete-timepoint spatial transcriptomes. In addition, the inferred factors reflected coordinated activation of morphogenetic programs, including cytoskeletal remodeling and cell-matrix interactions, and revealed transcriptional signatures associated with epithelial–mesenchymal transition and directed tissue migration, suggesting that the model effectively disentangled regulatory modules underlying the spatial organization and morphogenesis of craniofacial structures. The proposed model, STODE, will be broadly applicable to studies on embryogenesis, tissue regeneration, and disease progression, where reconstructing continuous spatiotemporal trajectories is essential for understanding biological mechanisms. Availability and Implementation The STODE model was implemented in Python using the PyTorch deep learning library. This code is available on GitHub at https://github.com/LzrRacer/STODE/ . Contact [email protected] , [email protected] , [email protected]
BibTeX
@misc{majima2025stode,
  author = {Koichiro Majima and Yasuhiro Kojima and Teppei Shimamura},
  title = {{STODE: A Deep Generative Framework for Continuous Spatiotemporal Dynamics in Spatial Transcriptomics}},
  year = {2025},
  doi = {10.1101/2025.11.24.690134},
  howpublished = {bioRxiv},
}
Figure