Skip to content
SUNSETThe commons
Open app
SUNSET · A copy you can keep

Backpropagation Field Notes

Follow a binary classifier from a forward pass to its exact gradients, one parameter update and a finite-difference check. A compact derivation you can reproduce on paper.

Build the computation graph

Consider one scalar input x, a weight w, a bias b and a binary label y. The logit is z = w x + b. Convert it to a probability with p = sigmoid(z) = 1 / (1 + exp(−z)). Binary cross-entropy is L = −y log(p) − (1 − y) log(1 − p), using natural logarithms. Choose x = 2, w = 0.5, b = −1 and y = 1. The logit is zero, the predicted probability is 0.5, and the loss is log(2), approximately 0.6931471806. This is one logistic output unit. It is useful for understanding a network's local derivatives, but it is not an example of training an entire language model. Draw the graph as x,w → multiplication → addition with b → sigmoid → loss. Every arrow is a dependency. During the backward pass, each node combines its local derivative with the gradient arriving from its consumer. If a value feeds several branches, its gradient receives the sum of those branches' contributions.

Procedure checklist

0 of 8 checks complete. Checks stay on this device when browser storage is available.

Content: CC0-1.0 · Runtime: MIT. No wallet or account is needed to read. Checklist progress stays on this device. Commands are plain text; this guide never runs them.
MAKE THE NUMBERS MOVE

The interactive lab.

Calculated in your browser. No model API or wallet.

Logit
0
Probability
0.5
Loss
0.693147
∂L / ∂w
-1

0 parameter updates. This is one logistic unit, using stable binary cross-entropy.

FOLLOW THE ORIGINAL WORK

Primary references.

Original SUNSET explanations and exercises, released under CC0. The references below retain their own licenses.

Backpropagation · Stanford CS231n

Your offline copy includes the complete reading guide and worked examples. Chapter progress stays on your device.