TL;DR
This paper introduces a novel test-time image adaptation technique for skin lesion classification that leverages diffusion models to "correct" corrupted input images on the fly, without retraining. By projecting test images back to a "cleaner" domain using a guided diffusion process and then intelligently combining predictions from original and adapted images, the method significantly improves classification robustness against various real-world image corruptions.
What Problem Does This Paper Address?
Deep learning models have shown great promise in diagnosing skin diseases, but their real-world deployment is hampered by "distribution shifts." These shifts occur when the test data differs from the training data due to factors like varying camera quality, lighting conditions, or image artifacts. For skin lesion classification, this can lead to a significant drop in diagnostic accuracy, undermining trust and reliability. Existing solutions often require retraining the model on target domain data, which is impractical during live testing and sensitive to data availability and hyperparameter tuning. This paper tackles the challenge of making these models robust to image-level corruptions at test time, without needing to retrain or have access to target domain training data.
Methods
The core of the proposed method is a Diffusion Model Driven Test-Time Image Adaptation (TTA) approach. Here's a breakdown of the key components:
- Diffusion Model for Image Projection: The authors train a class-unconditional diffusion model on the source domain data. At test time, this model is used to project a corrupted input image back towards the source domain. This is achieved through an iterative reverse diffusion process.
- Structure Guidance Module: To ensure that the projected image retains important structural information (like lesion boundaries) and aligns with the source domain's characteristics, a novel "structure guidance module" is introduced. This module uses linear low-pass filters during the reverse diffusion process to refine the image, preserving structural details.
- Confidence-based Self-Ensembling: Recognizing that diffusion models can sometimes produce less reliable outputs, a self-ensembling strategy is employed. This method intelligently combines predictions from the original, unadapted input and the diffusion-adapted input. It automatically adjusts the reliance on each prediction based on its confidence, effectively rejecting potentially erroneous generated images.
This approach allows for adaptation directly during the inference phase, making it a true test-time adaptation method.
Datasets
The paper introduces two new benchmarks for evaluating corruption robustness:
- ISIC2019-C: Derived from the ISIC2019 dataset, this benchmark includes 14 types of corruptions (noise, blur, digital) with five severity levels each, resulting in 70 distinct corrupted test sets.
- Dermnet-C: Based on the Dermnet dataset, this benchmark also features the same 14 corruption types and severity levels. Notably, Dermnet images are captured by regular cameras (not dermoscopes), making them more susceptible to various real-world corruptions.
These datasets are designed to simulate common image-level corruptions encountered in real-world skin lesion diagnosis scenarios.
Key Insights and Ideas
- Diffusion Models as "Image Correctors": The paper demonstrates that diffusion models, typically used for generation, can be repurposed to "undo" image corruptions and project images into a domain where a pre-trained classifier performs better.
- Structure Preservation is Crucial: Simply projecting an image back to the source domain isn't enough. The "structure guidance module" highlights the importance of preserving fine-grained visual details, especially critical for medical diagnoses like skin lesion classification.
- Confidence is Key for Robustness: The self-ensembling approach, which weighs predictions based on confidence, is vital for handling cases where the diffusion process might not yield an ideal adaptation. This prevents the system from relying on potentially misleading generated images.
- Test-Time Adaptation is Practical: The proposed method offers a practical solution for deploying AI models in dynamic, real-world environments where data distributions can shift unpredictably, without the need for costly retraining.
Key Results
The proposed method consistently improves classification accuracy across various corruptions, architectures, and datasets.
- Significant Accuracy Gains: On corrupted test sets, the method shows substantial improvements. For example, for ResNet-50 on ISIC2019-C, accuracy increases from 55.33% (corrupted) to 56.18% (DDA) and further to 56.72% with their proposed method. For Swin-T on Dermnet-C, accuracy jumps from 42.80% (corrupted) to 31.52% (their method), outperforming DDA.
- Robustness Across Architectures: The method demonstrates effectiveness with different backbone architectures, including ResNet-50, Swin-T, and ConvNeXt-T, indicating its general applicability.
- Effective Against Diverse Corruptions: Experiments show that the method significantly mitigates the performance drop caused by various corruptions like defocus blur, gaussian blur, jpeg compression, and noise, often restoring accuracy to near original levels.
- New Benchmarks: The introduction of ISIC2019-C and Dermnet-C provides valuable resources for future research in robust skin lesion classification.
Limitations and Future Work
- Computational Cost: While test-time adaptation, the diffusion process itself can be computationally intensive, which might be a consideration for real-time applications with very strict latency requirements.
- Hyperparameter Sensitivity: The paper mentions that traditional adaptation methods are sensitive to hyperparameters. While their method aims to mitigate this, the specific impact of their own hyperparameters (e.g., the scaling factor
win the guidance module) on performance might warrant further investigation. - Future Directions: The authors suggest that their work can be extended to other medical imaging domains and other types of distribution shifts. Further exploration of more advanced guidance mechanisms or ensemble strategies could also be promising.
Summary updated