Separating Where a Cell Sits From Where It Came From

Many immune cells that live permanently inside adult organs, such as tissue macrophages and mast cells, have a disputed ancestry. Some may descend from progenitors made in the embryonic yolk sac before blood stem cells exist. Others may be replaced over life by cells arriving from the bone marrow. Histology has catalogued such cells for decades without settling the question. One example is the fortyfold, androgen-reversible sex difference in hamster Harderian gland mast cells McGadey et al.. Another is the histamine-laden "summer cells" of the frog adrenal Kawamura. Human developmental single-cell atlases now describe the candidate ancestors in detail. They include a yolk-sac route to macrophages that seeds embryonic tissues Goh et al. and fetal-liver stages of blood and support-cell development Wesley et al.. What is missing is a reliable way to ask, for an individual adult cell in a tissue section, which of these ancestries it carries.

The obvious approach is to compare each adult cell's RNA profile to the fetal atlas and take the nearest match. This fails for a specific reason. Adult resident cells take on much of their expression program from their surroundings, so two macrophages of different ancestry sitting in the same niche can look alike, and similarity to a fetal state mostly reflects the niche. We propose to learn, from single-cell spatial transcriptomics paired with the matched stained tissue image, the part of each cell's expression that its surroundings explain. We then treat the remainder as the candidate carrier of ancestry and compare only that remainder to developmental trajectories. We validate on tissues where ancestry is known independently of expression.

Core Claim

A cell's ancestry signal can be separated from the program its surroundings impose, provided three conditions hold. First, the surroundings are measured explicitly: the stained-image features around the cell and the composition of its neighbors. Second, the model is trained across several organs, so niche programs differ between organs while any ancestry signal stays shared. Third, the ancestry axis is anchored to developmental endpoints taken from fetal atlases. The test is concrete. The method should distinguish cells of known different origin that sit in the same kind of neighborhood, and neighborhood-blind atlas matching should not.

Research Program

The data unit is a single-cell spatial transcriptomics section with its H&E stain. H&E, hematoxylin and eosin, is the routine pink-and-purple tissue stain. Each segmented cell $i$ of a chosen lineage, such as macrophages, in organ $t$ has expression $x_i$ over a targeted gene panel. We model its latent state as

$$z_i = h_t(n_i) + a_i + \epsilon_i,$$

The terms are defined as follows. $z_i$ is the cell's latent state from a count-based encoder. $n_i$ describes the niche: a pathology foundation-model embedding of the H&E patch around the cell, concatenated with the cell-type composition of its spatial neighbors. $h_t$ is an organ-specific niche model. $a_i$ is a residual constrained to lie in a low-dimensional subspace shared across all organs. $\epsilon_i$ is noise.

The organ-specific $h_t$ absorbs what each organ's surroundings do to a cell. The shared subspace for $a_i$ is the inductive bias. An ancestry signature should look similar in liver, lung, and skin, whereas a niche program should not. We add a penalty that discourages $a_i$ from being predictable from $n_i$ within each organ. This follows the logic of SpatialDIVA, which split Visium spot expression into separate latent spaces for intrinsic expression, spatial context, morphology, and batch. That work showed morphology and spatial context carry different biological signals. It did not attempt to recover ancestry, it worked at spot resolution, and it did not share a latent space across organs.

Anchoring comes from development. We take yolk-sac-route macrophages and definitive, stem-cell-derived myeloid cells from Goh et al. and fetal-liver populations from Wesley et al.. We restrict them to the panel genes, pass them through the same encoder, and fit the two ends of the ancestry axis with the niche term set to its fetal average. Because targeted panels hold only a few hundred genes, the panel itself is part of the design. We choose genes that separate the two routes in the fetal atlases and that are not among the top niche-responsive genes in adult scRNA-seq.

For the image encoder, we use the H&E-to-single-cell alignment of PAST, a CLIP-style model trained on 20 million paired Xenium cells and H&E patches across 15 cancers. We take it as a starting point and compare it with UNI features.

Bulk RNA-seq has a secondary but concrete role. Comparative bulk studies cannot tell a per-cell change from a change in which cells are present. Once the model yields per-lineage ancestry signatures, we deconvolve public bulk disease-versus-control cohorts. This asks whether an apparent change in macrophage genes reflects a shift in the ancestry mix.

Validation Data With Known Origin

Validation data is the crux of the proposal, and the file provides no human benchmark for it. We therefore use two sources where ancestry is known without looking at expression.

The first is human tissue from sex-mismatched bone marrow transplant recipients, for example a female recipient of a male graft. Y-chromosome transcripts and XIST in the panel mark donor cells. Donor-genotype macrophages are marrow-derived by construction. Host-genotype cells are a mixture of embryonic-derived residents and marrow cells made before the transplant, so this ground truth is one-sided. We therefore report how well the method ranks donor cells toward the definitive end of the axis, not accuracy on host cells.

