Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Shared-State Assumptions for Batch Alignment

Integration Methods and Their Benchmarking · Tutorial 156 of 700

Shared-State Assumptions for Batch Alignment

Learn why alignment requires biologically comparable states across batches, and how to recognize when limited overlap makes a correction unreliable or non-identifiable.

Advanced 10 min read

What You'll Learn

  • Define shared-state and overlap assumptions for cross-batch alignment.
  • Derive how shared states can distinguish a batch shift from biological variation.
  • Diagnose the risks of unequal cell-state composition and absent populations.
  • Explain why condition-specific states can be mistaken for batch effects.
  • Compare aligning shared states with restricting analysis to common support or preserving batch differences.

Why Alignment Needs Shared Biological States

An integration method is asked to make measurements from different batches comparable while retaining meaningful biological variation. That goal is not automatically achievable: if a cell state occurs in only one batch, its observed difference from cells in another batch may reflect biology, batch, or both. Alignment therefore depends on an assumption about which biological states can be compared across batches.

Here, a cell state means a biologically relevant profile or position in a chosen feature space; it need not be a discrete cell type. A batch is a group of cells processed under a particular technical setting. The integration target specifies which biological distinctions should be retained and which technical differences should be adjusted. The key question for this tutorial is whether the batches contain enough genuinely shared biological states to support that adjustment.

Definition: The shared-state assumption is that a biological state represented in more than one batch has the same underlying biological meaning and profile across those batches, apart from technical effects and sampling noise. The overlap assumption is that the batches being aligned contain a sufficiently informative set of such shared states to estimate or support the intended alignment. Overlap need not mean that every state occurs in every batch.

These are substantive assumptions, not consequences of running an integration algorithm. “Shared” does not mean merely close in an uncorrected embedding: technical shifts can separate the same state, and biological differences can put distinct states near one another. Evidence for shared states should come from study design and biological knowledge as well as measured data.

A Model That Shows the Identification Problem

A simple model makes the issue precise. Let \(Y_{ib}\) be the observed representation of cell \(i\) in batch \(b\), let \(Z_{ib}\) be its underlying biological profile, and let \(\delta_b\) be an additive batch effect. In one feature, write

$$ Y_{ib}=Z_{ib}+\delta_b+\varepsilon_{ib}, $$

where \(\varepsilon_{ib}\) is measurement noise with mean zero conditional on the biological state and batch. For a vector of features, the same expression applies componentwise. This is a simplifying model: real technical effects can be gene-specific or nonlinear, and a single additive shift may not describe them. The model is useful because it exposes the information alignment needs.

If the same biological state \(s\) occurs in two batches, and its underlying profile is stable across batches, then comparing cells representing \(s\) can cancel the biological component. Under the additive model, the expected difference is

$$ E(Y\mid s,b=2)-E(Y\mid s,b=1) =(Z_s+\delta_2)-(Z_s+\delta_1) =\delta_2-\delta_1. $$

The comparison estimates a batch contrast, subject to sampling and measurement variability. If there is no shared state, the corresponding difference instead contains both biological and technical differences. Without further information, those components cannot generally be separated.

Justification: Shared states provide a common biological reference. For each shared state \(s\), the state-specific batch contrast removes \(Z_s\) under the model. If batch effects are represented by a common additive shift, several shared states can provide repeated estimates of that contrast. If biological profiles vary across batches even within the purportedly shared state, or if the batch effect is not adequately represented by the model, this cancellation need not hold.

“Enough overlap” is therefore about information, not just a nonzero count of shared cells. The overlap must cover the states and feature directions relevant to the intended alignment, with enough observations to distinguish a technical pattern from noise. A few cells from one common state may not support a correction across a broad, heterogeneous population.

Worked Example: Estimating a Shift From Shared States

Suppose a one-dimensional feature is measured for two biologically shared states in two hypothetical batches. The observed state averages are:

Shared stateBatch 1 averageBatch 2 averageBatch 2 minus Batch 1
A275
B8135

