Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Defining the Integration Target

Integration Methods and Their Benchmarking · Tutorial 155 of 700

Defining the Integration Target

Learn to specify which differences integration should remove, which it should preserve, and how to check whether the chosen target is supported by the data.

Advanced 12 min read

What You'll Learn

  • Define integration targets in terms of both batch alignment and preservation of chosen biological differences
  • Distinguish conditional batch shifts from differences caused by cell-state composition
  • Specify which cell states, conditions, and features an integration is intended to preserve
  • Identify how global centering can erase biology or create artificial separation
  • Choose diagnostics that assess alignment without treating indiscriminate mixing as success
  • Recognize when confounding or missing state overlap limits what integration can accomplish

Integration Begins With a Target

Integrating single-cell RNA sequencing data is not simply a matter of making batches look alike. A useful integration should reduce technical differences between measurements of comparable cells while retaining biological differences that matter for the scientific question. Those goals can conflict: a transformation that makes all cells indistinguishable across batches may also erase cell states, condition effects, or rare populations.

The integration target is the explicit statement of what should become comparable and what must remain distinguishable. It is defined before selecting or evaluating an integration method. In particular, it identifies the technical variation to reduce, the biological distinctions to preserve, the resolution at which cells are considered comparable, and the representation in which success will be judged.

Definition: An integration target specifies (1) which technical differences across batches should be reduced, conditional on relevant biological features, and (2) which biological differences across cells should be retained in the integrated representation. It also specifies the cells, features, and representation to which those aims apply. Integration is not defined as making the overall batch distributions identical.

Let \(Y_i\) denote the measured expression vector for cell \(i\), \(B_i\) its batch, \(Z_i\) its cell state, and \(C_i\) a biological condition of interest. An integration procedure produces a representation \(\tilde{Y}_i=T_{B_i}(Y_i)\), where \(T_{B_i}\) may depend on the batch and on the method's fitted quantities. The target asks whether \(\tilde{Y}\) is more comparable across batches for cells with comparable biology, while retaining specified distinctions in \(Z\), \(C\), or other biological variables. The target need not require every gene-level contrast to be preserved if the intended output is a lower-dimensional representation; it must, however, state which distinctions that output is meant to support.

A simple measurement model helps express the distinction. For a gene \(g\), write \(Y_{ig}=\theta_g(Z_i,C_i)+\gamma_g(B_i,Z_i,C_i)+\epsilon_{ig}\). Here \(\theta_g\) represents biological signal, \(\gamma_g\) represents batch-associated measurement differences, and \(\epsilon_{ig}\) represents residual variation. This is a conceptual decomposition, not a guarantee that technical effects are additive or separable. It highlights the target: reduce relevant variation in \(\gamma_g\), without treating variation in \(\theta_g\) as nuisance merely because it is associated with batch.

State the Target Conditionally

The word “conditionally” is essential. Overall batch distributions combine within-state expression and the proportions of different states in each batch. Even if measurements within every state are identical across batches, the overall distributions can differ when the state proportions differ. Conversely, overall distributions can appear similar while a biologically important state-specific difference has been obscured.

For example, a target might say: “Within each of the annotated immune-cell states represented in both batches, reduce technical differences in the selected expression representation; retain the distinction between those states and retain the treatment-associated contrast within each state.” This wording does not assert that all states are present in both batches or that the treatment effect is identifiable. It makes the intended comparison explicit so that data support and diagnostics can be assessed.

Key distinction: Alignment means reducing batch-associated differences among cells that are biologically comparable for the target. Indiscriminate mixing means making cells from different biological states or conditions overlap just because they come from different batches. Mixing is not evidence of successful alignment unless it is assessed at the relevant biological resolution.

A useful target statement names four items: the batch-associated differences to reduce; the biological labels or contrasts to retain; the population of cells and features in scope; and the output representation in which performance will be evaluated. It should also say whether the aim is visualization, clustering, transfer of labels, or another use. A representation suitable for one purpose need not preserve all information needed for another.

Worked Example: Removing a Shared Technical Shift

Hypothetical data. Suppose two batches contain cells from the same cell state and condition. Their values for one illustrative expression feature are 2 and 4 in batch A, and 7 and 9 in batch B. Assume for this toy calculation that the difference of 5 units is entirely technical and that the cells are comparable.

