Grading Models on a New Hospital Using the Labels It Already Records

A clinical image model that scores well inside its home hospital often loses much of that accuracy at a new one. The only reliable way to find out is external validation: test the locked model on an independent cohort with expert ground truth. That ground truth is the expensive part. Pathologists and endoscopists do not trace tumor regions or grade every video frame as part of routine care. As a result, developers pick models and hyperparameters using held-out data from their own hospital, a choice that says little about how the model will behave elsewhere. Yet every hospital already records coarse labels as a matter of course: a diagnosis per slide, a maximum disease severity per patient, a tumor measurement per scan. These labels are too weak to train a fine-grained model from scratch. They do, however, constrain what a correct fine-grained model must output. A slide reported as tumor-free must contain no tumor patches. A patient with recorded maximum severity 2 cannot have a frame scored 3.

We propose to use those constraints for evaluation and selection, not for training. Given a pool of candidate models, we score each one on the external cohort by how often its fine-grained predictions contradict the routine record. We then test whether this score ranks the models by their true external accuracy, which is unknown at deployment, better than home-hospital validation, label-free confidence heuristics, or a small paid annotation budget. If it does, a team could perform a meaningful external check at a new site without asking an expert to draw a single mask.

Core Claim

Routine coarse labels at a target hospital partially identify the instance-level error of a fine-grained model. Some error rates are recovered exactly and others only as bounds. That partial identification is enough to choose among candidate models with much lower regret than the selection signals practitioners currently have.

The simplest way to see this is the slide-and-patch case. Let $\mathcal{N}$ be the set of patches from slides the pathology report calls negative, and let $f(x)\in\{0,1\}$ be the model's patch prediction. Every patch in $\mathcal{N}$ is truly negative, so the false-positive rate on those slides is

$$\widehat{\mathrm{FPR}} = \frac{1}{|\mathcal{N}|}\sum_{x\in\mathcal{N}} f(x),$$

and this is an unbiased estimate of the specificity error on negative-slide tissue with no expert involvement. Sensitivity is not identified, because we do not know which patches in a positive slide are tumor. We do observe the fraction of positive slides in which the model flags nothing. That miss rate is a lower bound on the slide-level miss rate. Combined with the observed positive-call rate on positive slides, it also brackets patch-level sensitivity across any plausible tumor fraction. The ordinal case is analogous: the rate at which frame predictions exceed the recorded patient maximum is an exact violation rate, while underestimation is only bounded. Our selection score combines the identified term with the bounded term. A central part of the work is reporting honestly when the bounds are too loose to separate two models.

Relation to Prior Work

Three lines of work motivate the gap. WILDS built cross-hospital benchmarks and showed a large drop on Camelyon17 for standard training, from roughly 93% accuracy within the home hospitals to roughly 70% on unseen ones. Its follow-up, Extending the WILDS Benchmark for Unsupervised Adaptation, found that adaptation methods are brittle, partly because target labels are unavailable for hyperparameter tuning. That tuning problem is exactly what we address. Time to reality check the promises of machine learning-powered precision medicine documents how often clinical models collapse under external validation. Yet Another ICU Benchmark shows that pipeline and cohort choices can move external performance more than architecture does. Together these results say that selection decisions matter and are currently made blind.

The closest method is Domain Adaptation for Ulcerative Colitis Severity Estimation Using Patient-Level Diagnoses. It uses recorded patient-level maximum severity as a training signal at the target hospital, through a loss that penalizes frames predicted above that maximum, and reaches 71.4% accuracy against 52.1% for unsupervised adaptation (ADDA). We use the same clinical logic for a different job. We keep it out of training entirely and use it as a held-out yardstick for deciding which model to trust. That separation matters because a constraint used as a training loss can no longer serve as an independent estimate of error. A model trained under that loss is part of our candidate pool, and our yardstick must be computed on patients it did not adapt on.

Benchmarking foundation models as feature extractors for weakly supervised computational pathology shows that external validation with slide-level labels is routine in pathology. It reports a mean external AUROC of 0.71 for the best frozen encoders, but evaluates only at the slide level. It never asks whether slide labels reveal patch-level error. Bias reduction in representation of histopathology images using deep feature selection shows that features encode the hospital of origin with 74.9% accuracy. This constrains our design, because a model can pass slide-level checks while relying on site artifacts. We therefore test whether the consistency score penalizes such models, since negative-slide false positives are where site artifacts surface. Causal ATTention Multiple Instance Learning and SpurCon are training-side remedies for shortcuts. We include them only as members of the candidate pool.

Research Program

The work has three parts.

First, we formalize consistency-based evaluation for two common forms of routine label. In the "any positive instance" form, a slide or scan is positive if any part of it is. In the "maximum ordinal" form, a patient's recorded grade is the worst grade among their frames. For each form we derive which error rates are exactly identified and the tightest bounds on the rest. The bounds are stated as functions of the unknown fraction of positive instances within positive bags, so that a user sees a range of external performance rather than a single number.

