Stepwise multi-scale reconstruction of cell spatial organization from single-cell RNA sequencing data with Cell2space Authors: Jieyi Pan, Qiyuan Guan, Duanchen Sun Published: 2026 ABSTRACT Abstract Elucidating the spatial organization of cells is fundamental to understanding tissue architecture and function, yet tissue dissociation during single-cell RNA sequencing (scRNA-seq) strips cells of their native architectural context. It is essential to integrate scRNA-seq data with spatial transcriptomics (ST) references to infer the spatial information of individual cells. Despite the development of various tools, achieving precise and biologically relevant spatial reconstructions remains challenging. Here, we present Cell2space, a deep learning framework that integrates scRNA-seq data with ST references to reconstruct multi-scale cellular spatial organization in a stepwise manner. Instead of treating spatial reconstruction as coordinate regression, Cell2space learns a universal spatial affinity function and employs a hierarchical inference strategy that integrates domain-level priors to refine cellular neighborhoods. This approach enables accurate assignment of single cells to spatial domains and inference of cell–cell neighborhood relationships. Comprehensive evaluations demonstrate that Cell2space robustly achieves superior performance in both domain assignment and neighborhood inference. Applied to the mouse visual cortex and human skin, Cell2space identifies layer-specific markers, reveals continuous gene expression gradients, and faithfully reconstructs stratified tissue architecture without requiring prior annotations. Together, Cell2space provides a powerful framework for integrating single-cell and spatial modalities, enabling deeper insights into tissue organization and cellular microenvironments. Introduction Single-cell RNA sequencing (scRNA-seq, SC) has transformed our understanding of cellular heterogeneity and transcriptional landscapes at high resolution [1, 2]. Despite its power in identifying rare cell types and reconstructing developmental trajectories, standard scRNA-seq pipelines require tissue dissociation, which disrupts native tissue architecture. As a result, critical spatial context is lost, limiting the characterization of cell–cell communication, microenvironmental interactions, and higher-order tissue organization. To address this limitation, spatial transcriptomics (ST) technologies have emerged, enabling the simultaneous measurement of gene expression profiles and spatial localization at the cellular level [3]. Current ST platforms generally fall into two categories: sequencing-based methods (e.g. 10X Visium [4], Slide-seq [5]), which provide genome-wide coverage but typically lack single-cell resolution, and imaging-based approaches (e.g. MERFISH [6], STARmap [7]), which achieve subcellular precision but are constrained to targeted gene panels. These inherent trade-offs between transcriptomic coverage and spatial resolution have motivated the development of computational methods to integrate scRNA-seq and ST data, aiming to reconstruct spatial organization at single-cell resolution. A major class of computational integration strategies uses scRNA-seq as a reference to enhance ST data, including cell-type deconvolution (i.e. inferring the cell-type composition of mixed low-resolution spatial spots) [8, 9] and imputation to recover or predict unmeasured gene expression values and thereby extend the gene coverage of imaging-based platforms [10, 11]. In contrast, complementary approaches seek to map dissociated single cells back into physical space. By leveraging the genome-wide coverage and single-cell resolution of scRNA-seq, these methods enable spatial organization reconstruction with rich molecular information, facilitating downstream analyses and biological discovery. Representative methods such as Tangram [12] and CytoSpace [13] align scRNA-seq profiles to ST references through probabilistic mapping or optimal transport to infer spatial positions. However, these approaches focus primarily on cross-modal alignment, i.e. matching cells and spatial references in a shared correspondence framework, rather than explicitly modeling the structural dependencies that govern local cellular neighborhoods. Others, including scSpace [14] and CeLEry [15], attempt to directly learn regression models to predict continuous spatial coordinates from gene expression. However, treating spatial reconstruction strictly as a coordinate prediction task overlooks an important conceptual issue. Spatial coordinates are not the primary biological quantity of interest, but rather a geometric representation of underlying neighborhood relationships. Tissue architecture is defined by structured cellular interactions and domain-level organization, rather than by absolute positions alone. Importantly, many ST analysis frameworks, such as STAGATE [16] and GraphST [17], use spatial coordinates mainly to construct K-nearest neighbor (KNN) graphs, which then support downstream structural modeling. This indicates that cellular neighborhood relationships are a more direct and biologically meaningful representation of spatial organization. Therefore, spatial reconstruction from single-cell transcriptomic data can be reframed as directly inferring domain-level structure and cell–cell neighborhood relationships, without explicitly recovering absolute coordinates. Such a formulation is both sufficient for downstream spatial analysis and more consistent with the hierarchical organization of tissues. To address this conceptual and methodological gap, we present Cell2space, a Python-based computational framework that integrates scRNA-seq data with ST references to reconstruct cellular spatial organization. The core of Cell2space is the optimization of a spatial affinity function, implemented as a multilayer perceptron (MLP), that captures the intrinsic relationship between gene expression and physical proximity. The framework employs a hierarchical inference strategy to reconstruct tissue architecture across multiple scales: it first assigns single cells to coarse-grained tissue domains and then utilizes these assignments as topological constraints to infer fine-grained, cell–cell neighborhood relationships. Using scRNA-seq expression profiles together with an ST reference, including its expression matrix, spatial coordinates, and domain annotations or computational partitions, Cell2space transfers tissue architecture to whole-transcriptome single-cell profiles by modeling these spatial dependencies within a shared latent biological space. The main outputs of the framework are (i) the predicted spatial domain assignments of single cells and (ii) the inferred cell–cell neighborhood structure. We demonstrate that this approach achieves high accuracy in spatial reconstruction and enables downstream analyses such as identifying novel layer-specific markers and uncovering continuous gene expression gradients. Furthermore, Cell2space is compatible with computationally identified spatial domains, providing a robust and flexible tool for characterizing tissue organization and cellular microenvironments. Results Overview of Cell2space The core principle of Cell2space is to learn a universal spatial affinity function from ST data and transfer it to scRNA-seq data to infer spatial relationships at single-cell resolution. The model takes scRNA-seq and ST datasets as input, leveraging domain annotations in the ST reference to guide the learning process (Fig. 1a). To harmonize these disparate modalities, Cell2space first projects both datasets into a joint latent biological space, effectively mitigating technical variations and batch effects (Fig. 1b). The central component of Cell2space is the optimization of a nonlinear spatial affinity function that parameterizes the intrinsic relationship between transcriptomic similarity and physical adjacency. This function is implemented as a dense MLP trained exclusively on the ST reference, which learns to discriminate between spatially adjacent (positive) and distant (negative) spot pairs based on their latent representations (Fig. 1c). Crucially, Cell2space employs a hierarchical inference strategy to reconstruct tissue architecture across multiple scales. In the first stage, the model performs spatial domain assignment by aggregating affinities between individual cells and reference spots, mapping each cell to its most probable coarse-grained tissue domain (Fig. 1d). Building upon these domain-level assignments, the second stage executes cell–cell neighborhood relationships inference, where pairwise affinities among all single cells are computed and refined through domain-specific topological constraints (Fig. 1e). This hierarchical approach ensures that fine-grained cellular neighborhoods are reconstructed within a biologically plausible spatial context. Together, these multi-scale outputs empower diverse biological applications, enabling precise spatial domain assignment, high-resolution cell–cell neighborhood inference, robust cell-type annotation, and the identification of novel spatially variable markers across complex tissues (Fig. 1f). Overview of Cell2space. (a) The inputs of Cell2space include scRNA-seq (SC) data and ST with domain annotations. (b) The gene expression profiles from scRNA-seq and ST are integrated into a unified feature space to mitigate technical discrepancies and align the distributional differences between the two modalities. (c) Cell2space establishes a universal spatial affinity function, parameterized by a dense MLP, by contrasting spatially adjacent positive pairs and distant negative pairs in the shared latent feature space. (d) Once trained, the MLP-based affinity function predicts the affinity between each single cell and reference ST spots, enabling spatial domain assignment by aggregating spot-level affinities within each domain. (e) Based on the shared latent representations of query cells, the trained MLP-based spatial affinity function computes pairwise cell–cell affinities, which are further refined using domain-level topological constraints to infer spatial cell–cell neighborhood relationships. (f) By restoring the spatial context of single-cell profiles, Cell2space enables deep biological insights, including high-resolution tissue mapping, neighborhood relationship analysis, and the expansion of the spatial transcriptomic landscape. Cell2space enables accurate spatial domain assignment in paired-tissue benchmarks To rigorously assess the performance of Cell2space, we established a ground-truth validation framework using paired tissue sections, rather than relying solely on synthetic simulations. This approach ensures that the evaluation captures complex, biologically authentic spatial structures across multiple scales. We evaluated the model from two complementary perspectives: the macroscopic prediction accuracy of single-cell spatial domains and the microscopic fidelity of inferred local cell–cell neighborhoods. To this end, we employed the human dorsolateral prefrontal cortex (DLPFC) dataset, which comprises 12 tissue sections arranged in adjacent pairs [18]. Within each pair, one section was treated as the reference ST data, while the other served as the pseudo single-cell input withholding its spatial coordinates. This setup yielded 12 independent validation scenarios, allowing us to benchmark reconstruction performance against the known ground truth of the held-out section (Fig. 2a and Methods). Cell2space enables accurate spatial domain assignment in paired-tissue benchmarks. (a) Schematic of the DLPFC dataset simulation process using adjacent slices for single-cell and ST inputs. (b) Boxplots quantify the performance of Cell2space compared to six baseline methods. Performance is evaluated using standard domain assignment accuracy. Statistical significance was assessed by two-sided paired Wilcoxon signed-rank tests comparing Cell2space with each baseline method; significance levels are indicated in the plot. Significance annotations are defined as follows: ns, 0.05
1.0. Subsequently, the biological functions of these domains were characterized via GO enrichment analysis using GSEAPY. The top 200 markers per domain were queried against the “GO_Biological_Process_2023” database, and pathways with an FDR < 0.05 were reported as significant. Gradient gene identification To characterize continuous transcriptional variations across cortical depth, we first ordered the identified spatial domains according to their anatomical hierarchy (from deep regions HPC/CC to superficial Layer 1). We calculated the mean expression level for each gene within each domain to generate layer-specific expression profiles. A linear regression model was then fitted to these domain-averaged expression values against the ordinal domain indices. Genes were prioritized based on the magnitude of their regression slopes, allowing for the identification of markers with significant increasing (positive slope) or decreasing (negative slope) expression gradients toward the pial surface. Lightweight implementation of Cell2space To improve scalability for large-scale applications, we developed a lightweight implementation of Cell2space that replaces dense all-by-all neighborhood inference with sparse candidate-based inference. Because the final output of Cell2space is a local neighborhood graph, the lightweight version preserves the same neighborhood reconstruction objective and overall inference logic while restricting computation to a reduced set of likely cell–cell relationships and retaining only sparse top-k neighbors for downstream analysis. This reduces the practical complexity of neighborhood reconstruction from approximately \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} $O\left({N}^2\right)$\end{document} to O(Nk), where k denotes the number of retained candidate neighbors per cell (default 256), thereby lowering memory usage and computational cost and making Cell2space more suitable for datasets on the order of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} ${10}^5$\end{document} cells with high-resolution spatial references. We present the full and lightweight versions as complementary running modes: the full version is recommended when reconstruction accuracy is the main priority, whereas the lightweight version is intended for larger datasets where scalability, memory usage, and runtime are more limiting (Supplementary Fig. 23). Key Points Cell2space achieves accurate and robust spatial reconstruction, consistently outperforming state-of-the-art methods. Cell2space achieves accurate and robust spatial reconstruction, consistently outperforming state-of-the-art methods. Cell2space reveals multi-scale spatial transcriptional landscapes. Cell2space reveals multi-scale spatial transcriptional landscapes. Cell2space can reconstruct tissue architecture without prior domain annotations. Cell2space can reconstruct tissue architecture without prior domain annotations. Supplementary Material