Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Benchmarking Deconvolution Without Ground Truth

Spatial Transcriptomics · Tutorial 652 of 700

Benchmarking Deconvolution Without Ground Truth

Use complementary, ground-truth-free checks to identify weaknesses in spatial deconvolution while distinguishing model fit and stability from accuracy.

Advanced 12 min read

What You'll Learn

  • Design reference holdouts that test whether a deconvolution pipeline responds plausibly to missing cell types or donors.
  • Use marker genes excluded from fitting as an independent consistency check.
  • Interpret expression residuals, including spatially structured residual patterns.
  • Quantify how estimates change across plausible reference choices.
  • Distinguish diagnostic evidence from direct evidence of proportion accuracy.
  • Recognize common sources of misleadingly reassuring benchmarks.

Assessing Deconvolution When Proportions Are Unknown

Spatial deconvolution estimates which cell types contribute to each spatial spot. In real tissue, the true proportions for each spot are usually unavailable, so a direct comparison of estimated and true proportions is impossible. This makes evaluation a collection of complementary checks rather than a single accuracy score. The checks considered here ask whether the method behaves plausibly under controlled reference changes, agrees with independent marker evidence, leaves interpretable residuals, and is robust to reasonable choices of reference data.

These checks do not turn unknown proportions into known ones. A method can fit expression well and still estimate the wrong mixture if cell types have similar signatures, the reference is mismatched, or important cell states are absent. The introductory material on evaluating deconvolution with synthetic mixtures covers cases where mixtures with known construction proportions can be made. Here, the target is the harder setting in which the observed tissue has no such ground truth.

Definition: A ground-truth-free benchmark evaluates a deconvolution method using evidence that does not require the true proportions in the tissue. Examples include held-out reference data, expression of marker genes not used in fitting, residual patterns, and changes in estimates across reference choices. These are diagnostics of plausibility, fit, or robustness; none alone establishes that the estimated proportions are accurate.

What Is Being Checked?

Let \(y_{sg}\) denote normalized expression of gene \(g\) in spot \(s\), and let \(A_{kg}\) denote the reference expression signature for cell type \(k\) and gene \(g\), on a compatible scale. A simple mixture representation is

$$ y_{sg} \approx \sum_{k=1}^{K} p_{sk} A_{kg}. $$

Here \(p_{sk}\) is the estimated contribution of cell type \(k\) to spot \(s\). Depending on how the signatures and normalization are defined, this contribution may represent an RNA contribution rather than a literal fraction of cells. The fitting procedure produces \(\hat p_{sk}\) and fitted expression \(\hat y_{sg}=\sum_k \hat p_{sk}A_{kg}\). The residual \(e_{sg}=y_{sg}-\hat y_{sg}\) records the expression not accounted for by that fitted mixture.

For any benchmark to be interpretable, the observed expression and reference signatures must be put on compatible scales, and the same normalization and fitting procedure should be used across comparisons. If evaluation genes helped determine the fitted proportions, agreement on those genes is not independent evidence: the method was explicitly given the information being checked. A practical approach is to define fitting genes and validation genes in advance, then leave the validation genes out of the fit.

Four questions organize the evaluation:

  • Does the pipeline respond sensibly to a controlled change? Hold out reference donors or cell types and examine whether expected failures become visible.
  • Do independently measured markers agree with the estimates? Check genes that were not used to fit the proportions.
  • What remains unexplained? Look at residual size, gene patterns, and spatial organization.
  • Are conclusions sensitive to plausible reference choices? Compare estimates from references that differ in donor, condition, or processing.

Reference Holdouts: Testing Expected Behavior

A reference holdout is a controlled stress test. One option is to exclude cells from a donor or batch when building the reference, then assess whether the fitted signatures and spot estimates remain plausible when that held-out material is evaluated. A more severe test is to omit one cell type from the reference. If spots contain that type, the model cannot assign its contribution to the missing type. Instead, expression from the omitted type may be left in the residuals or incorrectly attributed to similar represented types.

Holdouts are most informative when their design reflects a specific concern. Holding out donors tests dependence on donor-specific signatures; holding out a cell type tests what happens when the reference is incomplete. In either case, keep the test data separate from reference construction and from choices made during tuning. If the held-out cells were used to select markers or optimize the method, the test is no longer an independent check.

Worked Example: Omitting a Cell Type and Checking Its Markers

Suppose a hypothetical spot contains endothelial cells, but the reference used for fitting omits endothelial cells. Two endothelial marker genes are kept out of the fit. For these genes, the observed normalized expression is 12 and 9 units. The reduced reference predicts 5 and 4 units, respectively. Suppose the estimated residual standard deviations for these genes are 2 and 1.5 units.

For the first marker, the residual and standardized residual are

$$ e_1=12-5=7,\qquad \frac{e_1}{2}=3.5. $$

For the second marker, they are

