08 — Training

Backpropagation#

Algorithm✓ Mathematical
◆ The PatternChain rule applied through a network — how every weight gets its gradient

Backprop answers: "how much did each weight contribute to the error?" It uses the chain rule to propagate gradients backward from the loss to every parameter.

∂L/∂w₁ = ∂L/∂ŷ · ∂ŷ/∂h · ∂h/∂w₁
Chain Rule: multiply local gradients along the path from loss back to each weight
// Forward pass → loss → backward pass → weight update
Click Animate
Vanishing gradients: In deep networks, multiplying many small numbers (sigmoid derivatives ≤ 0.25) makes early-layer gradients near zero. Solutions: ReLU activations, batch norm, residual connections, gradient clipping (topic 14).
Pattern bridge: The chain rule propagates credit backward through layers — the same logic as information cascades in markets where effects ripple back.
← Previous
Loss Functions
Open in the full reader, with the topic sidebar →