DSP-KD: Dual-Stage Progressive Knowledge Distillation for Skin Disease Classification

Xinyi Zeng, Zhanlin Ji, Haiyang Zhang, Rui Chen, Qinping Liao, Jingkun Wang, Tao Lyu, Li ZhaoBioengineering 2024 · DOI

TL;DR

This paper introduces DSP-KD, a novel dual-stage knowledge distillation framework designed to train lightweight AI models for skin disease classification. By progressively transferring knowledge from a powerful "teacher" model to a smaller "student" model, DSP-KD achieves high accuracy on dermatoscopic images while maintaining computational efficiency, making it suitable for resource-constrained medical devices.

What Problem Does This Paper Address?

The increasing global demand for accurate skin disease diagnostics, especially for conditions like melanoma, highlights the need for advanced AI tools. However, deploying sophisticated deep learning models in practical medical settings is challenging due to limitations in storage and computational power on devices like smartphones or portable scanners. While knowledge distillation (KD) offers a way to create smaller, more efficient models, research specifically on multi-class skin disease classification using KD is limited. This paper aims to bridge this gap by developing an enhanced KD framework that effectively transfers knowledge from a large, accurate model to a lightweight one for skin disease diagnosis.

Methods

The core of this work is the DSP-KD (Dual-Stage Progressive Knowledge Distillation) framework. It operates in two stages:

  • Stage 1: Feature-Based Distillation with Hierarchical Fusion Masking (HF Masking): This stage focuses on transferring rich feature representations. It employs a novel Hierarchical Fusion (HF) masking strategy that leverages multi-level features (nuanced, coarse, global) from the teacher model. This strategy generates attention maps to guide the student in reconstructing important feature regions, going beyond simple imitation to actively reconstruct teacher-like features. This is built upon the Masked Generative Distillation (MGD) concept but with an improved masking mechanism.
  • Stage 2: Logit-Based Distillation with Normalized Logits (NKD): After the student's parameters are updated in Stage 1, this stage refines the model by distilling the teacher's output probabilities (logits). To address the challenge of uneven logit distributions and improve fitting, it uses Normalized Knowledge Distillation (NKD). This technique normalizes the logits before applying the softmax function, approximating the logit distribution and enhancing the transfer of label information.

The overall framework aims to progressively narrow the gap between teacher and student, maximizing mutual information transfer from feature levels to logit levels.

Datasets

The study utilizes two datasets:

  • ISIC2019 Dataset: A publicly available dataset focused on melanoma diagnosis, containing eight different diagnostic groups.
  • Private Skin Disorders Dataset (PSD-Dataset): A newly introduced benchmark dataset provided by Peking Union Medical College Hospital, comprising six common skin diseases (acne, melasma, rosacea, discoid lupus erythematosus, Ota nevus, and seborrheic dermatitis).

Both datasets underwent preprocessing, including resizing, data augmentation (using RandAugment), and a hair removal technique for noisy images.

Key Insights and Ideas

  • Progressive Distillation is Key: The dual-stage approach, moving from feature distillation to logit distillation, is crucial for effectively transferring knowledge and improving the student model's performance.
  • Hierarchical Fusion Masking Enhances Feature Transfer: The HF masking strategy in Stage 1 is more effective than standard MGD because it leverages structural information across different feature levels to create more representative masks, leading to better feature reconstruction.
  • Normalized Logits Improve Logit Distillation: NKD in Stage 2 helps to better capture the teacher's label information by normalizing the logit distribution, which is particularly beneficial when dealing with complex or imbalanced datasets.
  • Lightweight Models Can Be Highly Effective: The study demonstrates that even with smaller datasets like PSD, lightweight CNNs can achieve good performance, but KD is still essential for further improvement and efficiency.
  • Cross-Architecture Transferability: DSP-KD shows effectiveness in transferring knowledge between CNN models with different internal structures, highlighting its generalizability.

Key Results

  • The proposed DSP-KD framework significantly improved the classification accuracy of the ShuffleNetV2 student model on the ISIC2019 dataset, boosting it from 86.21% to 92.83% when using Res2Net101 as the teacher.
  • On the PSD-Dataset, DSP-KD achieved an accuracy of 94.93% with Res2Net101 as the teacher, outperforming other state-of-the-art fusion KD methods by over 1%.
  • The distilled ShuffleNetV2 model achieved superior performance while maintaining low model complexity (fewer parameters) and faster inference speeds compared to baseline models and other KD methods.
  • Ablation studies confirmed the effectiveness of both the HF masking strategy and the normalized logits approach, showing incremental improvements at each stage.

Limitations and Future Work

  • Teacher-Student Structure Impact: The paper acknowledges that the choice of teacher model and the structural differences between teacher and student can influence distillation performance.
  • Cross-Architecture Challenges: While DSP-KD shows promise for cross-architecture distillation, the authors note that extracting knowledge across significantly different architectural frameworks remains a challenge.
  • Future Work: Future research will focus on refining the DSP-KD framework for cross-architecture teacher-student models, enabling students to learn more comprehensive and complementary information. Optimizing the "transferability" of heterogeneous distillation frameworks is an ongoing research direction.

Summary updated

Abstract

The increasing global demand for skin disease diagnostics emphasizes the urgent need for advancements in AI-assisted diagnostic technologies for dermatoscopic images. In current practical medical systems, the primary challenge is balancing lightweight models with accurate image analysis to address constraints like limited storage and computational costs. While knowledge distillation methods hold immense potential in healthcare applications, related research on multi-class skin disease tasks is scarce. To bridge this gap, our study introduces an enhanced multi-source knowledge fusion distillation framework, termed DSP-KD, which improves knowledge transfer in a dual-stage progressive distillation approach to maximize mutual information between teacher and student representations. The experimental results highlight the superior performance of our distilled ShuffleNetV2 on both the ISIC2019 dataset and our private skin disorders dataset. Compared to other state-of-the-art distillation methods using diverse knowledge sources, the DSP-KD demonstrates remarkable effectiveness with a smaller computational burden.
BibTeX
@inproceedings{zeng2024dsp,
  author = {Xinyi Zeng and Zhanlin Ji and Haiyang Zhang and Rui Chen and Qinping Liao and Jingkun Wang and Tao Lyu and Li Zhao},
  title = {{DSP-KD: Dual-Stage Progressive Knowledge Distillation for Skin Disease Classification}},
  booktitle = {Bioengineering},
  year = {2024},
  doi = {10.3390/bioengineering11010070},
}
Figure