Cutting a Wire
To make the backward pass precise, we need a formal way to say "how does the output depend on this specific internal wire?" The tool is the wire-cut circuit.
Pick any wire named . The -wire-cut circuit removes that wire and treats its value as a free external input to the rest of the circuit. The output now depends on (what you feed in) as well as the original inputs . We write its functional behavior as .
Now is a well-defined partial: how does the circuit output change when we wiggle just the wire, holding everything else fixed?
To seed the backward pass, note that for the output wire itself: (trivially), so . This is the number we inject at the start.
Formal View
Why This Matters
Wire cutting gives the backward pass a rigorous foundation — it turns gradient propagation into precise partial derivative computation.
- Foundation for formal proofs of backpropagation correctness
- Basis for higher-order autodiff (computing Hessians via backprop through backprop)
- Forward-mode vs. reverse-mode autodiff differ in which wires they "cut" and when
- Sensitivity analysis in scientific computing and engineering design
Learning Resources
Backpropagation calculus | Deep Learning chapter 4
3Blue1Brown
Shows the chain rule structure underlying backprop in a simple chain circuit.
The spelled-out intro to neural networks and backpropagation: building micrograd
Andrej Karpathy
Implements the wire-cut idea by attaching a .grad attribute to each value object.
Quiz
What is the value of ?
In , what is ?
and describe the same function.
The backward pass goal is to compute, for each :
Common Mistakes
- Thinking wire-cutting physically breaks the circuit — it is a conceptual formalism for defining partial derivatives, not an actual modification.
- Forgetting that the seed value 1 comes from .