Abstract
Recent progress in generative AI, especially diffusion models, has demonstrated significant utility in text-to-image synthesis. Particularly in healthcare, these models offer immense potential in generating synthetic datasets and training medical students. However, despite these strong performances, it remains uncertain if the image generation quality is consistent across different demographic subgroups. To address this critical concern, we present the first comprehensive study on the fairness of medical text-to-image diffusion models. Our extensive evaluations of the popular Stable Diffusion model reveal significant disparities across gender, race, and ethnicity. To mitigate these biases, we introduce FairDiffusion, an equity-aware latent diffusion model that enhances fairness in both image generation quality as well as the semantic correlation of clinical features. In addition, we also design and curate FairGenMed, the first dataset for studying the fairness of medical generative models. Complementing this effort, we further evaluate FairDiffusion on two widely-used external medical datasets: HAM10000 (dermatoscopic images) and CheXpert (chest X-rays) to demonstrate FairDiffusion's effectiveness in addressing fairness concerns across diverse medical imaging modalities. Together, FairDiffusion and FairGenMed significantly advance research in fair generative learning, promoting equitable benefits of generative AI in healthcare.
Introduction
Generative AI, particularly Latent Diffusion Models (LDMs) like Stable Diffusion, has revolutionized text-to-image synthesis. In the medical domain, these models serve as powerful tools for generating synthetic datasets to train practitioners and improve diagnostic algorithms, especially for rare conditions where data is scarce. However, a critical "fairness gap" persists. Standard diffusion models often exhibit significant performance disparities across demographic subgroups, potentially generating high-quality images for majority groups while producing lower-quality or semantically inaccurate images for minority populations. If these biased synthetic images are used for clinical training or algorithm development, they risk perpetuating and even amplifying existing healthcare inequalities.
The FairDiffusion Framework
To address these disparities, we propose FairDiffusion (FD), a framework that moves beyond standard fine-tuning by introducing Fair Bayesian Perturbation. This method adaptively balances the learning process across different demographic attributes, such as race, gender, and ethnicity.
Fair Bayesian Perturbation
Instead of treating all training samples equally, FairDiffusion adaptively "perturbs" or rescales the learning process based on demographic attributes. The model treats the search for optimal group-specific weights as a black-box optimization problem. It calculates a "group-wise loss discrepancy" ($\Delta$) and utilizes a Gaussian Process-based Bayesian Optimization strategy to identify weights that minimize this discrepancy.
To balance the discovery of new perturbation parameters with the utilization of known effective ones, the framework employs an Upper Confidence Bound (UCB) acquisition function. This ensures that the model systematically explores the parameter space to find the most equitable configuration without sacrificing overall generative quality.
Equity-Scaled Metrics
Traditional metrics like the Frechet Inception Distance (FID) or Inception Score (IS) measure average performance but often mask underlying biases. We introduce "Equity-Scaled" versions of these metrics (ES-FID, ES-IS, and ES-AUC). these metrics penalize models that exhibit high variance between different demographic groups, providing a more accurate reflection of a model's fairness and utility in a diverse clinical setting.
Data and Evaluation
Our study introduces and utilizes several key datasets to benchmark fairness in medical generative AI:
- FairGenMed: A newly curated dataset of 10,000 Scanning Laser Ophthalmoscopy (SLO) fundus images. Unlike previous datasets that rely on noisy text-extracted labels, FairGenMed includes precise ground-truth labels and quantitative clinical measurements, such as cup-to-disc ratio and retinal nerve fiber layer thickness.
- HAM10000: A collection of multi-source dermatoscopic images used to evaluate the model's generalizability in skin cancer detection.
- CheXpert: A large-scale dataset of chest X-rays used to validate the approach across different medical imaging modalities.
Key Insights
Our research yielded several critical insights into the nature of bias in generative models:
- Bias Beyond Sample Size: We found that demographic bias is not solely a result of data imbalance. Even when a subgroup had the fewest training examples, it did not always exhibit the worst performance, suggesting that biases are deeply embedded in model architectures and pre-training phases.
- The Importance of Semantic Correlation: Fairness extends beyond visual realism. It is essential that clinical features described in a prompt (e.g., "glaucoma") are accurately represented in the generated image for all groups. FairDiffusion significantly improves this semantic alignment.
- Eliminating the "Fairness Tax": A common concern in AI research is that increasing fairness will decrease overall accuracy. Our results demonstrate that FairDiffusion actually improves overall performance (lower FID) while simultaneously closing the equity gap.
Results
FairDiffusion demonstrated substantial improvements across multiple modalities:
- Ophthalmology: On the FairGenMed dataset, FairDiffusion reduced the FID for the Black subgroup by 7.84 and for the Hispanic subgroup by 11.79, indicating a significant leap in image quality for these populations.
- Diagnostic Utility: In a glaucoma detection task using synthetic data, the Asian subgroup saw an AUC enhancement of 10.03, and the Male subgroup saw an enhancement of 7.58.
- Generalizability: On the HAM10000 dataset, FairDiffusion improved the Equity-Scaled AUC (ES-AUC) for age-related fairness from 47.46 to 53.48.
- Efficiency: The training time per sample increased only slightly (from 405ms to 473ms), and the model remains identical to standard Stable Diffusion during inference, ensuring no speed penalty for end-users.
Conclusion and Future Work
FairDiffusion and the FairGenMed dataset represent a significant advancement in fair generative learning. By addressing demographic disparities without compromising computational efficiency or overall performance, this work promotes the equitable benefit of generative AI in healthcare. Future research will focus on expanding geographic diversity beyond the US, incorporating additional protected attributes like socio-economic status, and conducting human-in-the-loop evaluations with medical professionals to further validate the clinical utility of synthetic samples.
Summary updated