Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Choosing Between MNNs and Anchors

Integration Methods and Their Benchmarking · Tutorial 177 of 700

Choosing Between MNNs and Anchors

Learn how MNNs and anchors identify shared cells and estimate correction, and how overlap, reference choice, and biological confounding guide the method choice.

Advanced 12 min read

What You'll Learn

  • Distinguish reciprocal nearest-neighbor pairs from scored anchor correspondences
  • Compare the assumptions each method needs for a match to represent shared biology
  • Interpret local correction vectors in a reduced representation
  • Assess reference dependence in pairwise and reference-based workflows
  • Diagnose false matches, missing shared states, and overcorrection
  • Choose a defensible method—or decline integration—for concrete study designs

Why the Choice Is About More Than the Matching Algorithm

MNN correction and anchor-based integration both use correspondences between cells to estimate how datasets differ. Neither can determine from expression data alone whether a difference is technical or biological. Their usefulness therefore depends on the study design: which cell states are genuinely shared, which batches contain them, and whether the representation used for matching keeps those states distinguishable.

The central practical question is not simply which method finds more matches. It is whether its matches provide credible evidence about the technical displacement to be corrected. MNNs define matches by mutual nearest-neighbor relationships between batches. Anchor-based methods identify and assess cell correspondences in a shared representation, then use weighted anchor information to correct cells. Both can fail if biological differences are mistaken for batch effects, but their matching and reference strategies make some failure modes more likely than others.

Definition: An MNN pair consists of one cell from each of two batches such that each is among the other cell’s nearest neighbors in the chosen representation. An anchor is a cell correspondence between datasets identified in a shared representation and retained as evidence for alignment. A correction vector is a displacement estimated from such correspondences; it describes how a cell or local region would be shifted in the representation, not a directly observed biological quantity.

What Each Method Assumes and Does

Both methods need cells in different batches that represent the same or sufficiently similar biological states. They also need a representation in which genuine shared states can be matched without systematically pairing biologically different cells. If a state occurs in only one batch, there is no direct cross-batch correspondence for that state. If a biological condition is present in just one batch, its effect may be indistinguishable from a batch effect without additional design information.

For MNN correction, reciprocal proximity is the evidence for a match. For a matched pair, the displacement from one cell to its partner estimates the local difference between batches. Nearby MNN pairs can be combined to estimate a correction for a cell. This is most credible when matched cells really share a state and the batch displacement varies smoothly enough that nearby matches inform the cell being corrected. It can be unreliable when a batch shift changes nearest-neighbor identities, when overlap is sparse, or when biologically distinct cells become mutual neighbors.

Anchor-based methods first find correspondences in a shared latent space; anchor filtering and scoring assess their consistency and reliability. A cell’s correction is then built from weighted anchor displacements, with nearby or more reliable anchors contributing more. This can accommodate a local correction that is informed by several correspondences rather than a single nearest pair. It still depends on the shared representation and the validity of the retained anchors. A high anchor score does not establish that two cells are biologically equivalent if the design or representation has confounded biology with batch.

The two methods are related in their correction logic: each uses cross-batch displacements to estimate a shift. They are not identical. Reciprocal nearest-neighbor status is the defining matching rule for MNNs; anchor-based integration uses a broader correspondence and reliability framework. An anchor workflow may be explicitly reference-based, mapping query cells to a chosen reference. MNN matches are pairwise, but a multi-batch MNN analysis can still depend on the order and reference choices used to combine batches. Neither method is universally reference-free or universally reference-dependent; the workflow determines that aspect.

Local Correction as a Weighted Displacement

Let a query cell have coordinates \(q\) in a reduced representation and let its matched reference cells have coordinates \(r_j\). Define the displacement from the query toward matched reference cell \(j\) as \(d_j=r_j-q_j\), where \(q_j\) denotes the query-side cell in correspondence \(j\). A local correction can be written as a weighted average of these displacements:

$$ \hat{d}=\sum_{j=1}^{m} w_j d_j,\qquad \sum_{j=1}^{m}w_j=1,\qquad w_j\geq 0. $$

The corrected coordinate is the original query coordinate plus the estimated displacement. The weights may reflect local proximity and, in anchor workflows, anchor reliability. In an MNN illustration, the contributing displacements come from relevant reciprocal pairs; in an anchor illustration, they come from relevant anchors. These equations summarize the local correction idea, not every implementation detail of either method.

