ML Playground

Change a learning rate, draw a decision boundary or inspect attention weights in eight browser experiments. These small examples explain mechanisms; they do not evaluate a production model.

Fig. 03 / Field notesFollowing the gradient
Gradient descent on a quadratic loss surface. Successive steps converge toward the minimum.
Each step uses the slope of the same quadratic loss.

Neural Network Explorer

Watch signal propagation through a configurable feedforward network. Adjust layers and neurons, see activations flow in real time.

2 4 ×1
Think of a neural network like a group of people passing a message. Each person (neuron) gets information from the people before them, does a quick calculation, and passes it forward. The blue glow shows which neurons are reacting. More layers means the network can learn more complex patterns — but it also needs more data.

Gradient Descent

See the optimizer in action. Click anywhere on the surface to place the ball — watch it roll downhill to find a minimum.

0.05
Imagine you're blindfolded on a mountain and need to find the lowest valley. You feel the ground around you and take a step in the steepest downhill direction — that's gradient descent. The orange ball shows this process. The learning rate slider controls step size: a big step gets there fast but might overshoot, a small step is safer but slower. The plot is keyboard-accessible: use the arrow keys to move the ball, Enter or Space to start rolling. Background: gradient descent and backpropagation, explained.

Backpropagation

A two-layer network showing forward and backward passes. Forward propagates input to output (steel blue). Backward sends error gradients (vermilion, dashed).

This is how neural networks learn from their mistakes. First (steel-blue lines), the network makes a prediction by passing numbers forward. Then it checks how wrong it was. The vermilion dashed lines show error information traveling backward, telling each connection how much it contributed to the mistake — like a team reviewing who dropped the ball, but in reverse order. Background: gradient descent and backpropagation, explained.

CNN Kernel Explorer

Click cells in the input grid to draw a pattern. Choose a kernel and see how convolution transforms the image.

A kernel is like a stencil that slides over your picture looking for specific patterns. Click or drag on the grid to draw something (keyboard: arrow keys move the cursor, Enter toggles a cell), then try different stencils. Edge detection finds borders between light and dark. Blur smooths things out. Sharpen makes contrasts stronger. The kernel slides across every position — that's the "convolution" part.

Attention Visualizer

See how self-attention lets each word look at every other word. Click a token to highlight its attention weights and the context it builds.

Click a token to see which tokens it attends to.

Activation Function Explorer

Plot the functions that give neural networks their nonlinearity. Toggle each one on or off and move your cursor to read exact values.

Move your cursor over the graph to read values.

Perceptron Learning

Place blue and red points, then train a perceptron. Watch the decision line rotate as it corrects each mistake — until it separates the classes.

Click to add points (blue first). Add both classes, then Train.

Polynomial Fit (Overfitting)

Fit polynomials of different degrees to the same points. A low degree underfits; a very high degree fits every point but wiggles wildly between them.

3
Click to add points, or generate random data, then adjust the degree.

Why model output is so easy to over-trust

A short companion to the tools above.

All videos