Medical image classifiers trained on fewer than a hundred patients tend to learn the wrong thing. They pick up cues in tissue around the diagnostic target, such as how thick a patient's fat layer is or which scanner was used, instead of the lesion itself. The usual fix is to segment the region of interest and black out everything else. That removes the shortcut, but it also removes context that clinicians actually use, such as the tissue bordering a tumor or the acoustic shadow below it. This proposal tests a different response. We keep the background but apply strong random corruption to it on every training step, so it carries no stable patient- or site-specific signal. At the same time, the lesion and a thin band around it receive only mild, shape-preserving transforms that keep the diagnosis valid.
In two sentences: one segmentation mask tells the augmentation pipeline where to be gentle and where to be destructive. How destructive the background step should be is set without any diagnostic labels, by raising its strength until a background-only probe can no longer tell patients or sites apart. The hypothesis is that this beats both whole-image augmentation and hard masking when cohorts are tiny. It also asks less of the segmentation mask than masking does, because an imperfect mask only leaves some lesion tissue in the scrambled zone rather than deleting it.
Core Claim
We claim that, in small clinical cohorts, the useful job of a region-of-interest mask is to say where augmentation strength should differ, not to say which pixels to delete. Concretely, given an image $x$ and a soft mask $m$, we train on
$$x' = m \odot T_{\text{in}}(x;\lambda_{\text{in}}) + (1-m)\odot T_{\text{out}}(x;\lambda_{\text{out}}).$$
Each symbol is defined as follows. The mask $m$ is 1 inside the lesion or organ and tapers smoothly to 0 across a perilesional band of learned width. $T_{\text{in}}$ is a family of mild, topology-preserving transforms: small elastic deformation, intensity gamma, and modality-appropriate speckle. $T_{\text{out}}$ is a family of strong, shortcut-destroying transforms: heavy blur, texture shuffling, intensity remapping, and swapping in background patches drawn from other patients. The scalars $\lambda_{\text{in}}$ and $\lambda_{\text{out}}$ control the strength of each family.
The new part is the label-free choice of the two strengths. For $\lambda_{\text{in}}$, we match the spread of augmented-versus-original lesion features to the natural spread of lesion features across patients. We reuse the distribution-matching idea of Unsupervised augmentation optimization for few-shot medical image segmentation, but compute it only inside the mask rather than over the whole image. For $\lambda_{\text{out}}$, we choose the smallest strength at which a linear probe on background-only features can no longer identify the patient or acquisition site above chance. Patient and site IDs come free with the metadata, so no diagnostic labels are spent. This also avoids the unstable validation splits that make policy search collapse under scarcity.
Position Relative to Prior Work
Three papers motivate the gap. The Role of Pleura and Adipose in Lung Ultrasound AI showed that unmasked lung ultrasound models score COVID-19 severity from subcutaneous fat, and that zeroing that region raises AUC from 0.6553 to 0.7742 on 93 patients. It applied no augmentation, so it cannot say whether the background was useless or merely contaminated. Lesion-Centric Latent Phenotypes from Segmentation Encoders for Breast Ultrasound Interpretability pools features only over the predicted lesion mask and reaches an external AUC of 0.982. It discards peritumoral tissue by construction and likewise reports no augmentation. Online Hyper-parameter Learning for Auto-Augmentation Strategy found that policy search throws away aggressive operations on small datasets. We read that as evidence that aggressiveness must be spatially targeted rather than abandoned.
The closest method is Decoupled Data Augmentation for Improving Image Classification. It splits natural images into object and background with SAM, edits the object conservatively with a diffusion model, and swaps backgrounds aggressively, reaching 53.67% in 10-shot CUB. We share the asymmetry but differ in four ways:
- No generative model. We use none, and this is a deliberate constraint taken from Limitations of Synthetic Data Generation in Specialized Data-Scarce Domains. That paper found no generative method consistently beat AugMix in scarce medical data, and synthetic images were 11–45% easier than real ones. Mask-conditioned synthesis such as Mask-guided Data Augmentation for Multiparametric MRI Generation with a Rare Hepatocellular Carcinoma reported only FID, never downstream accuracy, so it offers no counter-evidence.
- Soft boundary. We model a graded perilesional band rather than a hard object edge.
- Label-free strength selection. We set both strengths without labels instead of fixing them.
- Mask noise is a primary variable. We evaluate under imperfect masks from a weak segmenter, not only expert masks.
RGMIM is complementary. It uses a lung mask to decide where masked-image pretraining spends its reconstruction effort. It is a pretraining method that our augmentation can sit on top of, and it also serves as a strong low-label reference.
Research Program
The work has three parts.
Part one: the augmentation operator. We build the operator for 2D ultrasound and radiography. This includes a soft-mask construction in which the band width is a single parameter: a signed distance transform passed through a sigmoid. The operator also includes the two transform families and the two label-free strength rules.
Part two: a shortcut audit. Every trained model gets two measurements that do not depend on test accuracy.
- Background-swap sensitivity: how much the prediction changes when the background is replaced by another patient's background while the lesion is held fixed. A shortcut-free model should change little.
- Context use: how much accuracy drops when the perilesional band is zeroed. This tells us whether the context we preserve is actually used.
Part three: mask quality. We run everything under three mask conditions:
- expert masks;
- masks predicted by a segmenter trained on only ten annotated images;
- expert masks with systematic dilation or erosion.
This answers Gap 5 of the literature directly.
Baselines
Naive reference. The do-nothing point is a classifier trained on whole images with standard flips, crops, and affine jitter. It shares the backbone, initialization, epochs, and the same patient-level cross-validation folds with all other arms. On lung ultrasound, the comparable number is the unmasked AUC of 0.6553 reported by The Role of Pleura and Adipose in Lung Ultrasound AI.
Hard masking (strongest single competitor). This is the method our claim most directly challenges. On lung ultrasound we reimplement zero-masking of the subcutaneous region as in that paper, whose reported AUC is 0.7742. On breast ultrasound we reimplement mask-weighted pooling from Lesion-Centric Latent Phenotypes, whose reported external BUS-BRA AUC is 0.982. That figure was obtained training on the full BUSI plus BUS-UCLM sets (1,463 images). For our under-100-patient subsamples, no reported result was found on Lacuna, so we rerun it. We give hard masking the same augmentation applied inside the mask, so the only difference is whether background is deleted or scrambled.
Whole-image AugMix. This is the strongest non-generative augmenter, per Limitations of Synthetic Data Generation. Its strength is tuned with the same number of trials our method uses.
Decoupled background swapping. This baseline follows Decoupled Data Augmentation but without diffusion editing: lesions are pasted onto other patients' backgrounds.
Ablations. Four ablations isolate the key ingredients:
- fixed rather than label-free $\lambda_{\text{out}}$;
- a hard mask with no perilesional band;
- symmetric strong augmentation everywhere;
- strong augmentation inside the lesion and mild outside, which is the reversed asymmetry.
What counts as success. Beating the baselines means a higher patient-level AUC than hard masking, with paired bootstrap confidence intervals over folds that exclude zero, in at least two of three datasets. It also requires lower background-swap sensitivity than whole-image augmentation.
Why not just…?
Why not just zero out the background, as Gare et al. did? This is the real threat, and the experiment is built around it. If the perilesional band carries no information, hard masking plus inside-mask augmentation should tie with our method. The context-use measurement will show whether that is what is happening. Masking has a separate weakness that the noisy-mask condition tests: an eroded or wrong mask deletes diagnostic tissue with no recovery. We expect the gap in our favor to widen as mask quality drops. If it does not, we will report that masking suffices.
Why not just use strong whole-image augmentation such as AugMix? Global augmentation strong enough to wash out background shortcuts also distorts small lesions. The finding in Online Hyper-parameter Learning for Auto-Augmentation Strategy that small datasets reject aggressive operations is consistent with this. The symmetric-strong ablation and the background-swap audit test it directly.
Why not just paste lesions onto other backgrounds, as in De-DA? In ultrasound, lesions are not separable objects: speckle, shadowing, and boundary blur tie them to the surrounding tissue. Pasting therefore creates seam artifacts that a classifier can exploit. We include pasting as a baseline and expect it to fall between hard masking and our method. If it matches our method, the soft band and the strength rule add nothing beyond swapping, and we would say so.
Why not just freeze a foundation model and train a linear probe? Frozen features still encode background, so the shortcut can survive. We test this by running every augmentation arm on a frozen DINOv2-style backbone, matching the setup in Limitations of Synthetic Data Generation, as well as with full fine-tuning.
Proposed Experiments
Datasets. We use three datasets.
- The high-frequency linear lung ultrasound cohort (210 videos, 93 patients), using four-level severity AUC and accuracy. Access to this cohort is a dependency we will need to confirm.
- BUSI and BUS-UCLM subsampled to 25, 50, and 100 patients for training, with external testing on BUS-BRA.
- The four-class chest X-ray set at 1% and 0.5% labels. Here the low-label reference is RGMIM's reported 0.771 accuracy at 1% labels, and we also run our augmentation on RGMIM-pretrained weights.
Protocol. Every arm receives the same tuning budget and five repeated patient-level splits.
Decisive checks. There are three:
- Our method must beat hard masking under predicted masks at 50 patients on breast ultrasound with external testing.
- It must lower background-swap sensitivity relative to whole-image augmentation.
- The label-free $\lambda_{\text{out}}$ must match or beat the best fixed strength found with test-set hindsight. If it does not, it should be dropped in favor of a fixed default.
A negative result on the first check would be informative in its own right. It would mean that under severe scarcity, deleting context is safer than trying to keep it.
References
- Unsupervised augmentation optimization for few-shot medical image segmentation
- The Role of Pleura and Adipose in Lung Ultrasound AI
- Lesion-Centric Latent Phenotypes from Segmentation Encoders for Breast Ultrasound Interpretability
- Online Hyper-Parameter Learning for Auto-Augmentation Strategy
- Decoupled Data Augmentation for Improving Image Classification
- Limitations of Synthetic Data Generation in Specialized Data-Scarce Domains
- Mask-Guided Data Augmentation for Multiparametric MRI Generation with a Rare Hepatocellular Carcinoma
- RGMIM: Region-Guided Masked Image Modeling for Learning Meaningful Representations from X-Ray Images