Empirical-Null Pooling for Detecting Isolated Tumor Cells in Whole Slide Images

A whole slide image is a gigapixel scan of a tissue section. Models read it by cutting it into thousands of small tiles, scoring each tile, and then combining the scores into one slide-level call. For lymph-node screening, that combining step faces a hard problem. The evidence of cancer may be a handful of tiles containing isolated tumor cells, which are single cells or clusters under 0.2 mm. Meanwhile, the benign background of every slide looks different: different hospitals, stains, scanners and artifacts all push up the scores of normal tiles. As a result, a tile score of 0.8 can mean "tumor" on one slide and "typical blur artifact" on another.

We propose to judge each tile against its own slide's benign background rather than against a fixed threshold. Concretely, we estimate a "null" score distribution, meaning what normal tissue looks like on that slide, and report how far each tile sits outside it. This is a standard empirical Bayes move, an "empirical null." The empirical Bayes part does real work in one specific place. The parameters of each slide's null, especially its upper tail, are noisy for small or artifact-heavy sections. We therefore shrink those parameters toward a hospital-level and then a cohort-level prior. The suspicious tiles themselves are never shrunk. That separation is the point of the design. It stabilizes the background while leaving rare true extremes intact, and rare extremes are exactly what naive shrinkage is known to erase.

Core Claim

The claim is that slide-level detection of sparse metastases improves when tile scores are standardized by a hierarchically shrunk, slide-specific null instead of being pooled directly. We expect the gains in three places: isolated-tumor-cell sensitivity, transfer to an unseen hospital, and calibration of slide-level probabilities.

Here is the mechanism. Let $s_{ij}$ be the logit tumor score of tile $j$ on slide $i$ from a fixed tile classifier. Let $\hat\mu_i, \hat\sigma_i$ be robust location and scale estimates fitted to the central bulk of that slide's tiles. Let $m_h, \tau_h^2$ be the mean and between-slide variance of these quantities across slides from hospital $h$. The shrunk location is then

$$\tilde\mu_i = w_i \hat\mu_i + (1-w_i)\, m_h, \qquad w_i = \frac{\tau_h^2}{\tau_h^2 + v_i},$$

where $v_i$ is the sampling variance of $\hat\mu_i$. We compute $v_i$ from an effective tile count corrected for spatial autocorrelation, because neighboring tiles are far from independent. Scale and an upper-tail parameter are shrunk the same way, on the log scale. A hospital with few slides is itself shrunk toward the cohort. Each tile becomes a standardized exceedance $z_{ij} = (s_{ij} - \tilde\mu_i)/\tilde\sigma_i$.

The slide statistic is the number of spatially connected tile clusters whose local false discovery rate falls below a fixed level. The local false discovery rate is the posterior probability that a tile belongs to the null rather than to tumor. We also report a simpler variant: the maximum $z_{ij}$ corrected for the number of tiles $N_i$, using the Gumbel extreme-value correction, which is what makes the maximum of $N_i$ null draws comparable across slides of different size.

This weighting is the same compromise between local and pooled estimates that Shrinkage Estimators in Online Experiments applies to treatment-arm effects. It is also the compromise Nonparametric estimation of median survival times applies to clinical sites. Our proposal moves it from the quantity of interest to the nuisance background.

Relation to Prior Work

Three papers motivate the gap. The Camelyon+ benchmark (Comprehensive Benchmark Dataset for Pathological Lymph Node Metastasis) re-annotated Camelyon slides into negative, isolated tumor cells, micro-metastasis and macro-metastasis. Across 12 aggregators and 12 encoders, it found isolated tumor cells to be the common failure point. Navigating the MIL Trade-Off frames tile aggregation as a choice between stable mean pooling and sensitive max pooling. Its answer, Maxsoft, uses max-pooling in the forward pass and a hand-tuned temperature in the backward pass, with no estimate of what a given slide's background looks like. WILDS (WILDS, WILDS 2.0) documents the hospital shift on Camelyon17: tile accuracy falls from about 93% in-distribution to 70.8% on an unseen hospital.

One paper constrains the design. PEBS applies Morris–James–Stein shrinkage, a standard empirical Bayes estimator, to calibrate reward models separately for each human rater. It finds two failure modes. Shrinkage erases genuine "rare-true-extreme" raters, and the Gaussian assumption breaks on bounded scales. We answer the first by shrinking only the parameters of the null distribution, never the tile exceedances. We answer the second by checking normality of logit null scores on negative slides, with a skew-normal fallback.

One paper supplies the closest existing technique. ComBat Harmonization: Empirical Bayes versus Fully Bayes shrinks scanner-specific location and scale shifts of MRI feature tables toward shared priors. It also shows that empirical Bayes underestimates uncertainty relative to a roughly six-hour fully Bayesian fit. ComBat corrects input features per site before modeling. We instead correct the test statistic per slide, at the point where rare-event decisions are made. That is a different object, and it requires no tumor labels at the new site.

Research Program

The tile scorer is held fixed so that only aggregation varies. It is a linear probe on frozen pathology foundation-model features, of the UNI or Prov-GigaPath kind evaluated in Camelyon+, trained on the pixel-annotated tumor regions of Camelyon16 training slides.

