Free neural network visualizer

Neural Network Playground: Watch a Tiny Network Learn Step by Step

A neural network is a stack of simple math units (neurons) whose weights are tuned from examples until its predictions match the data. This free playground trains a tiny network right in your browser: step through one forward pass, loss and backpropagation update at a time, and watch the decision boundary learn to separate two classes.

Train a tiny neural network

Pick data and a network shape, then press Step to run one round of training and read what changed.

Filled dots: training data. Hollow dots: test data the network never trains on. Click anywhere to inspect a prediction.

Epoch
0
Train loss
0.713
Test loss
0.670
Test accuracy
60%

Loss over time: solid = training, dashed = test.

Press Step to run one epoch and see the forward pass, loss, backpropagation and weight update explained.

x → h1.1: weight 0.254y → h1.1: weight -0.995x → h1.2: weight 0.055y → h1.2: weight 0.962x → h1.3: weight 0.937y → h1.3: weight -0.438x → h1.4: weight 0.226y → h1.4: weight 0.441h1.1 → output: weight -0.163h1.2 → output: weight 1.084h1.3 → output: weight -0.098h1.4 → output: weight -0.025xyh1.1h1.2h1.3h1.4outputinputhidden 1output

How to use the playground

  1. 1. Choose data

    Pick a dataset (circle, XOR, two blobs or spiral) and how much noise to add.

  2. 2. Shape the network

    Choose one or two hidden layers with 1 to 8 neurons each, and a learning rate.

  3. 3. Step through training

    Press Step to run one epoch and read the forward pass, loss, backpropagation and weight update explained.

  4. 4. Watch it learn

    Press Train to run continuously and watch the decision boundary, loss curve and weights change.

  5. 5. Inspect and share

    Click the plot to see one prediction neuron by neuron, then copy a share link for your setup.

Things to try: XOR with 1 neuron (it cannot solve it) versus 4; the spiral with two layers of 8; learning rate 3 to see unstable training; lots of noise with 8 neurons to see overfitting.

Frequently asked questions

What is a neural network?

A neural network is a program that learns patterns from examples. It is built from layers of simple units called neurons; each one multiplies its inputs by weights, adds them up with a bias and passes the result through an activation function. Training adjusts the weights until the network's outputs match the examples.

How does backpropagation work?

Backpropagation measures how wrong the network is with a loss function, then works backward from the output layer using the chain rule to find how much each weight contributed to that error. That number is the weight's gradient. Gradient descent then nudges every weight a small step in the direction that lowers the loss.

What does the learning rate do?

The learning rate sets how big each weight update is. Too small and training crawls; too large and the loss bounces around or gets worse because each step overshoots. In this playground, try 0.3 for steady learning and 3 to see training become unstable.

What is overfitting?

Overfitting is when a network memorizes its training examples, including their noise, instead of learning the general pattern. You can spot it when training loss keeps falling while loss on held-out test data stops improving or rises. Smaller networks, more data and less noise help.

Is ChatGPT a neural network?

Yes. ChatGPT is built on a very large neural network called a transformer, with billions of weights instead of the few dozen here. It is trained with the same basic recipe this playground shows: a forward pass, a loss, backpropagation and gradient descent, repeated over huge amounts of text.

The same recipe, scaled up billions of times, powers today's AI breakthroughs. Get the good news in the free daily AI Wins digest.

Get the free digest

Get the free AI Wins digest

Only positive AI stories, delivered daily or weekly. Free, no spam, unsubscribe anytime.