Demographically-Conditioned Synthetic Medical Images for Bias Mitigation and Bias Detection in Disease Classifiers

Mahmoud Ibrahim, Bart Elen, Chang Sun, Gokhan Ertaylan, Michel DumontierarXiv 2026

TL;DR

This paper demonstrates that demographically-conditioned synthetic medical images can simultaneously mitigate and detect demographic bias in disease classifiers. By using a fine-tuned Stable Diffusion model as a pretraining prior rather than a joint data augmentor, the authors achieve a $100\times$ improvement in real-data training efficiency while generating synthetic test cohorts that reliably audit model fairness even when real minority data is critically scarce.

What Problem Does This Paper Address?

Fairness audits for medical image classifiers suffer from a severe "sample-size problem." Because clinical datasets are typically dominated by majority demographics, held-out test sets contain very few samples for minority subgroups (e.g., specific combinations of age and sex). As a result, the statistical confidence intervals for minority subgroup performance become wider than the actual bias the audit is trying to detect, rendering the audit inconclusive.

This data scarcity creates a double-edged sword: it drives the training bias (because the model doesn't see enough minority examples) and hides the evaluation bias (because the test set lacks the statistical power to expose it). The authors investigate whether a demographically-conditioned generative model can solve both sides of this problem.

Methods

The authors fine-tune a general-image latent diffusion model (Stable Diffusion 2.1) end-to-end on chest CT slices. The generator is conditioned via natural-language prompts containing demographic and clinical attributes, such as:
"{age} year old {SEX}. {COVID-19 findings on / Normal} chest CT scan"

To evaluate bias mitigation, they train downstream DenseNet-121 binary classifiers using two distinct strategies:

  1. Joint Augmentation (AUG): Mixing synthetic and real data together in a single training pass.
  2. Sequential Pretraining (FT): Pretraining the classifier entirely on a demographically balanced synthetic cohort, followed by fine-tuning on a small fraction of real data with a reduced learning rate.

For bias detection, they generate massive synthetic cohorts matching the demographic distribution of a well-powered "real oracle" test set to see if the synthetic data can reliably stand in for scarce real minority samples.

Datasets

The study utilizes the COVIDx-CT-3A dataset, focusing on the Variant-A subset to preserve a binary Normal vs. COVID-19 classification task.

  • Total Size: 168,694 axial chest CT slices from 1,718 unique patients.
  • Demographics: Stratified by Sex (Female/Male) and Age (Under 20, 20–40, 40–60, 60–80, Over 80).
  • Partitions: The data is split into patient-disjoint partitions: train, val, hold-out (used to train the generator), and hold-out-minority (deliberately enriched with minority cells to create a well-powered evaluation oracle).

The relationship between these real partitions and their synthetic counterparts is mapped out by the authors to ensure rigorous validation:

Data-provenance map illustrating real partitions and synthetic mirrors

Key Insights and Ideas

  • Training Schedule Beats Data Composition: Simply pooling real and synthetic data together (joint augmentation) performs poorly in low-real-data regimes because the massive synthetic distribution shift drowns out the real signal. Instead, treating synthetic data as a representation prior (pretraining) and real data as a decision-boundary refinement (fine-tuning) unlocks massive fairness and accuracy gains.
  • The 100× Real-Data Efficiency Crossover: Pretraining on a demographically balanced synthetic dataset and fine-tuning on just 1% of the real training data yields a classifier that outperforms a model trained on 100% real, biased data.
  • Synthetic Cohorts as High-Fidelity Audit Proxies: When real test sets run out of minority samples, a large synthetic cohort can act as a reliable proxy. It accurately reproduces the relative subgroup performance rankings of a well-powered real oracle.

Key Results

  • Generator Quality: The end-to-end fine-tuned Stable Diffusion 2.1 model significantly outperformed a domain-specific chest X-ray baseline, dropping the FID-Inception score from 77.04 to 50.14 on the hold-out partition while maintaining high demographic conditioning accuracy.
Table 3: Aggregate generator fidelity. Our SD 2.1 (fine-tuned end-to-end) versus the CXR-pretrained latent-diffusion baseline. Sex/Age acc.: conditioning accu- racy of separately-trained sex and age-group classifiers on the synthetic cohorts. COVID AUC: ROC-AUC of a separately-trained COVID classifier on the syn- thetic cohorts.
  • Bias Mitigation: The sequential training regime (FT-Balanced @ 1% real, using only 585 real slices) achieved a mean Matthews Correlation Coefficient (MCC) of 0.83 and a worst-cell MCC of 0.52. This comfortably beat the full-real baseline (TRTR-Biased, 58,499 slices), which scored 0.78 mean MCC and a dismal 0.17 worst-cell MCC.
  • Bias Detection: The synthetic test proxy achieved a perfect rank agreement (Spearman $\rho = 1.00$) with the real oracle for both MCC and Recall. In severely under-sampled demographic cells (<1,500 real slices), the synthetic estimator's calibration error was roughly $2.3\times$ lower than that of a standard small real test set.

Limitations and Future Work

The authors acknowledge several limitations that pave the way for future research:

  • Single Generator & Dataset: The findings are currently bounded to a single fine-tuned generator architecture evaluated on a single dataset (COVIDx-CT-3A).
  • Cross-Classifier Auditing: It remains an open question whether synthetic minorities can consistently rank different classifier architectures against one another.
  • Privacy Concerns: Future work needs to incorporate strict privacy-side analyses, such as membership inference risks and nearest-neighbor feature space checks, before these synthetic pipelines can be widely deployed in clinical settings.

Summary updated

BibTeX
@misc{ibrahim2026demographically,
  author = {Mahmoud Ibrahim and Bart Elen and Chang Sun and Gokhan Ertaylan and Michel Dumontier},
  title = {{Demographically-Conditioned Synthetic Medical Images for Bias Mitigation and Bias Detection in Disease Classifiers}},
  year = {2026},
  eprint = {2607.14984},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.14984},
}
Figure