Generalizing semi-supervised generative adversarial networks to regression.

Greg Olmschenk, Zhigang Zhu, Hao Tang

Abstract

In this work, we generalize semi-supervised generative adversarial networks (GANs) from classification problems to regression problems. In the last few years, the importance of improving the training of neural networks using semi-supervised training has been demonstrated for classification problems. We present a novel loss function, called feature contrasting, resulting in a discriminator which can distinguish between fake and real data based on feature statistics. This method avoids potential biases and limitations of alternative approaches. The generalization of semi-supervised GANs to the regime of regression problems of opens their use to countless applications as well as providing an avenue for a deeper understanding of how GANs function. We first demonstrate the capabilities of semi-supervised regression GANs on a toy dataset which allows for a detailed understanding of how they operate in various circumstances. This toy dataset is used to provide a theoretical basis of the semi-supervised regression GAN. We then apply the semi-supervised regression GANs to a number of real-world computer vision applications: age estimation, driving steering angle prediction, and crowd counting from single images. We perform extensive tests of what accuracy can be achieved with significantly reduced annotated data. Through the combination of the theoretical example and real-world scenarios, we demonstrate how semi-supervised GANs can be generalized to regression problems.

Introduction

Deep learning models are notoriously data-hungry, often requiring thousands of high-quality labels to achieve state-of-the-art performance. Semi-supervised learning (SSL) aims to bridge this gap by utilizing a small amount of labeled data alongside a large volume of unlabeled data. Generative Adversarial Networks (GANs) have been highly successful at SSL for classification tasks. In a typical classification setup, the discriminator is trained to identify $K$ real classes plus a $(K+1)$-th "fake" class produced by a generator.

Standard semi-supervised GAN for classification, where the discriminator identifies K real classes plus one fake class.

The Challenge of Regression

While the $K+1$ approach works for discrete categories, regression tasks—predicting continuous values like age, distance, or temperature—do not have discrete classes. Simply adding a "fake" category to a continuous output range introduces significant bias and makes training unstable. This paper introduces the Semi-supervised Regression GAN (SR-GAN) to solve this problem by moving away from the "fake class" label and toward feature matching.

The proposed SR-GAN architecture for regression tasks like age estimation, utilizing unlabeled data to improve prediction accuracy.

Methods: Feature Contrasting

The core innovation of the SR-GAN is a novel loss function called feature contrasting. Instead of outputting a specific class for fake data, the discriminator looks at internal "features" (activations in hidden layers).

  1. Discriminator Goal: It tries to make the feature statistics of unlabeled real data match those of the labeled data, while simultaneously making the feature statistics of fake data as different as possible from the real data.
  2. Generator Goal: The generator tries to produce images that force the discriminator to see "fake" features as "real" features.
  3. Stability: To ensure convergence, the authors introduce a modified gradient penalty and specific orders for loss functions to prevent the networks from falling into infinite training loops.

Key Results and Data Efficiency

The researchers evaluated the SR-GAN on a synthetic polynomial dataset and the IMDB-WIKI face dataset for age estimation. The results highlight a massive reduction in required labeled data:

  • 50x Data Reduction: On the age estimation task, an SR-GAN trained with only 100 labeled images achieved a Mean Absolute Error (MAE) of 10.6 years. A standard CNN required 5,000 labeled images to reach that same level of accuracy.
  • Regularization Effect: The generator acts as a regularizer, forcing the discriminator to learn a manifold representing the entire data distribution rather than just memorizing a few labeled examples.

Conclusion

By generalizing semi-supervised GANs to regression, the SR-GAN framework provides a powerful tool for tasks where labels are expensive but unlabeled data is plentiful. The use of feature statistics avoids the biases of previous methods, offering a stable path forward for continuous numerical predictions in computer vision and beyond.

Summary updated

BibTeX
@misc{olmschenk2018generalizing,
  author = {Greg Olmschenk and Zhigang Zhu and Hao Tang},
  title = {{Generalizing semi-supervised generative adversarial networks to regression.}},
  year = {2018},
  eprint = {1811.11269},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.11269},
}
Figure