正在把原文翻译成中文,长文需要一两分钟;先显示原文。

Download PDF

Nature Methods (2026) Cite this article

View saved research

Abstract

The spatial arrangement of cells is fundamental to their function, but single-cell RNA sequencing dissociates cells from their native spatial context. Here we present LUNA, a generative AI model that reconstructs tissue architecture from dissociated gene expression profiles by learning spatial priors from spatially resolved transcriptomics datasets. We validate LUNA by reconstructing the MERFISH mouse brain atlas comprising over 1.2 million cells, inferring the spatial locations of dissociated cells in a mouse central nervous system single-cell RNA sequencing atlas, and enriching the Slide-tags data by imputing the locations of nuclei lost during profiling. LUNA generalizes to previously unseen cell types in the MERFISH mouse brain atlas and to pathological samples, identifying regions of disease-associated alterations in a mouse model of Parkinson’s disease. Our results establish generative tissue reconstruction as an approach for overcoming current technological limitations in spatial biology and advancing our understanding of tissue organization and function.

Main

Single-cell RNA sequencing (scRNA-seq) technologies have enabled the high-throughput profiling of cellular transcriptomes, making it possible to identify and explore unique transcriptional profiles within individual cells1,2. These technologies have revolutionized our understanding of cellular diversity, providing unprecedented insights into the complexity of cells and tissues3,4,5,6,7,8. However, a major limitation of scRNA-seq technologies is the loss of spatial context, as cells are dissociated from their native microenvironments during the sequencing process. The spatial context is crucial for understanding how cells interact with their neighbors and the surrounding microenvironment, influencing their roles in healthy tissue function and disease development. Although spatially resolved technologies aim to address this limitation9,10,11, they are restricted in the number of genes that can be measured and are not always an option.