The work has three stages. The first is diagnostic. On negative slides, we measure how much the benign score distribution varies between slides and between hospitals. We test whether logit scores are approximately location-scale normal in the bulk and tail. We estimate effective sample size under spatial autocorrelation. If the variance between slides within a hospital is negligible, per-hospital standardization would suffice, and the slide-level hierarchy would be unnecessary. We report that outcome honestly.

The second stage builds the hierarchical null with closed-form method-of-moments hyperparameters. We also build a parametric-bootstrap version that propagates uncertainty in the hyperparameters, which addresses the overconfidence that the ComBat comparison found in plain empirical Bayes.

The third stage evaluates in two settings where the background parameters are genuinely noisy. One is leave-one-hospital-out transfer in which the new hospital contributes only 1, 3 or 10 unlabeled slides. The other uses small tissue sections, simulated by spatially subsampling Camelyon slides down to biopsy-sized regions.

Baselines

The naive reference is fixed-threshold pooling. Each slide is scored by the maximum raw tile probability, or by the count of tiles above 0.5, using the same tile scorer. This isolates what any standardization buys.

The strongest existing aggregators are CLAM-MB (Data Efficient and Weakly Supervised Computational Pathology) and Maxsoft. CLAM-MB with UNI or Gigapath features exceeds 0.95 AUC on Camelyon-17-Refine according to Camelyon+. Maxsoft with Prov-GigaPath reports WSI-level AUC 1.000 and patch-level AUC 0.948 on Camelyon17 according to Navigating the MIL Trade-Off. CAMIL (CAMIL) reports 88.1% AUC on Camelyon17 and serves as the spatially aware reference. We found no reported result on Lacuna for isolated-tumor-cell-versus-negative AUC or sensitivity on Camelyon+ for any method. We will therefore rerun CLAM-MB and Maxsoft ourselves on identical frozen features and identical splits. Each gets the same hyperparameter search budget, including Maxsoft's temperature, chosen by validation on training hospitals only.

Because slide-level AUC on Camelyon17 is already saturated, overall AUC cannot show a gain. Beating these baselines means a statistically significant improvement, by paired bootstrap over slides, in isolated-tumor-cell sensitivity at 95% slide specificity on Camelyon+. It also means no loss in overall AUC and lower expected calibration error under leave-one-hospital-out evaluation.

Two ablations isolate the key ingredient. The first is the per-slide empirical null without shrinkage. The second is per-hospital standardization without slide-level nulls, which is in effect ComBat applied to scores. A third variant applies ComBat-style empirical Bayes harmonization to the foundation-model embeddings before CLAM-MB.

Why not just…?

Why not just standardize each slide by its own null, without shrinkage? This is the most serious threat. A large slide has thousands of tiles, so its central location may be estimated well with no help from a prior. Our bet rests on two points. Spatial autocorrelation cuts the effective tile count sharply, and the upper tail of the null, which is what governs false positives at the extremes, is estimated far less precisely than the center. The unshrunk-null ablation decides this directly, stratified by tissue area. If shrinkage helps only on biopsy-sized sections, we will narrow the claim to that regime.

Why not just retrain or fine-tune an attention aggregator such as CLAM-MB on multi-site data? Camelyon+ reports that every trained aggregator it tested still fails on isolated tumor cells, despite strong overall AUC. Navigating the MIL Trade-Off shows that heavier aggregators become unstable with cohorts of a few hundred slides. A trained aggregator also cannot adapt to a new hospital's background without labels. The head-to-head isolated-tumor-cell comparison and the few-slide transfer setting test this.

Why not just harmonize features per hospital, through stain normalization or ComBat, and then use standard pooling? The optimal-transport study (Domain adaptation using optimal transport) and Camelyon+ both show that site differences include blur, fibrosis and preparation artifacts, not just color. Those artifacts vary from slide to slide within a hospital, and a per-hospital correction cannot capture that. This alternative is still a real competitor, and it is included as a baseline. If it matches us, the slide-level null adds nothing.

Why not just recalibrate the slide-level probability per hospital, PEBS-style? Rescaling the final probability fixes calibration but cannot recover a tumor cluster whose tile scores were already buried under an artifact-inflated maximum. We include per-hospital, shrunk affine recalibration of CLAM-MB outputs as a comparison on calibration error. We expect it to tie on calibration and lose on isolated-tumor-cell sensitivity.

Proposed Experiments

The primary experiment uses Camelyon+ four-class labels and treats isolated-tumor-cell-versus-negative detection as the main task. Training uses Camelyon16 and four Camelyon17 centers, and testing uses the held-out center, rotated over all five. We report three measures. The first is isolated-tumor-cell sensitivity at fixed specificity. The second is the observed false-positive rate among negative slides when the method claims a 5% false discovery rate, which checks whether the empirical-null calibration is honest. The third is expected calibration error.

The second experiment varies the number of unlabeled slides available from the new hospital, at 1, 3, 10 and all. Shrinkage should help most at small counts and fade toward the unshrunk null as counts grow, the same saturation pattern seen with roughly 10 groups in the online-experiment literature. The third experiment subsamples tissue to biopsy scale and plots the gap between shrunk and unshrunk nulls against effective tile count.

The decisive check has two parts. On negative slides with heavy artifacts, identified by the Camelyon+ artifact annotations, the shrunk-null method should cut false positives relative to raw max pooling. On true isolated-tumor-cell slides, the standardized exceedance of the annotated tumor tiles should be no smaller than under the unshrunk null. If shrinkage lowers those exceedances, the method is erasing rare true signal and the design has failed.