Encoder, decoder and bottleneck
The topic Batch normalization, gradients and convolutions left us with the bricks: strided convolutions that shrink an image and transposed convolutions that grow it back. Now we assemble them into the first architecture on the road to models whose likelihood we can compute or at least bound: the autoencoder. It does not generate anything yet, but its two halves reappear in VAEs, VQ-VAEs and latent diffusion.
An autoencoder is trained to reproduce its own input. An encoder with parameters maps an input to a code , and a decoder with parameters maps the code back to a reconstruction :
Reproducing the input is only a pretext. What we actually want is the code. The key is the bottleneck: the code is smaller than the input, , so the network cannot pass the pixels through unchanged. It has to keep what it needs to rebuild the image and drop the rest. Every input becomes a point in a lower-dimensional latent space that is learned from the data.
The idea is old: Rumelhart, Hinton and Williams (1986) already trained a network to squeeze its input through a narrow hidden layer and back.