bioRxivBioinformaticsPreprint
Nearest-neighbor nonnegative spatial factorization to study spatial and temporal transcriptomics
Priyanka ShresthaiD, Luis Chumpitaz Diaz, Barbara Elizabeth EngelhardtiD
Abstract
Nonnegative spatial factorization (NSF) is a spatially-aware factorization method that uses Gaussian processes (GPs) as spatial priors in a Poisson latent factor model to robustly identify interpretable, parts-based representations in spatial transcriptomics data. However, NSF scales poorly with modern datasets due to the computational complexity of Gaussian processes, which scales cubically with the number of points used for inference O(N 3). To address this limitation, we propose a modified version of NSF that leverages variational nearest neighbor Gaussian processes (VNNGPs), resulting in a substantial reduction in inference complexity from O(NM 2) in the current version of NSF to O(MNK2) for M inducing points, N total points and K nearest neighbors. Our method, nearest-neighbor NSF (NNNSF), is benchmarked on synthetic and real-world spatial and temporal transcriptomics datasets. Experimental results demonstrate that NNNSF achieves linear scaling with the number of neighbors and points used for inference in contrast with NSF, which has exponential computational complexity as the number of points used in inference increases. By restricting covariance calculations to the K-nearest neighbors of the points used in inference, NNNSF allows the use of more inducing points, leading to lower reconstruction loss. Nearest-neighbor NSF (NNNSF), which replaces standard variational inference with inducing points in NSF with the VNNGP, leads to a computationally efficient and scalable version of NSF that can be applied to large existing and forthcoming spatial genomics data. We added VNNGP and NNNSF to the GPZoo package, an an ongoing open source project developing a modular Gaussian process library in Python making use of the PyTorch interface. Source code and demonstrations are available at https://github.com/luisdiaz1997/GPzoo/tree/main.
- assay: spatial transcriptomics
- assay: bulk RNA-seq
- research focus: dimensionality reduction
- research focus: benchmarking
- approach: variational autoencoder
- approach: statistical model
- Citations
- 1
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- Multi-sample non-negative spatial factorization
Yi Wang, Kyla Woyshner, … Kasper D. Hansen·Genome biologyPeer-reviewed·Jun 2, 2025
- Scalable multi-group nonnegative spatial factorization for spatial genomics data with cell-type heterogeneity
Luis Chumpitaz-Diaz, Priyanka Shrestha, Barbara Elizabeth Engelhardt·bioRxiv·Jul 3, 2026
- Neighborhood nonnegative matrix factorization identifies patterns and spatially-variable genes in large-scale spatial transcriptomics data
Ragnhild Laursen, Han Chen, … Barbara Elizabeth Engelhardt·Genome biologyPeer-reviewed·Jan 16, 2026
- nnSVG for the scalable identification of spatially variable genes using nearest-neighbor Gaussian processes
Lukas M. Weber, Arkajyoti Saha, … Stephanie C. Hicks·Nature CommunicationsPeer-reviewed·Jul 10, 2023
- GPSNorm: Gaussian Process Spatial Normalization for Spatial Transcriptomics
Art Taychameekiatchai, Xiaowei Zhan, … Peifeng Ruan·bioRxiv·Jul 27, 2026
- Supervised Factorization to Associate Spatial Transcriptomics with Complementary Molecular Readouts
Faria Binta Awal, Robia G. Pautler, … Mohammad Saifur Rahman·bioRxiv·Sep 28, 2025