Second, we assemble realistic candidate pools. The pools cover standard training, domain-alignment losses such as CORAL and DANN, self-training such as Noisy Student and FixMatch, frozen foundation-model features with linear heads, and the weak-label adaptation method of Yamaguchi et al. Each method is swept over hyperparameters and random seeds, which yields on the order of a hundred candidates per task. This mirrors the selection problem WILDS 2.0 identified.

Third, we compare selection rules. Each rule sees only what a deployer would have: home-hospital validation data plus unlabeled target images and their routine coarse labels. The comparison is scored against the oracle, meaning the true instance-level target labels, which these benchmarks happen to contain.

The benchmarks are chosen because fine-grained ground truth exists, which lets us measure the true answer. On Camelyon17-WILDS we group patches by slide and form slide-level labels as a routine pathology report would. We acknowledge one artifact: these patches were sampled from annotated regions, so the resulting bags are cleaner than real slides. We report this caveat and, as a robustness check, add tissue-only negative patches. On LIMUC we form patient-level maximum severity from frame labels exactly as Yamaguchi et al. did, and hold out patients by site or subgroup. As a non-imaging stretch test we use the YAIB ICU cohorts. There, stay-level outcome codes play the role of the bag label for hourly predictions, and transfer runs from MIMIC to eICU, HiRID and AUMCdb.

Baselines

The do-nothing reference selects the candidate with the best home-hospital validation accuracy. This is what nearly every published clinical model does. It is the right floor because it costs nothing, and because WILDS reports that standard training is hard to beat. On Camelyon17 the reported out-of-hospital accuracy is 70.8% for standard training, rising to 86.7% for Noisy Student (Extending the WILDS Benchmark for Unsupervised Adaptation). So the spread in true target accuracy within our pool is at least about sixteen points, and choosing well is worth something.

The strongest label-free competitor ranks candidates by unsupervised signals on target images: average prediction confidence, prediction entropy, and agreement between independently trained candidates. These signals use the same unlabeled target data we use, minus the routine labels. Comparing against them isolates exactly the value of the routine labels. We found no reported result on Lacuna for any of these selection proxies on Camelyon17 or LIMUC, so we will run them ourselves on the identical pool.

The strongest labeled competitor is a small paid target annotation set. We give it an expert budget of fine-grained labels sized to the expert time that writing slide reports already costs, and we sweep the budget upward to find the crossover point. This baseline uses the same pool and the same target hospital. We count beating it at matched budget as success. Matching it with zero new annotation also counts as a useful result.

The key ablation selects using slide- or patient-level accuracy of the pooled prediction alone, which is the standard external check described by Neidlinger et al. We compare it against our score, which adds the instance-level consistency terms. If plain bag accuracy ranks candidates as well, the instance-level analysis adds nothing.

Every rule is judged by two quantities: the rank correlation between its score and the true target instance accuracy across the pool, and the regret, meaning oracle-best target accuracy minus the target accuracy of the candidate it picks. Beating the strongest baseline means lower regret on both Camelyon17 and LIMUC, with confidence intervals obtained by resampling target patients.

Why not just…?

Why not just trust home-hospital validation? It is free and sometimes tracks external accuracy. But WILDS documents a gap of more than twenty points on Camelyon17, and methods with similar home accuracy differ widely abroad. The experiment settles the question directly. If home validation shows rank correlation and regret comparable to our score, the proposal fails and we will say so.

Why not just use label-free confidence or agreement on the target images? This is the most serious threat, because it needs even less than we do. Its known weakness is that a model exploiting a site artifact can be confidently and consistently wrong; the hospital-signature results of Bidgoli et al. suggest exactly this failure. Our negative-slide false-positive term detects such confident errors directly. The head-to-head regret comparison on the same pool decides which signal is better. We also report the subset of candidates that rely on site artifacts as a stress test.

Why not just pay an expert to label a few target patches? Yamaguchi et al. found that patient-level labels outperformed 5% manual frame labels for adaptation. That result concerns training, though, not evaluation, and a small clean labeled set is the gold standard for estimating accuracy. We therefore treat this as a real competitor. The budget sweep reports how many expert labels it takes to match routine-label selection. The honest outcome may be that routine labels are worth a few dozen expert labels and no more.

Why not just check slide-level accuracy, as external validation studies already do? This is the ablation above. Slide-level accuracy hides patch-level false positives on positive slides and over-calls on negative ones. Whether that hidden error changes which model gets selected is exactly what the comparison measures.

Decisive Checks

The proposal succeeds if three things hold. Consistency-based selection must have lower regret than home-hospital validation and label-free proxies on both Camelyon17-WILDS and LIMUC. It must beat plain bag-level accuracy, confirming that the instance-level terms carry information. And the reported bounds must contain the true target sensitivity for most candidates. A further check is calibration of the estimate itself: the absolute error between the predicted external accuracy range and the oracle accuracy, per hospital.

The idea is falsified if label-free agreement matches it, or if a handful of expert labels dominates it. It is also falsified if the bounds are so wide that candidates cannot be separated whenever positive instances are a small fraction of positive bags. We will measure that failure explicitly by varying the tumor fraction in constructed slides.