When a medical dataset has too few examples of a rare disease, a popular fix is to ask a generative model to produce more of them. The generator, however, learned what the disease "looks like" from real hospital images, and those images carry non-medical clues. The best-documented example is pneumothorax (collapsed lung) on chest X-rays. Many of these images show a chest drain, the tube inserted to treat the condition. Classifiers learn to detect the tube instead of the collapsed lung. We claim that generating more rare-disease images balances the disease label while copying the generator's own rate of such clues into the new data. When the generator compresses variety toward its dominant mode, it can raise that rate. The downstream classifier then leans on the shortcut harder than it would have on the original imbalanced data. We propose to measure this effect directly, show that it follows a predictable dose-response with the clue rate in the synthetic images, and test a fix. The fix is to fill in the missing combinations of disease and clue, such as pneumothorax without a drain and a drain without pneumothorax, and to verify each generated image with a clue detector rather than trusting the text prompt.
This matters because the field is moving quickly toward label-balanced synthesis as the answer to medical long tails. Can Medical Vision-Language Pre-training Succeed with Purely Synthetic Data? builds SynCXR, 200,000 synthetic X-ray and report pairs sampled uniformly over clinical findings. It reports that pretraining on SynCXR beats real MIMIC-CXR by 3.8% average zero-shot AUC. Meanwhile, Fairness and Robustness of CLIP-Based Models for Chest X-Rays finds that all six real-trained chest X-ray vision-language models it audits score between +0.09 and +0.30 adjusted AUPRC higher on pneumothorax when a drain is present than when it is absent. Nobody has asked whether balancing by synthesis narrows that gap or widens it.
Core Claim
The claim has two parts. First, when minority-class images are generated conditioned on the label alone, the fraction of generated positives that carry the confounder is what the generator produces, which we call the synthetic confounder rate $q$. The shortcut gap in the trained classifier grows with $q$ and with the share of synthetic positives. We define that gap as $\Delta = \text{AUPRC}_{\text{drain present}} - \text{AUPRC}_{\text{drain absent}}$, measured on real test images. Because $q$ can be read off the synthetic set with a cheap detector before any classifier is trained, it acts as a pre-training audit for shortcut propagation.
Second, generating to balance the joint cells of (disease, confounder) removes most of this gap. The acceptance of each image must be checked by a detector, not assumed from the prompt. The remaining open question is whether keeping synthetic and real data in separate training stages, as recommended by From Fake to Real, is also needed in medicine to stop the classifier from using "synthetic-looking" as a cue.
Relation to Prior Work
Three medical papers motivate the claim by balancing labels through generation without auditing confounders:
- GAN-based Data Augmentation for Chest X-ray Classification trains a conditional GAN on CheXpert rare classes and gains ROC-AUC at 1% data, for example Fracture from 0.583 to 0.656. The gains vanish at 50–100% data.
- Red-GAN conditions a GAN on masks and on class or site labels for BraTS and ISIC.
- SynCXR prompts Llama 3.1-70B for uniform reports and renders them with RoentGen, a latent diffusion model fine-tuned on radiographs.
All three treat the label as the only axis to balance. We treat the confounder as a second axis whose rate the generator silently sets.
Two papers supply the mechanism. The Beauty or the Beast shows that StyleGAN2 faithfully reproduces the "R" orientation marker, and that pneumonia classifiers trained on its images collapse when the marker is cropped. A latent diffusion model distorted the marker and, by accident, avoided the shortcut. That paper left untested how this behavior scales with imbalance ratio, and it offered no deliberate control. Our confounder-rate sweep provides both.
From Fake to Real proves that mixing real and synthetic data to balance an attribute creates a joint shortcut on the attribute and the data source. It proposes pretraining on balanced synthetic data and then fine-tuning on real data, improving worst-group accuracy by up to 20% on CelebA-HQ, UTKFace and SpuCo Animals. Its synthetic sets are balanced across groups, so in spirit it already balances joint cells. What it does not face is the medical situation. There, the confounder is not a prompt-friendly attribute like hair color, and a text-conditioned radiograph generator may ignore "no chest tube." We therefore reuse its two-stage recipe as a component and add detector-verified cell filling. Its prediction is tested on medical data for the first time as an ablation.
AIM-Fair generates balanced faces from GPT-4 prompts and fine-tunes only fairness-sensitive parameters. It is relevant as a later refinement, but we do not rely on it.
Several papers constrain the design:
- Detecting shortcut learning for fair medical AI using shortcut testing shows that a model can encode an attribute without relying on it, and that some disparities are biological. We therefore measure reliance through performance gaps on stratified test sets, not through probes alone.
- MedEqualizer fills uncovered intersectional cells in tabular EHR with filtered GAN samples. It counts represented subgroups rather than testing downstream shortcuts. Our cell-filling mirrors its idea in imaging, with a downstream reliance test it lacks.
- Chest X-ray Image Classification: A Causal Perspective removes device and text confounders inside the classifier through backdoor adjustment, reporting 0.94 AUC for Cardiomegaly on NIH-CXR14. This is a classifier-side alternative to our data-side approach, and we discuss it below.
Research Program
The program has five parts.
Confounder detector. We train a chest-drain detector on the drain bounding boxes in NEATX, which the CLIP audit uses, built from NIH-CXR14 and PadChest. We report its precision and recall on held-out NEATX images, since every later measurement depends on it.
Imbalance regimes. We build training sets from NIH-CXR14 in which pneumothorax prevalence is subsampled to controlled ratios, roughly 1:10, 1:100, and the natural ratio. Separately, we control the real drain rate among positives. This lets us vary both the label imbalance and the size of the rare "pneumothorax without drain" cell.
Generation. We use RoentGen, the generator underlying SynCXR. It was trained on MIMIC-CXR, a different hospital from NIH, so its drain rate is inherited from outside our training data. That is exactly the propagation route we want to study. In the label-only condition we prompt with pneumothorax reports and measure the resulting $q$ with the detector. In the controlled condition we oversample and reject with the detector to reach any target $q$ from 0 to 1. We also generate drain-present negatives. Rejection sampling makes the cell rates exact even if the generator ignores negated prompts. We record the rejection rate per cell, because a very low acceptance rate for drain-free pneumothorax would itself be evidence of mode compression.
Quality-filter audit. We also run SynCXR's InternVL2-style plausibility filter on each cell. This tests whether an automatic quality gate preferentially discards the rare cell.
Downstream training and analysis. A DenseNet-121 classifier is trained under each data recipe with identical budgets. We fit the relationship between $\Delta$ and $q$ across the sweep. The claim predicts a monotone increase in $\Delta$ with $q$ that is steeper when synthetic positives outnumber real ones. The claim is falsified if $\Delta$ is flat in $q$, or if label-only synthesis gives a smaller $\Delta$ than the imbalanced real baseline. To check that the effect is not specific to drains, we repeat the core sweep on the "R" marker and pneumonia pair from The Beauty or the Beast. Markers can be detected with a simple template or OCR detector.
Baselines
Plain training on real data. The naive reference point is ordinary empirical risk minimization on the imbalanced real NIH-CXR14 training set. A second version adds inverse-frequency class weighting and minority oversampling. This tells us whether synthesis helps at all and whether the imbalanced baseline's own $\Delta$ is larger or smaller than what synthesis produces. I found no result on Lacuna for a supervised classifier's drain-present versus drain-absent pneumothorax AUPRC on NEATX. The only reported figure is for zero-shot CLIP models: a gap of +0.09 to +0.30 adjusted AUPRC (Fairness and Robustness of CLIP-Based Models for Chest X-Rays). We will evaluate a subset of those CLIP models with the released clip_cxr_fairness code, for an external anchor on the same test split.
Label-only synthetic mixing. This is the current medical practice, in the style of GAN-based Data Augmentation for Chest X-ray Classification and SynCXR. RoentGen pneumothorax images are pooled with real data until positives reach a fixed share, with no confounder control. The closest reported medical number is from that GAN paper: in the 1% CheXpert regime, ROC-AUC rose from 0.727 to 0.758 for Lung Lesion and from 0.583 to 0.656 for Fracture. It reports no confounder-stratified result.
Group-balanced training on real data. The strongest competitor is GroupDRO, the group-balanced objective FFR uses in its second stage, trained on real data only. The four (pneumothorax, drain) cells serve as groups, with labels coming from the same detector. It uses the same confounder information as our method but spends no generation compute. I found no result on Lacuna for GroupDRO on NEATX or NIH-CXR14 pneumothorax.
FFR with label-only synthesis. This version of From Fake to Real uses label-balanced synthetic pretraining followed by real fine-tuning. It isolates whether stage separation alone fixes propagation.
Two ablations of the proposal. The first uses joint-cell verified synthesis but mixes it with real data in one stage. The second applies two-stage training but sets the synthetic $q$ equal to the real drain rate, so the cells are not balanced. Together they separate the contribution of cell filling from that of stage separation.
Fairness conditions. All methods share the architecture, the number of training images seen, and a hyperparameter search of equal size, with 20 trials per method on a validation split that is itself stratified by drain. All methods use three seeds and the same real test sets: the NIH portion of NEATX in-domain and the PadChest portion as an external hospital. Beating a baseline means a smaller $\Delta$ and higher drain-absent AUPRC on both test sets, beyond the spread across seeds, without losing more than a small margin of overall AUPRC.
Why not just…?
Why not just run GroupDRO on the real data? This is the real threat. When the drain-free pneumothorax cell has hundreds of images, reweighting real data may match everything we build. The proposal settles this by sweeping the size of that cell downward. We expect GroupDRO to degrade once the cell holds only a handful of examples, because heavy upweighting of a few images drives memorization, the failure documented for oversampling by Tousignant et al. If GroupDRO holds up even at tiny cell sizes, we will report that generation is unnecessary for this problem, and the paper's contribution narrows to the propagation measurement.
Why not just remove the drain, by inpainting it out of training images or masking it? Inpainting makes every edited image partly synthetic, precisely where the shortcut lives. From Fake to Real predicts that this creates a new shortcut tied to the data source, around the edited region. Masking also discards anatomy near the tube. We include drain inpainting as an extra baseline under the same budget. We also train a real-versus-synthetic probe on the classifier's features to check for source leakage in every condition.
Why not just use a lower-fidelity generator that happens not to render confounders? The Beauty or the Beast shows this can work for text markers, but only by accident. Tubes are larger, smoother structures that diffusion models render well. Our sweep over $q$ tells us directly how much any generator's natural confounder rate costs, without having to hope for a flattering failure.
Why not just remove confounders inside the classifier with causal adjustment? The backdoor-adjusted model of Chest X-ray Image Classification: A Causal Perspective is complementary. It fixes the classifier but leaves the synthetic data itself biased. Its reported per-class AUCs are not stratified by confounder, so they do not answer our question. Adding it on top of label-only synthesis is a cheap extra comparison we will run if time allows.
Decisive Checks
The central experiment is the $q$ sweep. If the drain-absent AUPRC gap rises with the synthetic confounder rate under label-only synthesis, and verified joint-cell synthesis brings $\Delta$ below both the real imbalanced baseline and GroupDRO at small cell sizes, the claim holds. Replication on the external PadChest test portion and on the marker and pneumonia pair would show that it generalizes.
Two secondary results would each be publishable on their own. The first would show that RoentGen's natural $q$ for pneumothorax is at or above the real rate, which would confirm mode compression toward the confounded presentation. The second would show that an automatic plausibility filter rejects drain-free pneumothorax images disproportionately.
References
- Can Medical Vision-Language Pre-training Succeed with Purely Synthetic Data?
- Fairness and Robustness of CLIP-Based Models for Chest X-Rays
- From Fake to Real: Pretraining on Balanced Synthetic Images to Prevent Spurious Correlations in Image Recognition
- GAN-based Data Augmentation for Chest X-ray Classification
- Red-GAN: Attacking class imbalance via conditioned generation. Yet another medical imaging perspective
- The Beauty or the Beast: Which Aspect of Synthetic Medical Images Deserves Our Focus?
- AIM-Fair: Advancing Algorithmic Fairness via Selectively Fine-Tuning Biased Models with Contextual Synthetic Data
- Detecting shortcut learning for fair medical AI using shortcut testing
- MedEqualizer: A Framework Investigating Bias in Synthetic Medical Data and Mitigation via Augmentation
- Chest X-ray Image Classification: A Causal Perspective