Professor Thinh Nguyen's AI & Legal Technology Laboratory
Squeeze it, then rebuild it
An autoencoder is two networks trained as one. The encoder compresses an input into a short code; the decoder tries to rebuild the original from that code alone. Because the code is too small to memorize every pixel, the network has to discover what matters. The model below is training in your browser right now on 16 × 16 images of five shapes, with no labels.
Live training
Learn to reconstruct
Updates0
Rebuild error–
Compression–
Parameters–
Training input
Held-out images the network never trains on
Mean squared pixel error, log scale
Training batchesHeld-out images
The loss compares each rebuilt pixel with the original. Nothing else guides training: the shape names you see below are only used for coloring.
A code of 2 numbers gives blurry rebuilds but a map you can explore. Try 16 and compare the error.
Pick Noisy or Holes to train a denoising autoencoder: damaged input, clean target. The top row shows what it receives.
Press New random weights and watch the rebuilds go from gray fog to shapes.
The hourglass
256 pixels in, a few numbers through, 256 pixels out
Draw on the pad. Your drawing is encoded, decoded, and placed on the map below.
Each dot is a neuron, shaded by how strongly it fires (orange positive, blue negative). The narrow waist is the code.
Latent space
Walk the decoder's map
Every image gets a 2-number code, so every image is a point on this map. Colors show the shape type, which the network was never told. Drag anywhere to hand the decoder a code of your own.
Decoded at the crosshair
z = (0, 0)
★ your drawinginterpolation path
Interpolation
Morph through the code, not the pixels
Blending two images pixel by pixel gives a ghostly double exposure. Blending their codes and decoding gives in-between shapes the decoder believes are real. Both rows go from shape A to shape B.