Interactive Lab · Neural Networks
A neural network looks intimidating, but the machinery is stunningly repetitive: every neuron does the same two things, take a weighted sum of its inputs, then squash it through a nonlinear function. Do that once and you have a single neuron (a straight line). Stack a layer of them and feed the results forward, and the network can bend that line into a curve. Set the two inputs, tweak a weight, pick a squashing function, and watch one forward pass light up the edges and neurons on its way to a decision.
🎬 Watch the 90-second explainer, then move the inputs and weights below ↓
▶ The playground, set the inputs, nudge a weight, watch the signal flow
Tip: click any edge to bump its weight (+0.4 each click, Shift-click to subtract). Or use the sliders below.
Layer-1 weights (inputs → hidden), pick which hidden neuron you're steering:
The math that's actually running, live numbers
This little network is the atom of deep learning: stack these layers and you get GPT's MLP blocks, vision models, AlphaFold. The no-nonlinearity-collapse you just proved is THE foundational theorem of the field, it's why 'deep' means anything at all, and why activation choice (see the Activation lab) matters.
Set x₁ = 2, x₂ = 2 and watch the output. Now switch the activation from ReLU to sigmoidpredict first: does the output get bigger or smaller, and why does it stop climbing? Next, grab one layer-1 weight and drag it from +2.5 down through 0 to −2.5, and trace how that single number ripples: it re-colours one edge, re-fills one hidden neuron, and shifts every downstream signal. Finally ask yourself: with the activations turned off (imagine φ(z)=z), could three stacked linear layers ever draw anything but a straight line?
The takeaway
φ(Σ w·x + b). That's the entire operation, a layer runs it in parallel, then hands its outputs to the next layer.