Professor Turing

Study guides

Understand backpropagation

Last updated: 2026-10-29

The usual sticking point

Most people can follow the formula for backpropagation and still cannot say why the gradient of an early weight contains the weights of the layers after it. That gap is where the idea is, and it closes when you compute one by hand.

Start learning No account needed

A one-neuron-per-layer example to try on paper

Take a tiny network with no activation function. The input is x = 1. The first layer computes a1 = w1 · x, and the second computes a2 = w2 · a1. The loss is L = (a2 − t)2, where t = 4 is the target. Use w1 = 2 and w2 = 3.

  1. Compute a1, a2 and L going forward.
  2. Write the derivative of L with respect to a2.
  3. Use it to get the derivative of L with respect to w2.
  4. Now do the same for w1. Before you start, write down which quantities sit between w1 and L.

Three questions that find the gap

  • Where does the chain rule apply? Name every link between the weight and the loss.
  • Which weight are you differentiating with respect to, and which other quantities depend on it?
  • Which direction should the weight move to make the loss smaller, and why does the sign of the gradient tell you?

If you can answer the second question for w1, you can see why w2 shows up in the gradient of w1.

Test yourself without help

Cover the page and redo the example from a blank sheet, then change the numbers: x = 2, w1 = 1, w2 = 3, t = 4. If you cannot start, find the step where you stall and work on that step alone.

Numbers to check against for the first example: a1 = 2, a2 = 6, L = 4. The derivative of L with respect to a2 is 4. For w2 it is 4 × 2 = 8. For a1 it is 4 × 3 = 12, and for w1 it is 12 × 1 = 12.

Work it with the tutor

Professor Turing is a tutor that asks before it answers. Describe where you got stuck and what you tried, and it asks you questions one step at a time. If you send a number, it asks how you got it, whether it is right or wrong. If you show your work and it is right, it says so. It will not give you the final answer, so try a first step before you ask for help.

Start learning No account needed

See also: all study guides