Visual walkthrough — Computational graphs and autograd
We use the same running function as the parent so nothing clashes:
Step 1 — What "derivative" really means: a wiggle
WHAT. Before any graph, fix the one idea everything rests on. A derivative answers a single question: if I nudge the input by a tiny amount, how big is the nudge that comes out? That ratio (out-nudge ÷ in-nudge) is the derivative.
WHY this tool. Training a network means improving the loss. To improve something you must know which way to push each knob — and by how hard. "How much does the output move when I move this knob" is exactly a derivative. So the derivative is not an abstract symbol; it is literally the steering signal.
PICTURE. Look at the figure. We push the input right by a tiny step (the small blue arrow ). The curve carries that push to a tiny vertical step in the output (the pink arrow ). The slope of the little triangle — pink over blue — is the derivative. Steeper triangle = a small input wiggle causes a big output wiggle.

Step 2 — Break the function into primitive gears
WHAT. We cannot wiggle-analyse a big messy formula directly. So we chop into the smallest operations we already know how to differentiate — one operation per box.
WHY. We only have simple wiggle-rules memorised: the wiggle-rule for , for , for . If the whole computation is nothing but these primitives strung together, we can differentiate each box on its own and later glue them. This chopping is the computational graph the parent defined.
PICTURE. Each round node is a value; each arrow is one operation that builds a new value from its parents. Trace it: and flow into a node making ; also flows into a node making ; then and multiply into . Notice the pale-yellow node has two arrows leaving it — remember that; it is the whole plot of this page.

Step 3 — Write the wiggle-rule on every single arrow
WHAT. For each arrow (operation), we compute its local derivative — how much the child wiggles when the parent wiggles, ignoring the rest of the graph.
WHY. Local means "just this one box." A single box is simple enough that we already know its rule by heart. Doing them one at a time is the only reason this is tractable for millions of operations: no box ever needs to know about the whole network.
PICTURE. Each arrow is now labelled with its local wiggle-factor. Read them straight off the boxes:

Each label answers "if the tail of this arrow wiggles by 1, how much does the head wiggle?" — nothing more. (For : wiggling scales up by whatever currently is, so the factor is . See Sigmoid and activation functions later for the box.)
Step 4 — One path: multiply the factors along it
WHAT. Follow one route from an input to and ask how a wiggle survives the trip. Take the route .
WHY. A wiggle passing through a chain of boxes gets rescaled at each box by that box's local factor. Rescale, then rescale again — that's multiplication. This is the chain rule (Chain rule (multivariable calculus)) in its bare mechanical form.
PICTURE. Watch the blue wiggle enter , get multiplied by at the add box, then by at the multiply box. The two factors sit on the two arrows of the highlighted path; the output wiggle is their product.

But this is only one of two routes. Hold that thought.
Step 5 — The forgotten second path, and why we ADD
WHAT. Because leaves through two arrows (Step 2!), a wiggle in also travels the bottom route . The true effect on is the sum of both routes.
WHY. The two routes are two independent deliveries of the same wiggle. If nudging raises a bit through path A and raises it a bit through path B, the total rise is both added together — you cannot get one delivery for free. This "sum over paths" is precisely the multivariable part of the chain rule, and it is the reason autograd uses += not =.
PICTURE. Both routes are lit at once — top (blue) through , bottom (pink) through — merging at . The final derivative is top-factor plus bottom-factor.

Step 6 — Turn "sum over paths" into a backward sweep (the adjoint)
WHAT. Computing every path separately explodes: a deep net has astronomically many paths. Instead we compute, for each node , a single number = "total sensitivity of to ," and pass it backward once.
WHY. Notice the top and bottom paths in Step 5 shared the last arrow into . Rather than re-walking shared arrows, we store the sensitivity at each node and reuse it. Sweeping output → inputs means every node's is ready exactly when its parents ask for it. This is reverse mode, and it is why cost scales with outputs (one loss), not inputs (millions of weights) — see Automatic differentiation (forward vs reverse mode).
PICTURE. The seed is injected at the output. It flows backward: hands and to its parents, then and hand their shares back into (which adds them) and .

Step 7 — Plug in numbers at
WHAT. Run the whole machine on concrete values to see the abstract sweep produce a real gradient.
WHY. Numbers expose whether we truly understand the flow, and let us machine-verify. Note the forward pass stores because the backward factors (, , ) need them — the reason we cache values.
PICTURE. Values flow right (forward, yellow), adjoints flow left (backward, pink), on the same graph.

Step 8 — Degenerate & edge cases (never leave a gap)
WHAT. Cases where naive intuition wobbles. Each still obeys the same rule.
WHY. A reader must never hit a scenario we skipped. Autograd's rule is uniform, so let's watch it survive the weird inputs.
PICTURE. Three mini-boards: a zero local factor, a fan-in node, and a dead-flat slope.

The one-picture summary
Everything on one board: forward values glide right and get cached; the seed enters at the output and adjoints glide left, each arrow multiplying by its local factor, each fan-out node summing its incoming adjoints. One forward + one backward sweep = the gradient with respect to every input.

Recall Feynman retelling — the whole walkthrough in plain words
Think of a row of little machines. First I turn the input knobs and let the numbers roll through — each machine writes down the number it saw (that's the forward pass, and it saves those numbers because it'll need them). Now I ask the last machine: "if your output wiggled by one, whose fault is it?" It looks at its two input wires and says "you two are responsible by this much and that much" — those amounts are just how steep that machine is. Each earlier machine takes the blame it received and passes it back, again scaled by its own steepness. If a wire splits and feeds two machines, the knob it came from collects blame from both and adds them up. When the blame reaches the very first knobs, I now know exactly how much each knob matters — so I know which way to turn every one to make the answer better. That backward blame-passing is Backpropagation, and it costs about the same as running the machines forward once.