A simple justification shows why averaging is natural when the local displacements are noisy measurements of one shared shift. Suppose each observed displacement is \(d_j=\delta+\varepsilon_j\), where \(\delta\) is the local shift and the errors have mean zero. For fixed nonnegative weights summing to one, \(\hat{d}\) is unbiased for \(\delta\), because

$$ E(\hat{d})=\sum_{j=1}^{m}w_j E(d_j) =\sum_{j=1}^{m}w_j\delta=\delta. $$

This argument depends on the correspondences being valid and the local shift being sufficiently similar across them. If different biological states are mixed together, the average can be precise yet wrong: it estimates the average displacement of the incorrect matches. Weighting cannot repair a lack of genuine shared biology.

Worked Example: A Consistent Local MNN Shift

Suppose three hypothetical MNN pairs connect cells from a query batch to cells from a reference batch. In a two-dimensional representation, their query-to-reference displacement vectors are \((2,0)\), \((2,1)\), and \((1,0)\). Assume the pairs are plausible matches from the same local state and use equal weights.

The estimated local displacement is

$$ \hat{d}=\frac{1}{3}\{(2,0)+(2,1)+(1,0)\} =\left(\frac{5}{3},\frac{1}{3}\right) \approx(1.667,0.333). $$

A query cell at \((7,4)\), within the region informed by these pairs, would receive the illustrative corrected coordinate

$$ (7,4)+\left(\frac{5}{3},\frac{1}{3}\right) =\left(\frac{26}{3},\frac{13}{3}\right) \approx(8.667,4.333). $$

The arithmetic describes a shift in representation units, not a change in gene expression measured in counts. The calculation is defensible only if the three reciprocal pairs represent the same local biology and the query cell is close enough for their displacements to be relevant. A large spread among the vectors, or evidence that the pairs join different states, would undermine the estimate.

Worked Example: Unequally Weighted Anchor Displacements

Consider a hypothetical query cell with three nearby anchors to a reference. Their query-to-reference displacements are \((1,0)\), \((1,2)\), and \((4,0)\). Suppose their normalized reliability and locality weights are \(0.5\), \(0.3\), and \(0.2\), respectively. The weights are nonnegative and sum to one.

The weighted displacement is

$$ \hat{d}=0.5(1,0)+0.3(1,2)+0.2(4,0) =(0.5+0.3+0.8,\ 0+0.6+0) =(1.6,0.6). $$

If the query coordinate is \((6,5)\), its illustrative corrected coordinate is \((6,5)+(1.6,0.6)=(7.6,5.6)\). The third anchor’s large first-coordinate displacement has limited influence because it receives the smaller weight. This is useful only if the weighting reflects genuine local reliability. If that anchor actually represents a distinct condition-specific state, downweighting it may reduce damage, but the weighted average still does not prove the other anchors are valid.

Reference Dependence and Study Design

A reference is valuable when it provides broad, well-characterized coverage of the states that query datasets are expected to share. Reference-based anchor mapping makes this choice explicit: query cells are related to the reference, so reference coverage and representation affect which correspondences are available. A query state absent from the reference cannot acquire a direct anchor to its true counterpart there. It may remain unmatched or be assigned misleadingly to a nearby reference state, depending on the workflow and data.

MNN analysis is often built from pairwise batch comparisons. Reciprocal matching itself is defined between a pair of datasets, but integrating many batches requires choices about how pairwise evidence is combined. A weakly overlapping batch can be difficult to align through a chain of other batches, and an early error can influence later alignments. Thus, choosing a reference is not exclusively an anchor concern. The difference is that reference-based mapping typically specifies a target dataset for query mapping, whereas MNN reference dependence can arise through the multi-batch integration strategy.

In either approach, reference selection should be based on biological coverage, data quality, and the intended target of alignment, not simply on which dataset has the most cells. If all batches have substantial overlap and comparable quality, pairwise or multi-batch strategies may be reasonable. If a high-quality reference covers the expected shared states and future queries should be mapped to it, reference-based anchors may offer a clearer operational choice. If the biological states are not shared, choosing a different reference cannot create the missing overlap.

Worked Example: Choosing a Reference Under Unequal Coverage

Suppose three hypothetical batches contain annotated broad states. A candidate reference R has 8 of 10 states also represented in each of two query batches. Candidate reference S has 6 of 10 states shared with the first query and 9 of 10 shared with the second. These counts are a design summary, not evidence that every state is equally abundant or equally matchable.

