Abstract
One major challenge in analyzing spatial transcriptomic datasets is to simultaneously incorporate the cell transcriptome similarity and their spatial locations. Here, we introduce SpaceFlow, which generates spatially-consistent low-dimensional embeddings by incorporating both expression similarity and spatial information using spatially regularized deep graph networks. Based on the embedding, we introduce a pseudo-Spatiotemporal Map that integrates the pseudotime concept with spatial locations of the cells to unravel spatiotemporal patterns of cells. By comparing with multiple existing methods on several spatial transcriptomic datasets at both spot and single-cell resolutions, SpaceFlow is shown to produce a robust domain segmentation and identify biologically meaningful spatiotemporal patterns. Applications of SpaceFlow reveal evolving lineage in heart developmental data and tumor-immune interactions in human breast cancer data. Our study provides a flexible deep learning framework to incorporate spatiotemporal information in analyzing spatial transcriptomic data.
The Challenge of Spatial Transcriptomics
In the burgeoning field of spatial transcriptomics (ST), researchers can now see not just which genes are active in a cell, but exactly where that cell is located in a tissue. However, most analysis tools treat these two pieces of information separately or use them only to group cells into discrete "neighborhoods" (clustering).
The biological reality is often continuous: an embryo develops through a sequence of states, and a tumor invades healthy tissue along a gradient. Existing "pseudotime" methods often ignore spatial context, leading to trajectories that look like noise when mapped back onto the physical tissue. The challenge is to create a low-dimensional "map" of the data that respects both the transcriptome and the physical architecture of the organ.
Methods: The SpaceFlow Framework
SpaceFlow utilizes a Deep Graph Infomax (DGI) framework to generate spatially-consistent low-dimensional embeddings.
The technical workflow involves:
- Graph Construction: Building a Spatial Expression Graph (SEG) where nodes are cells and edges represent physical neighbors.
- Deep Learning Encoder: A two-layer Graph Convolutional Network (GCN) encodes this graph into a low-dimensional embedding.
- Spatial Regularization: This is the core innovation. The model uses a specific loss function that penalizes the system if cells that are physically far apart are placed too close together in the embedding space, even if their gene expression is similar.
- Outputs: The model produces low-dimensional embeddings, discrete domain segmentations, and the pseudo-Spatiotemporal Map (pSM)—a continuous "flow" metric that integrates pseudotime with spatial coordinates.
Key Results and Benchmarking
The authors validated SpaceFlow across several high-profile datasets, including the 10x Visium Human DLPFC (brain cortex), Stereo-seq Mouse Olfactory Bulb, Chicken Heart Development, and Human Breast Cancer.
- Performance: On the human brain (DLPFC) dataset, SpaceFlow achieved a median Adjusted Rand Index (ARI) of 0.427, performing competitively with the current state-of-the-art (BayesSpace) and significantly outperforming non-spatial methods.
- Scalability: Despite using deep learning, the model is efficient, typically training in under 5 minutes for datasets with 10,000 cells on a standard GPU.
- Biological Discovery: In the chicken heart data, SpaceFlow successfully mapped the transition of the myocardium from an immature to a mature state and identified the specific transformation of the epicardium into cardiomyocytes.
Discussion: Spatial Context and "Flow"
Traditional pseudotime methods often produce "speckled" results in space. SpaceFlow’s pSM produces smooth, layered gradients that match known biological developmental sequences. Physical proximity acts as a powerful "prior" that helps filter out technical noise in gene sequencing.
Furthermore, in breast cancer datasets, SpaceFlow identified specific "tumor-immune interface" domains—critical battlegrounds where the immune system interacts with the tumor—which are often missed by standard clustering.
Limitations and Future Work
The authors acknowledge that the current model uses Euclidean distance for spatial regularization, which might struggle with "disjoint" tissues or highly complex 3D structures. Future versions could incorporate 3D coordinates, histology images (H&E stains), or epigenetic data. Additionally, integrating RNA velocity could turn these maps into true directional "flow" diagrams of development.
Summary updated