Assume the additive model, equal biological profiles for each shared state across batches, and negligible noise in these illustrative averages. The state-specific contrasts are \(7-2=5\) and \(13-8=5\). Their average is

$$ \widehat{\delta_2-\delta_1} =\frac{(7-2)+(13-8)}{2} =\frac{5+5}{2} =5. $$

The repeated contrast is consistent with a five-unit batch shift for these states. Subtracting 5 from Batch 2 would align the two displayed state averages: \(7-5=2\) and \(13-5=8\). This calculation supports that correction only if A and B really are comparable states and the shift is appropriate for the intended feature space. It does not establish those assumptions by itself.

Unequal Composition Is Not the Same as a Batch Effect

Batches often differ in which populations they contain and in the proportions of shared populations they contain. These differences can change batch-wide averages even when the shared states have the same technical shift. A global mean comparison may then combine composition differences with batch effects.

Worked Example: A Batch-Specific Population Distorts the Global Mean

Consider a hypothetical scalar feature. Batch A contains three cells with biological values \(0,2,10\). The state at 10 occurs only in Batch A. Batch B contains the two shared states with biological values \(0,2\), and every Batch B observation has a technical shift of \(+5\), giving observed values \(5,7\). Batch A has no shift, so its observed values are \(0,2,10\).

The global observed means are

$$ \bar{Y}_A=\frac{0+2+10}{3}=4,\qquad \bar{Y}_B=\frac{5+7}{2}=6. $$

Their difference is \(6-4=2\), not the true five-unit shift. The discrepancy arises because the mean for Batch A includes a state absent from Batch B. By contrast, using only the known shared states gives contrasts \(5-0=5\) and \(7-2=5\), recovering the shift under the stated assumptions.

The state with value 10 has no counterpart in Batch B. The calculation supplies no basis for deciding where it should be placed by alignment. Forcing it toward a Batch B population could erase a real biological distinction. The example also shows why unequal composition can invalidate a correction based on overall distributions, even when some valid shared states are present.

The overlap needed depends on the intended target. If the aim is to compare only states represented in every relevant batch, analysis may be restricted to that common support. If the aim includes batch-specific populations, their biology must be preserved rather than treated as a technical mismatch merely because they lack a counterpart.

Condition-Specific States and Non-Identifiability

A particularly difficult case occurs when batch and biological condition are linked. A state may appear in one condition but not another, or its profile may genuinely change with condition. If each condition is observed in only one batch, there may be no data-based way to tell a condition effect from a batch effect. This is an identification problem, not simply a weakness that can be fixed by choosing a more flexible alignment algorithm.

Worked Example: Two Explanations for the Same Observations

Suppose a hypothetical feature is observed as \(Y_1=0\) for one cell in Batch 1 and \(Y_2=10\) for one cell in Batch 2. Batch 1 contains condition A and Batch 2 contains condition B. Under \(Y=Z+\delta\), one explanation is that both cells share a biological state with \(Z=5\), while the batch effects are \(\delta_1=-5\) and \(\delta_2=5\). The observations are \(5-5=0\) and \(5+5=10\).

A different explanation is that the states are condition-specific: \(Z_1=0\) and \(Z_2=15\), with \(\delta_1=0\) and \(\delta_2=-5\). This also gives \(Y_1=0+0=0\) and \(Y_2=15-5=10\). Both decompositions exactly reproduce the observations.

The observed values alone cannot choose between a shared state with a batch shift and distinct biological states with another batch shift. An alignment that assumes the first explanation may remove genuine condition-associated signal; an analysis that assumes the second may attribute technical variation to biology. Additional design information, such as observing both conditions in both batches, or defensible biological constraints, is needed to distinguish these explanations.

A state’s presence in only one condition does not prove that it is condition-specific: it could be missed through sampling or low abundance. Conversely, a similar label or a nearby location in a representation does not prove that two states are biologically equivalent. Treat uncertainty about state identity and prevalence as part of the analysis rather than silently resolving it through alignment.