For R, the state-level overlap fractions are \(8/10=0.80\) for each query. For S, they are \(6/10=0.60\) and \(9/10=0.90\). If the intended task is to map both queries to one common reference and the states are comparably important, R offers more even coverage. If the second query is the primary target and the six states missing from the first query are not relevant to the analysis, S could instead be preferable for that narrower task.

These fractions do not settle the choice. State labels may be coarse, rare states may be absent despite broad labels, and overlap in cell numbers may be highly uneven. Before using either reference, inspect match quality and state-specific coverage. The example illustrates a design principle: select a reference for the target biological comparisons, then verify that the required correspondences actually exist.

How to Choose, Diagnose, and Avoid Overcorrection

Study conditionMNNs may be preferable when...Anchors may be preferable when...Shared caution
Strong overlap across batchesReciprocal neighbors are stable and local shifts are coherent.Several reliable correspondences can inform weighted local correction.Check that matched cells represent the same biology.
Unequal cell numbers or a designated mapping targetPairwise matching is credible and multi-batch order is checked.A well-chosen reference supports the intended query-to-reference task.Cell abundance alone does not establish coverage.
Rare or weakly represented statesEnough true reciprocal matches exist to estimate a local shift.There is sufficient anchor coverage and reliable local support.Sparse matches can be unstable; avoid extrapolating confidently.
Condition-specific states confounded with batchNeither method can identify a technical shift from the confounded data alone.Neither method can create valid anchors to an absent counterpart.Do not force alignment of biology that may be unique.

A practical decision should be followed by diagnostics. For MNNs, examine whether reciprocal matches are numerous enough, concentrated in plausible shared states, and locally consistent in their displacement directions. For anchors, inspect coverage by cell state, the distribution and reliability of retained anchors, and whether correction is supported across the query rather than only in a few regions. For both, compare pre- and post-correction structure and check whether known biological distinctions remain interpretable.

Warning signs include abrupt changes in displacement across neighboring cells, matches crossing known state boundaries, large unmatched regions, and apparent disappearance of a condition-associated population after correction. These are not merely cosmetic problems in a visualization. They can indicate that the estimated correction is extrapolated, confounded, or removing biological structure. A method’s score or a visually mixed embedding cannot by itself establish that the integration is valid.

When the assumptions are weak, reasonable alternatives include analyzing batches separately, restricting alignment to well-supported shared states, or reporting unmatched states without forcing them into a reference. These choices may be preferable to a single integrated representation that obscures the uncertainty. Integration is a modeling decision about which differences to treat as technical; it is not a guarantee that all batch-associated variation should be removed.

Common Mistake

Common mistake: “The anchor workflow has more matches, or the MNN plot looks well mixed, so that method must have removed batch effects correctly.” A larger number of matches or greater mixing does not establish that the pairs represent shared biology. If batch and condition are confounded, an algorithm can align their differences and erase a real condition-specific signal. The correction is to assess correspondence validity and biological preservation, use design knowledge, and leave unsupported states unaligned rather than treating visual mixing as proof.
Key takeaway: Choose between MNNs and anchors by the credibility and coverage of their correspondences, the local behavior of their correction vectors, and the reference structure required by the study. If shared biology cannot be supported, neither method is a defensible substitute for that missing evidence.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. In a two-dimensional representation, two credible local MNN displacements are \((2,1)\) and \((4,1)\). With equal weights, what is the estimated shift?
  2. Why does a high anchor score not prove that a condition-specific query state has a true counterpart in the reference?
  3. A study has one reference with broad coverage of the intended shared states and several query batches to map to it. Which approach may be operationally convenient, and what must still be checked?
  4. What does it suggest if neighboring cells receive correction vectors pointing in sharply different directions?

Solutions. (1) The mean displacement is \(\{(2,1)+(4,1)\}/2=(3,1)\). (2) A score assesses correspondence evidence under the chosen representation and workflow; it cannot create a biological counterpart for a state absent from the reference or resolve condition–batch confounding. (3) Reference-based anchor mapping may be convenient because the target is explicit. Check state-specific anchor coverage, match reliability, and preservation of biological distinctions. (4) The local-shift assumption may be failing, the matches may be unreliable, or the region may contain distinct states; inspect correspondence identities and avoid assuming one smooth correction is valid there.

Clinical Biostats