To compare gene expression between two samples, biologists first divide out a "reference": either a housekeeping gene assumed to be constant, or the total number of molecules counted. Decades of qPCR work show that no reference is constant everywhere. A gene that is stable under one condition drifts under another, and normalizing against it creates fake fold-changes. Spatial transcriptomics measures gene expression at thousands of spots across an intact tissue slice, and it inherits this "moving ruler" problem in a sharper form. The conditions no longer come as a few labeled groups. They change gradually across the tissue: cortical depth, distance from a vessel, edges of a lesion. Every spot is also a tiny, sparse sample. Current pipelines respond by dividing each spot by its own total count. That ruler is noisy at low-count spots, and it is often correlated with tissue anatomy.
We propose to treat the per-spot normalization factor the way epidemiologists treat disease risk in small geographic areas. It becomes a hidden spatial map, estimated by borrowing strength from neighboring spots. At the same time, the model learns which genes are allowed to define that map, and where in the tissue each candidate reference gene stops being trustworthy. The output is a smoothed normalization surface, plus a per-gene, per-location stability map that replaces the single tissue-wide score that tools like geNorm and NormFinder produce. We test whether this ruler reduces false calls of "spatially variable" genes, which is the known failure mode of current spatial analysis.
Core Claim
Reference-gene stability in tissue should be estimated as a spatial field, not a group-level score. The normalization factor should be fitted jointly with that field under a spatial smoothness prior. Our claim is that this joint estimate recovers the true per-spot capture efficiency better than spot-wise total-count or median-ratio normalization, and better than running NormFinder on discrete tissue domains. The gains should be largest where reference behavior changes along gradients within a domain, rather than in steps between domains. We further claim that a measurable share of the false positives in spatially-variable-gene detection comes from this ruler error, so fixing the ruler lowers false calls without losing true ones.
The pieces exist separately but have not been combined. The reference-gene literature documents the moving ruler in detail. Haug et al. showed that HPRT1 produced a false twofold target increase during oocyte maturation, and that only a data-chosen combination (ACTB+PFKP, NormFinder stability 0.149) was adequate. Rahman et al. found 18S is stable under chemical stress but fails across development. Xia et al. showed stability differs between geographic accessions and between stress types. These papers motivate the project. Their tools all assume discrete groups, and none can say where along a continuum a gene stops being stable.
The spatial-smoothing literature supplies the method. The conditional autoregressive prior used by Hsieh et al. lets a regression coefficient vary smoothly across 478 areas, which beat a non-spatial mixture model by DIC. The Markov random field priors of Schmidt et al. put smoothness inside the likelihood instead of blurring images beforehand. Wu et al. borrowed strength across neighboring sites in sparse sequencing counts and gained AUC over binary calls (0.9748 vs 0.9556). We reuse these priors, but on a different object. Here the smoothed quantity is the ruler itself, not the signal being measured.
The Model
Let $y_{gs}$ be the count of gene $g$ at spot $s$, modeled as negative binomial with mean $\mu_{gs}$:
$$\log \mu_{gs} = \alpha_g + \log c_s + z_g\, f_{gs}, \qquad \log c_s = u_s + v_s .$$
The terms are as follows. $\alpha_g$ is the gene's baseline level. $c_s$ is the spot's capture efficiency, which is the ruler. $u_s$ is a spatially structured part with an intrinsic conditional autoregressive prior, meaning each spot is pulled toward the average of its neighbors. $v_s$ is independent spot-level noise. The pair $(u, v)$ is the standard structured-plus-unstructured split from disease mapping. $z_g \in \{0,1\}$ indicates whether gene $g$ departs from the ruler. When it does, $f_{gs}$ is a gene-specific spatial deviation field with its own Markov random field prior and precision $\tau_g$.
A gene's stability at location $s$ is read off the posterior. It combines the probability that $z_g = 0$ with the local size of $f_{gs}$. The model can therefore report that a gene is a usable reference in grey matter but not near the white-matter boundary, which no discrete-group method can do.
The model only works under a stated assumption. A smooth ruler and smooth biology are indistinguishable unless some genes are anchors. Identification therefore rests on the premise that an unknown subset of genes, a sizable fraction of a candidate pool, is spatially flat. This is the spatial analogue of the "most genes are not differentially expressed" premise behind median-ratio normalization. A consequence follows directly. If a region truly has more total RNA per cell, the model attributes that to biology only when the stable subset does not move with it. Without external spike-ins, no count-only method can separate global RNA content from capture efficiency. We will report results relative to the learned stable set and will not claim absolute quantities.
Research Program
The first component is inference that scales to roughly 4,000 Visium spots and up to tens of thousands of Stereo-seq bins. MCMC in high-dimensional spatial models is a known bottleneck (Schmidt et al.). We will therefore restrict the reference pool to a few hundred well-expressed candidate genes and use sparse-precision Laplace or variational approximations. We will check those approximations against MCMC on small slices.
The second component is choosing how much to smooth. Duncan and Mengersen showed that DIC picked the most under-smoothed of 12 variants 75% of the time. We will therefore select the prior strength using their goodness-of-smoothing criteria, the relative position of CASIR and variogram ratios, and report DIC only for comparison.
The third component is the stability map itself, released as a per-gene spatial surface. Spatial assays have no real prior candidate panel, so our model will be the first that can nominate one.
The fourth component feeds the corrected ruler into downstream analysis. We will use spatially-variable-gene detection with SPARK, SPARK-X and SpatialDE as offsets, and domain clustering.
Baselines
The naive reference point is spot-wise total-count normalization: each spot divided by its own library size. This is the default in spatial pipelines and the implicit offset in SVG methods benchmarked by Chen et al.. It is the reference any proposal must beat, and it costs nothing. A robust spot-wise median-of-ratios factor is run alongside it.
The strongest existing competitor is domain-wise NormFinder. We first cluster spots into tissue domains: annotated layers on DLPFC, or clusters from an off-the-shelf spatial clustering otherwise. We then run NormFinder treating domains as groups, choose the best gene combination as in Haug et al., and normalize each spot by that combination. This is exactly what the qPCR field would do if handed spatial data, so it is the fair test of whether continuous spatial modeling adds anything. It gets the same candidate pool and the same data. Its domain number is tuned over the same grid budget we spend on smoothing strength.
A fixed-housekeeping baseline uses ACTB/GAPDH-type genes with Gaussian-kernel pre-smoothing of their counts. This represents the "just blur the reference" practice.
Two ablations isolate our ingredients. The first removes the spatial prior on $c_s$, leaving joint stability selection but spot-wise factors. The second removes stability selection by forcing $z_g = 0$ for all genes, leaving a smoothed ruler built from everything. On simulated data, beating the baselines means lower error in recovering the true $\log c_s$ and fewer false-positive SVG calls among simulated null genes at matched power. On real data it means more reproducible stability maps and SVG calls across adjacent slices. For downstream clustering, the reported reference on DLPFC is JADE's median ARI of about 0.61–0.65, against GraphST 0.58 and STAGATE 0.52 (JADE). We will check whether any of these methods gains ARI when given our normalized input, but we do not expect large clustering gains. Clustering is a secondary check. For per-dataset SVG accuracy, there is no reported result on Lacuna for per-dataset AUPR or Type I error values in the 104-dataset benchmark. We will rerun those methods ourselves under each normalization.
Why not just…?
Why not just run NormFinder on spatial domains? This is the real threat. If reference instability changes in steps at domain boundaries, domain-wise NormFinder should tie with our model at far lower cost, and we will say so if it does. It fails in two predictable ways. First, it cannot represent gradients within a domain, such as a gene drifting with cortical depth inside one layer. Second, the domains are themselves computed from data normalized by the flawed ruler, which is circular. The simulation design varies the share of instability that is a step versus a gradient specifically to locate where the two methods diverge. On real data, adjacent-slice reproducibility decides between them.
Why not just smooth the housekeeping-gene counts with a Gaussian filter? Pre-blurring smears sharp anatomical boundaries. Both Schmidt et al. and Gabbe et al. report that pre-smoothing distorts boundaries relative to priors built into the model. Blurring also keeps the assumption that the chosen housekeeping genes are stable, which the qPCR literature repeatedly falsifies. The fixed-housekeeping baseline tests this directly. The prediction is that it does worst at layer boundaries.
Why not just use rank-based methods that never normalize? Within-spot gene-pair ranks (Less is more) avoid a ruler entirely and produced very strong sepsis classifiers. However, they were built for well-sequenced bulk or single-cell profiles, and they discard magnitude. At spots with few counts, dropouts flip pairwise orders. We will include a pair-reversal SVG test as a comparison. If it matches our false-positive control at equal power, the ruler is unnecessary for that task, and that would be a useful negative result.
Why not just let the SVG method absorb library size as an offset? That is what SPARK-style models already do, and it is our naive baseline. The offset is still the noisy, possibly anatomy-confounded total count. The question is whether a better offset changes the calls, which the main experiment measures.
Proposed Experiments
The first experiment is simulation with known truth. Starting from the 30 synthetic datasets in Chen et al. and from resampled real DLPFC count profiles, we impose capture-efficiency surfaces of three kinds: flat, domain-stepped, and smooth gradients correlated with anatomy. We also make a controlled fraction of candidate reference genes drift along gradients. We measure ruler recovery error, recall of truly stable genes, and the SVG false-positive rate among null genes under each normalization. Smoothing strength is chosen by CASIR and by DIC, so we can test whether the Duncan and Mengersen finding carries over to this setting.
The second experiment uses real tissue: the 12-slice DLPFC set, the Stereo-seq axolotl brain, and a subset of the real datasets in the 104-dataset benchmark spanning Visium, Slide-seq, Stereo-seq and STARmap. Truth is unavailable, so the decisive checks are internal. First, stability maps estimated on one slice should predict which genes look flat on an adjacent slice from the same donor. Second, genes our model calls stable should be called non-variable by SPARK on held-out slices more often than genes chosen by domain-wise NormFinder. Third, the agreement of SVG calls across adjacent slices, which Chen et al. use to rank methods, should rise under our ruler relative to total-count normalization.
The project's central hypothesis is that ruler error causes part of the SVG over-calling. That hypothesis fails if all three of the following hold together. Our method does not beat domain-wise NormFinder on gradient simulations. It does not lower null-gene false positives against total-count normalization. It does not improve cross-slice agreement on DLPFC.
References
- Epigenetic-related transcriptional reprogramming elucidated by identification and validation of a novel reference gene combination for RT-qPCR studies in porcine oocytes of contrasting quality
- Case Study Using Recommended Reference Genes Actin and 18S for Reverse-Transcription Quantitative Real-Time PCR Analysis in Myzus persicae
- Reference Gene Selection for Quantitative Real-Time PCR Normalization in Reaumuria soongorica
- Spatially Varying Coefficient Inequalities: Evaluating How the Impact of Patient Characteristics on Breast Cancer Survival Varies by Location
- Fully Bayesian Inference for Structural MRI: Application to Segmentation and Statistical Analysis of T2-Hypointensities
- Statistical Quantification of Methylation Levels by Next-Generation Sequencing
- Comparing Bayesian spatial models: Goodness-of-smoothing criteria for assessing under- and over-smoothing
- Benchmarking algorithms for spatially variable gene identification in spatial transcriptomics
- JADE: Joint Alignment and Deep Embedding for Multi-Slice Spatial Transcriptomics
- 4F.003 Spatially forecasting serious injury into the future
- Less is more: relative rank is more informative than absolute abundance for compositional NGS data