An autoencoder (AE) is an unsupervised neural network that learns to reproduce its input. An encoder funnels data through a narrow latent representation; a decoder rebuilds the original form from that encoding. Training compares input and output, commonly with mean squared or pixel-wise loss, so the bottleneck learns features that capture the input. section 8.1.1 section 8.6
The convolutional AE layout makes the funnel explicit: convolution and pooling reduce an image to a latent view, while upsampling restores its spatial size. section 8.1.1 section 8.1.2
For 28×28 single-channel images, a practical convolutional AE stacks Conv2D and MaxPool layers in the encoder, ending in the latent view. The decoder applies convolution followed by UpSampling repeatedly, then uses a final one-channel convolutional output. Combine the input and output in a Keras model and compile it with Adam and MSE. section 8.1.2 section 8.1.2
Image reconstruction and latent-space inspection
Train on unlabeled Fashion-MNIST images, then inspect reconstructed outputs and project learned encodings into two dimensions with t-SNE. A digit example shows latent-space clustering by classes even though labels are not supplied during AE training. section 8.1.1 section 8.1.2
Useful experiments keep the encoder and decoder structurally balanced while changing:
- The dataset, including MNIST handwritten digits. section 8.1.3
- Learning rate and batch size to observe training effects. section 8.1.3
- The number of convolutional layers on both sides of the model. section 8.1.3
- Generalization layers such as dropout and batch normalization. section 8.1.3
Architecture can also be evolved with a genetic algorithm. Encode encoder convolution layers, decoder up-convolution layers, batch normalization, and dropout as gene tokens. Generate a decoder with the same number of main layers as the encoder, then use crossover and mutation while preserving the AE funnel. Evaluate each individual by building and training its model, using validation loss as fitness to minimize. This is computationally slow, so reduced datasets can demonstrate the workflow; full data is preferable for optimization. section 8.2.1 section 8.3 section 8.4











