Towards Unraveling Calibration Biases in Medical Image Analysis

María Agustina Ricci Lara, Candelaria Mosquera, Enzo Ferrante, Rodrigo Echeveste

TL;DR

Fairness audits in medical AI often focus on accuracy, but calibration—how well a model’s predicted probabilities match reality—is just as vital for clinical trust. This paper reveals a major pitfall: common calibration metrics like Expected Calibration Error (ECE) are systematically biased by sample size, leading researchers to "find" unfairness in minority groups that may actually be a statistical artifact of low data volume.

What Problem Does This Paper Address?

In clinical settings, a model shouldn't just say "this is a malignant lesion"; it should provide a reliable probability (e.g., "there is an 80% chance this is malignant"). If a model is well-calibrated, that 80% prediction should be right exactly 80% of the time.

However, medical datasets are notoriously imbalanced. Minority groups (e.g., dark-skinned patients in dermatology datasets) often have far fewer samples than the majority. The authors address a critical methodological gap: Are our tools for measuring fairness themselves unfair? If a calibration metric is sensitive to the number of samples ($N$), then a model evaluated on a small minority group might appear "biased" or "uncalibrated" simply because the evaluation set is small, not because the model actually performs differently for that group.

Methods

The researchers took a two-pronged approach to "unravel" these biases:

  1. Real-world Audit: They trained a VGG-19 deep learning model to classify skin lesions as benign or malignant. They then evaluated the model's calibration across different skin tones using the Fitzpatrick scale.
  2. Subsampling Experiments: To test the impact of sample size, they compared the calibration of the majority group (light-skinned) using its full set versus a subsampled version that matched the small size of the minority group (dark-skinned).
  3. Synthetic Simulations: They created a controlled environment using one million samples and beta distributions to simulate varying levels of "de-calibration." This allowed them to isolate the effect of sample size ($N$) from the actual model calibration ($\alpha, \beta$ parameters), proving that the metrics fluctuate even when the underlying calibration is held constant.

The metrics evaluated included Expected Calibration Error (ECE), Maximum Calibration Error (MCE), Adaptive ECE (AdaECE), and the calibration components of Proper Scoring Rules (PSR) like Delta-CE and Delta-Brier.

Datasets

  • PAD-UFES-20: An open-access dataset from Brazil containing 2,298 clinical images of skin lesions.
  • Metadata: Includes patient information and skin tone via the Fitzpatrick scale.
  • Imbalance Note: The dataset is heavily skewed; there are approximately 20 times more light-skinned cases than dark-skinned cases, a common hurdle in dermatological AI research.

Key Insights and Ideas

  • The "Spurious Bias" Trap: When the authors ran a "naive" fairness audit, the model appeared significantly less calibrated for dark-skinned patients. However, once they matched the sample sizes by subsampling the light-skinned group, the "bias" vanished. The initial finding was a statistical ghost.
  • Metric Sensitivity: Popular bin-based metrics (ECE, MCE, AdaECE) are highly sensitive to $N$. As the number of samples decreases, these metrics tend to overestimate calibration error.
  • The Paradox of Better Models: Interestingly, the "finite size effect" (the bias caused by small $N$) becomes more noticeable as models become better calibrated. In perfectly calibrated synthetic scenarios, the ECE was almost entirely driven by sample size.
  • Robust Alternatives: The authors found that Delta-Brier and Delta-CE (derived from decomposing Brier and Cross-Entropy scores) are much more robust to sample size variations, making them safer choices for fairness audits in imbalanced datasets.

Key Results

  • Discrimination vs. Calibration: The model showed no significant difference in discrimination (AUC/Accuracy) between skin tone groups.
  • Naive vs. Controlled ECE: In the naive test, ECE for the dark-skinned group was significantly higher than the light-skinned group ($p < 0.001$). After matching sample sizes, the difference became non-significant ($p > 0.05$).
  • Synthetic Confirmation: In perfectly calibrated synthetic scenarios, reducing the sample size from 100% to 10% caused the ECE to jump from ~0.003 to ~0.008, despite the underlying calibration being identical.

Limitations and Future Work

  • Data Scarcity: The study was limited by the small number of dark-skinned samples available in public datasets. The authors emphasize the urgent need for more inclusive medical imaging databases.
  • Scope: The work focused on binary classification of skin lesions. Future research should investigate if these calibration biases hold true for multi-class problems or different imaging modalities (like MRI or X-ray).
  • Post-hoc Calibration: The authors suggest that since most models are now post-hoc re-calibrated (e.g., using Platt Scaling), researchers must be extra cautious, as these "refined" models are exactly where sample-size-induced metric bias is most prominent.

Summary updated

BibTeX
@inproceedings{lara2023towards,
  author = {María Agustina Ricci Lara and Candelaria Mosquera and Enzo Ferrante and Rodrigo Echeveste},
  title = {{Towards Unraveling Calibration Biases in Medical Image Analysis}},
  booktitle = {CLIP/FAIMI/EPIMI @ MICCAI},
  year = {2023},
  doi = {10.1007/978-3-031-45249-9\_13},
}
Figure