Almost every formula in this course comes from a Taylor series cut off after a few terms. The first neglected term tells us the error, and "O(h²)" tells us how fast it shrinks.
Round-off: doubles keep about 16 significant digits ().
The other source of error, truncation. The Taylor series lets us predict it before computing anything, and compare methods by their order.
all
all (radians)
all (radians)
only
only
| forward | error | central | error | central error ratio | |
|---|---|---|---|---|---|
| 0.1 | 0.9531018 | −4.69e−2 | 1.0033535 | 3.35e−3 | — |
| 0.05 | 0.9758033 | −2.42e−2 | 1.0008346 | 8.35e−4 | 4.01 |
| 0.025 | 0.9877045 | −1.23e−2 | 1.0002084 | 2.08e−4 | 4.00 |
| 0.0125 | 0.9938016 | −6.20e−3 | 1.0000521 | 5.21e−5 | 4.00 |
Forward errors halve when h halves (order 1). Central errors fall by 4 (order 2). Theory: central error ≈ = 0.00333 for ✓
. The decrease is largest for : that is the update rule (Lecture 25).
Adding (the Hessian) and minimising gives Newton's step: the basis of fast optimisers.
, and GELU are computed with short polynomials whose length comes from remainder bounds.
Gradient checking compares backprop with , the central difference, with : the best step size, explained in Lecture 4.
Errors and their propagation. Measuring errors, how round-off and truncation errors combine and grow through arithmetic, catastrophic cancellation, and the best step size .