Abstract
Spatial transcriptomics enable us to dissect tissue heterogeneity and map out inter-cellular communications. Optimal integration of transcriptomics data and associated spatial information is essential towards fully exploiting the data. We present SEDR, an unsupervised spatially embedded deep representation of both transcript and spatial information. The SEDR pipeline uses a deep autoencoder to construct a low-dimensional latent representation of gene expression, which is then simultaneously embedded with the corresponding spatial information through a variational graph autoencoder. We applied SEDR on human dorsolateral prefrontal cortex data and achieved better clustering accuracy, and correctly retraced the prenatal cortex development order with trajectory analysis. We also found the SEDR representation to be eminently suited for batch integration. Applying SEDR to human breast cancer data, we discerned heterogeneous sub-regions within a visually homogenous tumor region, identifying a tumor core with pro-inflammatory microenvironment and an outer ring region enriched with tumor associated macrophages which drives an immune suppressive microenvironment.
Introduction
The evolution of genomics from bulk tissue analysis to single-cell RNA sequencing (scRNA-seq) has revolutionized our understanding of cellular diversity. However, scRNA-seq typically requires tissue dissociation, which destroys the spatial context—the critical information regarding where cells reside and how they interact with their neighbors. Spatial Transcriptomics (ST) has emerged to bridge this gap, measuring gene activity while preserving physical coordinates. The primary computational challenge lies in effectively merging high-dimensional gene expression data with spatial relationships. Current methodologies often rely on linear methods like PCA or ignore spatial context during initial feature extraction, failing to capture the complex, non-linear interactions inherent in biological systems.
The SEDR Framework
To address these challenges, we developed SEDR (Spatially Embedded Deep Representation), an unsupervised deep learning pipeline designed to create a joint mathematical map of gene expression and spatial location.
As shown in Figure 1, the SEDR architecture utilizes a two-pronged approach:
- Deep Autoencoder: This branch compresses high-dimensional gene expression data into a low-dimensional latent representation, learning the fundamental "signature" of a cell's activity.
- Variational Graph Autoencoder (VGAE): This branch constructs a neighborhood graph where each cell (or spot) is a node connected to its nearest physical neighbors. The VGAE learns an embedding that captures how a cell’s gene expression relates to its local environment.
These representations are concatenated and optimized jointly. Finally, the model employs Deep Embedded Clustering (DEC)—an iterative refinement step—to sharpen the boundaries between different tissue layers or cell types, resulting in more biologically meaningful clusters.
Performance and Biological Insights
We validated SEDR across multiple datasets, including the human dorsolateral prefrontal cortex (DLPFC), human breast cancer, and mouse olfactory bulb data.
Clustering Accuracy and Trajectory Analysis
On the DLPFC dataset, which features well-documented anatomical layers, SEDR achieved a mean Adjusted Rand Index (ARI) of 0.427. This significantly outperformed standard tools like Seurat and SpaGCN. Furthermore, because SEDR captures the underlying logic of tissue structure, we were able to use its output to correctly retrace the chronological order of brain development through trajectory analysis, effectively turning a static spatial map into a developmental timeline.
Identifying Tumor Heterogeneity
In human breast cancer samples, SEDR demonstrated its ability to handle complex, messy environments. Within a visually uniform tumor region, SEDR identified a distinct "core" and an "outer ring." Analysis revealed that the core was pro-inflammatory, while the outer ring was enriched with tumor-associated macrophages that created an immune-suppressive environment, potentially facilitating tumor progression.
Batch Correction and High-Resolution Scaling
A significant hurdle in genomics is the "batch effect"—technical noise introduced by processing samples at different times. When paired with the Harmony algorithm, SEDR successfully integrated data from different brain slices, removing technical noise while preserving distinct biological layers. Additionally, SEDR successfully processed high-resolution Stereo-seq data from the mouse olfactory bulb, producing cleaner anatomical boundaries than traditional PCA-based methods.
Conclusion and Future Directions
SEDR provides a robust, unsupervised framework for integrating spatial and transcriptomic data. While currently highly effective, future iterations of the model aim to incorporate histological images (such as H&E staining) via a dedicated convolutional neural network (CNN) branch. Additionally, the team is exploring mini-batch and parallel processing techniques to improve computational efficiency for massive, high-resolution datasets containing millions of data points.
Summary updated