Abstract
Automated dermatology tools often suffer from performance disparities across different skin tones due to biased training datasets. We present FairDisCo (Fairness via Disentanglement Contrastive Learning), a framework that addresses this by decoupling disease features from skin-tone information. By combining a "confusion loss" for disentanglement with a supervised contrastive loss to preserve diagnostic signals, FairDisCo improves both accuracy and fairness metrics on diverse datasets like Fitzpatrick17k and DDI.
The Challenge of Fairness in Dermatology
Deep learning has significantly advanced automated skin lesion diagnosis. However, these models frequently exhibit "fairness" issues, performing poorly on patients with darker skin tones (Fitzpatrick types 5–6) because training data is predominantly sourced from lighter-skinned populations (types 1–2).
Simply removing skin-type labels—a strategy known as "fairness through blindness"—often fails because skin tone and lesion appearance are visually intertwined. Discarding skin-tone information often inadvertently degrades diagnostic accuracy. The authors of FairDisCo aimed to create a model that is invariant to skin tone while remaining highly sensitive to pathological features.
The FairDisCo Framework
The FairDisCo architecture consists of a shared feature extractor followed by three specialized branches designed to balance diagnostic power with demographic fairness:
- Target Branch ($f_c$): A standard classifier that predicts the skin condition (e.g., melanoma vs. benign).
- Sensitive Attribute (SA) Branch ($f_s$): This branch employs a "confusion loss." It forces the feature extractor to produce representations ($z$) that make it impossible for a secondary classifier to guess the patient's skin type, effectively disentangling disease features from skin-tone features.
- Contrastive Branch ($H$): This novel component uses a supervised contrastive loss ($L_{contr}$) to ensure that images of the same disease are clustered together in the model's latent space, while different diseases are pushed apart—regardless of the patient's skin tone.
This multi-branch approach prevents the disentanglement process from discarding useful diagnostic information. The contrastive branch acts as a semantic anchor, maintaining the integrity of the disease-related features even as the model is forced to ignore skin tone.
Experimental Setup and Datasets
The study utilizes two diverse datasets to benchmark performance:
- Fitzpatrick17k: 16,577 clinical images labeled with 114 skin conditions and 6 Fitzpatrick skin types.
- Diverse Dermatology Images (DDI): A high-quality dataset of 656 images with pathologically confirmed labels, specifically curated to include diverse skin types.
To evaluate fairness, the authors adapted standard metrics—Demographic Disparity (DPM) and Equality of Opportunity (EOM)—to work with multi-class clinical data.
Key Results and Insights
FairDisCo demonstrated that the perceived trade-off between accuracy and fairness is not mandatory. By using contrastive learning, the model improved both simultaneously:
- In-domain Performance (Fitzpatrick17k): FairDisCo outperformed the baseline by 0.65% in average accuracy while significantly boosting fairness scores (+8.54% in DPM and +7.74% in EOM).
- Out-domain Generalization (DDI): The model achieved a 0.75% boost in accuracy and a 4% boost in AUC (Area Under the Curve) over the baseline, proving it generalizes well to high-stakes, pathologically confirmed data.
- Stability: Visualization of prediction rates showed that while baseline models fluctuated wildly across different skin tones, FairDisCo maintained a much more stable and "fair" prediction rate across the entire Fitzpatrick spectrum.
Conclusion
FairDisCo represents a significant step toward equitable AI in dermatology. By leveraging contrastive learning to anchor diagnostic features during the disentanglement process, the model achieves a rare "win-win": improved overall accuracy and reduced demographic bias. Future work will focus on improving generalization to extreme out-domain scenarios where visual discrepancies between skin types remain a significant challenge for automated systems.
Summary updated