$$ e_2=9-4=5,\qquad \frac{e_2}{1.5}=3.33. $$

Both held-out markers are substantially higher in the observed spot than in the reduced model's fitted expression. This is consistent with the expected consequence of omitting a cell type that expresses these markers. It does not prove that the spot contains endothelial cells: other omitted biology, technical effects, or an unsuitable reference could also produce positive residuals. A useful follow-up is to restore the endothelial reference and check whether the markers' residuals decrease without creating implausible fits elsewhere.

Independent Marker Consistency

Marker consistency asks whether estimated contributions vary in a direction that agrees with expression of cell-type markers not used for fitting. For a cell type with validation-marker set \(M\), one simple score for spot \(s\) is the mean normalized expression across those genes:

$$ m_s=\frac{1}{|M|}\sum_{g\in M} y_{sg}. $$

The score can be compared with \(\hat p_{sk}\), the estimated contribution of the corresponding cell type. Agreement might appear as a positive association across spots or as higher marker scores in spots with larger estimated contributions. The expected pattern should be specified with biological and technical context in mind: marker genes may vary with activation, tissue region, sequencing depth, or related cell types. Markers are supporting evidence, not a direct measurement of cell abundance.

Worked Example: Comparing Estimates With a Held-Out Marker Score

Suppose four hypothetical spots have estimated contributions for cell type \(k\) of 0.10, 0.20, 0.40, and 0.50. The mean normalized expression of a validation-marker set, excluded from fitting, is 2, 3, 6, and 7 units. Calculate the Pearson correlation between the estimates and marker scores.

The means are \(\bar{x}=0.30\) for the estimated contributions and \(\bar{y}=4.50\) marker-expression units. The centered values are \((-0.20,-0.10,0.10,0.20)\) and \((-2.50,-1.50,1.50,2.50)\). Thus the sum of cross-products is

$$ \sum_s (x_s-\bar{x})(y_s-\bar{y}) =0.50+0.15+0.15+0.50=1.30. $$

The sums of squared deviations are \(0.10\) for the estimates and \(17.00\) for marker expression, so

$$ r=\frac{1.30}{\sqrt{0.10(17.00)}}=0.9971. $$

In this small hypothetical example, the estimates and held-out marker scores have a strong positive linear association. This supports consistency between two sources of evidence, but does not establish calibration: a method could rank spots correctly while systematically overestimating or underestimating the contribution. With only four spots, the correlation is also highly sensitive to individual observations. In a real analysis, inspect the scatterplot, use multiple markers, and consider whether marker expression could change for reasons other than cell-type abundance.

Residual Structure: What the Fit Leaves Behind

A good global fit can conceal systematic local failures. Examine residuals by gene, spot, tissue region, and spatial neighborhood. A residual that is positive for a coherent set of markers may point to an omitted cell type or state. Residuals concentrated in one region may indicate spatially varying reference mismatch. A broad increase in residual magnitude in low-depth spots may instead reflect technical variation or an unsuitable expression scale.

The justification for this diagnostic follows directly from the mixture model. Suppose the true mean expression includes a cell type \(h\) omitted from the reference, with contribution \(p_{sh}\) and signature \(A_{hg}\). If the fitted model accounts for the represented types but not this omitted component, then, in a simplified case,

$$ e_{sg}=y_{sg}-\hat y_{sg} \approx p_{sh}A_{hg}+\varepsilon_{sg}, $$

where \(\varepsilon_{sg}\) is expression noise and other modeling error. Thus residuals tend to be positive for genes strongly expressed by the omitted type, especially in spots where its contribution is large. The implication is conditional, not conclusive: a mismatch in gene expression or normalization can also generate residuals with similar patterns.

Spatial patterning can be summarized descriptively before applying a formal spatial test. For a chosen gene, compare residuals at neighboring spots. If nearby spots repeatedly have residuals of the same sign, the fit may be missing spatially organized biology or may have a region-specific mismatch. A spatial test is not automatically a test of deconvolution accuracy; it tests whether residual organization is inconsistent with the chosen model's assumptions.

Worked Example: A Simple Neighbor Residual Summary

For one hypothetical marker gene, four spots arranged in a line have residuals \(2, 1, -1, -2\) normalized-expression units. The three adjacent-pair products are \(2(1)=2\), \(1(-1)=-1\), and \((-1)(-2)=2\). Their mean is

$$ \frac{2+(-1)+2}{3}=1. $$

The mean squared residual is \((4+1+1+4)/4=2.5\) squared expression units. Dividing the mean adjacent-pair product by this mean square gives a descriptive summary of \(1/2.5=0.400\). The positive value indicates that the adjacent products are positive on average in this particular arrangement. It is not a formal test statistic with a calibrated p-value, and it does not establish why the residuals are patterned. The mixed signs also matter: one adjacent pair has a negative product. A fuller analysis would examine the residual map, the relevant gene set, and whether the pattern persists under reasonable reference and normalization choices.

