Borrowed eyes: transfer learning, autoencoders, VAEs and GANs

The board that draws a photograph as a grid of pixels. This lesson starts from what a network learns to see in that grid, then asks how to reuse it, squeeze it, and make new pictures from it.
A small hospital in Pune has 300 chest X-rays, each marked healthy or not by a doctor. A network like the one in the last lesson needs millions of photos to learn what an edge, a texture and a shape are. With 300, it memorises them and fails on the next patient. The hospital cannot buy more labelled X-rays this year. It has one cheap way out: use a network that already learned to see on someone else’s millions of photos.
By the end you will be able to reuse a trained network on a small dataset, explain how an autoencoder squeezes data and why a VAE or a GAN can make new data from the squeeze, and say what each one gets wrong.
The history (optional)
In July 2006 Geoffrey Hinton and Ruslan Salakhutdinov published “Reducing the dimensionality of data with neural networks” in Science. They showed that a network trained to rebuild its own input through a narrow middle gives short codes that beat the older method, principal components analysis. In December 2013 Diederik Kingma and Max Welling put the first version of “Auto-Encoding Variational Bayes” on arXiv. That is the variational autoencoder. In June 2014 Ian Goodfellow and seven co-authors submitted “Generative Adversarial Nets” to arXiv, and the paper went to NeurIPS that year. Also in 2014, Jason Yosinski, Jeff Clune, Yoshua Bengio and Hod Lipson published “How transferable are features in deep neural networks?” It measured, layer by layer, how much of a trained image network can be reused. Nothing later in this lesson depends on these dates.
Before you start. From Convolutional Networks: a kernel is a small grid of weights slid across an image, and stacked layers learn edges first, then textures, then parts, then whole objects. From What a Neural Network Is: a network is layers of weighted sums, and all its weights together are its parameters. From How It Learns (loss, gradient descent, backprop): training nudges every weight to shrink an error score, called the loss, and a network with too many weights for too few examples memorises them. From Fine-tuning & Alignment: you can freeze weights, meaning you keep them fixed and train only the rest.