Diagnostics, Alternatives, and Limits

Before alignment, assess whether the proposed shared states are plausible and whether the study design permits separating batch from biology. Useful checks include:

  • Tabulate which batches and conditions contain each broadly defined population or state, and inspect whether apparent absences could be explained by small sample sizes.
  • Compare state-specific profiles or established biological markers across batches, rather than relying only on a corrected visualization.
  • Check whether batch and condition are crossed in the design. If a condition occurs in only one batch, condition and batch effects may be inseparable.
  • Examine whether conclusions change when alignment is restricted to plausible shared states or when questionable populations are excluded from the alignment fit.
  • Look for implausible collapses: biologically distinct states becoming indistinguishable, or a batch-associated separation persisting within well-supported shared states.

These diagnostics are evidence, not proofs. A representation can make distinct states appear close, and a successful-looking batch mixing pattern can result from removing biological variation. Likewise, residual batch separation does not by itself establish failure if states, conditions, or technical effects differ. Interpret diagnostics in the context of the target and design.

ApproachWhen it is usefulMain caution
Align using well-supported shared statesComparable states occur across batches and the intended correction is supported by those comparisons.Incorrect state equivalence can erase biology; support may not extend to unique populations.
Restrict to common supportThe scientific comparison can be limited to populations represented across the batches being compared.Results do not describe populations excluded from the common support.
Model batch and condition separatelyThe design contains enough overlap across batches and conditions to estimate their contributions.When batch and condition are confounded, the separate effects are not identified by the data alone.
Preserve unaligned data or report batch-specific populationsThere is too little evidence for safe alignment, or unique states are scientifically important.Technical differences remain and may limit direct cross-batch comparisons.

Pair- or anchor-based alignment procedures also depend on credible cross-batch correspondences; the existence of a computational match does not establish biological equivalence. The specific construction and evaluation of such correspondences are separate methodological questions. The general limitation remains: no alignment can recover information that the design does not identify or guarantee preservation of a state that the target assumption incorrectly labels as technical.

Common mistake: “The batches have different overall means, so shifting one batch until the means match will remove batch effects.” This reasoning ignores differences in population composition and condition. A global difference can combine technical shift and real biology, as the numerical example showed. First identify plausible shared states and assess design overlap; if the distinction is not identified, report that limitation rather than treating a corrected embedding as proof.
1
Define what must be preserved.
Specify which conditions, populations, and state differences belong to the integration target.
2
Assess support across batches.
Determine which plausible states occur across the batches, and whether the overlap is informative for the intended correction.
3
Check identifiability and sensitivity.
Ask whether batch is separable from condition and whether conclusions depend on uncertain state matches.
4
Choose a defensible analysis scope.
Align supported shared states, restrict to common support, model effects where identifiable, or preserve and report unresolved differences.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. Under the additive model, why can comparing the same shared state across two batches inform a batch contrast?
  2. Batch A contains shared states with values 1 and 4 plus a unique state with value 10. Batch B contains the shared states with a technical shift of \(+3\), giving values 4 and 7. Why might comparing batch-wide means misstate the shift?
  3. Two conditions are each observed in only one batch. Can the observed difference alone identify separate condition and batch effects?
  4. What is one defensible response when a biologically important population occurs in only one batch?

Solutions. (1) For the same state \(s\), the expected difference is \((Z_s+\delta_2)-(Z_s+\delta_1)=\delta_2-\delta_1\); the shared biological profile cancels under the model. (2) The unique state changes Batch A’s mean but has no counterpart in Batch B, so the global mean difference combines composition and technical effects. The shared-state contrasts are \(4-1=3\) and \(7-4=3\), but that estimate applies to those shared states under the assumptions. (3) No. With condition and batch perfectly linked, distinct biological and technical explanations can yield the same observations; additional design overlap or justified external information is needed. (4) Do not force it to match an unrelated population. Preserve and report it as batch-specific, or restrict the comparison to common support if that matches the scientific target, while acknowledging the resulting limitation.

Clinical Biostats