3.1.9 · D5Neural Network Fundamentals
Question bank — Backpropagation algorithm derivation
Quick symbol refresher (so no notation is used unexplained):
- = the pre-activation of layer (the raw weighted sum before squashing).
- = the activation (after the nonlinearity ).
- = the error signal / "blame" of layer .
- = elementwise (Hadamard) product; = the transpose of matrix .
True or false — justify
TRUE or FALSE: Backpropagation is a different rule from the chain rule.
FALSE. It IS the multivariable chain rule — organised so shared sub-derivatives are computed once and cached, rather than a new mathematical law.
TRUE or FALSE: Backprop computes the gradient; it does NOT update the weights.
TRUE. Backprop only produces and . The actual weight change is a separate step done by Gradient descent ().
TRUE or FALSE: The backward pass uses the same matrices as the forward pass.
FALSE (in orientation). Forward multiplies by ; backward routes blame through the transpose , because blame flows outputs→inputs, the adjoint direction — the values are shared but the shape is flipped.
TRUE or FALSE: You need one full forward pass before you can do the backward pass.
TRUE. BP2/BP3 require the cached and from the forward sweep; without them and the outer products are undefined.
TRUE or FALSE: Backprop works only for networks that use the sigmoid activation.
FALSE. The equations hold for any differentiable ; only the specific changes. See Activation functions and their derivatives for ReLU, tanh, etc.
TRUE or FALSE: has the same number of entries as there are neurons in layer .
TRUE. has one component per pre-activation, hence one per neuron in layer .
TRUE or FALSE: If a layer is purely linear (), backprop still needs the gate.
TRUE — but the gate becomes , so it multiplies by one. The gate never disappears; for a linear layer it is simply the identity.
TRUE or FALSE: Making the network deeper always makes the gradient of early weights larger.
FALSE. BP2 multiplies many and factors; if these are small the product shrinks toward zero — the vanishing gradient problem. It can grow or shrink.
Spot the error
SPOT THE ERROR: "In BP2 we evaluate the activation derivative as ."
Wrong argument. It must be , evaluated at the pre-activation. Sigmoid hides this because is expressible in ; for ReLU using instead of 's sign gives wrong gradients.
SPOT THE ERROR: "BP2 reads ."
Missing transpose. is (size (size ); to produce a length- vector from a length- blame you need . Dimensions alone rule out the plain .
SPOT THE ERROR: ", an inner product giving a scalar."
Order and shape wrong. BP3 is the outer product , a full matrix matching 's shape — one gradient per weight, not a single number.
SPOT THE ERROR: "The bias gradient is ."
No. Since , the bias gradient is just (BP4). The activation factor belongs to the weight gradient, not the bias.
SPOT THE ERROR: "For MSE , the output blame equals ."
Incomplete. is only the first factor of BP1; you still multiply by : . (The gate cancels only for the special softmax + cross-entropy pairing — see Loss functions (MSE, cross-entropy).)
SPOT THE ERROR: "To get we chain all the way from back through every layer, freshly each time."
That defeats backprop. The whole point is that reuses the already-cached — dynamic programming, turning exponential recomputation into linear cost.
Why questions
WHY must we sum over in the BP2 derivation?
Because one neuron's output fans out to every neuron in the next layer. Total sensitivity is the sum of blame over all those forward paths — the multivariable chain rule for a variable that influences many downstream variables.
WHY is the derivative called a "gate" on the incoming error?
It scales the blame by how responsive the neuron was: if (saturated), the neuron barely changed its output, so little blame passes through — the gate is nearly shut.
WHY does backprop cache later-layer deltas instead of recomputing?
The gradient of any early weight contains the later deltas as factors. Computing them once and storing them makes every earlier gradient cheap — the same shared-subproblem trick as autodiff.
WHY does the transpose appear specifically in the backward direction?
Forward, maps inputs→outputs; the sensitivity of an output to an input is the adjoint of that map, which for a matrix is its transpose. Blame travels the reverse arrows of the computational graph.
WHY can't we skip the forward pass and start backward with random activations?
BP2/BP3 depend on the actual and produced by the current inputs and weights. Wrong activations give evaluated at the wrong point, so the gradients no longer point downhill on the true loss surface.
WHY do saturating activations like sigmoid cause vanishing gradients in deep nets?
Sigmoid's peaks at and is tiny when saturated. BP2 multiplies one such factor per layer, so a product of many sub-one numbers decays geometrically — see Vanishing and exploding gradients.
WHY is the outer product the right shape for ?
Weight connects input to neuron , so its gradient is (blame of ) (activity of input ) . Sweeping all pairs is exactly the outer product .
Edge cases
EDGE CASE: A ReLU neuron sits at (output ). What blame passes back through it?
None. ReLU's derivative is for , so the gate shuts and for that path is zero — a "dead" neuron receives no gradient and stops learning until upstream weights push its positive.
EDGE CASE: All weights in a layer are initialised to the same value. What breaks?
Symmetry. Every neuron in the layer computes identical , gets identical , and receives identical updates — they stay clones forever. Random init is needed to break this; backprop is correct but useless here.
EDGE CASE: The loss doesn't depend on the network at all (constant loss). What is ?
Zero. , so BP1 gives , and BP2 propagates zeros backward — every gradient is zero, meaning gradient descent takes no step. Correct behaviour: nothing to learn.
EDGE CASE: For the output layer with softmax activation + cross-entropy loss, why does simplify to ?
The softmax Jacobian and the cross-entropy derivative cancel exactly, leaving with no explicit gate. This is a special algebraic coincidence, not the general BP1 — see Loss functions (MSE, cross-entropy).
EDGE CASE: A single-layer network (). Do we ever use BP2?
No. With only an output layer, BP1 gives directly, then BP3/BP4 give the gradients. The recurrence BP2 only fires when there is a next layer to receive blame from.
EDGE CASE: Two forward paths from an early neuron reconverge later (skip connection). Does BP2 still hold?
Yes, if you sum blame over all incoming paths at the reconvergence point. The multivariable chain rule adds contributions from every path; standard BP2 is the special case of a strictly layered graph.
Recall Self-test before you leave
Cover every answer above and re-derive the reason, not just the verdict. Which single factor turns a correct-looking backward equation into a linear-network gradient if you drop it? ::: The nonlinearity gate. Which orientation of routes blame backward, and why? ::: The transpose — the adjoint of the forward map, forced also by dimensions.