A noise-corrected metric for evaluating spatial transcriptomics predicted from histology
stRSC evaluates methods that predict spatial transcriptomics from H&E-stained histology. Compute the reproducible-signal correlation (RSC) of your own predictions in the browser or with the Python toolkit, and compare your scores with the evaluations in the paper.
Prediction methods are usually evaluated by the Pearson correlation between predictions and measured RNA expression. Across whole sections, the correlation overstates prediction quality by crediting methods for recognizing tissue regions. In the HER2ST breast cancer dataset, a class-mean baseline that predicts one value per tissue region reaches a whole-section Pearson r of 0.111, above the median of 11 published methods (0.108). At fine scales, the correlation understates prediction quality because sampling noise dominates sparse RNA counts.
RSC largely avoids overstating and understating prediction quality. The measured RNA molecules are split at random into two halves, which share the true expression and carry independent sampling noise. RSC scores a prediction against the signal that both halves share, at each spatial scale and within tissue regions or cell classes.
At the finest scale, sampling noise lowers the Pearson r between the true expression and measured RNA expression to 0.44–0.57, whereas RSC stays at 0.997.
Removing molecules at random adds sampling noise to the counts while the predictions stay the same. Whole-section Pearson r falls from 0.509 to 0.408, whereas fine-scale RSC remains largely stable (0.337 to 0.386).
How RSC is computed
Split
Each RNA molecule is assigned at random to one of two halves. For a gene with N molecules in a spot, bin or cell, NA ~ Binomial(N, 0.5) and NB = N − NA. The split uses raw counts, before normalization.
Decompose
The prediction and both halves are decomposed into spatial scales, from broad tissue regions to neighboring spots or cells. The decomposition uses a Fourier basis on a regular grid, a neighbor graph on spots and a cell graph on single cells.
Correlate
At each scale b, C is the mean covariance of the prediction with the two halves, and Vmodel is the variance of the prediction. VRNA is the covariance between the two halves. All three are summed over genes and locations, and RSC is averaged over repeated splits.
RSCb = C / √(Vmodel · VRNA)
RSC computes the Pearson correlation of the prediction with the two halves but replaces the RNA variance with the split-half covariance VRNA, which estimates the variance of the reproducible signal. An RSC of 1 indicates that the prediction accounts for all reproducible variation at that scale, and an RSC of 0 reflects chance agreement. The correlation between the two halves, VRNA/√(VAVB), is the split-half reliability ρb. For halves of equal variance, the Pearson r of a prediction with the mean of the halves is RSCb · √(2ρb/(1 + ρb)). Pearson r therefore falls at fine scales, where counts are sparse and the split-half reliability is low. RSC follows the idea of Fourier shell correlation in cryo-electron microscopy, which compares two half-maps of the same structure. More in the user guide
Evaluate your own methods
- BrowserCalculate RSC
Calculate RSC
The browser computes RSC from your RNA counts and predictions at each spatial scale and within cell classes or regions, with the code of the Python toolkit. Counts can be a table, an .h5ad file, or Space Ranger or Xenium output, on spots, a regular grid or single cells.
- BrowserOpen in Analyze data
Pairwise accuracy
The browser computes normalized pairwise accuracy on unmatched and matched spot pairs, as in Fig. 2, from the RNA counts and predictions of two or more patients.
- BrowserOpen in Analyze data
Pairwise difference loss
The browser trains ridge regression on image features with and without the pairwise difference loss and scores both predictions with RSC, as in Fig. 6.
- PythonToolkit on GitHub
Toolkit
The Python toolkit runs the same calculations on your own computer, without a limit on section size.
pip install strscimport strsc counts = strsc.read_counts("sample.h5ad") result = strsc.rsc(counts, {"my_model": "predictions.csv"}, layout="spots") print(result.scales) - BrowserOpen in Analyze data
Computed results
The browser opens result files written by the toolkit and draws figures that download as SVG or 300-dpi PNG files with their data.
- BrowserOpen in Analyze data
Conventional metrics
The browser computes whole-section correlation and AUROC against expert annotations, for comparison with RSC.

Results of the paper
- Fig. 2Fig. 2 in Results
Tissue regions
Whole-section correlation overstates prediction quality within tissue regions. Normalized pairwise accuracy is 0% for a majority-order baseline and 100% for the agreement between two RNA halves. In HER2ST, the median of 11 published methods falls from 28.5% on unmatched spot pairs to 6.6% on matched pairs within the same region. Method rankings within regions are nearly unrelated to rankings by whole-section correlation (Kendall's τb = 0.091).
- Fig. 3Fig. 3 in Results
Spatial scales
RSC shows that spot-level predictions generally capture broad regional expression patterns but miss most fine-scale differences between nearby spots. In colorectal cancer, the RSC of Ridge–Phikon predictions falls from 0.800 at scales of 4,096 µm and above to 0.298 below 128 µm. In the Xenium samples of breast, pancreatic and lung cancer, 10 of the 11 spot-level models that we trained score lower at the finest than at the broadest scale in all nine samples.
- Fig. 4Fig. 4 in Results
Cell classes
Within malignant cells, RSC distinguishes single-cell methods that capture part of the cell-to-cell variability from methods whose scores across all cells are inflated by cell-type composition. At the fine scale within malignant cells, GHIST reaches an RSC of 0.242, compared with 0.042 for DeepSpot2Cell and 0.020 for sCellST. Across all cells, a class-mean baseline outscores sCellST (fine-scale RSC 0.081 versus 0.036).
- Fig. 5Fig. 5 in Results
Tertiary lymphoid structures
A high AUROC for locating tertiary lymphoid structures (TLS) can overstate how well a method predicts expression inside the structures. Ridge–Phikon-v2 separates TLS from other spots with an AUROC of 0.93 to 0.99, and a class-mean baseline reaches 0.99 to 1.00. Within TLS, the RSC of Ridge–Phikon-v2 is 0.25 to 0.29, compared with 0.59 to 0.79 between regions.
- Fig. 6Fig. 6 in Results
Pairwise difference loss
Guided by RSC, we designed a pairwise difference loss that supervises expression differences between neighboring spots. Across 11 spot-level models in nine Xenium samples, mean fine-scale RSC rises from 0.194 with standard training to 0.205 with the loss. On neighboring spots, the loss raises fine-scale RSC by 0.009 more than on the same number of non-neighboring spot pairs.