CellDF: Quality-controlled cell matching for whole-slide HE-IHC label transfer
A laboratory that stains immunohistochemistry (IHC) on a section adjacent to a hematoxylin and eosin (HE) section already holds the material to supervise HE models on its own cases. It goes unused because adjacent sections sample non-identical cells, and residual registration error prevents assigning IHC labels to individual HE cells. We present CellDF (Cell Displacement Field), which turns registered serial-section data into pairs of HE cells and the protein-expression labels measured on the adjacent section. CellDF estimates a locally adaptive residual displacement field through iterated kernel regression over each HE cell's K nearest IHC candidates; a sparse-kernel variant keeps it tractable at whole-slide cell counts, where pairwise matchers are not. The within-tile distribution of these displacements yields two ground-truth-free statistics, the directional scatter {sigma}{theta} and the between-tile angular deviation |{Delta}{theta}|, that localize matching quality more finely than landmark-based target registration error and drive a two-stage filter that withholds labels where matching is unreliable. On 54 same-section HyReCo pairs, {sigma}{theta} correlates only moderately with landmark error and flags localized restaining damage that global error misses; on 30 four-marker Acrobat serial-section cases, the same statistic identifies which IHC marker, if any, lies close enough to HE for cell-level transfer. As a proof of concept, transferred labels trained a cell classifier on HE embeddings that generalized to held-out cells within the sample (F1 0.85, AUROC 0.88). A laboratory can thereby generate cell-level protein-expression labels from its own sections and tune HE-only models on them, with each label set's reliability read from the data.