Interactive Lab

Scroll-driven articles that make the mechanism visible: concrete examples first, live figures second, and formal math only when it earns its place.

Intermediate

CLIP, Zero-Shot, from the Embeddings Up

A real CLIP-ViT-B/32 from OpenAI runs in your browser via transformers.js. Upload a photo, type whatever labels you want, and watch the model embed both sides into a shared 512-dim space, compute real cosine similarities, and softmax the result into live probabilities. Zero fine-tuning required.

Intermediate

Optical Flow, Frame by Frame

Play a real video frame-by-frame and watch a real Lucas-Kanade solver compute the 2-D velocity of every pixel, then colour the result as an HSV heatmap. Upload your own clip, step through frames, and feel the brightness constancy assumption break on fast-moving sports action.

Intermediate

Image Segmentation, with a Real Segmenter

A pretrained DeepLab v3+ (Pascal VOC, 21 classes) runs live in your browser on whatever photo you give it. Paint your own mask and watch mean-IoU and per-class IoU update against the real model's output — or run classical region growing and see where it breaks.

Intermediate

Object Detection, with a Real Detector

A pretrained COCO-SSD model loads in your browser and runs on whatever photo you give it. Drag ground-truth boxes to compare against its predictions, sweep the confidence threshold, run NMS, and draw the precision-recall curve — all on the real detector output.

Intermediate

Convolution, Step by Step

Pick a 3×3 kernel — edge detector, sharpen, blur, or your own — and step through a convolution one position at a time. See the input region highlighted, the element-wise products inside the kernel, and the output feature map building up. Adjust padding and stride live. This is the mechanics of every CNN, laid bare.

Intermediate

Vanishing Gradient Playground

Slide network depth from 1 to 50 layers. Toggle the activation between sigmoid, tanh, and ReLU. Watch gradient magnitudes at each layer on a log scale. Sigmoid collapses past 20 layers; ReLU stays alive. One slider, one visceral demo of why we abandoned sigmoid for deep networks.

Intermediate

Numerical Tricks of the Trade

Float64 overflows at $e^{700}$. Float32 overflows at $e^{88}$. Neural networks routinely compute quantities that blow past both limits. This page shows the four most important numerical tricks in ML — log-sum-exp, log-softmax, BCE-with-logits, and log1p/expm1 — as side-by-side naive-breaks / stable-works comparisons.

Intermediate

Softmax & Temperature

Edit logits live and watch softmax turn them into probabilities. Slide the temperature knob from 0.05 to 5 and see a peaky distribution morph into a uniform one. Draw one sample at a time or 10,000 at once — the same dial that powers ChatGPT creativity, knowledge distillation, and calibration.

Intermediate

Dropout Playground

Slide the dropout probability p from 0 to 1 and watch a small network flicker. Every frame is a different sub-network. Over many frames you are training an exponential ensemble with shared weights — the core intuition behind the most influential regularizer of 2012.

Intermediate

Receptive Field Grower

Convolutions are local — a single 3×3 kernel only sees 9 pixels. But stack them, and the receptive field balloons. Drag the depth slider, flip between same-kernel and mixed-kernel stacks, and see exactly which input pixels influence a deep feature. The VGG 'stack 3×3 convs' insight becomes obvious.

Intermediate

LR Schedule Visualizer

Four schedules, one canvas. Flip between step decay, exponential, cosine annealing, and warmup+cosine. Drag peak LR, warmup fraction, and cycle length. See the training-time LR curve and overlaid loss curves for each schedule — and exactly why cold-starting at peak LR diverges modern architectures.

Intermediate

LSTM Gates Playground

Three sigmoid gates protect an LSTM's cell state — the forget gate decides what to erase, the input gate what to write, the output gate what to read. Drag each slider, feed in a sequence, and watch the cell state change timestep by timestep. The 'conveyor belt' intuition becomes literal.

Intermediate

