Medical image classifiers often succeed for the wrong reasons. A pneumothorax detector can learn to spot the chest drain placed after treatment instead of the collapsed lung, and a lung ultrasound model can learn to read the thickness of subcutaneous fat. Such models look excellent on held-out data from the same hospital and then fail on the patients who matter most. One well-known remedy gives the model spatial supervision, meaning pixel masks that say where the disease is. However, pathology masks are expensive to draw, and a model trained this way is only regularized against the shortcuts present in its training data. This proposal studies a cheaper and more structural alternative. A small segmentation network outlines the relevant organ, and the classifier is then only allowed to pool evidence from inside that outline. This guarantees by construction that content outside the organ cannot drive the prediction, whether or not that content was ever seen in training.
The core claim is specific and falsifiable. Inference-time anatomical masking with a label-independent, CPU-sized organ segmenter (for example, one that outlines lung fields but knows nothing about pneumothorax) will remove shortcuts located outside the organ. This includes shortcuts that first appear at deployment, and there the method should beat training-time pathology-mask supervision. It will do little against shortcuts located inside the organ, such as a chest drain overlapping the lung field. We aim to measure this boundary precisely, together with its compute cost and its failure modes when disease corrupts the organ outline. The value of the result is that it tells deployers which shortcuts a millisecond-scale mask can remove for free and which require something else.
Where This Sits
Several papers motivate the work by documenting the problem. Hidden stratification causes clinically meaningful failures in machine learning for medical imaging shows that a pneumothorax model with 0.94 AUROC on drain-present cases drops to 0.77 on untreated cases. Fairness and Robustness of CLIP-Based Models for Chest X-Rays finds that all six audited vision-language models exploit drains on NEATX, and that they are also miscalibrated. The Role of Pleura and Adipose in Lung Ultrasound AI shows that a severity model reads subcutaneous fat, and that masking this fat out raises AUC from 0.6553 to 0.7742 on a 93-patient cohort. That last paper is the clearest evidence that masking outside the organ works. Its segmentation was handcrafted, however, and it failed when disease destroyed the pleural line.
Two papers constrain the design. Shortcut Learning in Medical Image Segmentation shows that segmenters themselves learn shortcuts from calipers, zero-padding and center-cropping. This matters because a scout segmenter trained on the diagnostic lesion could inherit the diagnostic shortcut. It is the reason we insist that the scout's training target be independent of the diagnostic label. Benchmarking saliency methods for chest X-ray interpretation shows that Grad-CAM-style heatmaps do not localize pathology reliably. We therefore do not use such heatmaps as the evidence of robustness; we use subgroup performance instead.
Two papers supply the method. Computed tomography–based COVID–19 triage through a deep neural network using mask–weighted global average pooling introduced mask-weighted pooling. In this approach, a smoothed lung mask weights the final feature map before averaging, so features are aggregated only from inside the lung. That work reports accuracy on retrospective cohorts but never tests shortcut robustness or what happens when the mask is wrong. We reuse its operator and ask exactly those questions. UNeXt: MLP-based Rapid Medical Image Segmentation Network supplies the scout architecture: 1.47M parameters and 25ms per image on an Intel Xeon CPU.
The closest competitor is Reducing Reliance on Spurious Features in Medical Image Classification with Spatial Specificity. It uses pathology masks at training time through a pixel-similarity loss and raises robust AUROC on SIIM-ACR from 0.46 to 0.82. Because its masks are needed only during training, it adds no inference cost. Our proposal must therefore justify its inference-time mask on grounds other than efficiency, and it does so on two grounds. First, the mask it uses is label-independent anatomy rather than pathology, so no disease annotation is needed. Second, the guarantee is structural, and so should extend to shortcuts absent from training. If that second claim fails, the proposal reduces to "use Saab et al.", and we will say so.
Research Program
The scout is a UNeXt-sized network trained only to outline the organ: lung fields on chest radiographs, and the pleura plus the space beneath it on lung ultrasound. It never sees diagnostic labels. The classifier is a standard CNN, and its final features are combined by mask-weighted pooling:
$$ z = \frac{\sum_{p} m_p \, f_p}{\sum_{p} m_p}, $$
In this formula, $f_p$ is the feature vector at spatial location $p$, $m_p \in [0,1]$ is the scout's mask value at that location after dilation and smoothing, and $z$ is the pooled vector passed to the output layer. Any feature where $m_p = 0$ contributes nothing to $z$. This is the out-of-mask guarantee. It is exact only for the pooling step, because a receptive field that straddles the mask edge still leaks some information. We therefore also test hard input masking, which zeroes out background pixels before the image reaches the network, and compare the two.
The program has three analyses. The first is a location-controlled shortcut study, which tests whether shortcut location relative to the organ determines what masking can remove. The second tests whether the benefit survives shortcuts that were not present during training. The third examines what degraded scout masks do to accuracy and calibration. For the third, we systematically erode, dilate, and shift masks. We also evaluate on severe-disease cases, where the organ boundary is disrupted as in the Gare et al. failure. We further test a simple deployment guard that falls back to unmasked pooling, with a flag, when the mask area or scout confidence looks abnormal.
Baselines
The naive reference point is empirical risk minimization. This is the same classifier with ordinary global average pooling and standard augmentation, trained on the same data. Saab et al. report 0.46 robust AUROC for binary-label training on SIIM-ACR, and our reproduction should land near that before any comparison is trusted.
The strongest existing method is Saab et al.'s pixel-similarity training with ground-truth pneumothorax masks, which reports 0.82 robust AUROC on SIIM-ACR. It is the strongest competitor because it achieves robustness at zero inference cost. We will run it with the same backbone, the same training images, and the same hyperparameter search budget. We will also run it in its reduced-annotation variant, since the paper reports gains with about 600 segmented images. Our method beats it only under one of two conditions. The first is that it matches this baseline's robust AUROC on the known drain shortcut within noise, while using no pathology masks. The second is that it exceeds the baseline's worst-group AUROC on out-of-mask shortcuts introduced only at test time. Losing on in-mask shortcuts is expected and would not count against the core claim.
The heavy robustness baseline is the adversarial inpainting preprocessor from Localized Shortcut Removal, which uses two U-Nets to find and repaint shortcut pixels. It reports recovery from 28.5% to 70.5% on a CIFAR10 color-dot task but no reported number on COVID-QU-Ex, where only qualitative results are given. We run it at its published reproduction budget and report its CPU latency alongside ours. Gaze-Directed Vision GNN for Mitigating Shortcut Learning in Medical Image reports 87.2% accuracy on SIIM-ACR. It needs eye-tracking data for training, so we cite it as a reference point but cannot run it fairly on datasets without gaze recordings.
Two ablations isolate the key ingredient. The first ablation replaces the anatomy scout with a lesion scout trained on pneumothorax masks. This tests whether a label-dependent scout inherits the drain shortcut, as the segmentation-shortcut paper would predict. The second ablation uses ground-truth organ masks in place of the scout's output, which separates losses due to the masking idea from losses due to scout error.
Why not just…?
Why not just use Saab et al.'s training-time masks and pay nothing at inference? This is the real threat. On the known drain shortcut it may well win, since drains overlap the lung field and our mask cannot exclude them. The injection experiment below settles the case of new shortcuts. We train with no out-of-lung shortcut and test with a corner tag correlated with, or inverted against, the label. Training-time supervision has never seen this cue, whereas the mask excludes it structurally. If Saab et al. is equally robust there, then inference-time masking offers nothing beyond annotation savings, and we will report exactly that.
Why not just use stronger augmentation such as random cropping? Random cropping does fix border artifacts in segmentation, according to the segmentation-shortcut paper. However, Saab et al.'s standard-trained models still fell below chance on robust splits, and augmentation cannot remove a cue that co-occurs with the label in every crop. We include random-crop and cutout versions of the naive baseline, tuned under the same budget.
Why not just use a chest X-ray foundation model? The CLIP audit found drain reliance and miscalibration in all six models it tested, and these models are far larger than a 1.47M-parameter scout. We evaluate one audited model zero-shot on NEATX and on our injected splits, using the released code at TheoSourget/clip_cxr_fairness. We also test whether wrapping it with mask-weighted pooling over its patch features helps.
Proposed Experiments
For chest radiographs, the base data are SIIM-ACR, with a robust split in which drain presence and label are decorrelated. Following Saab et al., we also use NEATX for drain-present versus drain-absent pneumothorax. The decisive test is synthetic injection into SIIM-ACR. A small marker or text patch is placed either outside the lung fields or inside them. It is correlated 95% with the label at training time and inverted at test time. Some conditions include the marker in training, and others introduce it only at test time. Under the core claim, masking should recover most of the untouched-image AUROC for outside, test-only markers. It should give little benefit for inside markers. For test-only markers, Saab et al. should degrade more than our method. We also report on COVID-QU-Ex, whose corner tags are a naturally occurring outside shortcut, although we found no reported quantitative baseline there.
For ultrasound, we reproduce the fat-thickness setting on the high-frequency linear lung ultrasound cohort. The target is to beat the reported 0.7742 AUC while replacing the handcrafted pleural segmenter with the learned scout. We report performance separately for the severe-disease grade, where the handcrafted segmenter failed. The small cohort size will limit how strong any claim from this dataset can be.
Metrics are AUROC and worst-group AUROC, including the untreated-pneumothorax subgroup. We also report expected calibration error, because a mask that truncates lesion margins could make predictions confidently wrong. Finally, we measure end-to-end latency and peak memory on a commodity 8-thread CPU. The scout's latency should be close to UNeXt's reported 25ms, and total overhead should stay below 20% of classifier time. The organ scout's training data depends on an external lung-field annotation set that is not indexed in this file.
References
- Hidden Stratification Causes Clinically Meaningful Failures in Machine Learning for Medical Imaging
- Fairness and Robustness of CLIP-Based Models for Chest X-Rays
- The Role of Pleura and Adipose in Lung Ultrasound AI
- Shortcut Learning in Medical Image Segmentation
- Benchmarking saliency methods for chest X-ray interpretation
- Computed tomography–based COVID–19 triage through a deep neural network using mask–weighted global average pooling
- UNeXt: MLP-Based Rapid Medical Image Segmentation Network
- Reducing Reliance on Spurious Features in Medical Image Classification with Spatial Specificity
- Localized Shortcut Removal
- Gaze-Directed Vision GNN for Mitigating Shortcut Learning in Medical Image