Abstract
Generative Adversarial Networks (GANs) often suffer from "majority class bias" when trained on imbalanced datasets, a common issue in domains like medical imaging. This paper presents CAPGAN (Conditional Variational Autoencoder with Balanced Pre-training for GANs), a framework designed to generate high-quality synthetic images from highly skewed data. By integrating a supervised Conditional Variational Autoencoder (CVAE) with a balanced pre-training strategy, CAPGAN provides a stable and fair initialization for the GAN, effectively mitigating mode collapse and improving minority class representation.
Introduction
In practical applications, datasets are rarely balanced. For instance, medical imaging databases often contain a vast majority of "normal" cases compared to rare "pathological" ones. Standard GANs trained on such data typically prioritize the majority class, leading to poor quality or missing samples for the minority class. While previous methods like BAGAN and BAGAN-GP attempted to address this via autoencoder-based "warm-ups," they often carried initial data biases into the final training phase. CAPGAN aims to resolve this by ensuring the generative model learns the features of rare classes with equal importance from the outset.
Methodology
The CAPGAN framework introduces several key innovations to stabilize training and ensure class fairness:
- CVAE-based Initialization: Instead of a standard autoencoder, CAPGAN utilizes a Conditional Variational Autoencoder (CVAE). The CVAE maps inputs to a continuous, regularized latent space defined by mean and standard deviation. This regularization prevents "holes" in the latent space, facilitating smoother transitions during the generative phase.
- Balanced Pre-training via Random Oversampling (ROS): To eliminate initial bias, the CVAE is pre-trained on a balanced version of the dataset. By replicating minority samples through ROS, the model is forced to learn the underlying features of rare classes before the adversarial training begins.
- Sophisticated Objective Function: The training process optimizes a multi-component loss function combining KL Divergence for latent space regularization, Cross-Entropy Loss to capture class-specific distributions, and Mean Squared Error (MSE) for pixel-level reconstruction fidelity.
- Adversarial Fine-tuning: Following pre-training, the CVAE weights are transferred to the GAN's generator and discriminator. The model then undergoes adversarial training with a gradient penalty to maintain stability and prevent discriminator dominance.
Experimental Results
The researchers evaluated CAPGAN across general computer vision benchmarks (MNIST, Fashion-MNIST, CIFAR-10) and specialized medical datasets (Blood cells, BreakHis). Imbalance rates were tested from 5:1 up to 100:1 to assess the model's robustness under extreme conditions.
Quantitative Performance
CAPGAN consistently outperformed baseline models like DCGAN and BAGAN-GP. As shown in the results table, CAPGAN maintains superior performance even as the imbalance rate increases. For example, on the CIFAR-10 dataset with a 100:1 imbalance, CAPGAN achieved a Frechet Inception Distance (FID) of 370.82, significantly better than DCGAN's 701.54.
Statistical Significance
The improvements were validated using Student’s t-tests, confirming that the gains in FID and Structural Similarity Index (SSIM) were statistically significant (p-value < 0.05) across all benchmarks.
Discussion and Conclusion
The success of CAPGAN highlights the importance of the "starting line" in adversarial training. By providing a balanced, regularized initialization, the model prevents the reinforcement of data biases. While CAPGAN shows remarkable robustness to extreme imbalance, challenges remain regarding high-resolution scaling and handling multi-scale variance in complex datasets like BreakHis. Future work will focus on optimizing the computational overhead of the two-stage training process and extending the architecture to handle higher-resolution medical imagery.
Summary updated