ŷ = — L = — Ready
1. Forward 2. Loss 3. Backward 4. Update
Click any connection to inspect its chain rule
Parameter Gradients Selected: h₁ → ŷ
Connection Weight ∂L/∂w −η∂L/∂w After update
Training History Initial loss

Backpropagation

Backpropagation assigns credit or blame for the prediction error to every weight in a neural network. It works backward from the loss, multiplying local derivatives with the chain rule.

What This View Shows

  • Activations view traces values from inputs to prediction
  • Gradients view reverses the flow and colors connections by |∂L/∂w|
  • Click a connection to reveal every factor in its chain rule
  • Parameter table compares gradients and proposed weight updates
  • Gradient check verifies the analytic derivative numerically

Try This

Switch the weight preset from Balanced to Saturated. With sigmoid or tanh, activation derivatives shrink and gradients nearly disappear.

Forward Pass

  1. Each hidden neuron computes zⱼ = Σᵢ wⱼᵢxᵢ + bⱼ
  2. Apply the activation: aⱼ = f(zⱼ)
  3. The output neuron combines hidden activations to produce ŷ
  4. Measure error with L = ½(t − ŷ)²

Backward Pass

  1. Start at the loss: ∂L/∂ŷ = ŷ − t
  2. Multiply by the sigmoid output derivative
  3. Continue backward through each weight and hidden activation
  4. Store one gradient ∂L/∂w for every parameter

Gradient Descent

wnew = wold − η · ∂L/∂w

The learning rate η controls how far the weight moves.

Selected Chain Rule

h₁ → ŷ

Weight Update

Current weight
Analytic gradient
Update −η∂L/∂w
Proposed weight

Numerical Gradient Check

Perturb the selected weight by ±ε and compare the resulting finite-difference slope with backpropagation.

Backprop
Finite difference
Relative error
0.50
0.80
1.00
0.500
Step 0 Loss
Output Target 1.00
Max |Grad| Status Ready
Initial forward and backward passes are ready. Click a connection to inspect it.