Fast whole-slide pathology systems save compute in a consistent way. They look at a blurry, low-magnification overview of the slide, guess which regions matter, and examine only those few regions at full resolution. On routine stains this works well: one such system examined about 4% of patches and still slightly improved diagnostic accuracy. The approach breaks down when the evidence is a handful of scattered cells. Immunohistochemistry (IHC) slides are tissue stained with antibodies that turn cells expressing a particular protein brown. The clinically important cases on these slides are often exactly the sparse ones: a low Ki-67 proliferation index, a few HER2-positive clusters inside a heterogeneous tumor, or isolated positive tumor cells. Shrinking the image blurs such signals until they fall below the selector's attention, and those regions are never examined again.
We propose to make this pruning step safe for IHC. The proposal rests on two changes. The first is physical. Brown stain absorbs light multiplicatively, so averaging pixel colors during downsampling systematically under-represents small dark spots. Averaging in optical density, the log-absorbance space where stain amounts add, preserves the total stain in each region. The low-magnification selector should therefore see the slide in stain-density space, not in RGB. The second change is statistical. Missing a region of positive tumor cells costs far more than zooming into one region unnecessarily. The selector is therefore trained with an asymmetric loss, and its discard threshold is calibrated on held-out slides so that the fraction of positive tumor cells it throws away stays below a stated bound. The selector is also restricted to invasive-tumor regions, so that its reported recall refers to the cells pathologists actually score.
Core Claim
Hierarchical whole-slide classifiers prune irreversibly from low-resolution views. PathCTM (Thinking in Scales) uses low-magnification attention to keep only the top regions. AHDMIL (AHDMIL) uses a lightweight low-resolution "scout" network to skip about 90% of tissue. The authors of both papers acknowledge that a lesion invisible at low resolution is permanently discarded, and both report only symmetric slide-level accuracy or AUC. Neither has been applied to IHC. Our claim is that, for IHC, most of this loss is avoidable rather than intrinsic to low resolution.
The argument is short. Let $x$ be per-pixel optical density of the brown stain (DAB) after color deconvolution, the standard method for separating stain channels. Transmitted intensity is $e^{-x}$. Downsampling in RGB averages intensities and then implicitly re-reads density as $-\log \overline{e^{-x}}$. By Jensen's inequality, this value is never larger than the true mean density $\bar{x}$. The gap is largest when the stain is concentrated in a few dark pixels, which is the sparse-positive case. Averaging directly in optical density keeps $\bar{x}$ exactly, and hence the integrated stain per region. We therefore predict that a scout operating on density channels detects regions containing only a few positive nuclei at magnifications where an RGB scout fails.
On top of this representation, the scout is trained with a false-negative-weighted objective. Its threshold $\tau$ is then set on calibration slides so that
$$ \Pr\left[\frac{\#\{\text{positive tumor nuclei in discarded regions}\}}{\#\{\text{positive tumor nuclei}\}} > \alpha\right] \le \delta , $$
where $\alpha$ is the tolerated cell-level miss fraction and $\delta$ is the allowed failure probability over slides. Positive tumor nuclei are counted at full resolution, inside an invasive-carcinoma mask. The guarantee is stated at the level that matters clinically: cells lost from a Ki-67 or HER2 score, not slide AUC.
Grounding in Prior Work
Three papers motivate the proposal. PathCTM and AHDMIL establish that low-resolution pruning yields large savings. PathCTM reports BRACS-3 AUC of 93.1% against 92.0% for exhaustive CLAM while processing roughly 4% of patches. Both papers name the irreversible-pruning failure without fixing it. PathFLIP shows that compressing slides into coarse representations makes small tumor nests vanish, which is the failure we target, although it was observed on H&E (routine hematoxylin-and-eosin stain) rather than IHC.
Two papers supply the method. The invasive-carcinoma IHC segmentation work (AI-Powered Segmentation of Invasive Carcinoma Regions) shows that restricting Ki-67 counting to an invasive-carcinoma mask changes the mean error from −10.19 to 2.46. We reuse this masking idea so that recall is defined only over tumor nuclei. That work runs dense segmentation over full IHC slides and optimizes a symmetric IoU loss; we instead use the mask to define the selector's target and to measure what it misses. The IHC4BC pipeline (Predicting Ki67, ER, PR, and HER2 Statuses) supplies cell-level ground truth: StarDist nucleus segmentation plus color-deconvolved H-scores on IHC slides. Its "localization paradox", where models attend to stroma rather than tumor nuclei, is a further reason to define the selection target by the tumor mask and not by learned attention.
One paper constrains the design. The HEROHE Challenge found that models with good AUC lost much of their standing under fixed-threshold F1. This is why we calibrate the operating point on held-out data with an explicit risk target rather than picking a threshold by eye. The endometrial triage system (Detection of malignancy in whole slide images of endometrial cancer biopsies) reached 97% malignant sensitivity, but by processing every patch. We aim for comparable recall control at a fraction of the compute.
Research Program
We will build a two-level system for IHC slides stained for Ki-67 and HER2.
The low-magnification scout runs at 1.25×, 2.5× or 5×. It receives the deconvolved DAB and hematoxylin optical-density channels, averaged in density space. It predicts, for each region, whether that region contains positive invasive-tumor nuclei.
The training targets come from full resolution. The targets are produced by running StarDist and deconvolution-based positivity at native resolution inside an invasive-carcinoma mask, following the two papers above.
The training loss weights missed positive regions by the number of positive nuclei they contain. Missing a region with forty positive cells therefore costs more than missing a region with one.
Calibration happens after training. On held-out calibration slides, we choose the largest discard threshold whose upper confidence bound on the cell-level miss fraction stays below $\alpha$. We will use a standard distribution-free risk-control bound. Its validity depends only on calibration and test slides being exchangeable, so we will report separately the cases where they come from different laboratories.
At high resolution, the kept regions are scored exactly as an exhaustive pipeline would score them. The output is a Ki-67 index or HER2 positive-cell fraction together with the certified miss bound.
Multi-marker reciprocal exclusion, for example CD31 positive with EMA negative, is clinically important but out of scope. Cell-level recall must work for one stain before combining panels makes sense.
Baselines
The naive reference point is exhaustive native-resolution scoring. Every tissue patch inside the invasive-carcinoma mask is processed at full magnification. This defines the ground-truth Ki-67 index and positive-cell set, and it sets the full compute cost against which savings are measured. A second naive point is an unmasked exhaustive count. The invasive-carcinoma segmentation paper reports a mean Ki-67 error of −10.19 for this setting, versus 2.46 with the mask, which shows why the mask is part of every arm.
The strongest existing competitors are PathCTM-style attention top-K pruning (Thinking in Scales) and an AHDMIL-style distilled scout (AHDMIL). These are the published methods that make the same compute–accuracy trade we make. We will reimplement each scout on the same IHC slides, using the same patch encoder and the same full-resolution scorer, so that only the selection rule differs. Each method gets the same hyperparameter-search budget and is evaluated at matched fractions of high-resolution patches (2%, 5%, 10% and 20%). Neither paper reports results on IHC or a cell-level miss metric, so there is no reported result found on Lacuna for these methods on IHC sparse-positive recall. On their own benchmarks, the reference numbers are BRACS-3 AUC 93.1% at about 4% of patches for PathCTM, and a 4.8% relative AUC gain over TransMIL on Camelyon16 for AHDMIL. Our method beats them if, at equal patch fraction, it achieves lower cell-level miss fraction and lower Ki-67 index error. The comparison matters most on slides with low Ki-67 index, roughly the bottom tertile of index values.
Three ablations isolate the ingredients. The RGB-scout ablation keeps everything except density-space downsampling and tests the Jensen-gap claim. The symmetric-loss ablation uses ordinary cross-entropy plus the same calibrated threshold, and tests whether asymmetric training adds anything beyond calibration. The uncalibrated ablation uses a validation-chosen threshold without a confidence bound, and tests whether the guarantee holds where it is claimed.
Why not just…?
Why not just lower the scout's threshold on a validation set? This is the most serious alternative, and our calibration step is a principled version of it. The question is whether asymmetric training and density-space input add anything beyond picking a lower threshold. HEROHE's threshold-dependent collapse (HEROHE Challenge) is a warning, but not proof for this setting. The symmetric-loss ablation settles the question directly. If it matches the full method at equal patch fraction and equal certified miss bound, we will report that calibration alone suffices and drop the asymmetric loss.
Why not just tile everything at full resolution? For a single slide, exhaustive tiling has no miss risk and is the reference arm. Exhaustive tiling is still the costliest arm. AHDMIL reports that tiling and feature extraction dominate run time, and that 99% of attention falls on about 10% of instances. PathCTM's 95.62% inference-time reduction shows how much compute is at stake. We will report wall-clock time per slide for every arm so the trade-off is explicit.
Why not just keep more regions, for example 20% instead of 4%? A larger fixed budget does reduce misses. It does not tell the user how many cells were lost on a given slide, and it wastes compute on dense-positive slides that need little zooming. The matched-budget curves test whether our selector reaches a given miss rate at a smaller patch fraction than simply widening top-K. If the curves coincide, the representation change is not buying anything.
Why not just segment invasive carcinoma at full resolution first? That is what the invasive-carcinoma paper does, and it requires dense full-resolution segmentation of the whole slide, so it saves no compute. We use its mask only to define targets during training and calibration. At inference, the mask is needed only inside the regions that are kept.
Proposed Experiments
The first experiment is a mechanistic stress test, run before any learning. On IHC slides from the IHC4BC cohort (Predicting Ki67, ER, PR, and HER2 Statuses), we count StarDist-detected positive nuclei per region at native resolution. We then measure how well a simple detector separates regions containing $k$ positive nuclei from negative regions, after RGB downsampling versus density-space downsampling at 5×, 2.5× and 1.25×. The prediction is that the density-space advantage grows as $k$ falls and as magnification drops. No advantage at $k \le 5$ would refute the core claim.
The main experiment trains the full system and the baselines. Wherever the data can be obtained, we will use Ki-67 and HER2 IHC slides from the IHC4BC cohort and the 170-patient invasive-carcinoma cohort (AI-Powered Segmentation of Invasive Carcinoma Regions). The file does not state that the latter is publicly available. We split slides by patient and reserve whole laboratories for a shift test. We report four quantities against the fraction of patches processed: the cell-level miss fraction, the absolute Ki-67 index error relative to exhaustive masked scoring, the empirical rate at which the bound $\alpha$ is violated, and the HER2 positive-fraction error.
The decisive checks are three. First, the empirical violation rate of the miss bound must stay below $\delta$ on in-distribution test slides. Second, on the bottom tertile of Ki-67 index, the method must beat PathCTM-style and AHDMIL-style selection on miss fraction at equal compute. Third, we test what happens across laboratories with different stain intensities. A specificity or compute blow-up under this shift, or a broken guarantee, would identify the honest limits of the approach.
As a secondary check that the representation change does not hurt H&E, we will run the RGB scout and the hematoxylin-density scout on Camelyon16, where AHDMIL reports results.
References
- Thinking in Scales: Accelerating Gigapixel Pathology Image Analysis via Adaptive Continuous Reasoning
- AHDMIL: Asymmetric Hierarchical Distillation Multi-Instance Learning for Fast and Accurate Whole-Slide Image Classification
- PathFLIP: Fine-grained Language-Image Pretraining for Versatile Computational Pathology
- AI-Powered Segmentation of Invasive Carcinoma Regions in Breast Cancer Immunohistochemical Whole-Slide Images
- Predicting Ki67, ER, PR, and HER2 Statuses from H&E-stained Breast Cancer Images
- HEROHE Challenge: assessing HER2 status in breast cancer without immunohistochemistry or in situ hybridization
- Detection of malignancy in whole slide images of endometrial cancer biopsies using artificial intelligence