TL;DR
This paper repurposes conditional diffusion models, typically used for image generation, as powerful medical image classifiers. These diffusion-based classifiers achieve competitive accuracy with state-of-the-art discriminative models, while uniquely offering built-in explainability and uncertainty quantification without requiring additional training or complex post-hoc analysis.
What Problem Does This Paper Address?
Deep learning has revolutionized medical imaging, but current discriminative classifiers often require extensive hyperparameter tuning, data augmentation, and careful training to ensure reliable performance. Even then, understanding why a model makes a certain prediction (explainability) and knowing how confident it is (uncertainty quantification) are typically addressed with separate, often complex, post-hoc methods. This leaves a gap in developing models that are not only accurate but also inherently trustworthy and transparent for critical clinical applications.
Methods
The core idea is to leverage conditional diffusion models as classifiers. Instead of generating an image from a text prompt, these models are conditioned on a class label. The classification process involves:
- Noising: The input medical image is corrupted with Gaussian noise at a specific noise level.
- Denoising with Class Conditioning: The diffusion model attempts to denoise this corrupted image, but it's guided by each possible class label (e.g., "sick" vs. "healthy").
- Reconstruction Error: The model generates a "reconstructed" image for each class. The difference (reconstruction error) between the original noised image and the class-conditioned denoised image is calculated.
- Classification: The class that yields the lowest reconstruction error is predicted as the most likely class.
To improve performance, the authors introduce a novel majority voting scheme. Instead of averaging reconstruction errors across multiple noise levels, they tally which class consistently produces the lowest error across different noise levels and select the class with the most "votes."
For explainability, they utilize Classifier-Free Guidance (CFG). By generating counterfactual images (e.g., transforming a "sick" image to look "healthy"), they can highlight regions that the model focused on for its decision. Uncertainty is quantified by analyzing the distribution of reconstruction errors across the multiple denoising steps required for classification.
Datasets
The paper evaluates its approach on two publicly available medical imaging datasets:
- ISIC Melanoma: A dataset of skin lesion images used for melanoma detection.
- CheXpert: A large dataset of chest X-ray images, used here for classifying "Pleural Effusion" versus "No Findings."
The data was split into standard 80/10/10 train/validation/test sets.
Key Insights and Ideas
- Diffusion Models as Classifiers: The most significant insight is that generative diffusion models can be effectively repurposed for discriminative tasks like classification, achieving competitive results without explicit classification training.
- Intrinsic Explainability & Uncertainty: Unlike traditional classifiers that require add-ons, diffusion models naturally provide explainability (via counterfactual generation) and uncertainty estimates as part of their classification process. This is a major advantage for clinical trust.
- Majority Voting Boost: The proposed majority voting strategy significantly improves classification accuracy over simple averaging of reconstruction errors, especially when dealing with noisy reconstructions at higher noise levels.
- Minimal Tuning: Diffusion classifiers require less hyperparameter tuning and no data augmentation compared to standard discriminative models, simplifying their deployment.
Key Results
- Competitive Accuracy: Diffusion classifiers (UNet, DiT-B/4, and fine-tuned Stable Diffusion) achieved classification accuracies comparable to state-of-the-art discriminative baselines (ResNet, EfficientNet, ViT, Swin) on both CheXpert and ISIC datasets. For example, on ISIC, the UNet diffusion model achieved 91.8% accuracy, while a fine-tuned Stable Diffusion model reached 94.8%, competitive with top discriminative models.
- Explainability Demonstrated: Figures 3, 6, and 7 visually demonstrate how diffusion classifiers can generate counterfactual images, showing how a "sick" image can be transformed into a "healthy" one, highlighting the visual features the model used.
- Validated Uncertainty: Figure 2(b) and Figure 5 show that as uncertain predictions are filtered out, accuracy increases. This confirms that the model is more confident in its correct predictions (True Positives/Negatives) than its incorrect ones (False Positives/Negatives), a crucial property for clinical decision support.
- Efficiency: While diffusion models are computationally intensive for inference (minutes per batch), they require less hyperparameter tuning and no data augmentation, potentially offsetting some of the computational cost in practice.
Limitations and Future Work
- Inference Speed: The paper acknowledges that diffusion models are limited by inference speed due to their iterative nature, requiring multiple steps for classification. Classifying a batch of 128 images took 3:48 minutes with their UNet model.
- Future Directions: The authors suggest exploring the robustness of diffusion classifiers under domain shifts and varying acquisition protocols. They also propose evaluating them on more complex scenarios like 3D image classification and multi-class classification, and conducting a more in-depth analysis of their uncertainty estimation against other common metrics.
Summary updated