HexaGAN: Generative Adversarial Nets for Real World Classification

Uiwon Hwang, Dahuin Jung, Sungroh Yoon

Introduction

In academic research, machine learning models are often trained and evaluated on pristine, "clean" datasets. In the real world, however, data is notoriously "dirty." Practitioners typically face three major hurdles simultaneously:

  1. Missing Data: Features are often incomplete (e.g., a patient skips a specific medical test).
  2. Class Imbalance: Some classes have far fewer examples than others (e.g., in fraud detection, 99% of transactions might be legitimate).
  3. Missing Labels: Labeling data is expensive and time-consuming, leaving large portions of datasets unlabeled.

The standard industry approach to these issues is a "cascading" pipeline: use one algorithm to fill holes, another to oversample the minority class, and a third for semi-supervised learning. However, this sequential approach is sub-optimal because errors made in the early stages inevitably propagate downstream.

HexaGAN is a novel generative adversarial network (GAN) framework designed to tackle all three of these hurdles simultaneously. By treating missing features, class imbalance, and missing labels as different forms of "imputation" within a unified architecture, HexaGAN achieves state-of-the-art performance in both data recovery and classification accuracy.

Three forms of imputation

The Core Insight: Everything is Imputation

The core "aha moment" of HexaGAN is framing feature recovery, class balancing, and semi-supervised learning as a single, unified task.

  • Filling a missing feature is imputing a value.
  • Balancing a minority class is imputing an entire sample (conditional generation).
  • Semi-supervised learning is imputing a missing label.

By solving these problems concurrently, the components "help" each other. For instance, better feature imputation leads to a more accurate classifier, which in turn provides higher-quality pseudo-labels for the unlabeled data.

Methods: The HexaGAN Architecture

The "Hexa" in HexaGAN refers to its six interacting neural network components, which are trained jointly to learn a robust representation of the underlying data distribution.

HexaGAN Architecture
  1. Encoder ($E$): Maps both labeled and unlabeled data into a shared hidden (latent) space.
  2. Imputation Generator ($G_{MI}$): Fills in missing feature values.
  3. Imputation Discriminator ($D_{MI}$): Unlike a standard GAN discriminator that evaluates a whole sample, this component performs element-wise discrimination, predicting whether each individual feature is real or imputed. This provides much denser, granular feedback during training.
  4. Conditional Generator ($G_{CG}$): Creates synthetic hidden vectors for minority classes to solve class imbalance. Generating hidden vectors ($h_c$) instead of raw data is computationally efficient and less prone to noise.
  5. Conditional Discriminator ($D_{CG}$): Ensures the generated hidden vectors match the distribution of real ones.
  6. Classifier ($C$): Predicts labels and acts as a "label generator" for unlabeled data (pseudo-labeling).

The framework utilizes a modified Wasserstein GAN (WGAN) loss with a zero-centered gradient penalty to stabilize the complex joint training process.

Key Results and Performance

The authors evaluated HexaGAN on a variety of benchmarks, including UCI Machine Learning Repository datasets (Breast Cancer, Credit Approval, Wine), the synthetic Madelon dataset, MNIST, and CelebA.

  • Superior Imputation: HexaGAN outperformed existing methods like MICE and GAIN, showing up to a 14% improvement in Root Mean Square Error (RMSE) for missing data recovery.
  • Classification Boost: In scenarios with 20% missing data, HexaGAN achieved up to a 5% improvement in F1-score compared to cascading combinations of state-of-the-art methods (e.g., GAIN + SMOTE + TripleGAN).
  • Robustness to Sparsity: The model remains remarkably stable even as the "missingness" rate increases. In tests on the Credit dataset, HexaGAN's performance gap over competitors actually widened as more data went missing.
  • Qualitative Quality: Visualizations on MNIST showed that HexaGAN produces much clearer, more recognizable digits when imputing 50% missing pixels compared to standard autoencoders.

Limitations and Future Work

While highly effective, HexaGAN has a few limitations. First, the study primarily focuses on data that is "Missing Completely At Random" (MCAR). In many real-world scenarios, data is "Missing Not At Random" (MNAR), where the reason for the missingness is related to the missing value itself.

Additionally, while the model works well on tabular and image data, extending HexaGAN to time-series data (like electronic health records) remains a key direction for future research, as temporal dependencies add significant complexity. Finally, with six interacting components, the framework relies on several hyperparameters that require careful tuning to balance the various loss functions.

Summary updated

BibTeX
@inproceedings{hwang2019hexagan,
  author = {Uiwon Hwang and Dahuin Jung and Sungroh Yoon},
  title = {{HexaGAN: Generative Adversarial Nets for Real World Classification}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
}
Figure