Autoencoders: Compress and Reconstruct — lecture notes
Squeeze an image through a tiny bottleneck and rebuild it. Autoencoders learn compact representations — and can clean up noisy inputs.
0:001. Introduction

What if a network had to rebuild its own input, but through a very narrow gap? To succeed, it must learn what really matters. That is an autoencoder.
0:122. Compress and rebuild

The encoder squeezes a 196 pixel image into a code of just four numbers. The decoder tries to rebuild the image from those four numbers. Training minimises the difference between input and output, so the bottleneck is forced to keep only the essential information.
0:313. Denoising

A denoising autoencoder is given a noisy version of the image but trained to output the clean original. It learns what real images look like, so it can remove noise it has never seen before.
0:464. Uses

Autoencoders compress data, remove noise, and detect anomalies: if something reconstructs badly, it probably looks unlike the training data. Their codes also make useful features for other models.
0:595. VAEs

A variational autoencoder encodes each input as a small distribution instead of a single point. That keeps the latent space smooth and organised, so you can sample new codes and generate brand new images.
1:146. Recap

To recap. An encoder compresses and a decoder reconstructs. The bottleneck forces useful representations. Autoencoders denoise, compress and detect anomalies, and VAEs turn the idea into a generator.
Key takeaways
- An autoencoder learns to reconstruct its input through a narrow bottleneck.
- The encoder produces a compact code; the decoder rebuilds the input.
- Denoising autoencoders learn to map noisy inputs to clean outputs.
- Variational autoencoders learn a smooth latent space for generation.
Check yourself
- What is an autoencoder trained to output?
Show answer
Its own input (or a clean version of it) — The target is the input itself.
- Why is the bottleneck small?
Show answer
To force the network to keep only essential information — A narrow code prevents simply copying the input.
- How can autoencoders detect anomalies?
Show answer
Unusual inputs reconstruct poorly — High reconstruction error signals something unlike the training data.
Go deeper
- Autoencoders: Compression, Denoising and Representation Learning · The AI Lecture Hall
- Variational Autoencoders: Probabilistic Latent Spaces · The AI Lecture Hall
- Anomaly Detection: Finding the Unusual · The AI Lecture Hall
© 2026 Janin A Apurba, CSE, AUST · Advanced ICT Officer, CNRS-UNHCR. All rights reserved. Notes for the animated lecture at https://ai-in-motion.vercel.app/watch/autoencoders.html