Reader small image

You're reading from  Deep Learning with Theano

Product typeBook
Published inJul 2017
PublisherPackt
ISBN-139781786465825
Edition1st Edition
Tools
Right arrow
Author (1)
Christopher Bourez
Christopher Bourez
author image
Christopher Bourez

Christopher Bourez graduated from Ecole Polytechnique and Ecole Normale Suprieure de Cachan in Paris in 2005 with a Master of Science in Math, Machine Learning and Computer Vision (MVA). For 7 years, he led a company in computer vision that launched Pixee, a visual recognition application for iPhone in 2007, with the major movie theater brand, the city of Paris and the major ticket broker: with a snap of a picture, the user could get information about events, products, and access to purchase. While working on missions in computer vision with Caffe, TensorFlow or Torch, he helped other developers succeed by writing on a blog on computer science. One of his blog posts, a tutorial on the Caffe deep learning technology, has become the most successful tutorial on the web after the official Caffe website. On the initiative of Packt Publishing, the same recipes that made the success of his Caffe tutorial have been ported to write this book on Theano technology. In the meantime, a wide range of problems for Deep Learning are studied to gain more practice with Theano and its application.
Read more about Christopher Bourez

Right arrow

Chapter 12. Learning Features with Unsupervised Generative Networks

This chapter focuses on a new type of model, the generative models, which include Restricted Boltzmann Machines, Deep Belief Networks, Variational Auto Encoders, Autoregressive models, and Generative Adversarial Networks. For the first nets, we've limited the presentation to the theory, while the last is explained in detail with practical code and advice.

These nets do not require any labels to be trained, which is called unsupervised learning. Unsupervised learning helps compute features from the data, without the bias of the labels. These models are generative in the sense that they are trained to generate new data that sounds real.

The following points will be covered:

  • Generative models

  • Unsupervised learning

  • Restricted Boltzmann Machines

  • Deep belief networks

  • Generative adversarial models

  • Semi-supervised learning

Generative models


A generative model in neural processing is a model that generates data given a noise vector z as input:

The purpose of the training is to find the parameters to generate data as close as possible to the real data.

Applications of generative networks include data dimensionality reduction, synthetic data generation, unsupervised feature learning, and pre-training / training efficiency. Pre-training helps generalization because pre-training focuses on the patterns in the data, and less on the data-label relation.

Restricted Boltzmann Machines

A Restricted Boltzmann Machine is the simplest generative net, composed of one fully connected hidden layer, as shown in the picture:

The full Boltzmann Machines have also hidden-to-hidden and visible-to-visible loop connections, while the Restricted version does not have any.

In the general case, RBM are defined as energy-based models, which means that they define a probability distribution through an energy function:

Z is the partition function...

Semi-supervised learning


Last but not least, such generative adversarial networks can be used to enhance supervised learning itself.

Suppose the objective is to classify K classes, for which an amount of labeled data is available. It is possible to add some generated samples to the dataset, which come from a generative model, and consider them as belonging to a (K+1)th class, the fake data class.

Decomposing the training cross-entropy loss of the new classifier between the two sets (real data and fake data) leads to the following formula:

Here, is the probability predicted by the model:

Note that if we know that the data is real:

And training on real data (K classes) would have led to the loss:

Hence the loss of the global classifier can be rewritten:

The second term of the loss corresponds to the standard unsupervised loss for GAN:

The interaction introduced between the supervised and the unsupervised loss is still not well understood but, when the classification is not trivial, an unsupervised...

Further reading


You can refer to the following topics for more insights:

  • Deeplearning.net tutorial on RBM: http://deeplearning.net/tutorial/rbm.html

  • Deeplearning.net tutorial on Deep Belief Nets: http://deeplearning.net/tutorial/DBN.html

  • Deeplearning.net tutorial on generating with RBM-RNN: http://deeplearning.net/tutorial/rnnrbm.html

  • Modeling Temporal Dependencies in High-Dimensional Sequences: Application to Polyphonic Music Generation and Transcription, Nicolas Boulanger-Lewandowski, Yoshua Bengio, Pascal Vincent, 2012

  • Generative Adversarial Networks, Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, Yoshua Bengio, 2014

  • Gans will change the world, Nikolai Yakovenko, 2016 https://medium.com/@Moscow25/

  • Pixel Recurrent Neural Networks, Aaron van den Oord, Nal Kalchbrenner, Koray Kavukcuoglu, 2016

  • InfoGAN: Interpretable Representation Learning by Information Maximizing Generative Adversarial Nets, Xi Chen, Yan Duan, Rein Houthooft...

Summary


Generative adversarial networks are a very active area of research today. They belong to the family of generative models, which includes RBM and deep belief networks.

Generative models aim at generating more data, or learning better features for supervised and other tasks in an unsupervised way.

Generative models can be conditioned on some environmental input, and try to find the hidden variables behind the real data.

These models, the most advanced, complete the overview of deep learning nets with Theano. The next chapter will look at some advanced concepts to extend Theano and the future of deep learning.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Deep Learning with Theano
Published in: Jul 2017Publisher: PacktISBN-13: 9781786465825
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Christopher Bourez

Christopher Bourez graduated from Ecole Polytechnique and Ecole Normale Suprieure de Cachan in Paris in 2005 with a Master of Science in Math, Machine Learning and Computer Vision (MVA). For 7 years, he led a company in computer vision that launched Pixee, a visual recognition application for iPhone in 2007, with the major movie theater brand, the city of Paris and the major ticket broker: with a snap of a picture, the user could get information about events, products, and access to purchase. While working on missions in computer vision with Caffe, TensorFlow or Torch, he helped other developers succeed by writing on a blog on computer science. One of his blog posts, a tutorial on the Caffe deep learning technology, has become the most successful tutorial on the web after the official Caffe website. On the initiative of Packt Publishing, the same recipes that made the success of his Caffe tutorial have been ported to write this book on Theano technology. In the meantime, a wide range of problems for Deep Learning are studied to gain more practice with Theano and its application.
Read more about Christopher Bourez