Flagging Batch Shift in Flow Cytometry using Jeffreys Divergence between Gaussian Mixtures

Jonathan Legrand, Aguirre Mimoun, Audrey Bidet, Pierre-Yves Dumas, Christ{è}le Etchegaray, Baudouin Denis de SennevillearXiv 2026

TL;DR

When clinical lab protocols or chemical reagents change, machine learning models analyzing single-cell data can fail silently while still outputting high-confidence predictions. This paper introduces a lightweight, model-agnostic "bouncer" placed upstream of a frozen classifier: by modeling patient samples as probability distributions and measuring their statistical distance from the training data, it flags shifted, unreliable samples for human review. On real-world leukemia cohorts, rejected samples had a misclassification rate 2.5 times higher than retained ones.

What Problem Does This Paper Address?

Flow cytometry is a workhorse of modern hematology, shooting lasers at thousands of individual cells per patient to measure physical and chemical markers. Machine learning is increasingly used to automate diagnoses from these cellular clouds—for instance, predicting NPM1 gene mutations in acute myeloid leukemia (AML) hours after a biopsy rather than waiting weeks for molecular sequencing.

The catch? Hospital labs are living environments. Over time, instruments drift, protocols update, and fluorescent reagents (fluorochromes) get swapped out. When this "batch shift" happens, a model trained on last year's data is suddenly looking at shifted inputs. Standard models don't know what they don't know; even their internal confidence scores degrade under distribution shift, leading to silent, confident errors. Rather than trying to force shifted data back into alignment, the authors ask: can we cheaply measure how far a new patient sample is from our training universe, and simply abstain when it’s too far?

Methods

Each patient sample is a bag of 1,000 cells described by 7 shared features (light scatter and surface markers). Instead of interrogating the classifier—here, a frozen Support Vector Machine using Fisher embeddings—the authors look purely at the input geometry.

