Abstract
Image-based spatial transcriptomic sequencing technologies have enabled the measurement of gene expression at single-cell resolution, but with a limited number of genes. Current computational approaches attempt to overcome these limitations by imputing missing genes, but face challenges regarding prediction accuracy and identification of cell populations due to the neglect of gene-gene relationships. In this context, we present stImpute, a method to impute spatial transcriptomics according to reference scRNA-seq data based on the gene network constructed from the protein language model ESM-2. Specifically, stImpute employs an autoencoder to create gene expression embeddings for both spatial transcriptomics and scRNA-seq data, which are used to identify the nearest neighboring cells between scRNA-seq and spatial transcriptomics datasets. According to the neighbored cells, the gene expressions of spatial transcriptomics cells are imputed through a graph neural network, where nodes are genes, and edges are based on cosine similarity between the ESM-2 embeddings of the gene-encoding proteins. The gene prediction uncertainty is further measured through a deep learning model. stImpute was shown to consistently outperform state-of-the-art methods across multiple datasets concerning imputation and clustering. stImpute also demonstrates robustness in producing consistent results that are insensitive to model parameters.
Introduction
Modern spatial transcriptomics (ST) technologies, such as MERFISH, SeqFISH+, and STARmap, are revolutionary in their ability to preserve the physical location of cells within a tissue. However, these methods are often limited by the number of genes they can simultaneously measure—typically ranging from dozens to hundreds. In contrast, single-cell RNA sequencing (scRNA-seq) provides a comprehensive view of the entire transcriptome but lacks spatial information.
To bridge this gap, researchers use "imputation" to predict missing spatial gene expressions using scRNA-seq as a reference. Existing methods like Tangram, SpaGE, or gimVI often rely on linear models or ignore complex, non-linear gene-to-gene interactions. Furthermore, they frequently lack a mechanism to quantify prediction confidence, which can lead to biological misinterpretations based on noisy data.
The stImpute Framework
We introduce stImpute, a computational framework that leverages protein language models and graph neural networks to enhance spatial transcriptomics imputation. The pipeline consists of four primary stages:
- Shared Latent Space Construction: An autoencoder (AE) projects both ST and scRNA-seq data into a shared latent space, facilitating the identification of $k$-nearest scRNA-seq neighbors for each ST cell.
- Biological Gene Graph Construction: Unlike traditional methods that rely on statistical co-expression, stImpute utilizes the ESM-2 protein language model. By analyzing the protein sequences encoded by genes, the model computes cosine similarities to build a functional gene relationship graph.
- Graph Neural Network (GNN) Imputation: The gene graph and neighbor information are processed by a GraphSAGE-based GNN. This allows for the propagation of information across the gene network to predict missing spatial expressions.
- Reliability Assessment: A post-hoc Multi-Layer Perceptron (MLP) calculates a "reliability score" for each imputed gene, providing a metric for researchers to filter low-confidence results.
Experimental Results
The performance of stImpute was evaluated across diverse datasets, including STARmap (Mouse Visual Cortex), osmFISH (Mouse Somatosensory Cortex), MERFISH (Mouse Pre-optic region), Slide-seq (Mouse Brain), and a large-scale Xenium dataset (Human Tonsil) containing 1.3 million cells.
Accuracy and Recovery
stImpute consistently outperformed state-of-the-art methods such as stPlus, SpaGE, and Tangram. At the cell level, it achieved an average Cosine Similarity Score (CSS) of 0.68, a 4.5% improvement over the second-best method. At the gene level, stImpute reduced Mean Squared Error (MSE) by 34% compared to the next best method. The inclusion of the GNN module was critical; ablation studies showed a 36% drop in performance (measured by MSE) when the GNN was removed.
Reliability and Scalability
The reliability score proved highly effective for downstream analysis. Filtering for the top 50% most reliable genes increased the average CSS from 0.67 to 0.74. Furthermore, stImpute demonstrated impressive scalability, processing the 1.3 million-cell Xenium dataset in approximately 16 hours while consuming less than 14 GB of RAM, making it accessible for standard workstation hardware.
Conclusion
stImpute represents a significant advancement in spatial transcriptomics by integrating protein-level functional information into the imputation process. By providing reliability scores, it offers a practical tool for robust biological discovery and helps avoid false positives in downstream analysis. Future work will focus on end-to-end integration of the AE and GNN modules and optimizing preprocessing pipelines for various ST modalities.
Summary updated