Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Formula & theorem reference

Concept clusters →

Every named result in this course, grouped by chapter. Each one links back to where it's derived.

Backpropagation: how every weight learns

Formula

Softmax-Cross-Entropy Gradient

If \hat y = \operatorname{softmax}(z) and L = -\sum_i y_i \log \hat y_i for a one-hot label vector y, then the gradient of the loss with respect to the logits z is \frac{\partial L}{\partial z} = \hat y - y.

Attention

Formula

Scaled Dot-Product Attention Scaling

Take query and key vectors q, k \in \mathbb{R}^{d_k} with independent, zero-mean, unit-variance entries. Their dot product q \cdot k then has variance d_k. Dividing the score by \sqrt{d_k}, \operatorname{score}(q, k) = \frac{q \cdot k}{\sqrt{d_k}}, restores unit variance regardless of d_k. This keeps the softmax over attention scores away from the saturated, near-zero-gradient region that a growing d_k would otherwise push it into.

Graph settings

Calculator