Fig. 1. Abstention module at evaluation time, after calibration. The training set is summarised by the reference density 𝑝0, and the calibration on labelled target samples yields the threshold 𝜏. For a new sample, the score 𝑑𝑚is the Monte Carlo Jeffreys divergence between its density 𝑝𝑚and 𝑝0. It depends only on the input density and not on the classifier. The prediction of the frozen classifier 𝑓is withheld if 𝑑𝑚> 𝜏.
  1. Sample-as-Distribution: Using standard Expectation-Maximization, they compress each patient's cell cloud into a Gaussian Mixture Model (GMM), and compare it against a fixed reference GMM fitted on pooled training cells.
  2. Distance Calculation: To measure how different a new patient's GMM is from the training reference, they compute the Jeffreys divergence (a symmetrized version of Kullback–Leibler divergence). Because Jeffreys divergence between GMMs has no closed-form math solution, they estimate it cheaply via Monte Carlo integration (drawing 256 random samples per distribution).
  3. Calibrated Abstention (What's New): While prior single-cell tools used GMM divergences for visualization and clustering, the authors turn it into an upstream selective classification rule. Using a small (20%) labeled calibration split of target data, they tune the GMM complexity and pick a divergence threshold $\tau$ that maximizes the gap between retained correct predictions and retained incorrect predictions. Any future sample exceeding $\tau$ is routed to a human expert.

Datasets

The study evaluates NPM1 mutation status prediction (mutated vs. wild-type) across three real-world AML bone marrow cohorts from Bordeaux University Hospital:

  • Source ($\mathcal{D}_{\text{train}}$): 172 patients (acquired 2019–2020, GEIL staining protocol).
  • Time-shifted: 156 patients (acquired 2013–2018 using the same GEIL protocol), mimicking gradual single-lab temporal drift.
  • Panel-shifted: 242 patients analyzed under a different protocol (ELN) with different fluorochromes, mimicking a major reagent overhaul.

Mutation rates (~30%) were statistically identical across all three cohorts, ensuring performance drops come from technical shift rather than label shift.

Key Insights and Ideas

  • A single Gaussian is enough for reagent shifts: Surprisingly, the optimal representation for test patients wasn't a complex multi-cluster mixture, but a single full-covariance Gaussian ($K=1$). Why? Swapping fluorochromes or tweaking instrument voltages mostly translates and rescales marker intensities—global first- and second-order shifts that a single mean vector and covariance matrix capture effortlessly.
  • Protocol changes dwarf multi-year drift: Visualizing pairwise divergences via multidimensional scaling (MDS) revealed that 6 years of temporal drift barely budged the data away from the training set, whereas changing the antibody/fluorochrome panel pushed samples into a completely separate region of space.
  • Input divergence isn't a silver bullet—it's a filter: Because the Time-shifted samples sat right on top of the training distribution, the divergence score couldn't separate right from wrong predictions there. Input distance specifically catches errors driven by domain shift, meaning it works best alongside—not instead of—classifier confidence and lab quality-control metrics.
Fig. 2. Non-metric MDS embedding of pairwise Jeffreys divergences between subject-level GMMs. Each point represents a patient, coloured according to its acquisition protocol.

Key Results

  • Mapping batch structure: Cohort identity explained 61% of the variance in pairwise Jeffreys divergences ($P = 10^{-3}$ via PERMANOVA), cleanly isolating the Panel-shifted cohort.
  • Error-rate separation: Before abstention, the frozen classifier achieved 84% accuracy on Time-shifted data and dropped to 79% on Panel-shifted data (81% overall).
  • Effective abstention: Across 20 runs pooling both test cohorts, the calibrated threshold rejected 30.9% of patients (almost exclusively from the Panel-shifted group). Rejected samples had a 33% misclassification rate, compared to just 13% for retained samples—a 2.5x error concentration in the flagged pile. At the median threshold on Panel-shifted data, ~60% of correct predictions were kept while ~80% of mistakes were caught.
Fig. 3. Mean retention curves on the evaluation subsets across 20 independent runs for the selected abstention GMM configuration. The curves show the proportions of correctly (blue, plain) and incorrectly (red, dashed) classified subjects retained (MRG) as the rejection threshold varies. Shaded regions represent the 95% confidence intervals across 20 independent runs, and the dotted vertical line marks the median of the 20 optimal thresholds for that configuration.

Limitations and Future Work

The evaluation is compact: one clinical prediction task, one hospital center, and one frozen classifier architecture. Furthermore, calibrating the threshold still requires a small labeled subset from the shifted domain. For future work, the authors suggest testing multicentric prospective cohorts, benchmarking alternative distance metrics (like Wasserstein optimal transport or Maximum Mean Discrepancy), and exploring finer reference distributions (such as per-batch or per-class training mixtures).

Summary updated

Abstract

Machine learning models for clinical flow cytometry are usually evaluated on data drawn from their training distribution. In routine practice, however, acquisition conditions and reagents may change, potentially making predictions unreliable without warning. We propose a model agnostic criterion for prediction reliability based on a notion of distance from the training distribution: each patient sample is represented by a Gaussian mixture model, and its Jeffreys divergence to a reference fitted on the training data is estimated using Monte Carlo integration. We illustrate our approach on real-life shifted cohorts of acute myeloid leukaemia patients, using a classifier trained to predict NPM1 mutation status. First, we show graphically and statistically that pairwise divergences capture acquisition cohort structure. We then calibrate a rejection threshold on a subset of shifted cohort samples and evaluate it on held-out subjects. Across 20 runs, the misclassification rate of rejected samples was 2.5 times larger than for retained samples. These results suggest that input divergence can help identify unreliable predictions, providing a strong candidate component for abstention frameworks, along with quality control measures and classifier confidence.
BibTeX
@misc{legrand2026flagging,
  author = {Jonathan Legrand and Aguirre Mimoun and Audrey Bidet and Pierre-Yves Dumas and Christ\{è\}le Etchegaray and Baudouin Denis de Senneville},
  title = {{Flagging Batch Shift in Flow Cytometry using Jeffreys Divergence between Gaussian Mixtures}},
  year = {2026},
  eprint = {2611.31321},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.31321},
}
Figure