The batch means are \(\bar{x}_A=(2+4)/2=3\) and \(\bar{x}_B=(7+9)/2=8\). The pooled mean is \((2+4+7+9)/4=5.5\). A batch-centering rule that shifts each batch mean to 5.5 adds \(5.5-3=2.5\) to values in A and \(5.5-8=-2.5\) to values in B.

$$ A:\ (2,4)+(2.5,2.5)=(4.5,6.5), \qquad B:\ (7,9)+(-2.5,-2.5)=(4.5,6.5). $$

In this simplified case the correction removes the specified batch offset and aligns the values. The justification depends on the stated assumption: both batches measure the same state and condition, and the difference is technical. If the batch difference instead reflected a real biological contrast, the same arithmetic would remove part of the biology. The calculation illustrates a target, not a general recommendation to center every batch.

Worked Example: Preserving a Condition Contrast

Hypothetical data. Consider one feature measured in control and treated cells in both batches. Batch A has control values 2 and 4 and treated values 5 and 7. Batch B has control values 12 and 14 and treated values 15 and 17. Suppose the common difference of 10 units between batches is technical, while the treated-versus-control difference of 3 units is biological and should be retained.

In batch A, the control mean is \((2+4)/2=3\), the treated mean is \((5+7)/2=6\), and the contrast is \(6-3=3\). In batch B, the means are 13 and 16, so the contrast is also \(16-13=3\). The overall batch means are 4.5 for A and 14.5 for B; the pooled mean is 9.5.

Centering each batch to the pooled mean adds 5 to A and subtracts 5 from B. The corrected control means are \((3+5)=8\) in A and \((13-5)=8\) in B. The corrected treated means are \((6+5)=11\) in A and \((16-5)=11\) in B. Thus the batch difference is removed and the condition contrast remains \(11-8=3\) units.

Here the arithmetic matches the target because both conditions are observed in both batches and the assumed technical offset is shared across conditions. If a correction instead forced treated and control cells to have the same feature value, it would violate the target by erasing the specified biological contrast. The example does not establish that batch effects are generally shared; that requires evidence and assumptions beyond these numbers.

Why Composition Changes the Target

A difference between batch averages is not, by itself, evidence of a technical batch effect. The average can differ because batches contain different proportions of biological states. The following identity makes the issue precise. For a feature \(Y\) and discrete cell state \(Z\), the mean in batch \(b\) is a weighted average of state-specific means:

$$ E[Y\mid B=b] = \sum_z E[Y\mid Z=z,B=b]P(Z=z\mid B=b). $$

Both the state-specific means and the state proportions can vary by batch. Comparing marginal means therefore mixes these sources. The identity does not say which source is technical; it shows why a marginal batch comparison cannot determine that on its own.

Worked Example: Different State Proportions, No Within-State Shift

Hypothetical data. Suppose a feature is 0 for every state-1 cell and 10 for every state-2 cell, in both batches. Batch A has eight state-1 cells and two state-2 cells; batch B has two state-1 cells and eight state-2 cells. Assume there is no within-state batch difference.

The marginal mean in A is \((8\times0+2\times10)/10=2\). The marginal mean in B is \((2\times0+8\times10)/10=8\). The difference, \(8-2=6\), comes entirely from the proportions of the two states, not from different feature values within a state.

If a global centering procedure shifts both batch means to their pooled mean, \((2+8)/2=5\), it adds 3 to A and subtracts 3 from B. State-1 values then become 3 in A and \(-3\) in B; state-2 values become 13 in A and 7 in B. This creates batch differences within each state even though none existed initially. The error is using a marginal target when the intended target is conditional on cell state.

A Short Justification for Conditional Assessment

The previous example follows directly from the weighted-mean identity. Write \(m_{zb}=E[Y\mid Z=z,B=b]\) and \(\pi_{zb}=P(Z=z\mid B=b)\). For two batches A and B, add and subtract \(\sum_z m_{zA}\pi_{zB}\) to obtain:

$$ E[Y\mid B=A]-E[Y\mid B=B] = \sum_z (m_{zA}-m_{zB})\pi_{zA} + \sum_z m_{zB}(\pi_{zA}-\pi_{zB}). $$

The first sum reflects differences in state-specific means, weighted by A's state proportions. The second reflects differences in composition, weighted by B's state-specific means. This decomposition is an algebraic identity, not a causal attribution. If states are missing from a batch, or state labels are uncertain, even the conditional comparison may be unavailable or unreliable. The target should not claim alignment for unsupported comparisons.

