Interactive Lab · Neural Networks

How does signal flow through a neural network?

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

activation function φ: ReLU: max(0, z), keeps positives, zeros out negatives.

Tip: click any edge to bump its weight (+0.4 each click, Shift-click to subtract). Or use the sliders below.

positive signal (excites) negative signal (inhibits) edge thickness = |signal| · node fill = activation
output 0.00 = φ( Σ w·h + b )
−22
−22

Layer-1 weights (inputs → hidden), pick which hidden neuron you're steering:

edit weights into:
−2.52.5
−2.52.5

The math that's actually running, live numbers



    

🧭 Where this fits

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.

🔮 Predict, then test

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

Your new mental model of a neural network