🪞

Autoencoders Intermediate

Compress then reconstruct. Visualise the encoder, the latent bottleneck and the decoder, and measure reconstruction error.

3 lessons 9 quiz questions ⚡ Live compiler
Lessons & quizzes Compiler Certificate

📚 Lessons & quizzes

Each lesson ends with its own short quiz. Answer them as you go — score 90% across all lessons to earn your certificate.

1 Compress and reconstruct

An autoencoder learns to copy its input to its output through a narrow bottleneck, forcing it to discover a compact latent code. Adjust the inputs below and watch the encoder squeeze them to two numbers and the decoder rebuild them.

2 Encoder, latent, decoder

The encoder maps input → latent; the decoder maps latent → reconstruction. Training minimises reconstruction error, usually mean-squared error between input and output. The smaller the bottleneck, the more the network must generalise.

const mse = (a, b) => a.reduce((s, v, i) => s + (v - b[i]) ** 2, 0) / a.length;
// after a forward pass:
const input = [0.7, -0.4, 0.2, 0.9];
const output = [0.66, -0.31, 0.18, 0.85];
console.log('reconstruction error:', mse(input, output));

3 Uses and variants

Autoencoders power denoising, anomaly detection (large reconstruction error = unusual input) and dimensionality reduction. Variational autoencoders (VAEs) make the latent space smooth and probabilistic so you can generate new samples by sampling the latent.

⚡ Autoencoders Compiler

Code runs live in a sandboxed frame, rendered by your browser.

JS

            

🎓 Certificate of Completion

🔒 Complete every lesson quiz above with 90%+ to unlock your downloadable certificate.