Class-N-Diff: Classification-Induced Diffusion Model Can Make Fair Skin Cancer Diagnosis
Nusrat Munia, Abdullah Imran
TL;DR
The paper tackles fairness gaps in skin cancer diagnosis by integrating a classifier into a diffusion-based generative model. It presents Class-N-Diff, a latent-space Diffusion Transformer framework that jointly learns image synthesis and disease classification, guided by a gating mechanism between the classifier and denoising process. Empirical results show improved generative quality (lower FID) and diversity (reduced MS-SSIM) alongside stronger, more robust classification across diverse skin tones, validating the benefit of joint learning. The approach enables realistic synthetic data generation that supports fairer, more accurate downstream diagnosis and points to avenues for expanding to multiple demographic attributes.
Abstract
Generative models, especially Diffusion Models, have demonstrated remarkable capability in generating high-quality synthetic data, including medical images. However, traditional class-conditioned generative models often struggle to generate images that accurately represent specific medical categories, limiting their usefulness for applications such as skin cancer diagnosis. To address this problem, we propose a classification-induced diffusion model, namely, Class-N-Diff, to simultaneously generate and classify dermoscopic images. Our Class-N-Diff model integrates a classifier within a diffusion model to guide image generation based on its class conditions. Thus, the model has better control over class-conditioned image synthesis, resulting in more realistic and diverse images. Additionally, the classifier demonstrates improved performance, highlighting its effectiveness for downstream diagnostic tasks. This unique integration in our Class-N-Diff makes it a robust tool for enhancing the quality and utility of diffusion model-based synthetic dermoscopic image generation. Our code is available at https://github.com/Munia03/Class-N-Diff.
