Giter Club home page Giter Club logo

semi-supervised-learning-gan's Introduction

Semi-supervised Learning with Generative Adversarial Networks (GANs)

Modern deep learning classifiers require a large volume of labeled samples to be able to generalize well. GANs have shown a lot of potential in semi-supervised learning where the classifier can obtain good performance with very few labeled data (Salimans et. al., 2016).

Overview

To train a -class classifier with a small number of labeled samples, discriminator (D) in a GAN's game should be replaced with a -classiifer where it receives a data point as input and outputs a -dimensional vector of logits . These logits can then be transferred into class probabilities, where:

provides the probability that is fake.

provides the probability that is real and belongs to class . Now, the loss of discriminator can be written as:

where:

is the standard supervised learning loss function given that the data is real and:

is the standard GAN's game-value where:

.

Now, let's denote the activations on an intermediate layer of discriminator. The feature matching loss of generator can be defined as:

Feature matching has shown a lot of potential in semi-supervised learning. The goal of feature matching is to push the generator to generate data that matches the statistics of real data. Discriminator is used to specify those statistics as it naturally learns to find features that are most discriminative of real data versus data generated by the current model.

In this code, I combined with the known generator cost that maximizes the log-probability of discriminator being mistaken:

.

So, the loss of generator can be written as:

Results

Table below shows cross-validation accuracy of semi-supervised learning GAN for 1000 epochs when 10% and 100% of MNIST data is labeled.

10% labeled data 100% labeled data
0.9255 0.945

Figure below shows cross-validation accuracy for 1000 epochs when 10% of data is labeled. As can be seen here, training has not yet reached a plateau which indicates further training could provide higher accuracy.

Figures below show some generated samples at different epochs of training when 10% of data is labeled:

Reference:

Salimans, T., Goodfellow, I., Zaremba, W., Cheung, V., Radford, A., and Chen, X. (2016). Improved Techniques for Training GANs. In advances in Neural Information Processing Systems (NIPS), pages 2226-2234 (http://papers.nips.cc/paper/6125-improved-techniques-for-training-gans.pdf)

semi-supervised-learning-gan's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

semi-supervised-learning-gan's Issues

Advance training technics used

Thanks for sharing.
May you kindly list the advance training technics you implemented from article "Improved Techniques for Training GANs" ?
Did you implemented all the below ? Have you compared what of those was more effective improving the final score ?

  1. Feature matching
  2. Minibatch discrimination (the article suggest to do not use for the need of semi-supervised-learning
  3. Historical averaging
  4. One-sided label smoothing
  5. Virtual batch normalization

Reading the article it is not clear to me if they used all or not. Do you have a better understanding ?

Version used

Hello
Can you please which version of tensorflow and keras you have used to run this code on
Thanks and great work !

Missing images in Readme

Hi, dear author's GitHub.

Would you mind adding the missing images on Readme?? Just to understand the whole idea.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.