Define Diagnostics Around the Target

Diagnostics should test the stated goals separately rather than collapse them into one score. For alignment, compare batches within relevant cell states and conditions, using the same feature representation that the integration target names. For preservation, check whether known or prespecified state distinctions and condition contrasts remain visible in the integrated output. Examine distributions and neighborhoods, not only average values: an equal mean can conceal different shapes, while a changed mean can reflect changes in cell composition.

  • Stratify batch comparisons. Assess batch differences within states, and within conditions when condition effects are meant to be retained.
  • Check biological contrasts. Compare relevant markers, state separations, and condition-associated differences before and after integration. A target should identify which contrasts are expected to persist.
  • Inspect composition. Report state proportions by batch separately from within-state alignment. Do not use a change in overall proportions as proof that expression has been aligned.
  • Use negative controls where appropriate. Features expected not to vary biologically for the comparison can help reveal residual technical structure, but a negative control is informative only if its biological behavior is defensible.
  • Test sensitivity. If conclusions change substantially with reasonable choices of features, state labels, or integration settings, the target may be weakly supported or the representation may be unstable.

A common diagnostic mistake is to treat low batch predictability as sufficient evidence of success. If batch labels become difficult to predict because distinct cell states have also been merged, the target may have been damaged rather than achieved. Conversely, batch labels can remain predictable because batches differ in cell-state composition, even when within-state measurements are well aligned. Evaluate predictability conditional on the relevant biology and interpret it alongside preservation checks.

Alternatives, Limitations, and Failure Modes

ApproachWhat it can offerTarget-related risk
No integrationPreserves the measured data without a correction transformation.Technical batch differences can complicate comparisons or visualization.
Global batch centeringCan remove a simple shared shift when batches are comparable in biological composition.Can remove biological differences or create false differences when composition or effects differ.
Covariate-based adjustmentMakes the adjusted variables and model assumptions explicit.Adjustment cannot recover a distinction that the design does not identify; an inappropriate model can remove biological signal.
Local alignment or anchor-based methodsCan align selected neighborhoods or cross-batch correspondences rather than imposing one global shift.Incorrect correspondences or unsupported overlap can still align unlike cells.

These are broad approaches, not guarantees. The choice depends on the declared target, study design, and intended downstream use. Integration is especially limited when batch and biological condition are confounded: the observed data may not determine which part of a difference is technical and which is biological. In such cases, no transformation alone resolves the ambiguity. The earlier material on batch-condition confounding addresses this identifiability problem; an integration target should state what cannot be established from the available design.

Other failure modes include using uncertain or overly coarse cell-state labels, aligning a rare state to a different common state, and evaluating preservation only in the same representation used to fit the correction. Integration can also distort distances, so an integrated embedding should not automatically be treated as a corrected gene-expression matrix for inference. The appropriate claim is limited to the features and representation assessed.

The central practical rule is to resist an unqualified goal such as “mix all batches.” Instead, say which cells should align with which cells, which biological contrasts should remain, and what evidence would count as success or failure. The next question—whether the data support shared biological states across batches—is a substantive assumption, not something guaranteed by defining a target.

Check Your Understanding

Answer each question by identifying the target or the source of the discrepancy. Concise solutions follow the questions.

  1. Two batches have different overall means for a gene. Why is this alone insufficient to conclude that the gene has a technical batch effect?
  2. In a study with control and treated cells in both batches, which contrast should be checked if integration is intended to remove batch shifts but preserve treatment biology?
  3. A batch classifier performs poorly after integration, but two known cell states have also merged. Is this sufficient evidence of successful integration? Explain.
  4. In a hypothetical data set, state-specific means are the same across batches, but state proportions differ. What kind of batch comparison is appropriate for assessing alignment?
  5. What limitation applies when condition and batch are completely confounded?

Solutions: (1) Overall means also depend on cell-state composition and condition composition; compare batches within relevant biological strata. (2) Check the treated-minus-control contrast within each relevant state and batch before and after integration, as well as cross-batch alignment within condition. (3) No. Poor batch predictability may result from erasing biology; assess both conditional batch alignment and preservation of the state distinction. (4) Compare measurements within each state rather than relying on marginal means, and report the state proportions separately. (5) The data may not identify whether the observed difference is technical or biological, so integration cannot resolve that ambiguity without additional information or assumptions.

Clinical Biostats