Iterative Online Image Synthesis via Diffusion Model for Imbalanced Classification

Shuhan Li, Yi Lin, Hao Chen, Kwang-Ting Cheng

Introduction

In medical AI, datasets are frequently plagued by severe class imbalance, where common diseases overshadow rare ones. This imbalance, coupled with the scarcity of medical data due to privacy concerns, poses a significant challenge for training robust classifiers. Standard mitigation strategies like re-weighting or re-sampling often lead to overfitting or degraded performance on majority classes. While generative models like GANs offer a way to synthesize data, they are typically used in an "offline" manner—generating a static dataset before training begins. This approach fails to adapt to the evolving needs of a classifier as it learns.

The IOIS Framework

To address these limitations, the authors introduce the Iterative Online Image Synthesis (IOIS) framework. This method integrates a pre-trained Diffusion Model (DM) directly into the classifier's training loop, allowing for the dynamic generation of tailored synthetic data.

The Iterative Online Image Synthesis (IOIS) framework architecture, illustrating the interaction between Classifier Training, Online Image Synthesis (OIS), and Accuracy Adaptive Sampling (AAS).

The IOIS framework consists of two primary modules:

  1. Online Image Synthesis (OIS): Unlike static synthesis, OIS generates new images every epoch using classifier guidance. By utilizing gradients from the current state of the classifier, the diffusion model produces images specifically designed to help the model distinguish between classes at its current stage of development.
  2. Accuracy Adaptive Sampling (AAS): This module dynamically determines the quantity of synthetic images needed for each class. By monitoring real-time training accuracy, AAS assigns more synthetic samples to classes where the model is struggling, ensuring a performance-driven balancing of the dataset.

Experimental Evaluation

The framework was rigorously tested on two major medical imaging benchmarks:

  • HAM10000: A skin lesion dataset with 10,015 images across 7 categories, featuring a high imbalance ratio of 59.
  • APTOS: A retinal fundus image dataset for blindness detection, containing 3,662 images across 5 categories with an imbalance ratio of 9.

Key Results and Performance

The IOIS framework consistently outperformed state-of-the-art (SOTA) methods, including traditional re-sampling and GAN-based approaches like StyleGAN2-ADA.

Performance comparison of IOIS against state-of-the-art methods on the HAM10000 and APTOS datasets.

On the HAM10000 dataset, IOIS achieved a Macro-F1 of 81.97%, a substantial improvement over the 77.78% baseline (Cross-Entropy Loss). Similarly, on the APTOS dataset, it reached a Macro-F1 of 73.02%, compared to the 69.05% baseline. Ablation studies further highlighted the importance of the adaptive components: while offline diffusion provides a baseline improvement, the addition of OIS and AAS modules significantly boosted performance, particularly on the highly imbalanced HAM10000 dataset.

Discussion

The success of IOIS stems from its ability to treat data synthesis as a dynamic response to the classifier's weaknesses. By focusing on performance rather than just class prevalence, the AAS module ensures that the model receives more data for the classes it finds most difficult. Furthermore, the use of classifier guidance ensures that the generated images are not just visually realistic but also task-informative.

Limitations and Future Work

Despite its performance gains, the IOIS framework introduces computational overhead due to the iterative nature of diffusion model sampling. Additionally, its effectiveness is tied to the quality of the pre-trained diffusion model. Future research could focus on optimizing sampling efficiency and extending the framework to other medical tasks such as image segmentation.

Summary updated

BibTeX
@inproceedings{li2024iterative,
  author = {Shuhan Li and Yi Lin and Hao Chen and Kwang-Ting Cheng},
  title = {{Iterative Online Image Synthesis via Diffusion Model for Imbalanced Classification}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2024},
  doi = {10.1007/978-3-031-72086-4\_35},
}
Figure