To address the limitations of individual technologies, computational methods have been developed to infer spatial context from gene expression of single cells. Early approaches relied on in situ hybridization-based reference atlases of landmark gene expression and leveraged them to infer the spatial location of cells in scRNA-seq datasets12,13. More recently, reference mapping methods such as Tangram14, CytoSPACE15, STEM16, scSpace17, STALocator[18](https://www.nature.com/articles/s41592-026-03332-2#ref-CR18 "Li, S., Shen, Q. & Zhang, S. Spatial transcriptomics-aided localization for single-cell transcriptomics with STALocator. Cell Syst. https://doi.org/10.1016/j.cels.2025.101195

           (2025).") and CeLEry[19](https://www.nature.com/articles/s41592-026-03332-2#ref-CR19 "Zhang, Q. et al. Leveraging spatial transcriptomics data to recover cell locations in single-cell RNA-seq with CeLEry. Nat. Commun. 14, 4050 (2023).") proposed mapping dissociated tissue data to reference spatial datasets. Although these methods have shown promising results, they rely on an exact spatial reference for mapping scRNA\-seq datasets, thus primarily functioning as data integration tools. On the other hand, novoSpaRc[20](https://www.nature.com/articles/s41592-026-03332-2#ref-CR20 "Nitzan, M., Karaiskos, N., Friedman, N. & Rajewsky, N. Gene expression cartography. Nature 576, 132–137 (2019)."),[21](https://www.nature.com/articles/s41592-026-03332-2#ref-CR21 "Moriel, N. et al. NovoSpaRc: flexible spatial reconstruction of single-cell gene expression with optimal transport. Nat. Protoc. 16, 4177–4200 (2021).") enabled the spatial reconstruction of single\-cell gene expression; however, novoSpaRc assumes that cells in close physical proximity exhibit similar gene expression profiles—an assumption that is often violated in complex tissue architectures.

Here, we present LUNA (location reconstruction using generative AI), a generative AI model that reconstructs complex tissue structures from gene expression of cells by learning spatial priors over spatial transcriptomics datasets. LUNA learns cell representations that capture cellular interactions locally and globally across the entire tissue slice, enabled by an attention mechanism22,23 that takes into account interactions across cells. LUNA operates as a diffusion model24,25,26; during training it learns to denoise corrupted cell coordinates, whereas during inference it starts from random noise and reconstructs the physical locations of cells solely from their gene expression.

We apply LUNA to reconstruct the multiplexed error-robust fluorescence in situ hybridization (MERFISH) whole mouse brain atlas, which consists of 1.23 million cells spanning all brain regions27, as well as the scRNA-seq mouse central nervous system atlas of 1.08 million cells28. LUNA effectively reconstructs mouse brain tissue across a wide range of brain regions and captures spatial gene expression patterns, including cells from previously unseen cell types without explicit training on those specific cell types. Beyond prediction, we use LUNA to identify genes that are the most predictive of the spatial structure, offering a means to link tissue architecture to its underlying transcriptional programs. Furthermore, LUNA enables the enrichment of Slide-tags datasets29 by inferring the tissue locations of nuclei lost during cell profiling. LUNA correctly placed different subtypes of neuronal cells in mouse embryonic tissue, enriching the sparse Slide-tags data by up to 95.5%, as well as tumor cells belonging to spatially distinct compartments in a human metastatic melanoma sample. Finally, we generated a Xenium spatial transcriptomics dataset from the brains of wild-type control mice and α-synuclein-induced Parkinson’s disease model mice. LUNA successfully positioned clusters of cells with pathological α-synuclein, even though it was trained only on control samples, as confirmed by immunostaining. LUNA is highly scalable, with linear time and memory complexity relative to the number of input cells during the inference, and it can infer the spatial coordinates of tens of thousands of cells in less than a few minutes on a GPU.

Results

Overview of LUNA

Given gene expression of dissociated single cells, we aim to infer their spatial locations and reconstruct tissue structure (Fig. 1a). To achieve that, we designed a diffusion model24,25,26, named LUNA, that generates complex tissue structures by predicting the physical locations of individual cells based on their gene expression. The key challenge in generating tissue structures arises from the inherent complexity of tissues, which are composed of a vast array of heterogeneous cells engaged in intricate cell–cell communication. LUNA overcomes these challenges by enabling each cell to ‘communicate’ with all other cells guided by the learned weights (attention scores; Methods). In this way, LUNA learns cell embeddings that capture cellular interactions on both the global and local levels, allowing LUNA to directly map cell embeddings to spatial locations. During training, LUNA learns spatial priors on existing spatial transcriptomics data. In the inference stage, LUNA generates complex tissue structures solely from gene expression of cells.

Fig. 1: LUNA is a generative AI model that positions cells into complex tissue structures from their gene expression by learning spatial priors over existing spatially resolved datasets.

LUNA reconstructs tissue structure from gene expression data for dissociated cells. A mouse brain atlas containing 1.2 million cells illustrates the reconstruction of multiple tissue sections. During training, the input to LUNA are gene expressions with cell coordinates corrupted by noise. A multi-head self-attention model produces cell embeddings, which are used to predict coordinates and reconstruct tissue structure. A rotation-invariant loss compares predicted and ground-truth coordinates. During denoising, a sample from a standard normal distribution progressively forms a structured tissue shape as diffusion time decreases. Plots show that both sampling time and memory use increase approximately linearly with the number of cells.

Full size image

a, Given gene expression of cells, the tissue reconstruction process involves predicting the complex tissue architecture from gene expression profiles of cells. We visualize the Uniform Manifold Approximation and Projection (UMAP)[74](https://www.nature.com/articles/s41592-026-03332-2#ref-CR74 "McInnes, L., Healy, J. & Melville, J. UMAP: uniform manifold approximation and projection for dimension reduction. Preprint at https://doi.org/10.48550/arXiv.1802.03426

           (2018).") of cells based on their gene expression profiles (1,122 genes) from the MERFISH whole mouse ABC Atlas[27](https://www.nature.com/articles/s41592-026-03332-2#ref-CR27 "Zhang, M. et al. Molecularly defined and spatially resolved cell atlas of the whole mouse brain. Nature 624, 343–354 (2023).") (left). Each cell is colored according to one of 338 distinct subclasses. LUNA’s predictions of the spatial tissue structure are displayed on the right with eight slices randomly chosen from a total of 66 slices. LUNA was trained on a spatial transcriptomics dataset of another mouse. **b**, Overview of the training stage of LUNA. LUNA takes as input spatial transcriptomics data and corrupts the spatial locations of cells by adding noise. Using the attention mechanism, LUNA learns how to position each individual cell with respect to other cells based on their gene expression. The loss function in LUNA ensures invariance to the rotations and translations of the predicted slice. **c**, Visualization of the denoising during the inference stage in LUNA across different diffusion steps on an example slice (29,079 cells) from the ABC Atlas. The noise state is initialized from a standard normal distribution. Conditioned on the gene expression of the cells, LUNA progressively removes noise at each diffusion step. **d**, LUNA achieves linear time and memory complexity during inference relative to the number of input cells. Correlations between inference time and the number of input cells (top) and between reserved memory of the GPU and the number of input cells (bottom) across all 66 slices from the ABC Atlas. Each point corresponds to a slice, correlating the cell count with either the time or memory used during the inference stage by LUNA. Panels **a** and **b** created in BioRender; Yu, Y. <https://biorender.com/l3kygx1> (2026\).

Source data

The neural network in LUNA consists of a multihead self-attention mechanism22,23 that allows each cell to focus on gene expression of specific cells when making predictions (Fig. 1b). The cell embeddings are then mapped from the latent space to the physical space via a fully connected layer. To ensure robustness to rotations and translations of input slices, the loss function in LUNA is specially designed to be invariant to these transformations and preserve the relative spatial relationships of the cells (Methods).

The training stage of LUNA comprises two processes (corruption and denoising), both of which are repeated over a range of diffusion times (Methods). During the corruption process, a controlled amount of Gaussian noise is added to the ground-truth cell coordinates. Using the noised cell coordinates generated from this process and conditioned on the gene expression data, LUNA then learns to recover the original cell coordinates through the denoising process. During the inference stage, LUNA takes gene expression profiles as model input and reconstructs tissue structures by denoising cell coordinates in an autoregressive manner. Initially, cell coordinates are generated from random Gaussian noise, and LUNA iteratively removes noise from these coordinates, predicting spatial locations of cells (Fig. 1c and Extended Data Fig. 1). LUNA is highly scalable, with linear time and memory complexity relative to the number of cells during the inference. It infers physical locations of tens of thousands of cells in just a few minutes on a single GPU. For example, LUNA inferred locations of 40,000 cells from the Allen Brain Cell (ABC) MERFISH mouse brain atlas27 in approximately 4 min using around 6 GB of GPU memory (Fig. 1d).

LUNA accurately reconstructs the whole mouse brain atlas

LUNA effectively scales to atlas-scale large datasets and accurately reconstructed a whole mouse brain of the ABC MERFISH mouse brain atlas27. We trained LUNA on 2.85 million cells across 147 slices from one mouse (Supplementary Note 1). We then applied it to infer locations of cells from the whole brain of another mouse consisting of 1.23 million cells and 338 identified subclasses in 66 slices (Fig. 2a).

Fig. 2: LUNA accurately reconstructs the mouse brain atlas of 1.23 million cells.

LUNA is trained on brain data from one mouse and used to predict the spatial locations of cells from another mouse. Ground-truth and predicted brain maps show similar spatial patterns for 338 cell subclasses, four neurotransmitter types, and the genes Rxfp1 and Rorb. Predicted and ground-truth spatial correlations for Rorb are closely related, with Pearson correlation equal to 0.99. In a zero-shot test, the second animal contains cell classes absent from the training set. Ground-truth and predicted maps show similar distributions for the unseen NP-CT-L6b Glut and vascular classes and their associated genes.

Full size image

a, LUNA was trained on all slices from Animal 1 in the ABC Atlas (2.85 million cells) and then applied to predict the tissue structure of cells from Animal 2 unseen during training (1.23 million cells). b, Examples of tissue reconstruction results using LUNA on three representative slices from distinct major brain regions of the MERFISH whole mouse ABC Atlas27, comprising 12,610 cells, 30,931 cells and 22,010 cells, respectively. For visualization purposes, three slices were randomly selected from the ABC Atlas. Cells are colored according to their cell-type annotations with 338 distinct cell subclasses, showing ground truth (top) and predicted (bottom) locations. c, LUNA’s predictions across four neurotransmitter types. Ground-truth locations (top) and LUNA’s predictions (bottom) for a slice with 35,738 cells. d, Spatial expression patterns of two spatially variable genes in the IT-ET Glut cell type. To select spatially variable genes, we calculated Moran’s I values for all genes (1,122 in total) based on ground-truth locations and identified those with the highest Moran’s I value. Representative genes include Rxfp1 and Rorb for IT-ET Glut cells. Cells from other cell types are shown in gray color. e, Spatial autocorrelation for the Rorb gene computed using the Moran’s I on the ground-truth locations and the locations predicted by LUNA. Each point represents a single slice, with a total of 66 slices. The slices are color-coded from blue (low) to red (high) based on the true Moran’s I values for Rorb. Points near the diagonal indicate better spatial pattern preservation by LUNA. Pearson’s correlation coefficient (ρ) is displayed in the top left. f, Zero-shot setting evaluation of LUNA. We exclude all cells from a randomly chosen cell class (out of 34 total classes) during model training and evaluate LUNA’s predictions on the cells from a held-out cell class, without any further training or refinement of the model. g,h, LUNA effectively generalizes to unseen cells from NP-CT-L6b Glut cell class in the zero-shot setting. NP-CT-L6b Glut cells (n = 69,641 in Animal 1) were excluded during training. The model was evaluated on Animal 2, including NP-CT-L6b Glut cells (n = 29,262 in Animal 2). The spatial distribution of the excluded class (left) and the spatial expression patterns of the genes Tshz2 and Syt6 (middle and right) in the NP-CT-L6b Glut cell type across two representative slices (g,h). Genes Tshz2 and Syt6 were identified as the most spatially variable among 1,122 genes, selected based on the highest Moran’s I values calculated from ground-truth cell locations. i, Zero-shot generalization to unseen cells from the vascular cell class. Vascular cells (n = 447,941 in Animal 1) were excluded during training. The model was evaluated on Animal 2, including vascular cells (n = 198,550 in Animal 2). The spatial distribution of the excluded class (left), and the spatial expression patterns of the genes Ppp1r1b and Slc17a7 (middle and right) in vascular cells for a representative slice. Panels a and f created in BioRender; Yu, Y. https://biorender.com/l3kygx1 (2026).

Source data

We evaluated LUNA’s predictions using the ground-truth cell locations. We found that LUNA’s predictions agree well with the ground-truth cell locations across 11 major regions identified in the ABC Atlas, despite their distinct structural characteristics (Supplementary Figs. 1–3). For example, LUNA accurately captured the circular structure of the olfactory bulb region, the layered organization of the isocortex region, and the anatomical separation between the brain stem and cerebrum (Fig. 2b). In the slice from the olfactory bulb region affected by sequencing artifacts, LUNA inferred the spatial distribution of cells in areas lacking ground-truth spatial information. To further evaluate the generation results, we compared LUNA’s predictions across various levels of categorization, ranging from neurotransmitter level (four types) to subclass level (338 types) and cell supertype level (1,201 types). LUNA accurately positioned cells at different levels of categorization, from coarser to finer (Fig. 2c and Supplementary Fig. 4).

We next assessed LUNA’s ability to correctly position cells within a cell type based on their gene expression profiles. We identified spatially variable genes by computing Moran’s I statistic30 and visualized the expression values of genes with the highest Moran’s I values (Supplementary Note 3). LUNA successfully captured the spatial expression patterns of genes within individual cell types, demonstrating its ability to preserve biological information. For example, LUNA accurately positioned cells expressing Rxfp1 and Rorb in extratelencephalic and intratelencephalic neurons containing the neurotransmitter glutamate (Fig. 2d). We also observed a high reconstruction quality across non-neuronal cells (Supplementary Fig. 5). For example, LUNA correctly positions the physical locations of a small group of 85 cells out of 3,725 astrocyte-ependymal cells expressing the Cfap206 gene (Extended Data Fig. 2).

To quantitatively evaluate the conservation of spatial gene expression patterns, we computed spatial autocorrelation using the Moran’s I statistic for all 1,122 genes across the 66 slices. We compared Moran’s I values derived from LUNA’s predicted locations with those from the ground-truth cell locations. This analysis revealed a strong correlation between the Moran’s I values based on LUNA’s predictions and those based on the true locations, with an average Pearson’s correlation coefficient of 0.95 across all genes (Supplementary Fig. 6). For instance, the spatial autocorrelation for the spatially variable Rorb gene was consistently well preserved across all slices, with a near-perfect Pearson’s correlation coefficient (Fig. 2e). These results demonstrate that LUNA effectively preserves spatial gene expression patterns throughout the mouse brain.

We further validated LUNA’s capability to predict spatial information of missing slices. We trained LUNA on a subset of spatially measured slices from the ABC dataset and evaluated on 41 randomly held-out slices. LUNA’s predictions agree well with ground-truth cell locations on this cross-slice generalization task (Supplementary Figs. 7 and 8).

LUNA generalizes to unseen cell classes

We next evaluated the capability of LUNA to predict the spatial locations of cells from classes unseen during training without any additional training or fine-tuning of the model (Fig. 2f). We refer to this as zero-shot capability, as the model was never trained on any samples from the unseen cell class31,32. We excluded each of the 31 broad cell class categories that have a sufficient number of cells (more than 1,000 cells across the entire atlas) identified in ref. 27 and then trained LUNA on slices from Animal 1 in the ABC Atlas without the held-out cell class (Supplementary Note 1). We then applied LUNA to predict tissue structures for all cell classes in Animal 2, including the held-out cell class. Across different cell classes, LUNA correctly positioned cells within the spatial architecture of the tissue (Extended Data Figs. 3–5). For example, LUNA correctly positioned NP-CT-L6b Glut cells in the isocortex, cortical subplate and hippocampal formation regions (Fig. 2g,h). We additionally examined the spatial expression patterns of spatially variable genes in NP-CT-L6b Glut cells. We identified genes Tshz2 and Syt6 as genes with the highest Moran’s I values among 1,122 genes based on the ground-truth cell locations. We found that within the unseen NP-CT-L6b Glut class, LUNA correctly positioned cells according to the Tshz2 and Syt6 expression patterns (Fig. 2g,h). To analyze the similarity of the unseen NP-CT-L6b Glut cells with seen classes, we examined the gene expression similarity between this class and other seen classes. NP-CT-L6b Glut cells partially share gene expression patterns with several seen classes (Supplementary Fig. 9). This suggests that LUNA captures shared spatial gene expression patterns and models continuous spatial variation in gene expression, enabling it to infer spatial coordinates for previously unseen cell types. We further analyzed other randomly excluded cell classes, such as the vascular cell class that is spread across the entire slice (Fig. 2i and Supplementary Fig. 10) and the HY GABA cell class (Supplementary Fig. 11), confirming that LUNA preserves key spatial gene expression patterns of unseen cell types, demonstrating strong zero-shot capabilities.

Interpreting gene contributions to spatial structure prediction

LUNA can enable identification of genes whose exclusion affects the prediction of spatial structure the most. Specifically, we measured the sensitivity of spatial predictions to exclusions of each individual gene by masking its expression to zero during inference and quantified the resulting changes in predicted cell positions. We computed discrepancies between spatial predictions obtained with the full gene panel and those obtained with one gene excluded (Fig. 3a).

Fig. 3: LUNA identifies genes that have a strong impact on predicting spatial organization and outperforms alternative baselines on predicting tissue structure.

LUNA predicts spatial cell locations from gene expression and outperforms the comparison methods on slices from an unseen animal. Its average spatial correlation is about 0.45, compared with about 0.27 for scSpace and lower values for the other methods. Example reconstructions show LUNA more closely matching the ground truth than reference-based methods, whether those methods use random or best-match reference slices. A gene-masking analysis compares predictions with all genes included against predictions with one gene excluded. Excluding Igfbpl1, Cldn11 or Vgf reduces spatial correlation in the respective cell types shown.

Full size image

a, We trained LUNA on all slices from Animal 1 in the ABC Atlas (2.85 million cells) with the whole gene panel. During inference, we masked expression of individual genes, repeating this process for each gene in the panel (1,122 genes). We then assessed the contribution of individual genes for predicting spatial organization of Animal 2 with LUNA. To quantify the contribution of the masked gene, we compared the difference in the physical spaces between the full-gene model and the gene-excluded model. b, Performance difference caused by excluding each gene for different cell classes. The performance was measured using the Spearman’s rank correlation (SRC) coefficient computed within each cell class. Each box summarizes n = 1,122 single-gene exclusion experiments (one per gene) for one cell class; box plots show the median (center), 25th to 75th percentiles (box bounds), 1.5× interquartile range (whiskers) and outliers. The five cell classes were selected as the classes whose spatial structure is most affected by excluding specific genes across all cell classes. Genes causing more than a 5% performance change are marked in red. c–e, The effect of different initializations of the initial noise during inference. We conducted ten experiments with different random seeds, focusing on genes that strongly influence specific cell classes. We compared SRC when using all genes with scenarios excluding Igfbpl1 in OB-IMN GABA (c), Cldn11 in OPC-Oligo (d) and Vgf in CTX-MGE GABA (e). Box plots show the median (center), 25th to 75th percentiles (box bounds) and whiskers extend to the most extreme value within 1.5× interquartile range of the box edges. f, LUNA fundamentally differs from the existing methods. LUNA takes as input different slices and learns spatial priors across all slices during training. In the inference stage, LUNA generates cell locations conditioned on their gene expression by leveraging learned spatial priors. In contrast, other methods require the preselection of a single reference slice and then map cells to the reference slice. Consequently, the spatial structure of their results heavily depends on the chosen reference slice. g, Performance comparison on the cross-animal generalization task between LUNA and alternative baselines on the MERFISH mouse primary motor cortex atlas43. The performance was measured as the median SRC between the ground-truth spatial coordinates and the predicted spatial coordinates over all slices from an unseen mouse (31 slices, 118,036 cells). Higher correlations indicate better prediction performance. Error bars represent s.d. across 31 slices. h, Visualization of ground-truth locations and predictions using LUNA and alternative baselines for one example slice (5,235 cells) using a randomly selected reference slice. Colors denote cell class labels. Performance comparison on that slice using SRC between the ground-truth spatial coordinates and the predicted spatial coordinates as a metric (far right). i, Visualization of ground-truth locations and predictions using LUNA and alternative baselines for one example slice (5,024 cells) using the best-matched slice as a reference for alternative baselines. The best-matched slice was found using prior information about distribution of cell classes which LUNA does not use. Colors denote cell class labels. Performance comparison on that slice using SRC between the ground-truth spatial coordinates and the predicted spatial coordinates as a metric (far right). Panel a created in BioRender; Yu, Y. https://biorender.com/l3kygx1 (2026).

Source data

We investigated how individual genes influence the predicted spatial locations of major cell classes in the ABC Atlas. We trained LUNA on all slices from Animal 1 with the whole gene panel and, during inference, masked individual genes from Animal 2, quantifying each gene’s cell-class-specific contribution as the Spearman rank correlation (SRC) within each class (Fig. 3b, Extended Data Fig. 6 and Supplementary Table 1). Certain genes had a particularly strong effect on prediction accuracy, including Igfbpl1, Cldn11, Vgf, Nefh and Nr2f1 (Fig. 3b), with the highest impact in the olfactory bulb–intracerebral migrating stream GABA neurons (OB-IMN GABA), oligodendrocyte precursor cells and oligodendrocytes (OPC-Oligo), cortex–medial ganglionic eminence GABA neurons (CTX-MGE GABA) and cortex–caudal ganglionic eminence GABA neurons (CTX-CGE GABA), respectively.

Functionally, these genes are closely tied to cell identity and function: Igfbpl1 is involved in regulating cell growth and GABAergic transmission in mice33,34; Cldn11 encodes an oligodendrocyte-specific protein essential for myelin sheath formation35 and previous work has shown that myelin mutant mice lacking expression of the Cldn11 gene in oligodendrocytes exhibit central auditory deficits, reduced anxiety-like behavior and neurotransmitter imbalances36; Vgf and Nefh genes are biomarkers related to neurodegenerative diseases and neuronal damage37,38; Nr2f1 plays a crucial role in neurodevelopment, strongly influencing cortical development and network activity maturation[39](https://www.nature.com/articles/s41592-026-03332-2#ref-CR39 "Zhang, K. et al. Imbalance of excitatory/inhibitory neuron differentiation in neurodevelopmental disorders with an NR2F1 point mutation. Cell Rep. https://doi.org/10.1016/j.celrep.2020.03.085

           (2020)."),[40](https://www.nature.com/articles/s41592-026-03332-2#ref-CR40 "Tocco, C., Bertacchi, M. & Studer, M. Structural and functional aspects of the neurodevelopmental gene NR2F1: from animal models to human pathology. Front. Mol. Neurosci. 14, 767965 (2021)."). We further evaluated the performance variation with different initializations of the noise in the inference phase, confirming the robustness of our findings and systematic influence of *Igfbpl1*, *Cldn11*, *Vgf*, *Nefh* and *Nr2f1* genes on specific cell classes (Fig. [3c–e](https://www.nature.com/articles/s41592-026-03332-2#Fig3) and Supplementary Fig. [12](https://www.nature.com/articles/s41592-026-03332-2#MOESM1)).

LUNA can also assess the joint contribution of gene pairs on spatial organization. Focusing on the 332 ligand–receptor pairs from OmniPath41 that overlap the ABC Atlas gene library, we jointly masked each pair during inference and measured its effect on the five cell classes most affected in the single-gene analysis (Extended Data Fig. 7). The strongest interactions involved vesicular neurotransmitter transporters: Slc32a1 (a GABA transporter) in CTX-CGE GABA neurons, and Slc17a7 (a glutamate transporter) in MH-LH Glut neurons, with Slc17a7 also affecting CTX-CGE GABA neurons and oligodendrocytes. Interactions with the Thbs4 ligand, whose loss causes a dystrophic phenotype in mice42, most affected OB-IMN GABA neurons.

LUNA outperforms other methods by a large margin

LUNA can reconstruct complex tissue structures by learning spatial priors across multiple slices. Existing methods are reference mapping methods and require the preselection of a single reference slice to which then new cells are mapped based on the similarity of the gene expression between the cells in the reference slice and the input gene expression profiles (Fig. 3f). This mapping is performed either by explicitly learning a mapping matrix, as in novoSpaRc20, Tangram14, STEM16 and CytoSPACE15, or by implicitly regressing from gene expression space to the physical space, as in scSpace17, STALocator[18](https://www.nature.com/articles/s41592-026-03332-2#ref-CR18 "Li, S., Shen, Q. & Zhang, S. Spatial transcriptomics-aided localization for single-cell transcriptomics with STALocator. Cell Syst. https://doi.org/10.1016/j.cels.2025.101195

           (2025).") and CeLEry[19](https://www.nature.com/articles/s41592-026-03332-2#ref-CR19 "Zhang, Q. et al. Leveraging spatial transcriptomics data to recover cell locations in single-cell RNA-seq with CeLEry. Nat. Commun. 14, 4050 (2023).") (Supplementary Note [2](https://www.nature.com/articles/s41592-026-03332-2#MOESM1)).

We compared the performance of LUNA to alternative methods on the spatially resolved cell atlas of the mouse primary motor cortex sequenced by MERFISH43 (Supplementary Note 1). We used 31 slices (118,036 cells) from one animal as the test set and trained LUNA on 33 slices (158,379 cells) from another mouse to learn spatial priors across multiple slices. During inference, all methods were conditioned only on the gene expression. As existing methods cannot accept multiple slices as input, we first randomly selected a single slice from the training mouse to serve as the reference, repeating the procedure for each slice of the testing mouse. We evaluated the results using the Spearman’s rank correlation between the predicted and ground-truth locations, averaging the performance across all slices from the unseen mouse (Supplementary Note 3). LUNA achieved an average correlation coefficient of 0.448, outperforming the best alternative baseline scSpace by 63% (Fig. 3g). Performance gains of LUNA were retained using other evaluation metrics, such as precision and root sum square deviation (Supplementary Note 3 and Supplementary Fig. 13). CeLEry is the only other method besides LUNA capable of potentially leveraging information from multiple slices. We reran CeLEry using all slices from the training mouse as the training dataset. However, as CeLEry is a regression model that does not account for geometric constraints, it is not robust to variations in slice orientation or cutting shapes within the training set. Consequently, we observed a substantial performance decline when CeLEry was trained with multiple slices compared to using a single slice (Supplementary Fig. 13). We visualized the spatial locations predicted by different methods on a sample slice from the unseen test mouse (Fig. 3h and Supplementary Fig. 14). LUNA accurately predicted the layerwise structure of mouse primary motor cortex tissues and correctly inferred the spatial priors of the tissue, such as the contour of the tissue. We analyzed the spatial gene expression patterns of cell-type-specific marker genes. LUNA distinguished cells from different cell classes, accurately reflecting the spatial gene expression patterns (Supplementary Fig. 15). In contrast, other methods struggled due to the dissimilarity between the reference and test slices.

The limitations of other methods stem from their reliance on preselected reference slices, which constrains their generalization capabilities. To systematically evaluate the sensitivity of existing methods on the reference slice, we selected different slices as a reference training slice and evaluated performance on a fixed test slice. We computed the average performance of these methods across different reference slices. LUNA achieved a 121% higher Spearman’s rank correlation coefficient compared to the average performance of the best alternative method, scSpace, where the average is calculated over different reference slices (Supplementary Fig. 16). Given the sensitivity of reference mapping methods to the choice of reference slices, we further explored alternative strategies by selecting the most similar slice from another animal as the reference by using cell class information as a prior (Supplementary Note 2). We then reassessed the performance of alternative methods using this prior information. This prior information improved the performance of alternative baselines (Fig. 3i); however, they still lagged substantially behind LUNA’s performance. Even without using any prior information, LUNA outperformed all baselines, achieving 37.5% better performance on SRC than the best alternative method, CeLEry (Supplementary Fig. 17). We further compared LUNA to other alternative methods on the MERFISH ABC Atlas in the setting that selects the best reference slice for alternative methods as a prior (Supplementary Note 2). LUNA again substantially outperformed all alternative methods in all evaluation metrics even without using any prior information (Supplementary Fig. 18). Moreover, alternative methods fail to generalize to cell classes unseen in the reference section, whereas LUNA successfully reconstructs these patterns (Supplementary Note 2 and Extended Data Fig. 8). This gap reflects a difference in inductive bias, where many of the benchmarked approaches depend heavily on relationships learned from the reference cell types seen during training, with limited capacity to capture gene-level spatial localization or intergene colocalization. Their performance therefore tends to degrade on cell types whose transcriptional profiles are substantially underrepresented in, or absent from, the training data.

Reconstruction of the scRNA-seq atlas

We next applied LUNA for reconstruction of tissue structures of 1.08 million dissociated single cells across 13 coronal slices from the mouse central nervous system (CNS) scRNA-seq atlas28 (Fig. 4a). We used the model trained on the ABC MERFISH mouse brain atlas to predict spatial locations for cells in the scRNA-seq mouse CNS atlas integrated with the MERFISH atlas using Harmony44 (Supplementary Note 1). As the scRNA-seq atlas lacks spatial information, we validated LUNA’s performance using estimated cell locations derived from the integration of the scRNA-seq atlas with the STARmap PLUS CNS spatial atlas45 (Supplementary Note 1). In ref. 45, the mouse CNS spatial atlas was created using the in situ sequencing STARmap PLUS, which was then integrated with the scRNA-seq data using Harmony44. The integrated dataset underwent careful quality control by human experts, ultimately providing estimated cell locations of the scRNA-seq atlas45 (Fig. 4b). To validate LUNA’s predictions, we used these estimated cell locations obtained after the integration. Notably, LUNA never used spatial information from the STARmap PLUS atlas.

Fig. 4: LUNA predicts the tissue structure of 1.08 million cells from the scRNA-seq mouse central nervous system atlas.

LUNA reconstructs tissue from dissociated cells and predicts spatial distributions of brain cell types and gene expression. Estimated ground truth is obtained by integrating STARmap PLUS sequencing with a single-cell RNA sequencing atlas and expert input. Comparisons show estimated and predicted distributions for 26 main cell types, selected excitatory neurons, and the genes Lpl, Iqgap2, and Mef2c. Additional maps show spatially variable genes in vascular and leptomeningeal cells, astrocytes, ependymal cells, and peptidergic neurons. Density plots and a bar chart compare spatial uncertainty across cell types.

Full size image

a, Given the dissociated cells from the scRNA-seq atlas of the mouse CNS28, LUNA infers the tissue architecture. b, Estimated ground-truth spatial locations are obtained by sequencing mouse CNS using STARmap PLUS technology and integrating the CNS scRNA-seq dataset with the STARmap PLUS CNS dataset, followed by manual evaluation by human experts45. We use these estimated locations to validate LUNA’s predictions. c, Tissue reconstruction of the scRNA-seq mouse central nervous system atlas using LUNA for one example slice (58,117 cells). Cells are colored based on the main cell types (26 types). LUNA was trained on all the cells from Animal 1 of the ABC Atlas (2.85 million cells) and applied to generate cell locations for an scRNA-seq atlas from the mouse central nervous system (1.08 million cells, 13 coronal slices). d,e, Tissue reconstruction of the scRNA-seq mouse central nervous system atlas using LUNA for di- and mesencephalon excitatory neurons (d) and telencephalon-projecting excitatory neurons (e). The top plot shows estimated ground-truth locations obtained by aligning scRNA-seq atlas with the STARmap atlas and the bottom plot shows LUNA’s predictions. Cells from each main cell type are colored by their submolecular types. Cells from other main cell types are shown in gray color. f, Spatial expression patterns of three spatially variable genes across telencephalon-projecting excitatory neurons. To identify these genes, we calculated Moran’s I values for all 11,844 genes based on LUNA’s predictions, selecting three genes with distinct spatial patterns from the top ten genes with the highest Moran’s I values. The representative genes include Lpl, Iqgap2 and Mef2c. Cells from other main cell types are depicted in gray. g, Main-cell-type-specific spatially variable genes (SVGs) detected using LUNA’s predictions among genes that are unseen during training and unique to the scRNA-seq atlas. Four example main cell types are displayed, including both non-neuronal and neuronal cell types. Cells from other main cell types are depicted in gray. Genes are randomly selected among their top five SVGs with the highest Moran’s I values. h, Kernel density estimation visualizations of example cells with high (top row) and low (bottom row) confidence predictions. We generate 150 samples with different random seeds and compute the area encompassing 80% of predictions, defining this as the high density region (HDR) value for each cell. A smaller HDR implies lower uncertainty of a cell’s location. Cells with high confidence display sharply peaked distributions (low HDR values), while low-confidence cells exhibit more dispersed distributions. i, Mean area of high-density regions computed from kernel density estimation of predicted spatial coordinates for each main cell type. Each bar represents a main cell type, with its height corresponding to the mean HDR area for cells of that type and error bars indicating s.d. Smaller HDR areas reflect smaller uncertainty in predicting locations of cells. Number of cells (n) for each main cell type is annotated in the panel. We overlaid a maximum of 200 randomly sampled points as the gray dots for each type. Panel b created in BioRender; Yu, Y. https://biorender.com/l3kygx1 (2026).

Source data

When we applied LUNA to the scRNA-seq CNS atlas, its predictions aligned closely with cell locations estimated through integration of the data with the STARmap PLUS atlas at both the main-cell-type level (26 types; Fig. 4c and Supplementary Fig. 19) and the finer submolecular-type level, which includes 216 distinct types (Supplementary Fig. 20). The agreement is particularly pronounced in the isocortex, hippocampal formation, thalamus and hypothalamus regions. We further evaluated LUNA’s performance in reconstructing mouse CNS tissue architecture across various main cell types (Supplementary Fig. 21). Additionally, we examined LUNA’s predictions for specific neuronal main cell types including di- and mesencephalon excitatory neurons (Fig. 4d) and telencephalon-projecting excitatory neurons (Fig. 4e), along with their respective submolecular types. The results indicate that LUNA not only accurately placed cells across main cell types but also precisely predicted the spatial relationships of complex submolecular types within these neuronal cells. This underscores LUNA’s capability to capture both broad and intricate cellular architectures within the CNS.

To evaluate the conservation of spatial gene expression patterns, we analyzed the spatial distribution of three spatially variable genes, Lpl, Iqgap2 and Mef2c, within telencephalon-projecting excitatory neurons (Fig. 4f). These genes were selected based on their high Moran’s I values, calculated from a dataset of 11,844 genes using LUNA’s predictions. This analysis revealed that the spatial gene expression patterns predicted by LUNA closely align with the estimated ground truth, demonstrating LUNA’s effectiveness in capturing gene expression gradients at the cellular level. Specifically, Iqgap2 gene shows a gradual downregulation across the Ammon’s horn region (CA2) of the hippocampus, while Lpl displays an opposite trend with gradual upregulation in this region. For Mef2c gene, expression is minimal in telencephalon-projecting excitatory neurons within the CA2 region but substantially upregulated in the isocortex and olfactory areas. Overall, these results confirm that LUNA effectively reconstructs the complex spatial architecture of the mouse CNS scRNA-seq atlas and captures gene expression spatial changes. This underscores LUNA’s applicability in reconstructing cell locations for scRNA-seq atlases. We evaluate these predictions quantitatively by computing spatial autocorrelation using Moran’s I statistics across all 11,844 genes from the scRNA-seq CNS atlas and observe high agreement between LUNA’s predictions and estimated ground-truth locations (Supplementary Fig. 22). To further assess LUNA’s performance in the presence of batch effects, we evaluated LUNA on both non-integrated and integrated versions of the scRNA-seq data. LUNA maintains good performance despite batch effects, demonstrating robustness to technological differences; however, it still benefits from batch correction to further enhance overall performance (Supplementary Fig. 23).

By predicting the locations of dissociated scRNA-seq data, LUNA can be used to detect spatially variable genes that are absent from the spatial dataset used for model training. To demonstrate this, we detected main-cell-type-specific spatially variable genes among genes that are unseen during training (specific to the scRNA-seq atlas) using LUNA’s predicted cell locations (Supplementary Note 5). Using predicted locations, we identified genes with distinct spatial patterns in both neuronal and non-neuronal cells (Fig. 4g). Additionally, we report the top five (among the total of 11,844 genes) unseen genes with the highest Moran’s I value for different main cell types (Supplementary Table 2).

As a generative model, LUNA allows us to capture multiple plausible spatial arrangements, enabling the estimation of uncertainty in predictions. To estimate uncertainty in locations of scRNA-seq atlas, we generated 150 samples from the LUNA model using different random seeds. We then applied kernel density estimation to the predicted locations of each cell to analyze spatial uncertainty (Supplementary Note 6). For each individual cell, LUNA can estimate high-density regions (HDRs) and thus model uncertainty in predictions (Fig. 4h). Extending this modeling on the level of main cell types, LUNA can be used to model uncertainty of main cell types and identify regions in which locations of cells are interchangeable. For example, we found that telencephalon-projecting inhibitory neurons on average have smaller HDR regions and thus lower uncertainty in the spatial locations of cells belonging to these main cell types, whereas ependymal cells have the highest uncertainty (Fig. 4i).

LUNA infers locations of spatially unmapped nuclei in the Slide-tags data

LUNA can be used to predict the tissue locations of nuclei lost during cell profiling with Slide-tags technology29. Slide-tags enables profiling the single-cell and spatially resolved transcriptome by tagging nuclei with spatial barcode oligonucleotides derived from DNA-barcoded beads with known positions and then using tagged nuclei as an input to single-nucleus profiling assays29; however, many nuclei are lost during the barcoding process due to a combination of dissociation and microfluidic losses. To compensate for the sparsity in Slide-tags data, we applied LUNA to assign spatial locations to the spatially unmapped nuclei in the Slide-tags data.

We first applied LUNA to the sagittal section of the embryonic mouse brain at embryonic day 14 (E14) dataset consisting of 4,623 spatially mapped nuclei with Slide-tags (Fig. 5a and Supplementary Note 1). To evaluate LUNA’s performance using ground-truth nuclei locations, we used 4,160 spatially mapped nuclei as the training set and evaluated LUNA’s performance on the remaining 463 cells. LUNA’s predictions agree well with the ground-truth locations of cells obtained with Slide-tags (Fig. 5b). Without using any cell class information, LUNA accurately predicted cell locations, even for different neuronal subclasses. We further validated these predictions by computing spatial autocorrelation using Moran’s I index across all genes used for training (Fig. 5c). The relationship exhibits an almost perfect correlation, with a slope slightly below one (slope = 0.864), indicating a modest systematic underestimation of spatial autocorrelation values alongside a near-perfect rank agreement.

Fig. 5: LUNA infers locations of spatially unmapped nuclei in the Slide-tags data.

LUNA’s predicted locations for held-out mouse embryo nuclei closely match ground truth, with a correlation of 0.997 between predicted and ground-truth Moran’s I values. Maps compare spatially measured nuclei with nuclei located by LUNA, including radial glia and Neuron 2 cells. In human melanoma, maps compare measured and LUNA-located nuclei, tumor cell subtypes, and expression of CLU and DISC1FP1. For tumor-cell spatially variable genes, 437 are detected by both methods, 41 only in measured nuclei, and 396 only in LUNA-located nuclei. POLR3D and U2SURP are shown as examples detected uniquely using LUNA-located nuclei.

Full size image

a, Spatially mapped nuclei using Slide-tags from the embryonic mouse brain at E14 containing 4,623 cells29. Cells are colored according to their cell-type annotation. b, LUNA’s predictions of nuclei locations agree well with the ground-truth locations from Slide-tags. Ground-truth locations (left) and LUNA’s predictions (right) on the subset of the held-out dataset of the mouse E14 embryonic brain. LUNA was trained on 4,160 cells with ground-truth locations from spatially mapped nuclei and we evaluated its predictions on the held-out test set of 463 cells. c, Spatial autocorrelation computed using the Moran’s I on the ground-truth locations and locations predicted by LUNA on the held-out test set of mouse E14 embryonic brain. Each point represents one of the 690 genes used for training (Supplementary Note 1). Genes are colored on a gradient from blue (low) to red (high) based on their ground-truth Moran’s I value. Points closer to the diagonal indicate better preservation of spatial patterns by LUNA. The Pearson’s correlation coefficient (ρ) is reported on the top left. d, LUNA generated locations of 4,414 initially unmapped nuclei of the mouse E14 embryonic brain. LUNA was trained on spatially mapped nuclei and then applied to infer locations for the unmapped nuclei. The combined locations of nuclei mapped by LUNA and those spatially mapped by Slide-tags with cells colored according to their cell-type annotation (left). Cells colored based on the source of cell locations (right). e, Nuclei mapped by Slide-tags (left) and nuclei mapped by LUNA for Neuron_2 (cyan color) and Radial glia (yellow) cell types. All other cells are shown in gray. f, LUNA enriched the Slide-tags human metastatic melanoma sample from 4,804 cells to 6,466 cells by generating locations for spatially unmapped nuclei. The left panel shows the ground-truth locations of spatially mapped nuclei used as the training dataset, while the right panel combines these with the nuclei locations predicted by LUNA. g, LUNA correctly inferred the spatial compartment of two tumor clusters segregated into spatially distinct compartments. Spatially mapped nuclei by Slide-tags (top) and locations of unmapped nuclei generated by LUNA (bottom). Tumor cells are colored according to their type, while other cells are shown in gray color. h,i, Spatial expression patterns of the CLU gene (h) and the DISC1FP1 gene (i) across spatial compartments of tumor cells. We selected these genes as SVGs for each tumor type. Spatially mapped nuclei by Slide-tags (top) and locations of unmapped nuclei generated by LUNA (bottom). Tumor cells are colored according to expression levels of these genes. Other cells are shown in gray color. j, Number of SVGs uniquely detected by LUNA. SVGs were identified with SpatialDE46 (likelihood-ratio test, one-sided) in tumor cells using spatially mapped nuclei (n = 899) and nuclei mapped with LUNA (n = 1,250). FDR-corrected47 P < 0.01. k, Fraction of spatial variance (FSV) versus significance of spatial variation (FDR-corrected P value) for SVGs. Each dot represents a gene (n = 9,413). The dashed horizontal line indicates the significance cutoff (FDR-corrected P < 0.01). Genes are categorized as nonsignificant, significant genes commonly detected and significant genes uniquely detected using nuclei mapped with LUNA. Among genes detected uniquely by LUNA, the top three genes that have the lowest FDR-corrected P value (POLR3D, U2SURP and WWTR1 genes) and the top three genes that have the highest FSV (CD2AP, RPL22 and RPS4X genes) are highlighted in red. The spatial gene expression patterns of POLR3D and U2SURP genes are visualized (top right).

Source data

Encouraged by these results, we applied LUNA to infer locations of spatially unmapped nuclei due to nuclei losses with Slide-tags. We trained LUNA on spatially mapped cells of mouse E14 tissue and applied the model to infer locations of 4,414 spatially unmapped nuclei (Fig. 5d). To validate predictions of LUNA on the cell class level, we ran a linear support vector classifier to infer cell classes of spatially unmapped nuclei as annotations for spatially unmapped nuclei were missing in the original dataset (Supplementary Note 1 and Supplementary Fig. 29). We found that LUNA placed spatially unmapped nuclei in proximity of cells with the same class, enriching the sparse Slide-tags dataset by 95.5%. We further examined the spatial distribution of specific cell types, additionally confirming that LUNA placed nuclei from both neuronal and non-neuronal cells to the correct spatial regions (Fig. 5e and Supplementary Fig. 24).

We next applied LUNA to a human metastatic melanoma sample obtained with Slide-tags technology29. This sample includes a diverse array of cells, including immune cells and tumor cells. We trained LUNA on 4,804 spatially mapped nuclei and applied it to generate locations for the spatially unmapped nuclei. We again transferred cell-type annotations of spatially unmapped nuclei with the linear support vector classifier to validate LUNA’s predictions (Supplementary Note 1). We found that LUNA successfully enriched the dataset to the total of 6,466 spatially mapped cells (Fig. 5f). LUNA correctly placed two tumor subpopulations into spatially distinct compartments according to predicted cell class annotations (Fig. 5g), as well as nontumor cells (Supplementary Fig. 25). To further validate LUNA’s predictions, we investigated the heterogeneity of these two tumor populations by identifying differentially expressed genes between the two cell classes. Cells expressing CLU gene are placed by LUNA in different spatial compartments than cells expressing DISC1FP1 gene, which is also the case in the original dataset of spatially mapped nuclei of the melanoma sample (Fig. 5h,i).

We investigated whether LUNA-enriched Slide-tags data can increase the power to detect spatially variable genes in the human metastatic melanoma sample. We detected spatially variable genes using SpatialDE46, focusing exclusively on tumor cells in the sample (Supplementary Note 5). The LUNA-enriched dataset revealed 396 additional spatially variable genes (false discovery rate (FDR)-corrected47 P < 0.01) not detectable in the original sample, an 83% increase (Fig. 5j). Gene Ontology enrichment (Supplementary Fig. 26) was strongest for ‘Myc Targets V1’ (MSigDB48), which includes genes regulated by the MYC oncogene known to promote cell proliferation and closely linked to tumor aggressiveness and survival outcomes49, and the Ribosome pathway (Kyoto Encyclopedia of Genes and Genomes50), with known causal associations with increasing cancer risk51.

Among genes uniquely detected using the LUNA-enriched sample, the genes with the lowest P value include U2SURP (P = 3.4 × 10−8), POLR3D (P = 5.2 × 10−8) and WWTR1 (P = 7.6 × 10−8) (Fig. 5k), whose abnormal activity is known to be associated with cancer52,53,54,55. We use the fraction of spatial variance (FSV)46 to measure the extent to which spatial patterns contribute to the total variance observed in gene expression data. Of all significant genes detected using the LUNA-enriched sample, 50 genes exceeded the average (FSV = 7.3%, over 833 identified spatially variable genes), including CD2AP (FSV = 12.2%), RPL22 (FSV = 11.7%) and RPS4X (FSV = 11.4%) genes. RPL22 is known to act as a tumor-suppressor gene56, while previous studies have suggested that CD2AP and RPS4X are associated with certain malignant tumors57,58,59,60. We applied LUNA to enrich other Slide-tags datasets, including samples from human tonsil (Supplementary Fig. 27) and human cortex (Supplementary Fig. 28).

LUNA generalizes to pathological conditions

To study the ability of LUNA to predict spatial locations of cells in tissues undergoing pathological processes, we generated Xenium data from an α-synuclein-induced Parkinson’s disease mouse model61,62 (Methods). Mice were unilaterally injected with 2 μl of preformed fibrils (PFFs) into the dorsal striatum at 8 weeks of age (Fig. 6a). In this model, misfolded proteins propagate to neighboring neurons, seeding further aggregation in anatomically connected regions. At 3 months post-injection (3MPI), brains were sectioned and profiled. The same sections were subsequently immunostained to detect misfolded α-synuclein, providing an independent experimental validation of the predicted pathological changes (Fig. 6b).

Fig. 6: LUNA enables robust spatial reconstruction of diseased samples using a model fine-tuned on wild-type control tissues.

A workflow uses LUNA to compare mouse brain tissue three months after alpha-synuclein injection with control tissue and identify regions with potential pathological alterations. The model is pretrained on a brain atlas, fine-tuned on control samples, and used to predict cell distributions in injected samples. Predicted distributions for two glutamatergic cell types resemble those in the test sample. LUNA aligns control and injected samples to a common coordinate framework and identifies local gene-expression differences. An evaluation with immunostaining shows predicted and measured aggregate intensity agree.

Full size image

a, Illustration of the α-synuclein (α-syn) PFF injection model in the Parkinson’s disease mouse model. Misfolded α-syn is transmitted to neighboring neurons, seeding further aggregation and pathology spread in connected regions. To model this pathology, wild-type (WT) mice were unilaterally injected with 2 μl of PFFs into the dorsal striatum. This schematic was adapted from ref. 61. b, Illustration of the experiment. Brains from control (CTR) mice and from mice at 3MPI were extracted, sectioned, and processed using Xenium spatial transcriptomics. For each brain, two distinct anatomical positions were collected and analyzed. The same sections from 3MPI samples were subsequently subjected to immunostaining for misfolded α-syn, providing validation of pathology-affected regions. We used the LUNA model pretrained with MERFISH ABC Atlas, and fine-tuned it on CTR samples, and then applied the model to infer spatial structures of 3MPI samples. c, Spatial distributions of neuronal subtypes for the posterior section. Shown are NP-CT-L6b glutamatergic neurons (02 NP-CT-L6b Glut, purple) and DG-IMN glutamatergic neurons (04 DG-IMN Glut, blue) in a training sample (CTR, top), a 3MPI sample (middle) and the LUNA-predicted spatial coordinates for the 3MPI sample (bottom). Gray points denote all the other cells for reference. d, Cells exhibiting differential transcriptomic profiles between CTR and 3MPI samples identified from LUNA’s predictions. We removed spatial coordinates from the Xenium dataset and input single-cell-like gene expression data from the CTR and 3MPI sections into LUNA. During inference, LUNA aligns these samples to a common coordinate framework. We visualized the genes Myl4, Cdh9 and Bdnf, which were selected for their local spatial differential expression in the amygdala and hippocampus regions. Cells were colored by their local expression differences, with lighter shades indicating greater local shifts. To identify regions with potential pathological alterations, we further computed a unified score across genes with high distributional shifts between the 3MPI and CTR samples. Cells with pronounced local transcriptomic differences were labeled in yellow, while all others were shown in blue. These highlighted cells indicate regions with localized spatial transcriptomic alterations, potentially associated with pathological changes. e, Immunostaining for α-syn pathology in the 3MPI sample (left) shows α-syn in green, with each dot representing an individual protein aggregate. Scale bar is defined on the panel. Ground-truth cell locations for the same sample are shown on the right, with each cell colored by the intensity of α-syn fibril staining. Immunostaining in e was performed on two 3MPI sections with similar results. f, LUNA enables spatial data-free identification of brain regions with spatial gene expression dysregulation that correlates with α-syn pathology. Cells that are identified with potential pathological alterations between 3MPI and CTR (left) and all cells (right) are positioned according to LUNA’s predicted locations and colored by α-syn fibril staining intensity. A close-up view highlights the immunostaining of the regions identified by LUNA that potentially associate with pathological alterations, overlaid above the left plot. Panel b created in BioRender; Yu, Y. https://biorender.com/l3kygx1 (2026).

Source data

We used a LUNA model pretrained on the ABC MERFISH Atlas and we fine-tuned it on generated Xenium wild-type sections. We then applied the model to infer the spatial locations of diseased 3MPI sections that the model has never seen (Fig. 6b and Supplementary Note 1). LUNA successfully reconstructed the spatial organization of the different coronal sections (Supplementary Fig. 30). We visualized individual cell classes and observed strong alignment between LUNA’s predictions and the ground-truth spatial distributions in the 3MPI section (Supplementary Fig. 31). Notably, in the amygdala region, LUNA’s predictions more closely resembled the spatial organization of the diseased samples than the wild-type samples on which the model was fine-tuned (Fig. 6c). We further quantitatively measured the spatial distribution similarities using Wasserstein distance. Across all cell classes, the distance between the predictions and the test section was consistently lower than that between the predictions and the training section, indicating that the model predictions better reflect the spatial layout of the diseased samples across all cell classes than that of the wild-type samples (Extended Data Fig. 9).

Encouraged by these results, we decided to test whether LUNA can be used to identify spatial gene expression deregulation, such as those we expect to be induced by α-synuclein pathology spread. Specifically, we reasoned that the physical space learned by LUNA can be used for cell alignment and the identification of regions of local gene expression changes, without ever measuring spatial data. To achieve this, we first ran LUNA on slices from both wild-type and 3MPI samples, resulting in spatial predictions in a shared coordinate framework (Fig. 6d and Supplementary Fig. 32). Then, we used these cell coordinates to quantify 3MPI-versus-wild-type local gene expression changes (Supplementary Note 7). We found differentially expressed genes such as Myl4, Cdh9 and Bdnf in the amygdala and the hippocampus, some of which have been associated with neuronal stress or senescence63,64,65. We reasoned that the regions where cumulative changes across all genes were maximal were also the most likely to be the most affected by pathology. To test this, we computed a unified score for all cells based on their local gene expression differences between the 3MPI and wild-type samples (Supplementary Fig. 33 and Supplementary Note 7). We computed Jensen–Shannon Divergence across all genes to identify those with the largest distributional shifts between wild-type and 3MPI samples. Local gene expression differences were then assessed by comparing spatially averaged expression across each cell’s neighborhood. We found certain clusters of cells that are consistently flagged across more than half of the most divergent genes, revealing regions with potential pathological transcriptomic alterations (Fig. 6d and Supplementary Fig. 32).

To validate these regions of interest, we performed immunostaining against pathological α-synuclein in the 3MPI sample (Fig. 6e). We found that cells identified as locally distinct by LUNA exhibited higher levels of α-synuclein aggregates (Fig. 6f and Supplementary Fig. 34). Notably, LUNA accurately predicted the locations of clusters of cells with pathological α-synuclein. These results showcase how LUNA can generalize beyond wild-type conditions, and can be applied to different biological conditions providing a unique opportunity to identify spatial gene expression dysregulations without spatial data.

We further showed that LUNA is applicable without additional fine-tuning on healthy Xenium samples. Applying the library-size normalization and log transformation (Supplementary Note 1) to both datasets, we trained the model using only the 133 intersecting genes between the MERFISH ABC Atlas and Xenium datasets (Supplementary Fig. 39) and directly evaluated the Xenium pathological samples without any fine-tuning on the healthy Xenium samples. The model achieved a median SRC of 0.673, and over 80% of cells achieved an SRC above 0.5, indicating robust performance (Extended Data Fig. 10a). We further observed robust performance at the cell class level (Extended Data Fig. 10b,c) and in localizing α-synuclein fibril staining intensity (Extended Data Fig. 10d); however, fine-tuning is nonetheless beneficial and yields further performance gains (Extended Data Fig. 10).

Discussion

LUNA is a generative AI model that reconstructs tissue architecture from gene expression profiles of dissociated single cells by learning spatial priors over spatial transcriptomic data. The model learns cell representations that allow for accurate positioning of cells within the tissue context, even in the absence of direct spatial information. LUNA operates in a continuous physical space, unrestricted by a finite number of physical spots, thus enabling the generation of tissue structures with arbitrary spatial density. Moreover, LUNA can infer spatial priors of the tissue and adapt to the context of the test sample without requiring explicit slice alignment. This is achieved by conditioning on the global gene expression profile of all cells, whereas alternative methods rely on selecting a specific reference slice for spatial reconstruction.

LUNA has broad implications in the field of spatial biology and addresses existing technological limitations. LUNA can infer two-dimensional (2D) spatial locations for dissociated single cells from scRNA-seq datasets, enabling reconstruction of complex tissue architectures. Reconstructing spatial structures from scRNA-seq data thus enables the recovery of both transcriptome-wide gene expression profiles and inferred spatial localization, thereby combining the strengths of both modalities. In addition, LUNA can generate locations for cells or spots missing spatial information in the existing spatial technologies such as Slide-tags29. LUNA could reduce the need for comprehensive imaging of all tissue slices. A smaller number of slices can be profiled spatially, and LUNA can be used to infer spatial information for the remaining slices given their gene expression profiles, lowering experimental costs. Finally, LUNA is a complementary tool for analyzing tissue spatial structures and can be used along with existing tools for spatial analysis such as Squidpy66, Seurat v.5 (ref. 67), STELLAR68 and STalign69, as well as with existing batch-correction methods44,70, whose embeddings can be used to condition LUNA.

Currently, LUNA operates within a 2D spatial framework, which does not fully capture the inherently three-dimensional (3D) nature of tissue architectures. This limitation stems primarily from the constraints of existing sequencing technologies, which are not yet capable of measuring tissue structures in full 3D detail. LUNA can be extended beyond 2D spatial reconstruction and with ongoing advancements in technology71, datasets that provide rich molecular organization of tissues in 3D are likely to become more widely available in the near future.

Our current analysis has mainly focused on mouse brain cell atlases due to the abundance of available data. Applying LUNA to other tissues and model organisms could reveal the extent to which generalizable spatial priors can be learned across different biological systems. A limitation of the current framework is its requirement for a shared gene panel between the reference and query datasets. Using existing foundation models72,73 for conditioning LUNA could help to map different gene panels into a common embedding space. While LUNA effectively generalizes to unseen cell types within the mouse brain atlas, its ability to generalize in a zero-shot setting is limited when the training and test slice distributions differ substantially. In such settings, LUNA would require additional fine-tuning.

We envision that LUNA, as an AI-driven tissue reconstruction model, can contribute to understanding complex biological processes and generating the intricate architecture of tissues across diverse biological systems. As large-scale spatial datasets become available, generative tissue reconstruction models may lay the foundation for future virtual tissue models that capture the spatial and functional landscape of real tissues and simulate the effects of perturbations within the context of tissue architecture.

Methods

Overview of LUNA

LUNA is a diffusion-based generative model designed to generate spatial locations of cells from their gene expression. Using an attention-based mechanism, LUNA learns how each individual cell should attend to other cells according to their relevance to a cell’s own location and molecular features. During training, LUNA leverages spatial transcriptomics data with ground-truth cell locations to learn to generate cell locations conditioned on gene expression. During inference, the input to LUNA is the gene expression of dissociated cells, and the model then generates cell locations from pure Gaussian noise conditioned on gene expression, enabling inference of cell locations.

In the training phase, the input to LUNA is spatial transcriptomics data from single or multiple slices. LUNA learns cell embeddings that capture both the local and global tissue structure using a multihead self-attention mechanism22,23 that enables cells to learn to attend to other cells. We designed the loss in LUNA as an SE(2)-invariant function75,76,77,78 (it is robust to arbitrary rotations and translations of the predicted locations), only enforcing the preservation of relative distances between cells within each slice.

Training LUNA involves two main steps: (1) a corruption process that iteratively adds noise to the ground-truth cell locations, and (2) a denoising process that generates the ground-truth locations from the noise-corrupted locations. During the denoising process, LUNA learns to reverse the corruption process, gradually transitioning from noisier to less noisy cell locations. LUNA as a generative model is more robust to distribution shifts, compared to a regression model which is prone to overfitting to specific tissue distributions (Supplementary Fig. 35). Another benefit of using generative modeling lies in estimating uncertainty in predictions (Figs. 3c–e and 4h,i).

Learning cell representations

LUNA learns cell representations that capture the relationship between the molecular features of individual cells and their spatial context within tissue. These embeddings form the foundation for predicting the locations of cells.

The model is built on the premise that a cell’s location is influenced not only by its own molecular features but also by those of other cells in the tissue. To effectively model these interactions, LUNA employs a multihead self-attention mechanism22,23, which dynamically integrates information from all cells in the slice. This mechanism allows the model to assign attention scores to different cells based on their relevance to the prediction of each cell’s location, capturing both local and global cellular interactions. Once the cell embeddings are learned, LUNA projects each cell’s embedding into a 2D space to predict its location.

Formally, LUNA takes as input (1) molecular features of cells \({{X}}_{s}\in {{\mathbb{R}}}^{m\times d}\) in a given slice s, where m denotes the number of cells and d denotes the number of genes; (2) time step \(t\in {\mathbb{N}}\) uniformly sampled from 0 to the maximum diffusion time T; and (3) corrupted cell locations \({\tilde{{R}}}_{s,t}\in {{\mathbb{R}}}^{m\times 2}\) at time step t. The output of the model is the denoised cell locations \({\hat{{R}}}_{s}\in {{\mathbb{R}}}^{m\times 2}\) for a given slice s. We omit slice index s for the ease of notation.

LUNA is composed of multiple transformer layers, each integrating fully connected layers followed by the self-attention block. At each layer l given a fixed diffusion time t, LUNA learns (1) cell embeddings \({{F}}^{(l)}\in {{\mathbb{R}}}^{m\times {d}_{x}^{(l)}}\); (2) a diffusion time embedding \({\gamma }_{t}^{(l)}\in {\mathbb{R}}\); and (3) cell location embeddings \({{R}}^{(l)}\in {{\mathbb{R}}}^{m\times {d}_{r}^{(l)}}\).

The cell embeddings F(0) in layer 0 are initialized via a fully connected neural network layer that maps the molecular features of cells into the latent embedding space with dimensionality \({d}_{x}^{(0)}\):

$${{F}}^{(0)}={\mathrm{FCN}}({{X}}_{s}),$$

(1)

where FCN denotes a fully connected neural network layer. The diffusion time embedding \({\gamma }_{t}^{(0)}\) is initialized to the value of the diffusion time itself:

$${\gamma }_{t}^{(0)}=t.$$

(2)

Finally, the cell location embeddings are initialized as the corrupted cell locations obtained from the corruption process at time step t:

$${{R}}^{(0)}={\tilde{{R}}}_{t}.$$

(3)

Then, at each layer l ∈ {1, …, L}, LUNA first transforms cell embeddings, a diffusion time embedding and cell location embeddings using fully connected layers:

$${{F}}_{f}^{(l)}={\mathrm{FCN}}\left({{F}}^{(l-1)}\right),$$

(4)

$${\gamma }_{t}^{(l)}={\mathrm{FCN}}\left({\gamma }_{t}^{(l-1)}\right),$$

(5)

$${{R}}_{r}^{(l)}={\mathrm{FCN}}\left({{R}}^{(l-1)}\right).$$

(6)

The transformed cell embeddings, diffusion time embedding and cell location embeddings are concatenated to form a unified representation for each cell:

$${{H}}^{(l)}=\left[{{F}}_{f}^{(l)},{\gamma }_{t}^{(l)}{{\bf{1}}}_{m\times 1},{{R}}_{r}^{(l)}\right],$$

(7)

where 1m × 1 is a column vector of ones used to replicate the diffusion time embedding \({\gamma }_{t}^{(l)}\) across all m cells. To obtain final cell embeddings F(l) in layer l, the unified representation H(l) is passed through a self-attention block which computes attention weights between all pairs of cells23:

$${{F}}^{(l)}={\text{SelfAttention}}^{(l)}\left({{H}}^{(l)}\right).$$

(8)

This self-attention operation enables the model to aggregate information from all cells in a slice, capturing how each cell’s location is influenced by others. To ensure scalability, we implemented the efficient attention23 (an approximation of attention computation with a linear complexity). This approach reduces memory usage and computational complexity by circumventing the need for explicit pairwise interactions between every query–key pair (Supplementary Note 9).

Finally, the cell embeddings F(l) are used to predict the locations of each cell. The cell locations are generated from the embeddings using a fully connected layer that projects the location of each cell from the latent embedding space to the 2D physical space:

$${{R}}^{(l)}={\mathrm{FCN}}\left({{F}}^{(l)}\right).$$

(9)

At each layer, the updated locations are centered by subtracting the mean, ensuring that the cell locations remain stable and consistent relative to the tissue structure. At the final layer, the output cell locations are the predicted clean cell locations \(\hat{{R}}={{R}}^{(L)}\). To better illustrate the scalability of our model components, especially the efficient attention mechanism and the FCN layer, we conducted kernel-level profiling of LUNA (Supplementary Note 10 and Supplementary Table 3).

Loss objective

To optimize LUNA, we introduce a specific loss objective that is SE(2)-invariant. This geometric invariance is crucial because the spatial arrangement of cells in the tissue may undergo transformations due to experimental artifacts, while the underlying gene expression profiles remain unchanged.

To ensure SE(2)-invariance, LUNA introduces a pairwise loss function, which focuses on preserving the relative distances between all cells in the slice defined as follows:

$${{\mathcal{L}}}_{{\rm{diff}}}=\dfrac{1}{{m}^{2}}\parallel \Delta (\hat{{R}})-\Delta ({{R}}_{gt}){\parallel }_{F}^{2},$$

(10)

where \(\Delta (\cdot):{{\mathbb{R}}}^{m\times 2}\to {{\mathbb{R}}}^{m\times m}\) computes the pairwise squared Euclidean distances between the locations of all cells and \({{R}}_{gt}\in {{\mathbb{R}}}^{m\times 2}\) represents the ground-truth cell locations.

The function \(\Delta {(\hat{{R}})}_{ij}=\parallel {\hat{r}}_{i}-{\hat{r}}_{j}{\parallel }_{2}^{2}\) computes the squared distance between the predicted locations of cells i and j, and similarly, \(\Delta {({{R}}_{gt})}_{ij}=\parallel {r}_{i}-{r}_{j}{\parallel }_{2}^{2}\) computes the squared distance between the true locations. The pairwise loss then becomes:

$${{\mathcal{L}}}_{{\rm{diff}}}=\dfrac{1}{{m}^{2}}\mathop{\sum }\limits_{i=1}^{m}\mathop{\sum }\limits_{j=1}^{m}{\left(\parallel {\hat{r}}_{i}-{\hat{r}}_{j}{\parallel }_{2}^{2}-\parallel {r}_{i}-{r}_{j}{\parallel }_{2}^{2}\right)}^{2},$$

(11)

which penalizes deviations between the predicted and true pairwise distances, ensuring that the spatial relationships between cells are preserved.

The final loss is computed over all slices s ∈ {1, . . . S} where S denotes the total number of slices:

$${\mathcal{L}}=\dfrac{1}{S}\mathop{\sum }\limits_{s=1}^{S}{{\mathcal{L}}}_{\,\text{diff}\,}^{(s)}.$$

(12)

We further conducted a comprehensive ablation study on LUNA’s model components, which confirms that LUNA’s attention-based architecture is crucial for capturing complex spatial dependencies between cells, while the pairwise loss function plays a key role in maintaining relational consistency (Supplementary Note 8 and Supplementary Fig. 36).

Corruption process

The diffusion model training begins with a corruption process, where LUNA progressively introduces noise to the true cell locations in an autoregressive manner. This step gradually transitions the true cell locations into pure noise, with the resulting corrupted locations serving as inputs for the subsequent denoising process.

We denote the initial diffusion time step, where no noise has been introduced to the cell locations, as time step 0, where ground-truth spatial information is fully retained. Conversely, the maximum diffusion time step, denoted as T, represents the state where no ground-truth information is preserved, and the locations are sampled from pure Gaussian noise. The time step t is randomly selected from {0, 1, 2, …, T}. The corrupted cell locations at time step t for the slice s are denoted as \({\tilde{{R}}}_{t}\in {{\mathbb{R}}}^{m\times 2}\), where again we omit the slice index s for the ease of notation. From time step t − 1 to t, Gaussian noise is added to the corrupted cell locations \({\tilde{{R}}}_{t-1}\), yielding noisier locations \({\tilde{{R}}}_{t}\) according to a predefined noise scheduler24,25,79. This noise scheduler is controlled by the noise schedule exponent, which controls how much noise is injected or removed at each time step of the reverse diffusion process and governs the randomness during sampling80. At time step T, the true cell locations \({{R}}_{gt}={\tilde{{R}}}_{0}\) are transformed into corrupted cell locations \({\tilde{{R}}}_{T}\) that have a standard Gaussian distribution. The conditional distribution is defined as:

$${q}_{\phi }({\tilde{{R}}}_{t}| {\tilde{{R}}}_{t-1})={\mathcal{N}}\left({\tilde{{R}}}_{t}| \sqrt{{\alpha }_{t}}{\tilde{{R}}}_{t-1},(1-{\alpha }_{t}){I}\right),$$

(13)

where q**ϕ( ⋅ ∣ ⋅ ) represents the corruption process with a noise scheduler ϕ that conditionally transitions the cell location distribution from less corrupted to more corrupted states. \({\mathcal{N}}(\cdot | \cdot ,\cdot)\) denotes a Gaussian distribution, and I is the identity matrix. The noise scheduler ϕ, regulated by hyperparameters {α**t}, controls the balance between retaining the original cell locations and adding noise and governs the randomness during sampling.

To mitigate computational complexity, we compute the conditional distribution of corrupted cell locations given the true cell locations Rgt, rather than from the previous diffusion step25,81:

$${q}_{\phi }({\tilde{{R}}}_{t}| {\tilde{{R}}}_{0})={\mathcal{N}}\left({\tilde{{R}}}_{t}| \sqrt{{\overline{\alpha }}_{t}}{\tilde{{R}}}_{0},(1-{\overline{\alpha }}_{t}){I}\right).$$

(14)

Sampling from this conditional distribution is equivalent to adding Gaussian noise to the true cell locations. As shown in ref. 81, the corrupted cell locations are computed as:

$${\tilde{{R}}}_{t}=\sqrt{{\overline{\alpha }}_{t}}{\tilde{{R}}}_{0}+\sqrt{(1-{\overline{\alpha }}_{t})}\epsilon ,$$

(15)

where \({\overline{\alpha }}_{t}=\mathop{\prod }\nolimits_{i = 1}^{t}{\alpha }_{i}\), and ϵ is drawn from a Gaussian distribution with mean 0 and variance I (\(\epsilon \sim {\mathcal{N}}(0,{I})\)). As t progresses from 0 to T, the cell locations become increasingly corrupted until they are indistinguishable from white noise. At t = T, the corrupted locations \({\tilde{{R}}}_{T}\) are sampled purely from Gaussian noise, with \({\overline{\alpha }}_{T}=0\). To ensure robustness to translations, we additionally subtract the center of mass from the noise ϵ and the data slices \({\tilde{{R}}}_{0}\), thus working with distributions defined in the subspace where the center of mass is fixed to 0 (refs. 82,83).

Denoising process

Given the corrupted locations, we train the LUNA model to recover the true cell locations by reversing the corruption process using gene expression profiles. We denote the model as μ**θ( ⋅ , ⋅ , ⋅ ) where θ represents all model parameters. LUNA progressively denoises the corrupted cell locations \({\tilde{{R}}}_{t}\) producing less corrupted locations \({\tilde{{R}}}_{t-1}\) given time step t, more corrupted locations \({\tilde{{R}}}_{t}\) at the time step t, and the molecular features X.

Eventually, LUNA learns to generate clean cell locations from pure white noise, transitioning from t = T to t = 0. To achieve this, the model first predicts the clean cell locations \(\hat{{R}}\) using the learned network μ**θ( ⋅ , ⋅ , ⋅ ). It then interpolates between the corrupted locations \({\tilde{{R}}}_{t}\) and the predicted clean locations \(\hat{{R}}\), producing less corrupted locations for the next diffusion step:

$${\tilde{{R}}}_{t-1}=\dfrac{(1-{\overline{\alpha }}_{t-1})\sqrt{{\alpha }_{t}}}{1-{\overline{\alpha }}_{t}}{\tilde{{R}}}_{t}+\dfrac{(1-{\alpha }_{t})\sqrt{{\overline{\alpha }}_{t-1}}}{1-{\overline{\alpha }}_{t}}\hat{{R}}.$$

(16)

Inference phase

Once the model μ**θ( ⋅ , ⋅ , ⋅ ) is trained, LUNA generates cell locations based on the molecular features of the cells in the test set \({{X}}_{ts}\in {{\mathbb{R}}}^{{m}_{ts}\times d}\). The inference process starts by sampling locations from a normal distribution \(\epsilon \sim {\mathcal{N}}(0,{I})\), where \(\epsilon \in {{\mathbb{R}}}^{{m}_{ts}\times 2}\). The noisy locations, Rts,T = ϵ are then refined through a sequence of diffusion steps.

At each step t, the model takes the noisy locations Rts,t, the molecular features Xts, and the time step t as inputs to predict the denoised locations for the next time step t − 1:

$${{R}}_{ts,t-1}=\dfrac{(1-{\overline{\alpha }}_{t-1})\sqrt{{\alpha }_{t}}}{1-{\overline{\alpha }}_{t}}{{R}}_{ts,t}+\dfrac{(1-{\alpha }_{t})\sqrt{{\overline{\alpha }}_{t-1}}}{1-{\overline{\alpha }}_{t}}{\mu }_{\theta }({{R}}_{ts,t},{{X}}_{ts},t).$$

(17)

This process is repeated for each time step, iterating from t = {T, . . ., 0} until the model generates the final clean cell locations at t = 0.

Hyperparameters

We use a consistent learning rate of 5 × 10−4 across all experiments, with a maximum diffusion time of 1,000 steps and a cosine noise schedule characterized by ν = 2, which dictates the noise addition rate to the coordinates. A detailed analysis of hyperparameter selection and robustness to different values is provided in Supplementary Note 4 and Supplementary Figs. 37 and 38.

Xenium data collection

We generate a new spatial transcriptomics dataset using Xenium. Animal husbandry and experimental procedures adhered to the Swiss Federal Veterinary Office guidelines and were authorized by the Cantonal Veterinary Office (cantonal animal license no. VD3499).

Animal procedures

C57BL/6J male mice were group-housed, with a maximum of four animals per cage, at 22 °C and 50–60% relative humidity, under a 12-h light–dark cycle. At 8 weeks of age, mice were anesthetized with a ketamine/xylazine cocktail prepared in sterile saline. Once fully anesthetized, mice were placed in a stereotaxic frame. The head was shaved, Viscotears was applied to protect the eyes, and the scalp was disinfected with liquid Betadine solution. After incision, connective tissue was removed to expose the skull and identify the bregma landmark for unilateral dorsal striatum injections.

Stereotaxic coordinates relative to bregma were anteroposterior +0.6 mm, mediolateral +2.0 mm and dorsoventral −2.6 mm. A small hole was drilled into the skull, preserving the dura mater, and 2 μl of mouse wild-type PFFs at a concentration of 2.5 μg μl−1 were injected into the right hemisphere at a flow rate of 0.4 μl min−1 using a Hamilton syringe. The needle was left in place for 5 min post-injection before slow retraction to minimize backflow and was cleaned from blood to avoid clogging. The incision was sutured, Betadine gel was applied and animals were monitored in a heated recovery cage until fully awake. Postoperative well-being was assessed daily in accordance with animal license scoring sheets.

Tissue preparation for Xenium

Xenium was performed on four C57BL/6J mice: two wild-type controls and two α-synuclein PFF-injected animals collected at 3MPI. One 3MPI animal was excluded before any downstream analysis because its coronal sections were not anatomically matched to the control sections, showing a systematic spatial offset in the sampled planes that precluded reliable cross-sample comparison. All analyses in this study, and the dataset deposited on figshare, are based on the remaining three animals (two control and one 3MPI). Control and 3MPI mice were killed via overdose of a ketamine/xylazine cocktail and brains were rapidly removed. Brains were embedded in Tissue-Tek O.C.T. compound (cat. no. 4583) within 10 × 10 × 5-mm cryomolds (Tissue-Tek, cat. no. 4565) and frozen by submersion in dry-ice-chilled (approximately −70 °C) isopentane (Sigma, cat. no. M32631). Frozen embedded brains were maintained on dry ice until transfer to −80 °C storage.

Coronal sections (10 μm) were cut on a Leica cryostat and mounted onto Xenium capture slides (10x Genomics, cat. no. 10006559). For each brain, one coronal section targeting the amygdala (−1.70 mm relative to bregma) and one targeting the striatum (+0.6 to −1 mm relative to bregma) were collected. Two sections were placed per capture slide, which were returned to −80 °C until processing. The predesigned 248-gene Xenium Mouse Brain Gene Expression panel was profiled across all sections on the Xenium in situ platform (10x Genomics).

Post-Xenium immunofluorescence

Following completion of the Xenium runs, slides were stored in PBS at 4 °C. For immunofluorescence staining, tissues were permeabilized with PBS containing 0.5% bovine serum albumin (BSA) and 0.1% Triton X-100, blocked with 2% BSA in PBS and then incubated overnight at 4 °C with primary antibody against phosphorylated Ser129 α-synuclein (pSer129 α-synuclein, clone EP1536Y, Abcam ab51253, RRID:AB_869973) at 1:1,000 dilution, followed by a secondary antibody (Invitrogen A32731, polyclonal, Alexa488) at 1:500 dilution.

Imaging was performed using a Leica DMi8 epifluorescence microscope equipped with a Lumencor SPECTRA X LED light source (nIR, 90-10172), a Leica DFC9000 GTC sCMOS camera (11547007) and a ×20 HC PC APO objective (NA 0.8, air), yielding a pixel size of 0.34 μm. Images were acquired with 10% tile overlap to cover the entire tissue section, collecting between 8 and 12 z-planes with 1-μm spacing.

Anatomical registration

Anatomical registration was performed using Aligning Big Brains and Atlases (https://go.epfl.ch/abba)[84](https://www.nature.com/articles/s41592-026-03332-2#ref-CR84 "Chiaruttini, N. et al. ABBA+ BraiAn, an integrated suite for whole-brain mapping, reveals brain-wide differences in immediate-early genes induction upon learning. Cell Rep. https://doi.org/10.1016/j.celrep.2025.115876

           (2025)."), which combines affine transformations and nonlinear warping with anatomical border\-guided feature registration. Images were automatically aligned to the Allen Brain Atlas Common Coordinate Framework version 3 (CCFv3\), and the alignment was subsequently manually refined to ensure precise anatomical correspondence.

Immunofluorescence data processing

2D images were obtained from the acquired immunofluorescence stacks by performing maximum-intensity projection channelwise on the raw stacks. The immunofluorescence images were then stitched into a mosaic image using ASHLAR85. Only the 4′,6-diamidino-2-phenylindole (DAPI) channel was used to compute the corrected stitched coordinates. The immunofluorescence images were then aligned to the Xenium images by running the software wsireg[86](https://www.nature.com/articles/s41592-026-03332-2#ref-CR86 "Patterson, H. Multi-modal whole slide image registration (wsireg), v.0.3.8. GitHub https://github.com/NHPatterson/wsireg

           (2022)."), a Python wrapper of elastix[87](https://www.nature.com/articles/s41592-026-03332-2#ref-CR87 "Klein, S., Staring, M., Murphy, K., Viergever, M. A. & Pluim, J. P. W. elastix: a toolbox for intensity-based medical image registration. IEEE Trans. Med. Imaging 29, 196–205 (2010)."),[88](https://www.nature.com/articles/s41592-026-03332-2#ref-CR88 "Shamonin, D. et al. Fast parallel image registration on CPU and GPU for diagnostic classification of Alzheimer’s disease. Front. Neuroinform. 
            https://doi.org/10.3389/fninf.2013.00050

           (2014)."). Each image transformation was computed using only the DAPI channel of both acquisitions, and the same obtained transformation was applied to the other channels of the immunofluorescence images (no warping was applied to the Xenium data in the process). To calculate the α\-synuclein intensity level per cell, we first normalized the aligned α\-synuclein channel by applying percentile\-based normalization, in which we transformed the intensity values of the image so that the first percentile is mapped to 0 and the 99\.8th percentile is mapped to 1\. The results from the normalization were then clipped to the \\(\\left\[0,1\\right]\\) intensity range. The median normalized α\-synuclein intensity per cell was then calculated by sequentially subsetting the normalized α\-synuclein channel using the segmentation masks obtained from Xenium and aggregating accordingly.

Cell annotation

To annotate the Xenium data at the single-cell level, we used the scRNA-seq data published elsewhere89 as a reference for label transfer. We downloaded all the given single-cell references (v.2 and v.3) and then concatenated them to obtain a single h5ad data file. During the concatenation process, we randomly subsampled the data by a factor of 4 (we kept 25% of the single cells) to alleviate posterior computational workload. We then ran Tangram14 for each Xenium dataset using the preprocessed single-cell data as reference. We ran Tangram in its default settings except for the run mode, for which we used mode = ‘clusters’. This mode runs the mapping at the cluster level and substantially reduces computational complexity. We annotated the Xenium data using 34 clusters.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

Data availability

MERFISH Whole Mouse Brain Atlas (ABC Atlas) data for Animal 1 are available at https://alleninstitute.github.io/abc_atlas_access/descriptions/Zhuang-ABCA-1.html and for Animal 2, data are at https://alleninstitute.github.io/abc_atlas_access/descriptions/Zhuang-ABCA-2.html. The MERFISH Mouse Primary Motor Cortex Atlas is available at the Brain Image Library at https://doi.org/10.35077/g.21. The scRNA-seq Mouse Central Nervous System Atlas is available at the Single Cell Portal at https://singlecell.broadinstitute.org/single_cell/study/SCP1830. Slide-tags datasets for all tissues are available at the Broad Institute Single Cell Portal under the accession numbers SCP2170 (mouse E14), SCP2171 (human melanoma), SCP2169 (human tonsil) and SCP2167 (human brain). Xenium data on WT and 3MPI sections generated in this work are available on figshare at https://doi.org/10.6084/m9.figshare.33017210 (ref. [90](https://www.nature.com/articles/s41592-026-03332-2#ref-CR90 "Yu, T. et al. Xenium in situ spatial transcriptomics of the amygdala and striatum in an α-synuclein preformed-fibril mouse model of Parkinson’s disease. figshare https://doi.org/10.6084/m9.figshare.33017210

           (2026).")). [Source data](https://www.nature.com/articles/s41592-026-03332-2#Sec31) are provided with this paper.

Code availability

LUNA was written in Python v.3.9 using the PyTorch library. The source code is available on GitHub at https://github.com/mlbio-epfl/LUNA and archived on Zenodo at https://doi.org/10.5281/zenodo.21203881 (ref. [91](https://www.nature.com/articles/s41592-026-03332-2#ref-CR91 "Yu, T. et al. mlbio-epfl/LUNA: luna. Zenodo https://doi.org/10.5281/zenodo.21203881

           (2026).")) under an MIT license. The project website with links to data and code can be accessed at <https://brbiclab.epfl.ch/projects/LUNA/>.

References

  1. Tang, F. et al. mRNA-Seq whole-transcriptome analysis of a single cell. Nat. Methods 6, 377–382 (2009).

Article  PubMed  CAS  Google Scholar 2. Macosko, E. Z. et al. Highly parallel genome-wide expression profiling of individual cells using nanoliter droplets. Cell 161, 1202–1214 (2015). 3. Patel, A. P. et al. Single-cell RNA-seq highlights intratumoral heterogeneity in primary glioblastoma. Science 344, 1396–1401 (2014). 4. The Tabula Sapiens Consortium. The Tabula Sapiens: a multiple-organ, single-cell transcriptomic atlas of humans. Science 376, eabl4896 (2022). 5. Lu, T.-C. et al. Aging Fly Cell Atlas identifies exhaustive aging features at cellular resolution. Science 380, eadg0934 (2023). 6. Li, H. et al. Fly Cell Atlas: a single-nucleus transcriptomic atlas of the adult fruit fly. Science 375, eabk2432 (2022). 7. Sikkema, L. et al. An integrated cell atlas of the lung in health and disease. Nat. Med. 29, 1563–1577 (2023). 8. Hickey, J. W. et al. Organization of the human intestine at single-cell resolution. Nature 619, 572–584 (2023). 9. Chen, K. H., Boettiger, A. N., Moffitt, J. R., Wang, S. & Zhuang, X. Spatially resolved, highly multiplexed RNA profiling in single cells. Science 348, aaa6090 (2015).

Article  PubMed  PubMed Central  Google Scholar 10. Codeluppi, S. et al. Spatial organization of the somatosensory cortex revealed by osmFISH. Nat. Methods 15, 932–935 (2018).

Article  PubMed  CAS  Google Scholar 11. Wang, X. et al. Three-dimensional intact-tissue sequencing of single-cell transcriptional states. Science 361, eaat5691 (2018).

Article  PubMed  PubMed Central  Google Scholar 12. Achim, K. et al. High-throughput spatial mapping of single-cell RNA-seq data to tissue of origin. Nat. Biotechnol. 33, 503–509 (2015).

Article  PubMed  CAS  Google Scholar 13. Satija, R., Farrell, J. A., Gennert, D., Schier, A. F. & Regev, A. Spatial reconstruction of single-cell gene expression data. Nat. Biotechnol. 33, 495–502 (2015). 14. Biancalani, T. et al. Deep learning and alignment of spatially resolved single-cell transcriptomes with Tangram. Nat. Methods 18, 1352–1362 (2021). 15. Vahid, M. R. et al. High-resolution alignment of single-cell and spatial transcriptomes with CytoSPACE. Nat. Biotechnol. 41, 1543–1548 (2023). 16. Hao, M. et al. STEM enables mapping of single-cell and spatial transcriptomics data with transfer learning. Commun. Biol. 7, 56 (2024). 17. Qian, J. et al. Reconstruction of the cell pseudo-space from single-cell RNA sequencing data with scSpace. Nat. Commun. 14, 2484 (2023). 18. Li, S., Shen, Q. & Zhang, S. Spatial transcriptomics-aided localization for single-cell transcriptomics with STALocator. Cell Syst. https://doi.org/10.1016/j.cels.2025.101195 (2025). 19. Zhang, Q. et al. Leveraging spatial transcriptomics data to recover cell locations in single-cell RNA-seq with CeLEry. Nat. Commun. 14, 4050 (2023). 20. Nitzan, M., Karaiskos, N., Friedman, N. & Rajewsky, N. Gene expression cartography. Nature 576, 132–137 (2019).

Article  PubMed  CAS  Google Scholar 21. Moriel, N. et al. NovoSpaRc: flexible spatial reconstruction of single-cell gene expression with optimal transport. Nat. Protoc. 16, 4177–4200 (2021).

Article  PubMed  CAS  Google Scholar 22. Vaswani, A. et al. Attention is all you need. In Advances in Neural Information Processing Systems Vol. 30 (Curran Associates, 2017). 23. Shen, Z., Zhang, M., Zhao, H., Yi, S. & Li, H. Efficient attention: attention with linear complexities. In Proc. IEEE/CVF Winter Conference on Applications of Computer Vision (IEEE, 2021). 24. Sohl-Dickstein, J., Weiss, E., Maheswaranathan, N. & Ganguli, S. Deep unsupervised learning using nonequilibrium thermodynamics. In Proc. 32nd International Conference on Machine Learning (PMLR, 2015). 25. Ho, J., Jain, A. & Abbeel, P. Denoising diffusion probabilistic models. In Advances in Neural Information Processing Systems Vol. 33 (Curran Associates, 2020). 26. Song, Y. & Ermon, S. Generative modeling by estimating gradients of the data distribution. In Advances in Neural Information Processing Systems Vol. 32 (Curran Associates, 2019). 27. Zhang, M. et al. Molecularly defined and spatially resolved cell atlas of the whole mouse brain. Nature 624, 343–354 (2023).

Article  PubMed  CAS  Google Scholar 28. Zeisel, A. et al. Molecular architecture of the mouse nervous system. Cell 174, 999–1014 (2018). 29. Russell, A. J. et al. Slide-tags enables single-nucleus barcoding for multimodal spatial genomics. Nature 625, 101–109 (2024).

Article  PubMed  CAS  Google Scholar 30. Moran, P. A. Notes on continuous stochastic phenomena. Biometrika 37, 17–23 (1950).

Article  PubMed  CAS  Google Scholar 31. Palatucci, M., Pomerleau, D., Hinton, G. E. & Mitchell, T. M. Zero-shot learning with semantic output codes. In Advances in Neural Information Processing Systems Vol. 22 (Curran Associates, 2009). 32. Xian, Y., Schiele, B. & Akata, Z. Zero-shot learning-the good, the bad and the ugly. In Proc. IEEE Conference on Computer Vision and Pattern Recognition (IEEE, 2017). 33. Gonda, Y. et al. Expression profiles of insulin-like growth factor binding protein-like 1 in the developing mouse forebrain. Gene Expr. Patterns 7, 431–440 (2007).

Article  PubMed  CAS  Google Scholar 34. Butti, E. et al. Neural precursor cells tune striatal connectivity through the release of IGFBPL1. Nat. Commun. 13, 7579 (2022). 35. Bronstein, J. M., Tiwari-Woodruff, S., Buznikov, A. G. & Stevens, D. B. Involvement of OSP/Claudin 11 in oligodendrocyte membrane interactions: role in biology and disease. J. Neurosci. Res. 59, 706–711 (2000).

Article  PubMed  CAS  Google Scholar 36. Maheras, K. J. et al. Absence of Claudin 11 in CNS myelin perturbs behavior and neurotransmitter levels in mice. Sci. Rep. 8, 3798 (2018).

Article  PubMed  PubMed Central  Google Scholar 37. Quinn, J. P., Kandigian, S. E., Trombetta, B. A., Arnold, S. E. & Carlyle, B. C. VGF as a biomarker and therapeutic target in neurodegenerative and psychiatric diseases. Brain Commun. 3, fcab261 (2021).

Article  PubMed  PubMed Central  Google Scholar 38. Theunissen, F. et al. Intronic NEFH variant is associated with reduced risk for sporadic ALS and later age of disease onset. Sci. Rep. 12, 14739 (2022). 39. Zhang, K. et al. Imbalance of excitatory/inhibitory neuron differentiation in neurodevelopmental disorders with an NR2F1 point mutation. Cell Rep. https://doi.org/10.1016/j.celrep.2020.03.085 (2020). 40. Tocco, C., Bertacchi, M. & Studer, M. Structural and functional aspects of the neurodevelopmental gene NR2F1: from animal models to human pathology. Front. Mol. Neurosci. 14, 767965 (2021). 41. Türei, D. et al. Integrated intra- and intercellular signaling knowledge for multicellular omics analysis. Mol. Syst. Biol. 17, e9923 (2021).

Article  PubMed  PubMed Central  Google Scholar 42. Vanhoutte, D. et al. Thrombospondin expression in myofibers stabilizes muscle membranes. eLife 5, e17589 (2016).

Article  PubMed  PubMed Central  Google Scholar 43. Zhang, M. et al. Spatially resolved cell atlas of the mouse primary motor cortex by MERFISH. Nature 598, 137–143 (2021). 44. Korsunsky, I. et al. Fast, sensitive and accurate integration of single-cell data with harmony. Nat. Methods 16, 1289–1296 (2019).

Article  PubMed  CAS  Google Scholar 45. Shi, H. et al. Spatial atlas of the mouse central nervous system at molecular resolution. Nature 622, 552–561 (2023). 46. Svensson, V., Teichmann, S. A. & Stegle, O. SpatialDE: identification of spatially variable genes. Nat. Methods 15, 343–346 (2018). 47. Storey, J. D. & Tibshirani, R. Statistical significance for genomewide studies. Proc. Natl Acad. Sci. USA 100, 9440–9445 (2003). 48. Liberzon, A. et al. The molecular signatures database hallmark gene set collection. Cell Syst. 1, 417–425 (2015). 49. Schulze, A., Oshi, M., Endo, I. & Takabe, K. MYC targets scores are associated with cancer aggressiveness and poor survival in ER-positive primary and metastatic breast cancer. Int. J. Mol. Sci. 21, 8127 (2020). 50. Kanehisa, M., Furumichi, M., Sato, Y., Ishiguro-Watanabe, M. & Tanabe, M. KEGG: integrating viruses and cellular organisms. Nucleic Acids Res. 49, D545–D551 (2021). 51. Pelletier, J., Thomas, G. & Volarević, S. Ribosome biogenesis in cancer: new players and therapeutic avenues. Nat. Rev. Cancer 18, 51–63 (2018).

Article  PubMed  CAS  Google Scholar 52. Deng, L. et al. MYC-driven U2SURP regulates alternative splicing of SAT1 to promote triple-negative breast cancer progression. Cancer Lett. 560, 216124 (2023).

Article  PubMed  CAS  Google Scholar 53. Zheng, X. et al. Integrative bioinformatics and experimental analyses identify U2SURP as a novel lactylation-related prognostic signature in esophageal carcinoma. Immunol. Res. 73, 45 (2025).

Article  PubMed  CAS  Google Scholar 54. Hernández-Gómez, C., Hernández-Lemus, E. & Espinal-Enríquez, J. The role of copy number variants in gene co-expression patterns for luminal B breast tumors. Front. Genet. 13, 806607 (2022).

Article  PubMed  PubMed Central  Google Scholar 55. Wei, J. et al. The Hippo signaling effector WWTR1 is a metastatic biomarker of gastric cardia adenocarcinoma. Cancer Cell Int. 19, 74 (2019).

Article  PubMed  PubMed Central  Google Scholar 56. Rao, S. et al. Inactivation of ribosomal protein L22 promotes transformation by induction of the stemness factor, Lin28B. Blood 120, 3764–3773 (2012). 57. Xie, W. et al. CD2AP inhibits metastasis in gastric cancer by promoting cellular adhesion and cytoskeleton assembly. Mol. Carcinogen. 59, 339–352 (2020).

Article  CAS  Google Scholar 58. Zhang, L. et al. CD2AP promotes the progression of glioblastoma multiforme via TRIM5-mediated NF-kB signaling. Cell Death Dis. 15, 722 (2024).

Article  PubMed  PubMed Central  Google Scholar 59. Tsofack, S. P. et al. Low expression of the X-linked ribosomal protein S4 in human serous epithelial ovarian cancer is associated with a poor prognosis. BMC Cancer 13, 303 (2013). 60. Paquet, É. R. et al. Low level of the X-linked ribosomal protein S4 in human urothelial carcinomas is associated with a poor prognosis. Biomark. Med. 9, 187–197 (2015).

Article  PubMed  CAS  Google Scholar 61. Henderson, M. X. et al. Spread of α-synuclein pathology through the brain connectome is modulated by selective vulnerability and predicted by network analysis. Nat. Neurosci. 22, 1248–1257 (2019). 62. Henderson, M. X., Trojanowski, J. Q. & Lee, V. M.-Y. α-Synuclein pathology in Parkinson’s disease and related α-synucleinopathies. Neurosci. Lett. 709, 134316 (2019). 63. Fan, Y. & Xiao, S. Progression rate associated peripheral blood biomarkers of Parkinson’s disease. J. Mol. Neurosci. 65, 312–318 (2018).

Article  PubMed  CAS  Google Scholar 64. Wu, H. et al. A single-cell atlas of the substantia nigra reveals therapeutic effects of icaritin in a rat model of Parkinson’s disease. Antioxidants 13, 1183 (2024). 65. Wang, Y., Liu, H., Zhang, B.-S., Soares, J. C. & Zhang, X. Y. Low BDNF is associated with cognitive impairments in patients with Parkinson’s disease. Parkinsonism Relat. Disord. 29, 66–71 (2016).

Article  PubMed  Google Scholar 66. Palla, G. et al. Squidpy: a scalable framework for spatial omics analysis. Nat. Methods 19, 171–178 (2022). 67. Hao, Y. et al. Dictionary learning for integrative, multimodal and scalable single-cell analysis. Nat. Biotechnol. 42, 293–304 (2024).

Article  PubMed  CAS  Google Scholar 68. Brbić, M. et al. Annotation of spatially resolved single-cell data with STELLAR. Nat. Methods 19, 1411–1418 (2022).

Article  PubMed  PubMed Central  Google Scholar 69. Clifton, K. et al. STalign: alignment of spatial transcriptomics data using diffeomorphic metric mapping. Nat. Commun. 14, 8123 (2023). 70. Lopez, R., Regier, J., Cole, M. B., Jordan, M. I. & Yosef, N. Deep generative modeling for single-cell transcriptomics. Nat. Methods 15, 1053–1058 (2018). 71. Schott, M. et al. Open-ST: high-resolution spatial transcriptomics in 3D. Cell 187, 3953–3972 (2024).

Article  PubMed  CAS  Google Scholar 72. Rosen, Y. et al. Universal cell embedding provides a foundation model for cell biology. Nature 656, 183–191 (2026). 73. Tejada-Lapuerta, A. et al. Nicheformer: a foundation model for single-cell and spatial omics. Nat. Methods 22, 2525–2538 (2025). 74. McInnes, L., Healy, J. & Melville, J. UMAP: uniform manifold approximation and projection for dimension reduction. Preprint at https://doi.org/10.48550/arXiv.1802.03426 (2018). 75. Segol, N. & Lipman, Y. On universal equivariant set networks. In 8th International Conference on Learning Representations (ICLR, 2020). 76. Torres-Mendez, L. A., Ruiz-Suarez, J. C., Sucar, L. E. & Gómez, G. Translation, rotation, and scale-invariant object recognition. IEEE Trans. Syst. Man Cybern. 30, 125–130 (2000).

Article  Google Scholar 77. Romero, D., Bekkers, E., Tomczak, J. & Hoogendoorn, M. Attentive group equivariant convolutional networks. In Proc. 37th International Conference on Machine Learning Vol. 119, 8188–8199 (PMLR, 2020). 78. Wu, Y., Löwe, H., Carricato, M. & Li, Z. Inversion symmetry of the Euclidean group: theory and application to robot kinematics. IEEE Trans. Robot. 32, 312–326 (2016).

Article  Google Scholar 79. Song, J., Meng, C. & Ermon, S. Denoising diffusion implicit models. In 9th Int. Conference on Learning Representations (2021). 80. Vignac, C., Osman, N., Toni, L. & Frossard, P. Midi: mixed graph and 3D denoising diffusion for molecule generation. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases (Springer, 2023). 81. Chan, S. H. Tutorial on diffusion models for imaging and vision. Found. Trends Comput. Graph. Vis. 16, 322–471 (2024). 82. Xu, M. et al. GeoDiff: a geometric diffusion model for molecular conformation generation. In 10th International Conference on Learning Representations (2022). 83. Hoogeboom, E., Satorras, V. G., Vignac, C. & Welling, M. Equivariant diffusion for molecule generation in 3D. In Proc. 39th International Conference on Machine Learning Vol. 162, 8867–8887 (2022). 84. Chiaruttini, N. et al. ABBA+ BraiAn, an integrated suite for whole-brain mapping, reveals brain-wide differences in immediate-early genes induction upon learning. Cell Rep. https://doi.org/10.1016/j.celrep.2025.115876 (2025). 85. Muhlich, J. L. et al. Stitching and registering highly multiplexed whole-slide images of tissues and tumors using ASHLAR. Bioinformatics 38, 4613–4621 (2022). 86. Patterson, H. Multi-modal whole slide image registration (wsireg), v.0.3.8. GitHub https://github.com/NHPatterson/wsireg (2022). 87. Klein, S., Staring, M., Murphy, K., Viergever, M. A. & Pluim, J. P. W. elastix: a toolbox for intensity-based medical image registration. IEEE Trans. Med. Imaging 29, 196–205 (2010).

Article  PubMed  Google Scholar 88. Shamonin, D. et al. Fast parallel image registration on CPU and GPU for diagnostic classification of Alzheimer’s disease. Front. Neuroinform. https://doi.org/10.3389/fninf.2013.00050 (2014). 89. Yao, Z. et al. A high-resolution transcriptomic and spatial atlas of cell types in the whole mouse brain. Nature 624, 317–332 (2023). 90. Yu, T. et al. Xenium in situ spatial transcriptomics of the amygdala and striatum in an α-synuclein preformed-fibril mouse model of Parkinson’s disease. figshare https://doi.org/10.6084/m9.figshare.33017210 (2026). 91. Yu, T. et al. mlbio-epfl/LUNA: luna. Zenodo https://doi.org/10.5281/zenodo.21203881 (2026).

Download references

Acknowledgements

We are grateful to R. Viñas Torné, S. Fan, C. Vignac, Y. Qin, E. Lein, P. Schwaller, E. Macosko, M. Nitzan and A. Regev for valuable discussions. Generative AI tools were used to assist with formatting references and to provide feedback on the paper. All suggestions were reviewed and verified by the authors, who made all changes themselves.

Funding

We gratefully acknowledge the support of the Swiss National Science Foundation (SNSF) (starting grant TMSGI2_226252/1, SNSF grant IC00I0_231922 and SNSF grant 10.004.411), Swiss Cancer League (KFS-6340-02-2025-R) and the Swiss AI Initiative Large Call (ab006). M.B. is a CIFAR Fellow in the MacMillan Multiscale Human Program. Open access funding provided by EPFL Lausanne.

Ethics declarations

Competing interests

S.A. is currently employed by Meta. The other authors declare no competing interests.

Peer review

Peer review information

Nature Methods thanks the anonymous reviewers for their contribution to the peer review of this work. Primary Handling Editor: Lin Tang, in collaboration with the Nature Methods team.

Additional information

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Extended data

Extended Data Fig. 1 Overview of the inference stage of LUNA.

During inference, LUNA takes only gene expressions as the input and generates the spatial positions of given cells starting from pure noise, effectively reconstructing spatial tissue structures. This iterative process gradually removes noise from the initialized purely noised coordinates and ultimately results in the fully denoised coordinates that correspond to cell locations in a tissue. For visualization purposes, we crop the shape of the sampled point cloud to a square.

Extended Data Fig. 2 LUNA correctly locates a rare Cfap206-expressing subpopulation of astrocyte-ependymal cells.

LUNA correctly locates 85 cells out of 3,725 astrocyte-ependymal cells expressing the Cfap206 gene.

Extended Data Fig. 3 LUNA generalizes to cell classes unseen during training on a 30,931-cell slice.

LUNA generalizes to cell classes unseen during training. Generalization to unseen cell classes on the ABC Atlas under the cross-animal generalization scenario, shown on an example tissue slice comprising 30,931 cells. Each pair of plots shows the ground truth spatial distribution (left) and LUNA’s prediction (right) for a held-out cell class. In each experiment, the displayed class was entirely excluded from training. Background cells (gray) represent all other cell classes included during training.

Extended Data Fig. 4 LUNA generalizes to cell classes unseen during training on a 22,010-cell slice.

LUNA generalizes to cell classes unseen during training. Generalization to unseen cell classes on the ABC Atlas under the cross-animal generalization scenario, shown on an example tissue slice comprising 22,010 cells. Each pair of plots shows the ground truth spatial distribution (left) and LUNA’s prediction (right) for a held-out cell class. In each experiment, the displayed class was entirely excluded from training. Background cells (gray) represent all other cell classes included during training.

Extended Data Fig. 5 LUNA generalizes to cell classes unseen during training on a 12,610-cell slice.

LUNA generalizes to cell classes unseen during training. Generalization to unseen cell classes on the ABC Atlas under the cross-animal generalization scenario, shown on an example tissue slice comprising 12,610 cells. Each pair of plots shows the ground truth spatial distribution (left) and LUNA’s prediction (right) for a held-out cell class. In each experiment, the displayed class was entirely excluded from training. Background cells (gray) represent all other cell classes included during training.

Extended Data Fig. 6 Contribution of individual genes to spatial structure prediction across cell classes.

For each of n = 18 cell classes, we quantified the performance disparity caused by excluding each gene from the input during inference. Each box summarizes n = 1,122 single-gene exclusion experiments (one per gene) for one cell class, showing the distribution of the Spearman’s rank correlation (SRC) gap between prediction with the full gene panel and prediction with that gene excluded. Gene contribution was computed separately for each cell class by grouping cells of the same class and computing the SRC within that group. Box plots show the median (center line) and the 25th-75th percentiles (box bounds); whiskers extend to the most extreme value within 1.5x the interquartile range of the quartiles, and genes beyond the whiskers are shown as individual open circles. The three genes with the largest gap in each cell class are labeled in red.

Source data

Extended Data Fig. 7 Ligand-receptor interactions important for predicting spatial organization.

(a) We assess the importance of known ligand-receptor pairs for predicting spatial organization with LUNA. Focusing on the 332 ligand-receptor pairs curated from the existing literature (OmniPath; Turei et al., 2021) that overlap with the ABC gene panel, we mask one pair at a time during inference and quantify its contribution to the predicted spatial organization. (b-f) The ten ligand-receptor pairs with the strongest contribution to the spatial organization of (b) CTX-CGE GABA neurons, (c) MH-LH Glut neurons, (d) CTX-MGE GABA neurons, (e) OB-IMN GABA neurons and (f) OPC-Oligo cells. The value in each entry is the performance difference between the maximum performance obtained with all genes and the performance after masking that specific ligand-receptor pair. A lighter color in the heatmap indicates a higher contribution of the pair. Entries for gene pairs without documented interactions are blank. Panel a created in BioRender; Yu, Y. https://biorender.com/l3kygx1 (2026).

Source data

Extended Data Fig. 8 LUNA uniquely generalizes to unseen cell types.

For all the methods, we exclude all cells from a randomly chosen cell class (out of 34 total classes) during model training and evaluate each method’s predictions on the cells from the held-out cell class. LUNA is the only method that effectively generalizes to unseen cell types. (a) Performance comparison on unseen NP-CT-L6b Glut cells. The spatial distribution of NP-CT-L6b Glut cells (left; in purple) and spatial expression patterns of marker genes Tshz2 and Syt6 (middle and right) in the NP-CT-L6b Glut cell type for one representative slice. (b) Performance comparison on unseen vascular cells. The spatial distribution of the vascular cells (left; in blue), and the spatial expression patterns of the genes Ppp1r1b and Slc17a7 (middle and right) for one representative slice. The top three baseline methods by Spearman’s correlation, scSpace, CeLEry and STALocator, are displayed. For each baseline, training and test sections were selected by maximizing cosine similarity between cell-type distributions to ensure optimal matching conditions.

Extended Data Fig. 9 LUNA-predicted spatial coordinates align more closely with the test section than the training section.

Wasserstein distance between LUNA-predicted spatial distributions and ground truth coordinates of the training section (left) versus the test section (right), shown across the 27 cell classes that have at least 20 cells in each of the training, test and predicted sets. Each dot represents the Wasserstein distance for one cell class (n = 27 cell classes); the same cell classes are paired across the two conditions. Lower values indicate greater similarity. Box plots show the median (center line) and the 25th-75th percentiles (box bounds); whiskers extend to the most extreme value within 1.5x the interquartile range of the quartiles. Statistical significance was assessed with a two-sided Wilcoxon signed-rank test on the paired per-class distances (n = 27, P = 0.007). A single comparison was performed; no adjustment for multiple comparisons was applied.

Source data

Extended Data Fig. 10 LUNA generalizes to Xenium data without fine-tuning.

(a) Spearman’s rank correlation (SRC) between ground-truth cell locations and locations predicted by LUNA, comparing models trained with and without fine-tuning. Per-cell SRC values were computed for the same set of cells in one 3MPI sample under both models (n = 75,851 cells per model). Box plots show the median (center line) and the 25th-75th percentiles (box bounds); whiskers extend to the most extreme value within 1.5x the interquartile range of the quartiles. (b, c) LUNA predictions without fine-tuning achieve comparable performance to fine-tuned predictions. Shown are (b) NP-CT-L6b glutamatergic neurons (02 NP-CT-L6b Glut, purple) and (c) DG-IMN glutamatergic neurons (04 DG-IMN Glut, blue) in a 3MPI sample (left), and LUNA-predicted spatial coordinates for the 3MPI sample with fine-tuning (middle) and without fine-tuning (right). Gray points denote all other cells for reference. (d) LUNA predictions without fine-tuning correctly localize alpha-synuclein (α-syn) aggregate staining intensity. Cells are positioned according to 3MPI ground truth locations (left), LUNA-predicted coordinates with fine-tuning (middle), and without fine-tuning (right), colored by α-syn aggregate staining intensity.

Source data

Supplementary information

Supplementary Information (download PDF )

Supplementary Notes, Tables, Figs. 1−39 and References.

Reporting Summary (download PDF )

Source data

Source Data Fig. 1 (download XLSX )

Statistical source data: inference time and reserved GPU memory versus number of input cells across all 66 ABC Atlas slices (d).

Source Data Fig. 2 (download XLSX )

Statistical source data: ground-truth versus LUNA-predicted Moran’s I values for the Rorb gene across slices (e).

Source Data Fig. 3 (download XLSX )

Statistical source data: per-gene performance gaps per cell class (b), seed-replicate SRC (c–e), per-slice cross-animal benchmark across seven methods (g) and per-method SRC on two example slices (h,i).

Source Data Fig. 4 (download XLSX )

Statistical source data: per-cell HDR areas for i, 56,740 cells across 23 cell classes.

Source Data Fig. 5 (download XLSX )

Statistical source data: ground-truth versus predicted Moran’s I (c), spatially variable gene set membership (j) and per-gene SpatialDE fraction of spatial variance and FDR-corrected q values (k).

Source Data Fig. 6 (download XLSX )

Statistical source data: per-cell α-synuclein aggregate staining intensity (min/mean/median/max) for the 3MPI Xenium sample (3MI_A), used to color cells in e.

Source Data Extended Data Fig. 6 (download XLSX )

Statistical source data: per-gene Spearman’s rank correlation gaps for each cell class.

Source Data Extended Data Fig. 7 (download XLSX )

Statistical source data: ligand–receptor knockout performance differences. Top ten pairs per cell class (b–f, five classes) and the heatmap matrices for each panel; plus the full 332-pair analysis (a).

Source Data Extended Data Fig. 9 (download XLSX )

Statistical source data: Wasserstein distances per cell class and the Wilcoxon signed-rank test.

Source Data Extended Data Fig. 10 (download XLSX )

Statistical source data: per-cell SRC in the 3MPI sample, with and without fine-tuning.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and permissions

About this article

Cite this article

Yu, T., Ekbote, C., Morozov, N. et al. Tissue reconstruction with generative AI. Nat Methods (2026). https://doi.org/10\.1038/s41592\-026\-03332\-2

Download citation

  • Received: 01 April 2025
  • Accepted: 19 October 2026
  • Published: 01 December 2026
  • Version of record: 01 December 2026
  • DOI: https://doi.org/10\.1038/s41592\-026\-03332\-2

Share this article

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative