Give a real neural network a handful of labelled dots. Press train and watch backpropagation bend its boundary, then check whether it learned the rule or only memorised the dots.
EPOCH0full passes over the data
TRAINING LOSS0.000on the dots it learns from
VALIDATION LOSS0.000on held-out dots
VALIDATION ACCURACY0%held-out dots on the right side
DECISION FIELD
Where does it say orange?
Cyan · class 0
Orange · class 1
Validation
Added by you
x →y ↑
Hover or tap the field to inspect any point.
Arrow keys move the probe. Enter or Space adds a point of the selected class at the probe. Shift with an arrow moves further.
INSIDE THE NETWORK
Neurons and weights
Each hidden square is one neuron’s view of the plane. Lines are weights: thicker means stronger, orange positive, cyan negative.
LEARNING CURVE
Loss over time
Training
Validation
THE DATA
What it learns from
Tap the field to
Changing the dataset, dot count or lies restarts training. Added dots join the training set.
Each hidden neuron draws one soft straight cut across the plane; you can see it in its little square. The output neuron weighs those cuts and squashes the total into a probability. More neurons means more cuts to combine, so the boundary can curve.
How the model works
Guess. For every training dot, the network computes P(orange) from its current weights.
Score. Binary cross-entropy measures how surprised it is by the true labels. A network that always says 50% scores 0.693, the “coin flip” line on the chart.
Blame. Backpropagation works out how much each weight contributed to that loss (its gradient).
Nudge. Every weight moves a step of size learning rate × gradient downhill. One step over all the dots is one epoch.
Check. 48 separate validation dots, never used in the update, show whether the rule generalises.
The weight penalty (L2) adds a pull toward zero on every weight. Small weights make gentle, smooth boundaries that are harder to bend around single lying dots.
HONEST LIMITS
What this is, and is not.
A small full-batch network with one tanh hidden layer, a sigmoid output, binary cross-entropy and optional L2 regularisation. It is not a large language model, and nothing here is sent to a server.
Assumptions, controls & sources
Colour, not height, encodes probability. The field is sampled on a 61 × 61 grid from the same weights the readouts use.
“Labels that lie” flips that fraction of training labels only. Validation dots are always clean, and the validation set is for tuning, not a final unbiased test.
You can add up to 64 dots. They join the training set without resetting the weights.
Training pauses at 20,000 epochs. Speeds are animation rates, not benchmarks.
Keyboard: focus the field, move the probe with the arrow keys (Shift for bigger steps), and press Enter to add a dot. Space toggles training from the Train button.