Artifact-Based Domain Generalization of Skin Lesion Models

Alceu Bissoto, Catarina Barata, Eduardo Valle, Sandra Avila · DOI

Abstract

Deep learning models for skin lesion classification often rely on spurious correlations, such as clinical artifacts (rulers, ink, or hair), rather than biological features. This "shortcut learning" leads to catastrophic failure when models encounter new clinical environments. This paper presents a pipeline to improve domain generalization by creating adversarial "trap sets," utilizing Group Distributional Robust Optimization (GroupDRO) based on artifact annotations, and applying a test-time debiasing technique called NoiseCrop. The results demonstrate significant performance gains in highly biased scenarios and improved stability across out-of-distribution datasets.

Introduction

In the field of medical imaging, deep learning models frequently achieve high accuracy by exploiting "shortcuts"—features that correlate with the target label in a specific dataset but are not medically relevant. In dermatology, malignant lesions are more frequently photographed alongside rulers for scale or marked with surgical ink. Consequently, a model might learn to identify a ruler rather than the morphological characteristics of melanoma.

This phenomenon is a failure of Domain Generalization (DG). While standard DG research often relies on explicit environment labels (e.g., the specific hospital or camera used), medical datasets rarely provide this metadata. This study addresses the challenge by using artifact annotations to create artificial environments, forcing models to ignore confounding noise in favor of genuine clinical signals.

Methodology

The researchers proposed a three-stage pipeline designed to expose, mitigate, and bypass artifact-based bias.

1. Trap Sets

To rigorously measure bias, the authors constructed "trap sets." These are datasets where the correlation between an artifact and a diagnosis is intentionally reversed between the training and testing phases. For instance, if the training set associates rulers with malignancy, the test set associates rulers with benign lesions. This setup ensures that any model relying on shortcuts will fail, providing a clear metric for robustness.

2. Artifact-based Environments and GroupDRO

Using seven types of annotated artifacts (including hair, rulers, and ink), the researchers partitioned the data into distinct environments. They then applied Group Distributional Robust Optimization (GroupDRO). Unlike standard Empirical Risk Minimization (ERM), which minimizes average error, GroupDRO minimizes the error of the worst-performing group. This forces the model to perform well even in groups where artifacts do not provide a predictive advantage.

3. NoiseCrop (Test-time Debiasing)

To address artifacts during inference, the authors introduced NoiseCrop. This technique uses segmentation masks to identify the lesion, crops the image to the lesion's boundaries, and replaces the surrounding background with random uniform noise. By "censoring" the periphery, the model is prevented from utilizing any remaining artifacts outside the immediate area of interest.

Experimental Setup

The study utilized a diverse array of skin lesion datasets:

  • ISIC2019: The primary training set and the basis for trap set construction (approx. 25,000 images).
  • ISIC2018: Utilized specifically for training the initial artifact classifiers.
  • OOD Test Sets: To evaluate out-of-distribution generalization, the models were tested on PH2, Derm7pt (both clinical and dermoscopic versions), and PAD-UFES-20.

Results and Discussion

Performance Gains

In the most extreme bias scenarios (Bias level 1.0), standard ERM models collapsed to an AUC of 0.58. However, the proposed pipeline—combining GroupDRO and NoiseCrop—achieved an AUC of 0.74. This 16-percentage-point improvement highlights the efficacy of the debiasing strategy. Furthermore, qualitative analysis using ScoreCAM saliency maps confirmed that while standard models fixated on rulers or skin patches, GroupDRO models successfully shifted their attention to the lesion itself.

The "Oracle" Gap and Local Robustness

Despite these gains, the research identified a significant "Oracle" gap—the difference between the proposed model and one trained with knowledge of the test distribution. This suggests that hyperparameter selection remains a major hurdle in domain generalization. Additionally, the authors found that debiasing is often artifact-specific; a model trained to ignore rulers does not inherently ignore surgical ink. Robustness appears to be "local" to the specific confounders accounted for during training.

Out-of-Distribution Stability

On external datasets like PH2 and PAD-UFES-20, the debiased models exhibited much higher stability. While standard models showed wild fluctuations in performance depending on the training bias level, the GroupDRO and NoiseCrop models maintained consistent performance, suggesting they had learned more transferable features.

Conclusion

While the proposed pipeline significantly improves model robustness against known artifacts, the study concludes with a cautionary note: models do not automatically default to "clinically meaningful" features when shortcuts are removed. Instead, they may seek out other, less obvious spurious correlations. Future work will focus on reducing the need for manual artifact annotations and exploring "model editing" techniques that allow clinicians to manually steer models away from non-biological features.

Summary updated

BibTeX
@inproceedings{bissoto2022artifact,
  author = {Alceu Bissoto and Catarina Barata and Eduardo Valle and Sandra Avila},
  title = {{Artifact-Based Domain Generalization of Skin Lesion Models}},
  booktitle = {Workshops @ ECCV},
  year = {2022},
  url = {https://openreview.net/forum?id=Qod5RMWdlD},
}
Figure