Sensitivity to Reference Choice

A deconvolution result may depend on which reference cells, donors, or conditions are used. Refit the same spots under several defensible reference choices while holding the gene set, normalization, and fitting settings fixed as far as possible. Then compare estimates for each cell type and spot. For two references \(A\) and \(B\), a simple summary for type \(k\) across \(S\) spots is the mean absolute difference

$$ D_k=\frac{1}{S}\sum_{s=1}^{S}|\hat p_{sk}^{(A)}-\hat p_{sk}^{(B)}|. $$

This quantity measures disagreement between the two runs in the units of the estimated contribution. Small disagreement suggests stability to that particular reference change; it does not imply accuracy. Large disagreement flags dependence on the reference and motivates investigation of signature similarity, marker coverage, and whether either reference better represents the tissue. Compare not only averages but also spatial maps and which spots change most.

Worked Example: Quantifying Reference Sensitivity

Two plausible hypothetical references produce estimates for one cell type in three spots. Reference A gives 0.30, 0.50, and 0.70; reference B gives 0.25, 0.55, and 0.60. The absolute differences are 0.05, 0.05, and 0.10. Therefore,

$$ D_k=\frac{0.05+0.05+0.10}{3}=0.0667. $$

The estimates differ by an average of 0.0667 contribution units per spot across these three spots. The discrepancy is largest in the third spot. This does not say which reference is better: both may be mismatched, or they may differ in a biologically meaningful way. Inspecting that spot's marker expression and residuals can help characterize the disagreement, but no ground-truth-free check can decide which estimate is correct without additional evidence.

Combining Evidence and Recognizing Failure Modes

The strongest evaluation uses checks that fail for different reasons. A reference holdout probes the pipeline under a planned perturbation; held-out markers assess expression consistency; residual analysis searches for unexplained structure; and reference sensitivity measures dependence on reference choice. Agreement across these checks increases confidence that the output is not obviously contradicted by available evidence. It is still not equivalent to validation against true proportions.

This differs from benchmarking only with synthetic mixtures, where the constructed proportions are known and numerical errors against those proportions can be calculated. Synthetic mixtures can directly test recovery under their construction assumptions, but they may not reproduce tissue complexity. Ground-truth-free checks apply to real tissue, but their conclusions are indirect. They complement rather than replace one another.

Common pitfalls include:

  • Calling a low residual error accurate deconvolution. Several distinct mixtures can produce similar expression. A good fit shows compatibility with the model, not unique recovery of the true proportions.
  • Reusing fitting markers as validation markers. Agreement is partly guaranteed when the same genes helped determine the estimates. Reserve independent genes for the check.
  • Treating a holdout as a direct estimate of real-world accuracy. A holdout tests a particular change, such as omitting a donor or cell type; its result does not cover every source of mismatch.
  • Equating reference stability with truth. Multiple references can share the same bias. Conversely, a real biological difference between reference sources can produce sensitivity without identifying which estimate is wrong.
  • Ignoring technical and biological alternatives. Marker variation and structured residuals may reflect activation, tissue region, normalization, or measurement quality rather than an incorrect cell-type contribution.

When diagnostics disagree, report the disagreement rather than selecting whichever check is most reassuring. State which genes and references were held out, how markers were chosen, which residual patterns were examined, and which choices materially changed the estimates. Such reporting makes the evidence interpretable while keeping the conclusion within its limits.

Key takeaway: Without ground truth, deconvolution can be stress-tested and cross-checked, but not certified by a single diagnostic. Separate evidence of model fit, marker consistency, and reference stability from evidence of proportion accuracy.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. A cell-type marker was included when fitting proportions and is then used to claim independent marker agreement. What is the problem, and how should the check be redesigned?
  2. A type is omitted from the reference, and its held-out markers show positive residuals. What does this support, and what does it not prove?
  3. Across five spots, two references yield estimates with absolute differences 0.02, 0.03, 0.05, 0.04, and 0.06. Calculate their mean absolute difference.
  4. Residuals of the same sign cluster in one tissue region. Give two possible explanations and one follow-up check.

Solutions. (1) The marker is not independent evidence because it influenced the fitted estimates. Use markers excluded from fitting and, ideally, define them before examining the results. (2) The pattern is consistent with the omitted type contributing expression that the reduced model does not explain. It does not prove that type is present, because other omitted biology or technical mismatch could create similar residuals. (3) The mean absolute difference is \((0.02+0.03+0.05+0.04+0.06)/5=0.040\) contribution units per spot. This measures sensitivity between those references, not accuracy. (4) Possible explanations include a region-specific reference mismatch or unmodeled spatial biology; technical or normalization effects are also possible. Examine the residual map by gene and compare results under a plausible alternative reference or normalization, without treating any one check as definitive.

Clinical Biostats