Abstract
Discovering hidden patterns from imbalanced data is a critical issue in various real-world applications including computer vision. Existing classification methods usually suffer from the limitation of data, especially the minority classes, resulting in unstable prediction and low performance. In this paper, a deep generative classifier (DGC) is proposed to mitigate this issue via both data perturbation and model perturbation. Specifically, the proposed generative classifier is modeled by a deep latent variable model where the latent variable aims to capture the direct cause of the target label. Meanwhile, the latent variable is represented by a probability distribution over possible values rather than a single fixed value, which is able to enforce uncertainty of the model and lead to stable prediction. Furthermore, this latent variable, as a confounder, affects the process of data (feature/label) generation, allowing for well-justified sampling variability considerations and data perturbation. Extensive experiments on widely-used real imbalanced image datasets demonstrate the superiority of the proposed model on the imbalance classification task.
1. Introduction
In real-world machine learning applications, data is rarely balanced. For instance, in medical diagnostics, healthy cases vastly outnumber disease occurrences; in autonomous driving, typical road conditions are far more common than accidents. Standard classifiers tend to be "lazy," achieving high overall accuracy by overfitting to the majority class while ignoring the minority.
Existing solutions generally fall into two categories: Data Perturbation (e.g., SMOTE or GANs for synthetic data) and Model Perturbation (e.g., cost-sensitive learning or Bayesian uncertainty). However, these are often treated as separate stages, creating a gap where generated data may not effectively support the specific classifier. The Deep Generative Classifier (DGC) bridges this gap by integrating both approaches into a single, robust generative framework.
2. Methodology
The DGC framework introduces a unified approach to handle class imbalance by combining data augmentation and model uncertainty. As illustrated in Figure 1, the model employs parallel perturbation paths to ensure stable classification results.
2.1 Latent Variable Modeling
The core innovation of DGC is its structural representation of the relationship between features ($x$), labels ($y$), and a hidden latent variable ($z$). Unlike standard models that map $x$ directly to $y$ (Figure 2a), DGC assumes that a latent variable $z$ is the "direct cause" of both the features and the label (Figure 2b/c). This allows the model to capture the underlying semantic structure of the data rather than relying on surface-level correlations.
2.2 Unified Perturbation
- Data Perturbation: The model performs oversampling within the latent space ($z$) to generate realistic synthetic examples for minority classes. By oversampling in the latent space rather than pixel space, the model generates semantic variations (e.g., different poses) rather than simple geometric transforms.
- Model Perturbation: Instead of a point estimate, $z$ is treated as a probability distribution. This forces the classifier to account for uncertainty, leading to clearer decision boundaries even when training data is scarce.
- Wasserstein Metric: DGC utilizes the Wasserstein distance instead of the standard KL-divergence. This provides a more stable training signal and prevents the model from collapsing or producing blurry synthetic data for minority classes.
3. Experimental Results
The researchers evaluated DGC on four image benchmarks with high Imbalance Ratios (IR): MNIST, Fashion-MNIST, SVHN, and CelebA. DGC consistently outperformed established baselines like BAGAN (GAN-based) and BayesCNN (uncertainty-based).
- Minority Recall ($R_{MI}$): On the CelebA dataset (IR=100), DGC achieved a minority recall of 0.2987, nearly triple the performance of BayesCNN (0.1063).
- Overall Robustness: On the SVHN dataset, DGC reached an Average Class Specific Accuracy (ACSA) of 0.7493, surpassing the next best model, mmDGMs (0.7220).
- Visual Evidence: t-SNE visualizations confirmed that DGC's latent space creates much tighter, more separable clusters for minority classes compared to raw input features.
4. Conclusion
The Deep Generative Classifier offers a robust solution for imbalanced classification by unifying data and model perturbation. While computationally more intensive than standard models, its ability to generate semantically meaningful minority samples and account for model uncertainty leads to state-of-the-art performance. Future work will explore incorporating self-attention mechanisms and scaling the approach to higher-resolution imagery.
Summary updated