ŷ = —
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
- Each hidden neuron computes
zⱼ = Σᵢ wⱼᵢxᵢ + bⱼ - Apply the activation:
aⱼ = f(zⱼ) - The output neuron combines hidden activations to produce
ŷ - Measure error with
L = ½(t − ŷ)²
Backward Pass
- Start at the loss:
∂L/∂ŷ = ŷ − t - Multiply by the sigmoid output derivative
- Continue backward through each weight and hidden activation
- Store one gradient
∂L/∂wfor 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 |