Why a Spatial Pattern Can Have More Than One Explanation
A gene can appear more abundant in one tissue region than another for at least two distinct reasons. The region may contain different proportions of cell types, or cells of the same type may express the gene differently across regions. Both mechanisms can operate together. A spatial map of spot-level abundance alone does not distinguish them: a spot is a mixture, so its value can change even when expression within every cell type remains fixed.
The aim here is to make that distinction explicit with a mixture model and a numerical decomposition. The quantities in the examples are hypothetical. They represent comparable, exposure-adjusted gene abundance on a common scale, not unadjusted sequencing counts.
This equation is an expectation for a mixture: if a cell is drawn from the spot’s cell population, its expected gene abundance is the proportion-weighted average of the cell-type means. For raw spot counts, an additional factor such as the number of cells represented and capture or sequencing exposure affects the expected total. Consequently, comparing \(q_s\) requires that differences in such exposure have been accounted for or are equal across the comparison. Earlier material on spot counts and linear mixture models provides the setting for this representation; the focus here is interpreting changes in the mixture itself.
The cell proportions in this definition are proportions of cells, not automatically proportions of captured RNA. If cell types differ greatly in RNA content, or if normalization changes the scale, a mixture based on RNA contribution may be more appropriate than a cell-fraction mixture. The meaning of the weights must match the quantities being averaged.
Separating a Difference Between Two Regions
Consider two regions, \(A\) and \(B\). Let \(p_{Ak}\) and \(p_{Bk}\) be their cell-type proportions, and let \(\mu_{Ak}\) and \(\mu_{Bk}\) be their cell-type-specific means for the gene. Their mixture means are \(q_A=\sum_k p_{Ak}\mu_{Ak}\) and \(q_B=\sum_k p_{Bk}\mu_{Bk}\). The observed mixture difference is \(\Delta q=q_B-q_A\). It is useful to split this difference into a composition component and an expression component.
The composition component asks how the mixture would shift as the proportions change, averaging the two regions’ cell-type means. The expression component asks how the mixture would shift as cell-type means change, averaging the two regions’ proportions. The symmetric averaging is useful because it does not privilege either region as the sole baseline.
Why the Decomposition Adds Up
For each cell type, abbreviate the changes by \(\Delta p_k=p_{Bk}-p_{Ak}\) and \(\Delta\mu_k=\mu_{Bk}-\mu_{Ak}\). The contribution of type \(k\) to the mixture difference can be written as \(p_{Bk}\mu_{Bk}-p_{Ak}\mu_{Ak}\). Since \(p_{Bk}=p_{Ak}+\Delta p_k\) and \(\mu_{Bk}=\mu_{Ak}+\Delta\mu_k\), expansion gives \(p_{Ak}\Delta\mu_k+\mu_{Ak}\Delta p_k+\Delta p_k\Delta\mu_k\). This expression includes an interaction term: changing both proportion and mean makes the total different from simply adding changes evaluated at region \(A\).
The symmetric decomposition splits that interaction evenly between the two components. In fact, \(\Delta p_k(\mu_{Ak}+\mu_{Bk})/2=\mu_{Ak}\Delta p_k+\Delta p_k\Delta\mu_k/2\), and \(\Delta\mu_k(p_{Ak}+p_{Bk})/2=p_{Ak}\Delta\mu_k+\Delta p_k\Delta\mu_k/2\). Adding these expressions recovers the expanded contribution exactly. Summing over cell types proves \(C+E=q_B-q_A\). This is an accounting identity for the specified mixture means; it does not establish that either component is causal.
Another valid approach is to choose region \(A\) as a reference and first change proportions while holding means at \(\mu_A\), then change means at proportions \(p_B\). That gives a composition term \(\sum_k\Delta p_k\mu_{Ak}\) and an expression term \(\sum_k p_{Bk}\Delta\mu_k\), which also add exactly to \(\Delta q\). Reversing the order assigns the interaction differently. The symmetric definition avoids that order dependence by sharing the interaction equally.
Worked Examples
Worked Example: A Difference Due Only to Composition
Suppose a gene has mean abundance 2 units per type 1 cell and 10 units per type 2 cell in both regions. Region \(A\) has proportions \((0.80,0.20)\), while region \(B\) has proportions \((0.30,0.70)\). Assume the measurements are on the same exposure-adjusted per-cell scale.
The mixture means are \(q_A=0.80(2)+0.20(10)=1.60+2.00=3.60\) units per cell and \(q_B=0.30(2)+0.70(10)=0.60+7.00=7.60\) units per cell. Thus \(\Delta q=7.60-3.60=4.00\) units per cell.
The cell-type-specific means do not change, so \(E=0\). The composition component is \(C=(0.30-0.80)(2)+(0.70-0.20)(10)=(-0.50)(2)+(0.50)(10)=-1.00+5.00=4.00\) units per cell.
The higher mixture mean in region \(B\) is entirely accounted for by the larger proportion of type 2 cells, which have the higher gene mean. This conclusion is about the mixture arithmetic under the stated inputs; it does not show that a biological process caused the proportion difference.
Worked Example: A Difference Due Only to Within-Type Expression
Now suppose both regions have proportions \((0.50,0.50)\). In region \(A\), the cell-type means are \((2,8)\) units per cell; in region \(B\), they are \((5,8)\) units per cell. Assume comparable exposure-adjusted measurements.
The mixture means are \(q_A=0.50(2)+0.50(8)=1+4=5.00\) units per cell and \(q_B=0.50(5)+0.50(8)=2.5+4=6.50\) units per cell. Therefore \(\Delta q=1.50\) units per cell.
Because proportions do not change, \(C=0\). The expression component is \(E=0.50(5-2)+0.50(8-8)=0.50(3)+0=1.50\) units per cell. Here the entire difference comes from the higher mean in type 1 cells. If the type-specific changes had instead offset one another after weighting, the mixture mean could remain unchanged despite real within-type changes.
Worked Example: Both Composition and Expression Change
Suppose region \(A\) has proportions \((0.75,0.25)\) and cell-type means \((2,10)\) units per cell. Region \(B\) has proportions \((0.40,0.60)\) and means \((4,8)\) units per cell. Assume the same gene scale and comparable exposure in both regions.
First calculate the mixture means: \(q_A=0.75(2)+0.25(10)=1.50+2.50=4.00\) units per cell, and \(q_B=0.40(4)+0.60(8)=1.60+4.80=6.40\) units per cell. Hence \(\Delta q=2.40\) units per cell.
For composition, the proportion changes are \((-0.35,0.35)\) and the average cell-type means are \((3,9)\). Thus \(C=(-0.35)(3)+(0.35)(9)=-1.05+3.15=2.10\) units per cell.
For expression, the mean changes are \((2,-2)\) and the average proportions are \((0.575,0.425)\). Thus \(E=0.575(2)+0.425(-2)=1.150-0.850=0.300\) units per cell. The check is \(C+E=2.10+0.30=2.40=\Delta q\). In this example, changing composition makes the larger contribution, while within-type changes add a smaller positive contribution.
Assumptions, Diagnostics, and Interpretation
The decomposition is only as meaningful as its inputs. The cell types should form a mutually exclusive and sufficiently comprehensive partition of the cells represented in the spots. Within each region, the proportions should be nonnegative and sum to one. The cell-type means and the mixture values must refer to the same gene, compatible measurement scale, and comparable exposure adjustment. If a cell type is absent from one region, its mean there may not be estimable from that region’s observations; a decomposition using a borrowed or imputed mean must say so explicitly.
Check the following before interpreting the components:
- Proportion checks. Verify that each proportion lies between zero and one and that the proportions sum to one, allowing only small discrepancies from rounding. Large violations may indicate an estimation or cell-type definition problem.
- Scale checks. Confirm that the cell-type means are comparable across regions. Different library-size adjustments, transformations, or reference scales can produce apparent differences that are not biological changes in per-cell expression.
- Mixture reconstruction. Calculate \(\sum_k p_{sk}\mu_{sk}\) for each region and compare it with the chosen exposure-adjusted spot-level quantity. A large discrepancy signals that the mixture inputs do not represent that quantity well.
- Reference and classification checks. Misclassified cells, omitted cell types, or cell states that vary across regions can shift both estimated proportions and estimated means. Treating a heterogeneous type as uniform can make a within-type change look like composition, or the reverse.
- Uncertainty checks. Estimated proportions and cell-type means are not known exactly. The arithmetic decomposition is exact conditional on those estimates, but that does not make the component estimates precise. When inputs are uncertain, report that uncertainty rather than treating the decomposition as fixed truth.
A composition component is a standardized descriptive contrast: it quantifies how the mixture mean changes with the observed proportions under the specified cell-type means. The expression component similarly summarizes changes in the observed type-specific means under averaged proportions. Neither is automatically a causal effect. Spatially patterned unmeasured factors, tissue processing, cell-state shifts, and errors in deconvolution can affect the inputs. Also, a small total difference can conceal large opposing components; reporting only \(\Delta q\) can miss that cancellation.
How This Differs From Other Summaries
A raw spot-level comparison describes the net difference in the measured spot quantity, but by itself does not explain whether it arises from composition or cell-type-specific expression. Comparing estimated means within each cell type can reveal expression contrasts, but alone it does not quantify how the changing proportions contribute to the spot-level difference. Standardization brings both pieces onto the same mixture scale and makes their contributions add to the observed contrast.
A composition-only counterfactual can be useful: hold all cell-type means fixed at a chosen reference and recalculate the mixture using the other region’s proportions. Its answer depends on the selected reference. The symmetric decomposition instead averages over both regions, though it still relies on valid proportions and means. These are descriptive alternatives, not substitutes for a design that supports causal interpretation or for an analysis that accounts for uncertainty and count variability.
Spatial smoothness or clustering in spot-level abundance does not, by itself, identify which mechanism is responsible. A spatial pattern may track tissue architecture and hence changing composition, within-type expression, or both. The mixture calculation clarifies the possible sources of a pattern; it does not replace checking whether the inputs and comparison are suitable.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- Two cell types have fixed means of 3 and 9 units per cell. Region \(A\) has proportions \((0.60,0.40)\); region \(B\) has \((0.40,0.60)\). Calculate both mixture means and identify the source of the difference.
- If proportions are identical across regions but one cell-type mean changes, which symmetric component is zero? Explain.
- Why can two nonzero components be present even when the net mixture difference is zero?
- A set of estimated cell-type proportions sums to 1.18. What should be checked before interpreting a decomposition based on them?
Solutions. (1) \(q_A=0.60(3)+0.40(9)=1.80+3.60=5.40\) units per cell; \(q_B=0.40(3)+0.60(9)=1.20+5.40=6.60\) units per cell. The difference is \(1.20\) units per cell and is due to composition because the means are fixed. (2) The composition component is zero because every proportion change is zero; any mixture difference comes from within-type expression changes. (3) The components may have opposite signs and cancel: \(C+E=0\) is possible even when \(C\neq0\) and \(E\neq0\). (4) Check the proportion estimation, normalization, and cell-type definitions; determine whether the discrepancy is only rounding or reflects a substantive constraint violation. Do not interpret the decomposition as if the proportions were valid until resolved.