The second is mouse tissue from standard embryonic fate-mapping reporters profiled on Xenium with H&E. Labelled cells give a positive set for yolk-sac ancestry, and species differences in yolk-sac hematopoiesis Goh et al. caution against transferring numbers across species. HEST-1k HEST-1k and PAST-20M supply unlabelled multi-organ sections for pretraining the niche model. Neither has ancestry labels.

Baselines

The naive reference is neighborhood-blind atlas matching. We train a classifier on fetal yolk-sac-route versus definitive-route myeloid cells from Goh et al., restricted to panel genes, and apply it to adult cells. It uses the same panel, encoder, and anchor cells as our method but has no niche term. If our method cannot beat this on donor-versus-host ranking, the niche correction adds nothing.

The strongest existing alternative for mapping cells to references is optimal-transport projection in the style of SpaOTsc. SpaOTsc projects dissociated cells onto spatial frames using shared genes and reports held-out spatial expression AUC of 0.95 in zebrafish and 0.88 in Drosophila, a mapping task, not an origin task. We run it with the fetal atlas as the source and adult cells as the target, reading ancestry from transport mass. We also run a SpatialDIVA-style disentanglement with its intrinsic latent used in place of our shared residual. This is the closest method in spirit.

For the image-only route we use PAST embeddings with a linear ancestry head. On expression prediction, PAST reports a mean single-cell Pearson $r = 0.619$ against 0.536 for UNI and 0.520 for CONCH PAST. For predicting cell ancestry from H&E or spatial data, no reported result was found on Lacuna for any method.

All methods get the same sections, the same segmentation, the same panel, and the same hyperparameter search budget, tuned on the mouse data. The human transplant tissue is held out entirely. Ablations remove, in turn, the niche term, the cross-organ sharing (one model per organ), the image features (neighbor composition only), and the neighbor features (image only). Beating the baselines means higher AUROC for donor-versus-host and reporter-positive-versus-negative in the niche-matched evaluation described below, with confidence intervals from resampling patients.

Why not just…?

Why not just match adult cells to the fetal atlas by expression? This is the most serious competitor, and it is the naive baseline. If ancestry marks survive niche adaptation strongly enough, it will perform as well as our method. The niche-matched evaluation settles this. If atlas matching separates donor from host cells equally well within matched neighborhoods, we will report that the niche correction is unnecessary.

Why not just predict origin directly from H&E with a pathology foundation model? Image-only models lose single-cell expression information relative to paired models: UNI reaches 0.536 against PAST's 0.619 on expression prediction PAST. More importantly, what an image shows is mostly the niche. We include an image-only head as a baseline. If it matches our method on niche-matched pairs, that would itself be a finding: morphology carries ancestry.

Why not just run trajectory inference or RNA velocity from fetal to adult cells? Pseudotime has no built-in direction, and velocity depends on splicing counts that targeted spatial panels do not capture CellRank. Methods using lineage barcodes, such as TreeVAE, need CRISPR barcoding that cannot be applied to human tissue. STORIES needs dense time-series spatial atlases that do not exist across human life. None of these can be run fairly on our validation data, so we argue against them rather than benchmark them.

Why not just deconvolve bulk RNA-seq with a developmental reference? Reference deconvolution degrades in intermingled tissues A comprehensive comparison on cell type composition inference for spatial transcriptomics data. It also inherits the same confound as atlas matching. We use bulk data only after the ancestry signatures have been validated.

Proposed Experiments

The decisive experiment is niche-matched discrimination on human transplant tissue. We pair donor-genotype and host-genotype macrophages whose niche descriptors $n_i$ are nearest neighbors. We then ask each method to rank the donor cell toward the definitive end of the axis, which removes any advantage from recognizing locations. We report AUROC overall and within matched pairs. The mouse reporter tissue repeats this with yolk-sac-labelled cells as the positive set. A second check tests whether the organ-sharing assumption holds: we train on some organs and test on a held-out organ. If the shared residual is really ancestry, it should transfer, and a per-organ model should not. A third check tests whether the residual is actually being read. We permute $a_i$ within matched niches and confirm that discrimination collapses.

Only if these hold do we apply the model to the open questions. We ask whether adult human TREM2-positive, microglia-like cells outside the brain sit at the yolk-sac end of the axis, given that Goh et al. found such a subset in the yolk sac. We also ask whether bulk disease cohorts show ancestry-mix shifts behind their reported macrophage gene changes.

The main failure mode is that ancestry leaves no cell-intrinsic trace once niche is accounted for. That outcome would be measurable and informative: it would indicate that, for the lineages tested, adult resident identity is set by niche rather than retained from ancestry.