How a neural network trains, step by step

A walk-through of a tiny network that learns to classify emails as spam or not spam from "click here" count and exclamation marks.

Taskclassify an email as spam (output → 1) or not spam (output → 0)·inputs: x₁ "click here" count, x₂ exclamation marks, x₃ day sent (1-7, irrelevant)
Interactive

Step 1 of 8: Welcome

inputshidden layeroutput0.300.100.200.400.050.050.400.30x₁x₂x₃"click here""!" countday senth₁h₂y

A step-by-step demonstration of how a tiny neural network trains. By the end you will see how an input becomes a prediction, how the model measures its error, and how it adjusts its weights to learn.

Legend
orange circle = input
blue circle = hidden neuron
green circle = output neuron
0.30number on a line = weight

Press Next to begin.