bioRxiv Science⌕ Search

bioRxiv · 10.64898/2026.08.07.743490

Learning Discrete Cell and Niche Codes from Spatial Transcriptomics Using Dual Residual Vector Quantization

Abstract

Spatially-resolved transcriptomics (SRT) measures gene expression at single-cell resolution while preserving each cells spatial location, enabling the joint study of cell identity and cellular niche, the recurring microenvironment that organises tissue function. Existing representation-learning methods typically capture only one of these axes at a time. We present SQUINT, a graph vector-quantized variational autoencoder (VQ-VAE) that learns two disjoint codebooks per cell from a shared architecture: a cell codebook quantising the per-cell embedding before neighbourhood aggregation, biased toward cell-intrinsic identity, and a niche codebook quantising the embedding after graph neural network (GNN) aggregation, biased toward spatial context. Both use residual vector quantization, giving a coarse-to-fine discrete-token hierarchy. SQUINT is trained with per-branch negative-binomial reconstruction objectives and three domain-motivated components that we show are crucial: a within-section cosine adjacency loss that anchors the niche codes in the spatial graph, a cross-section contrastive loss on the cell latents that aligns transcriptomically matched cells, and a decoder section covariate that absorbs batch effects. Across three datasets spanning four spatial assays (STARmap, MERFISH, CosMx, Xenium) and four tasks - niche identification, cell-type identification, cross-section integration, and spatial gene-expression imputation in held-out regions - SQUINT outperforms or is competitive with strong baselines on identification and achieves the most faithful cross-section integration. The resulting discrete vocabulary makes tissues directly consumable by transformer-style foundation models and enables one-step query-to-reference atlas mapping via code-distribution similarity, which we demonstrate on a CosMx human non-small-cell lung cancer cohort.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Birk, S., Merchant, A., Vahidi, A., Theis, F. J., Lotfollahi, M.. 2026-08-17. Learning Discrete Cell and Niche Codes from Spatial Transcriptomics Using Dual Residual Vector Quantization. https://doi.org/10.64898/2026.08.07.743490

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related preprints

Integrative Nanopore and Illumina sequencing reveals age-associated tRNA modification and CCA-tail dynamics in yeast

Aging is characterized by a progressive loss of proteostasis. Transfer RNAs (tRNAs) are essential regulators of translation, yet their dynamics during aging remain poorly understood due to challenges in sequencing highly modified RNAs. Here we present a benchmarked Nanopore direct RNA sequencing (RNA004 chemistry) resource that profiles the Saccharomyces cerevisiae tRNAome during replicative aging at single-molecule resolution. Using in vitro transcribed tRNA controls, we establish modification detection thresholds and validate key findings with orthogonal Illumina sequencing. While overall tRNA abundance remains largely stable, our resource reveals age-associated terminal A cleavage at the 3' CCA tail of mature tRNAs, targeted T-loop and anticodon modification changes, and single-molecule evidence of modification co-occurrence. This dataset provides a resource for exploring tRNA regulation, translation fidelity, and longevity.

genomics↗

A hydrogen-producing mitochondrion in an anaerobic eukaryotrophic rhizarian

Diverse eukaryotes thrive under low oxygen conditions, in part through highly modified mitochondrion-related organelles (MROs) that use alternate metabolic pathways to support ATP production and cofactor recycling. Anaerobic lifestyles have evolved repeatedly across the eukaryotic tree of life, each providing an independent opportunity to understand how eukaryotes adapt to life in low oxygen conditions. Here, we use single-cell transcriptomics to reconstruct the MRO metabolism of PCE SSF, a benthic eukaryotrophic flagellate and the first cultivated representative of Novel Clade 12 (NC12; Rhizaria), an independently anaerobic rhizarian lineage. PCE SSF possesses an anaerobic hydrogen-producing mitochondrion capable of hydrogenosome-type substrate-level phosphorylation. It also retains a nearly complete but likely branched tricarboxylic acid pathway that lacks citrate synthase and malate dehydrogenase. The function of citrate synthase may instead be fulfilled by the typically cytosolic ATP citrate lyase, previously reported in this context only in the anaerobic cercozoan, Brevimastigomonas motovehiculus. Unlike B. motovehiculus, however, PCE SSF retains only Complex II and the NuoE/NuoF subunits of the electron transport chain and lacks a mitochondrial genome. Together, these features indicate an atypical and reduced mitochondrial metabolism, highlighting the diversity of evolutionary solutions to anaerobic energy metabolism in eukaryotes.

genomics↗

Targeted CRISPRi screening reveals unexpected resilience across the RNA polymerase III transcriptome

Increased RNA polymerase III (Pol III) activity and tRNA abundance are widely linked to cancer cell growth, yet the functional requirement for individual Pol III genes and core components remains unclear, in part due to the difficulty of achieving gene-specific perturbation of highly conserved loci. Here, we developed an inducible CRISPR interference platform and a custom single-guide RNA (sgRNA) library enabling gene-specific targeting of Pol III-transcribed genes and Pol III machinery. Genome-wide screening identified several Pol III dependencies in diploid fibroblasts and HEK293T cells, including multiple initiator methionine tRNA genes among the strongest fitness dependencies. Unexpectedly, glioblastoma models remained largely insensitive to repression of both individual Pol III genes and core Pol III components, despite efficient target repression. These findings establish a general strategy for gene-specific interrogation of conserved Pol III genes and indicate that glioblastoma models tolerate extensive perturbation of Pol III genes and machinery.

genomics↗