The Seq2Seq Bottleneck

Seq2Seq compresses every source token into a single context vector, then generates the target from it. Type a source sentence, slide its length, and watch the context vector's 'information density' fall off. This is the exact failure mode that made attention (1 year later) inevitable.

Intermediate

BPE Tokenizer Step by Step

Type a small corpus, press 'merge', watch the most frequent adjacent pair get glued together. Repeat until the vocabulary reaches your target size. This is exactly how GPT-2, Llama, and Claude build their tokenizers — and how a model ends up with tokens like 'ization', 'tion', or ' the'.

Intermediate

LoRA · Low-Rank Adapter Playground

LoRA injects two small matrices A and B next to a frozen base weight. B·A is low-rank by construction — so fine-tuning a 70B model becomes fine-tuning two 32k-param matrices per layer. Slide the rank, see the trade-off between capacity and cost in real numbers.

Intermediate

VAE Latent-Space Explorer

Slide the KL weight β from 0 (plain autoencoder) to 10 (strong VAE). Watch the 2D latent space of a toy dataset collapse from scattered clumps into a clean unit-Gaussian disc — and watch the reconstruction quality trade off as the prior tightens. The exact knob from β-VAE, visible live.

Intermediate

Diffusion · Forward Noise & Reverse Denoise

DDPM corrupts data into noise over T steps and learns to reverse the corruption. Drag the timestep slider to see a 2D distribution (a spiral) dissolve into an isotropic Gaussian, then press 'reverse' to watch it reassemble. The intuition behind Stable Diffusion, one step at a time.

Intermediate

Classifier-Free Guidance Scale

Classifier-free guidance extrapolates between unconditional and conditional predictions. Slide the weight w from 0 (no guidance, unconditional) through 7 (Stable Diffusion default) to 30 (over-guided ringing). See the generated shape literally stretch toward the target — and break at high w.

Intermediate

Feeling GAN training through the forger-and-detective game

A pedagogical explainer on how GAN training actually works. You'll pick a target distribution, tune a manual discriminator with a slider, derive the optimal D*(x) by hand, click to see the generator's gradient arrow on a single sample, scrub training steps to watch the Nash equilibrium emerge, witness mode collapse on bimodal data, and close with why Wasserstein distance stabilised training in 2017.

Intermediate

Vision Transformers, on Real Photos

A pretrained MobileNet runs live in your browser to turn every patch of your photo into a real 1024-dim feature vector. We then compute honest dot-product attention between those real features — not hand-crafted scalars — and paint the result as an overlay. Upload any photo, drag the patch slider, click a patch, and watch a genuine attention heatmap appear.

Intermediate

The Optimizer Race

Drop a starting point on any of four loss landscapes (ravine, saddle, plateau, Rosenbrock) and watch SGD, Momentum, and Adam race to the minimum with live step counters, loss scoreboards, and log-scale loss curves.

Intermediate

Attention, Calculated

Pick an ambiguous sentence, drag the query and key arrows, and watch dot products, softmax, and value blending update live to produce one contextual meaning.

Intermediate

RAG, From Scratch

A step-by-step walkthrough that builds RAG from two things you already know: next-token prediction and k-nearest neighbours. Interactive 2D embeddings, live retrieval, prompt assembly, and examples across air quality, cooking, and history.

Intermediate

Text Diffusion, Tiny

A hands-on explainer that trains a discrete denoising diffusion model on Indian names in your browser, showing how iterative unmasking generates text without predicting one token at a time.

Intermediate

Seeing the Multivariate Normal

A narrative explainer that starts with the ordinary bell curve, then builds a 2D Gaussian through examples, sampling, parameter learning, marginals, and conditional slices.

Intermediate

Autograd, Seen

A visual explainer for automatic differentiation that first distinguishes autodiff from finite differences and symbolic algebra, then walks a single computation graph forward and backward before showing modules and mini-batch training.