Abstract
This work introduces the Continuous Conditional Generative Adversarial Network (CcGAN), a novel framework designed for image generation conditioned on continuous scalar variables, such as age or rotation angles. Traditional conditional GANs (cGANs) are optimized for categorical labels and struggle with the infinite nature and data sparsity inherent in continuous regression labels. CcGAN addresses these challenges through two primary innovations: (1) a reformulation of empirical cGAN losses into vicinal discriminator losses (Hard and Soft Vicinal Discriminator Losses) to handle sparse data, and (2) new label input mechanisms (Naive and Improved Label Input) to effectively integrate scalar conditions into the model. We also introduce two benchmark datasets (RC-49 and Cell-200) and a new evaluation metric, Sliding Fréchet Inception Distance (SFID). Our results demonstrate that CcGAN significantly outperforms standard cGANs in generating high-quality, diverse images across various continuous domains.
Introduction
Conditional GANs have seen immense success in generating images based on discrete categories. However, many real-world applications require conditioning on continuous scales. For instance, generating a face at a specific age or an object at a precise orientation involves "regression labels" rather than simple class labels.
Existing cGAN architectures face two fundamental problems in this context:
- Data Sparsity (P1): Continuous labels mean that for any specific value (e.g., 27.4 years old), there may be very few or even zero real training images. Standard empirical losses fail because they rely on sufficient samples per label.
- Label Input Mechanism (P2): One-hot encoding is impossible for infinite continuous values. Simple discretization (binning) ignores the inherent correlation between neighboring labels, often leading to mode collapse or poor interpolation.
Methodology
Vicinal Discriminator Losses (S1)
To overcome data sparsity, CcGAN adopts the principle of Vicinal Risk Minimization (VRM). Instead of requiring an exact match between a generated image's label and a real image's label, the discriminator learns from a "vicinity" of the target label.
- Hard Vicinal Discriminator Loss (HVDL): The discriminator considers all real samples within a distance $\kappa$ of the target label $y$ as "real" for that condition.
- Soft Vicinal Discriminator Loss (SVDL): This approach uses a smoothing kernel (e.g., Gaussian) to weight real samples. Images with labels closer to $y$ have a higher influence on the loss, providing a smoother training signal.
Label Input Mechanisms (S2)
To feed a scalar number into a complex neural network effectively, the authors propose two mechanisms:
- Naive Label Input (NLI): A simple linear projection of the scalar label into the network's latent space.
- Improved Label Input (ILI): This uses a pre-trained "oracle" network to map labels into a high-dimensional feature space, helping the GAN understand the underlying structure of the labels.
Sliding Fréchet Inception Distance (SFID)
To evaluate performance on sparse continuous data, the authors proposed SFID. Unlike standard Intra-FID, which requires many samples per discrete label, SFID uses a sliding window to calculate FID scores across the label range, providing a reliable measure of quality even when data is thin.
Experiments and Results
The researchers evaluated CcGAN on five diverse datasets: Circular 2-D Gaussians, RC-49 (3D chairs), Cell-200 (microscopy), UTKFace (age), and Steering Angle (dashcam).
Key Findings
- Superior Quality: CcGAN consistently produced sharper and more diverse images than binned cGANs. In the Cell-200 and Steering Angle tasks, standard cGANs often suffered from severe mode collapse, while CcGAN maintained high fidelity.
- Quantitative Performance: On the RC-49 dataset, CcGAN (using SVDL and ILI) achieved an Intra-FID of 0.389, a significant improvement over the 1.720 achieved by the best binned cGAN baseline.
- Smooth Interpolation: By treating labels as continuous, CcGAN learns a smooth manifold. Transitions between labels are fluid, whereas binned models often show visual "jitter" as they jump between discrete categories.
Conclusion
CcGAN provides a robust framework for continuous conditional generation. By rethinking discriminator losses through a vicinal lens and improving how labels are embedded, it overcomes the sparsity and input challenges that previously limited GANs in regression tasks. Future work will explore multi-dimensional continuous conditioning and automated hyper-parameter tuning for the vicinity kernels.
Summary updated