M08 / FOUNDATIONS

The MLP. Watch one training step
flow through the network.

The multi-layer perceptron is the atom of deep learning. Here a tiny 2→2→1 network trains in front of you: the signal flows forward (yellow), the error flows backward (magenta), weights update, the loss drops. Every number is shown in sync with the animation — nothing hidden.

EXPERIMENT 08.01 · MLP.TRACE NET · 2 → 2 → 1 · sigmoid LOSS · ½(ŷ−y)² STATUS · LIVE
FORWARD · hidden layer cycle 1
PREDICTION ŷ vs TARGET y
ŷ = 0.50 error = 0.40 target = 0.90
LOSS over cycles
loss — · step 0
THIS PHASE · the math
CONTROLS
SPEED1.0×
lr η3.0
hidden layers2
neurons / layer3
activation tanh
loss mse
optimizer adam
x₁0.10
x₂0.30
target y0.90
WEIGHTS live
On weight initialization → notice the weights start as small random numbers (Xavier-style: scaled by 1/√fan-in), never zero. If every weight were identical, all hidden neurons would compute the same thing and receive the same gradient forever — they'd never differentiate. Random init breaks that symmetry. Hit RE-INITIALIZE to draw a fresh set and watch training restart.
This is the entire algorithm. Forward → loss → backprop → update, on repeat. A real network does exactly this with millions of weights over millions of examples. To see it train on a real dataset as a living diagram, open Training MLP in the Laboratory.