← Neural NetworksToolsInVisionLearning Center
Backpropagation and Gradients · Lesson 35

Partial Derivatives and the Chain Rule

Isolate each parameter's influence and connect effects across a sequence of neural-network operations.

Watch the lesson

Partial Derivatives and the Chain Rule explained visually

2:58

Use camera controls and connected processes to make partial derivatives and the chain rule intuitive.

Lesson overview

What you will learn

Trace derivatives, gradients, and parameter responsibility through a neural network.

  1. Change one variable
  2. Follow intermediate effects
  3. Apply the chain rule
  4. Reach earlier parameters
01

Change one variable

A partial derivative changes one input while temporarily holding the other variables fixed.

02

Follow intermediate effects

An early weight influences several intermediate calculations before it affects the final loss.

03

Apply the chain rule

Backpropagation multiplies an upstream gradient by each operation's local derivative.

04

Reach earlier parameters

Repeated chain-rule steps connect the final loss to parameters far from the output.

Knowledge check

Quick check: test your understanding

What stays fixed in a partial derivative?

The other input variables.

What values are multiplied during backpropagation?

The upstream gradient and the local derivative.

Why is the chain rule necessary?

Early parameters affect loss through intermediate calculations.

Accessible referenceLesson 35 transcript378 words · Matches the published narration and captionsOpen transcript

A neural network's loss depends on many weights and biases at the same time. A partial derivative lets us study one of those parameters while temporarily treating the others as fixed. Imagine adjusting a photograph with two controls. One control changes brightness, and the other changes contrast.

The final image quality depends on both controls. To measure the effect of brightness alone, we change brightness while holding contrast constant. To measure the effect of contrast, we reverse the experiment. Partial derivatives apply this idea to a function with several inputs. Each partial derivative asks one focused question.

How would the result change if this particular variable moved slightly while the other variables stayed constant? In a neural network, each weight receives its own partial derivative of the loss. Together, these values form the gradient used by the optimizer. However, an early weight does not connect directly to the final

loss. Its effect travels through several intermediate calculations. Consider a camera network. An early weight affects a neuron's weighted sum. That sum affects the activation. The activation affects the next layer, which influences the final prediction. The prediction then affects the loss. The chain rule connects this sequence.

Imagine three gears. Turning the first gear moves the second, and the second moves the third. To determine how the first gear affects the third, we combine the effect of the first on the second with the effect of the second on the third. Backpropagation works in the same way.

It receives an upstream gradient from the calculation ahead, computes the local derivative of the current operation, and multiplies them. The result becomes the gradient passed to the preceding operation. At the output layer, the network measures how the loss changes with the prediction. Moving backward, it combines that information with the derivative of the

output activation, then with the relevant weights, and continues through earlier layers. This repeated use of the chain rule allows the loss to assign responsibility to a weight located far from the output. Partial derivatives separate the influence of individual parameters. The chain rule connects their effects across layers.

Together, they make backpropagation possible. In Lesson 36, we will follow a small network through an actual forward pass and backward pass so this process becomes concrete.