🔄 Backpropagation Step-by-Step

Watch how gradients flow backward through the network

Click "Forward Pass" to start
Component Value Gradient
Input - -
Weight 1 0.5 -
Hidden - -
Weight 2 0.8 -
Output - -
Loss - -

How Backpropagation Works:

  1. Forward Pass: Calculate output from input through weights
  2. Calculate Loss: Compare output with target
  3. Backward Pass: Calculate gradients using chain rule
  4. Update Weights: Adjust weights opposite to gradient direction
Forward: output = σ(w₂ · σ(w₁ · input))
Loss: L = (output - target)²
Backward: ∂L/∂w = ∂L/∂output · ∂output/∂w (chain rule)
Update: w_new = w_old - α · ∂L/∂w