TL;DR
Giant pathology foundation models are great at spotting dividing tumor cells across different hospital scanners, appease the accuracy gods, and then utterly fail the deployment test because they are way too slow. When you shrink ("distill") them into fast, compact networks, their out-of-the-box robustness to new scanners quietly vanishes. Fortunately, this paper shows you don't need expensive retraining or new human labels to get most of it back—just a single mathematical nudge calibrated on five unlabelled images from the new scanner restores a massive chunk of the lost performance.
What Problem Does This Paper Address?
Counting dividing cells—mitotic figures—in biopsy slides is critical for grading cancer. Recently, massive vision foundation models (0.3 to 1.2 billion parameters) have proven remarkably resilient to "domain shift," meaning they stay accurate even when slides are digitized on an unfamiliar brand of microscope scanner with slightly different color profiles or optics.
The catch? Whole-slide images contain thousands of candidate cells, and foundation models crawl along at 80 to 342 cells per second. To actually deploy them, engineers use knowledge distillation: training a tiny, fast "student" network to mimic the giant "teacher."
Previous benchmarks suggested distilled students stay robust, but they relied on threshold-free metrics like AUROC (which only asks: are positives ranked higher than negatives?). In the real world, a deployed model has to commit to a hard decision threshold—a fixed operating point—to say yes, this cell is dividing or no, it isn't. Under scanner shift, output probabilities drift even when cell rankings hold steady. Nobody had measured whether a distilled student survives at a fixed operating point on an unseen scanner, where the performance goes if it fails, and what it costs to fix it.
Methods
The authors distil four LoRA-adapted pathology foundation models (H-optimus-0, Virchow2, UNI, and UNI2-h) into two compact convolutional students: ResNet-18 (which uses BatchNorm) and ConvNeXt-T (which uses LayerNorm, meaning no running normalization statistics to drift).
Instead of treating domain shift as one monolithic failure, they dissect the student’s performance drop on an unseen scanner into three distinct layers and repair them in order of increasing computational cost:
- Operating Point (Cheapest repair): They introduce Teacher-Referenced Recalibration (TGR). Keeping the student's weights frozen, TGR fits a single scalar offset to the student's output logits so its average predictions match the teacher's probabilities on a handful of unlabelled target-scanner images. What’s new here isn't the one-parameter math—it's using the foundation-model teacher on those same target cells as the reference anchor.
- Normalisation Statistics (No retraining, no teacher): For ResNet-18, standard AdaBN (and optionally TENT) updates BatchNorm running statistics using unlabelled images from the new scanner.
- Representation (Most expensive): Teacher-Guided Adaptation (TGA) retrains the student's weights by adding unlabelled target-scanner images to the distillation mix. Crucially, the authors include a no-teacher control (pseudo-labelling with an ensemble of plain ResNet-18s) to separate how much help comes from the fancy foundation model versus simply seeing unlabelled target images.
Datasets
The study uses the human breast carcinoma subset of MIDOG++, an established benchmark for mitotic figure classification. It consists of 150 cases (50 each from three scanners: Hamamatsu XR, Hamamatsu S360, and Aperio CS2), totaling 1,721 mitotic figures and 2,714 hard-negative "imposters." Models are trained on two scanners and evaluated on the held-out third scanner using cross-fitting. No new datasets are introduced.
Key Insights and Ideas
- Distillation transfers ranking, not calibration: Distilling a foundation model boosts the student's AUROC on an unseen scanner, creating an illusion of robustness. Yet at the deployed F1 threshold, ResNet-18 gets zero statistically significant benefit from distillation alone. The student knows which cells look more mitotic, just not where to draw the line on a new scanner.
- Most of the "lost" intelligence doesn't need retraining: As shown below, architecture dictates where the robustness leaks. For ResNet-18, fixing the threshold and BatchNorm statistics recovers 51% to 75% of the teacher's advantage without touching a single network weight. For BatchNorm-free ConvNeXt-T, fixing that single threshold parameter alone recovers 41% to 46%.
- The teacher’s superpower is knowing the target prevalence: Standard label-free recalibration methods assume either that the proportion of mitotic cells stays identical across hospitals, or that cell appearance doesn't change across scanners. Both assumptions break in pathology. Because the foundation model stays well-calibrated on the new scanner, TGR inherits the true target prevalence from just ~5 unlabelled images—surviving severe shifts in mitosis rates where standard prior-shift estimators crash and burn.
- Target data does the heavy lifting during retraining: When retraining is used, 57% to 96% of the F1 boost actually comes from the unlabelled target images themselves, even without a foundation model guiding them (though the teacher still adds a meaningful +0.030 F1 boost for ConvNeXt-T).
Key Results
- Closing the threshold gap cheaply: With just 5 unlabelled images (~150 cells), TGR gets within 0.005 F1 of an oracle cutoff tuned using ground-truth human labels on the new scanner (+0.036 to +0.037 F1 gain over the unadapted student). With just 1 image, TGR beats both AdaBN and human-labelled threshold tuning on 1 image (0.740 vs. 0.646 F1 on ResNet-18).
- Speed vs. Accuracy: Repaired across all three layers, the ConvNeXt-T student has 23 to 41× fewer parameters and runs 62 to 98× faster (7,899 cells/sec vs. 80–128 cells/sec for H-optimus-0 and Virchow2 on an RTX 3090 Ti).
- Recovering the teacher: That repaired ConvNeXt-T student recovers 86% to 99% of its teacher’s F1 advantage. Statistically, it is proven non-inferior to Virchow2 (at a 0.02 F1 margin, trailing by just 0.001 F1), and sits only 0.005 to 0.012 F1 behind H-optimus-0 (where formal non-inferiority was not established).
Limitations and Future Work
- Scope of data and task: Everything is tested on one dataset, one organ (breast), and three scanners. Furthermore, the models only classify pre-identified candidate patches; upstream candidate detection on whole slides is left out of scope.
- Simulated prevalence shifts: Prevalence changes were tested by resampling existing cells rather than collecting cohorts with naturally differing tumor grades (where cell morphology might shift alongside prevalence).
- Garbage in, garbage out for TGR: TGR trusts the teacher's operating point. In one case (the seed-0 UNI teacher), the teacher picked a poor threshold on the source scanners, and TGR faithfully passed that flaw right along to the student. Future work isn't explicitly mapped out by the authors, though testing beyond single-organ patch classification is the natural boundary they draw.
Summary updated