Abstract
Optimal integration of transcriptomics data and associated spatial information is essential towards fully exploiting spatial transcriptomics to dissect tissue heterogeneity and map out inter-cellular communications. We present SEDR, which uses a deep autoencoder coupled with a masked self-supervised learning mechanism 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. SEDR achieved higher clustering performance on manually annotated 10 × Visium datasets and better scalability on high-resolution spatial transcriptomics datasets than existing methods. Additionally, we show SEDR's ability to impute and denoise gene expression.
Introduction
While single-cell RNA sequencing (scRNA-seq) has revolutionized our understanding of cell types, it requires dissociating tissue into a "soup" of individual cells, which destroys crucial spatial context. Emerging Spatial Transcriptomics (ST) technologies solve this by capturing gene expression while preserving the physical location of cells.
However, ST data presents a massive computational challenge: how do you effectively merge high-dimensional gene data (thousands of genes) with 2D/3D spatial relationships? Existing tools often struggle with "dropouts" (missing data points), high noise levels, or poor scalability as datasets grow to include tens of thousands of spots. SEDR (Spatially Embedded Deep Representation) was designed to bridge this gap by learning a low-dimensional "latent representation" that respects both the biology of the genes and the geography of the tissue.
Methods
The core of SEDR is its dual-network architecture that undergoes joint optimization to integrate transcriptomic and spatial features into a unified latent space.
- Deep Masked Autoencoder: This branch focuses on gene expression. It uses a masked self-supervised learning mechanism—randomly hiding a subset of gene data and forcing the model to reconstruct it. This encourages the network to learn robust biological features rather than just memorizing noise or dropouts.
- Variational Graph Autoencoder (VGAE): This branch handles the spatial context. It builds a K-nearest neighbor (KNN) graph where each spot is a node connected to its physical neighbors. The VGAE embeds this graph into the same latent space as the gene data.
- Iterative Clustering: SEDR employs Deep Embedded Clustering (DEC) to refine the boundaries between different tissue domains (like layers of the brain or regions of a tumor) by iteratively grouping similar spots in the latent space.
Unlike many competitors, SEDR uses sparse matrix operations, making it significantly more memory-efficient and faster on large-scale datasets.
Results and Benchmarking
The authors validated SEDR across several major spatial transcriptomics platforms, including 10x Genomics Visium, Stereo-seq, and Slide-seqV2. On the human dorsolateral prefrontal cortex (DLPFC) benchmark, SEDR achieved the highest Adjusted Rand Index (ARI), outperforming 10 other popular methods such as BayesSpace and STAGATE.
Key findings from the experimental results include:
- Superior Accuracy: SEDR consistently recovered manually annotated tissue layers with higher precision than RNA-only or simpler spatial methods.
- Better Trajectory Inference: When mapping developmental lineages, SEDR accurately reconstructed the "inside-out" developmental order of the cerebral cortex, whereas RNA-only methods produced jumbled results.
- Denoising and Imputation: In an ovarian cancer dataset, SEDR increased the correlation between PTPRC gene expression and gold-standard protein staining from 0.193 to 0.499, demonstrating its power to recover signal from sparse data.
- Biological Discovery: In a breast cancer case study, SEDR identified a specific "outer ring" of tumor-associated macrophages (TAMs) around a tumor core that was invisible to manual pathology but highly relevant to cancer progression.
Discussion and Future Directions
SEDR demonstrates that spatial information acts as a powerful regularizer, smoothing out technical noise and providing a "sanity check" for transcriptomic clustering. Furthermore, the use of masking—a technique popularized by Large Language Models—allows the model to learn the underlying "grammar" of tissue expression, making it highly effective for imputation.
As spatial technologies move toward sub-cellular resolution, scalability becomes paramount. SEDR’s ability to handle 80,000+ spots with low GPU/CPU overhead makes it more future-proof than many existing Graph Convolutional Network (GCN) approaches.
Currently, SEDR relies on gene expression and spatial coordinates. Future iterations aim to incorporate histology images (H&E-stained slides) via a Convolutional Neural Network (CNN) branch and adapt the framework for imaging-based platforms like MERFISH. The team also plans to implement mini-batch training to scale the tool to datasets involving millions of cells.
Summary updated