MEDFAIR: Benchmarking Fairness for Medical Imaging

Yongshuo Zong, Yongxin Yang, Timothy M. Hospedales · DOI

Introduction

Machine learning models in medical diagnosis often inherit or amplify human biases, leading to disparate performance across subgroups defined by race, gender, or age. Despite a proliferation of "bias mitigation" algorithms, the field has lacked standardization in datasets, metrics, and evaluation protocols. This "Wild West" environment makes it difficult to ascertain which techniques are truly effective in clinical settings.

MEDFAIR addresses these gaps by providing the first comprehensive, reproducible benchmark for fairness in medical imaging AI. By evaluating 11 algorithms across 10 diverse datasets, the study highlights a critical but often overlooked factor: the method used to select the final model during training is as important as the algorithm itself.

The MEDFAIR Framework

The authors introduced MEDFAIR to standardize the evaluation of fairness. The framework encompasses four critical pillars: algorithm implementation, dataset selection, model selection criteria, and rigorous evaluation settings.

The MEDFAIR framework standardizes the four pillars of fairness evaluation: algorithms, datasets, model selection, and evaluation metrics.

The benchmark includes 10 publicly available datasets covering 2D imaging (e.g., Chest X-rays, Fundus images, Skin dermatology) and 3D imaging (e.g., Heart CT, Lung CT, Brain MRI). These datasets allow for evaluation across sensitive attributes such as age, sex, race, and skin type in both in-distribution and out-of-distribution (OOD) settings.

The Role of Model Selection

A central finding of MEDFAIR is that model selection is a "hidden" lever for fairness. Most researchers select the "best" model based on overall validation accuracy. However, MEDFAIR demonstrates that alternative criteria can significantly improve subgroup equity.

Visualization of model selection strategies on the Pareto front, comparing standard performance-based selection with fairness-aware criteria like Minimax Pareto and Distance to Optimal (DTO).

The study compared three primary criteria:

  • Overall Performance: Selecting the model with the highest total validation AUC.
  • Minimax Pareto Selection: Choosing the model on the Pareto front that maximizes the performance of the worst-performing subgroup.
  • Distance to Optimal (DTO): Selecting the model closest to a theoretical "utopia point" where all groups achieve perfect performance.

Simply switching to Minimax Pareto selection often improved fairness more effectively than implementing complex new debiasing algorithms.

Key Results and Discussion

After training over 7,000 models, several sobering realities emerged:

  1. Baseline Resilience: Standard Empirical Risk Minimization (ERM) remains a strong baseline. Many state-of-the-art (SOTA) mitigation algorithms failed to outperform ERM with statistical significance when subjected to rigorous testing.
  2. The Robustness-Fairness Link: Domain Generalization (DG) methods, particularly SWAD (Stochastic Weight Averaging Densely), consistently ranked among the top performers. This suggests that making models robust to environmental shifts also tends to improve their fairness across subgroups.
  3. The OOD Challenge: Fairness gains observed in-distribution often vanish when models are tested on data from different hospitals or protocols. This underscores the difficulty of deploying "fair" AI in dynamic real-world environments.

Conclusion

MEDFAIR serves as a reality check for the medical AI community. It reveals that fairness is not just a matter of choosing the right algorithm, but also of adopting standardized evaluation protocols and conscious model selection strategies. By making their framework open-source, the authors provide a foundation for building more reliable and equitable medical diagnostic tools.

Summary updated

BibTeX
@inproceedings{zong2023medfair,
  author = {Yongshuo Zong and Yongxin Yang and Timothy M. Hospedales},
  title = {{MEDFAIR: Benchmarking Fairness for Medical Imaging}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=6ve2CkeQe5S},
}
Figure