MACHINE LEARNING/Student Engineering Notebook
Page 11·notes
MULTILAYER PERCEPTRONS & BACKPROPAGATION MATH—~34 MIN READ

The Backpropagation Algorithm: Multivariable Chain Rule Derivation

“Backward error propagation, intermediate sensitivity deltas, computational graphs, and SGD updates.”

1.The Step-by-Step Mathematical Derivation of Backprop

Backpropagation is an efficient dynamic programming application of the multivariable calculus chain rule on a directed acyclic computational graph.

The Four Fundamental Backprop Equations:

1. delta^{(L)} = grad_a L * g'(z^{(L)}) (Output layer sensitivity).

2. delta^{(l)} = ( (W^{(l+1)})^T delta^{(l+1)} ) * g'(z^{(l)}) (Sensitivity backpropagated through layer weights).

3. dL / db^{(l)} = delta^{(l)} (Rate of change wrt bias).

4. dL / dW^{(l)} = delta^{(l)} (a^{(l-1)})^T (Outer product gradient wrt weight matrix).

WORKED EXAM ANALYSIS · STEP-BY-STEP DERIVATION

2. Worked Practice Problem: 1-Step Backpropagation Weight Update

⚠️ Pitfall Warning:

Evaluate the activation derivative g'(z) at the pre-activation value z.

Problem: A neuron has single input x = 2.0, weight w = 1.5, bias b = 0. Target output y = 1.0. Activation is linear g(z) = z, loss is squared error L = (1/2)(y_hat - y)^2. Learning rate eta = 0.1. Compute updated weight w_new.

Step 1: Forward Pass:

z = w x + b = 1.5 2.0 + 0 = 3.0

y_hat = g(z) = 3.0

Step 2: Compute Loss and Output Error:

Loss = (1/2) (3.0 - 1.0)^2 = (1/2) 4 = 2.0

dL / dy_hat = y_hat - y = 3.0 - 1.0 = 2.0

Step 3: Compute Gradient wrt Weight w:

dL / dw = (dL / dy_hat) (dy_hat / dz) (dz / dw)

dy_hat / dz = g'(z) = 1.0; dz / dw = x = 2.0

dL / dw = 2.0 1.0 2.0 = 4.0

Step 4: Update Weight via Gradient Descent:

w_new = w - eta (dL / dw) = 1.5 - 0.1 (4.0) = 1.5 - 0.4 = 1.1.

WORKED NUMERICAL · STUDENT DERIVATION✎ Key Takeaway: Backpropagation is this chain rule applied layer by layer, reusing intermediate results.

Worked example: one gradient step by hand

Problem Statement:
The model is ŷ = wx with loss L = (ŷ − t)². With x = 2, t = 3 and w = 1, take one gradient step with η = 0.1.
Step 1: Forward pass

ŷ = 1·2.

2
Step 2: Chain rule

dL/dw = 2(ŷ − t)·x.

2(2 − 3)·2
↳ Result: −4
Step 3: Update

w ← w − η·dL/dw.

1 − 0.1·(−4)
↳ Result: 1.4
Final Answer:w = 1.4 (the new prediction is 2.8, closer to 3)
STUDENT PRACTICE · CONCEPT DRILL

Practice: test yourself

Original practice questions in the GATE style, with worked explanations. Not past-paper questions.

Problem 1 · GATE-LEVEL

The sigmoid's derivative is σ(x)(1 − σ(x)). What is its largest value?

Problem 2 · GATE-LEVEL

Why do deep networks with sigmoid activations suffer from vanishing gradients?

Problem 3 · GATE-LEVEL

Momentum in gradient descent:

SOURCE TRANSPARENCY & CITATIONS

Primary Academic References & Exam Sources

Every concept in Notes From a B.Tech Brain is synthesized from authoritative academic texts, seminal peer-reviewed research, verified exam archives, and renowned university lectures.

Curated University Lecture Series
Neural Networks and Deep Learning ·
LECTURE SERIES