Ask what should change under a concrete input, then trace that expectation through the equation.
Foundation Lab
Backpropagation & Automatic Differentiation
Every modern neural network is trained via backprop—it is the fundamental algorithm enabling gradient-based learning
Selected Foundation Object
Keep the equation fixed; move through the evidence.
Reverse-mode is optimal when outputs << parameters (typical in ML); forward-mode would require one pass per parameter
Use the key equation and canonical papers as the available witnesses, without implying that a runnable panel exists.
The useful learning product is the reusable mechanism you can carry into another model, paper, or engineering tradeoff.
Use prerequisites, dependents, and semantic links to repair the next gap without leaving the object behind.
Why It Matters for Modern Models
- Every modern neural network is trained via backprop—it is the fundamental algorithm enabling gradient-based learning
- Memory cost of storing activations explains why activation checkpointing exists and why large models need gradient accumulation
- Understanding forward/backward asymmetry explains why inference is cheap but training is expensive
What Tutorials Skip
What is still poorly explained in textbooks and papers:
- Reverse-mode is optimal when outputs << parameters (typical in ML); forward-mode would require one pass per parameter
- The computation graph is built dynamically in PyTorch—this is why torch.no_grad() saves memory, not just compute
- Vanishing/exploding gradients arise from repeated multiplication of Jacobians—residual connections fix this by adding identity
Visualization Status
Core Math (Optional Deep Dive)
If you want intuition first, start with the key equation and cited sources. Come back here for the full walkthrough.
The chain rule computes gradients efficiently via reverse-mode autodiff:
For composite function :
The backward pass propagates sensitivities:
Computational cost: one forward pass + one backward pass = O(2 × forward).
Memory cost: must store all intermediate activations .