Numerical behavior of learning computations

Trace rounding and conditioning through reductions, losses, gradients, optimizer state, and update accumulation with explicit error checks.

10 published lessons1 module301 min of guided study
  1. 01
    Numerical behavior of learning computationsadvanced · 10 lessons

Follow the path or begin with a question. Every lesson is open.

Your notebook0 of 10 lessons completed

Your place, at your pace. Progress is optional and saved only in this browser when available.

Inside this module

Each lesson includes an interactive lab

Numerical behavior of learning computations

Trace rounding and conditioning through reductions, losses, gradients, optimizer state, and update accumulation with explicit error checks.

  1. 01

    Unit roundoff is half the spacing convention, not the whole error story

    Separate significand precision, local spacing, exponent range, and rounding mode before interpreting numerical tolerances in learning kernels.

    28 min
  2. 02

    Cancellation can expose errors that happened before subtraction

    Separate a sensitive small difference from its computation, then compare raw moments and centered statistics on an exactly specified batch.

    29 min
  3. 03

    Reduction order and compensation solve related but different problems

    Compare sequential and balanced sums, inspect a genuine Kahan counterexample, and explain what a Neumaier correction recovers in one controlled case.

    30 min
  4. 04

    Shift exponential losses before they overflow

    Derive shifted log-sum-exp and direct log-probability losses while preserving finite-input domains and recognizing already lost logits.

    29 min
  5. 05

    Scale the backward path before tiny gradients disappear

    Explain when loss scaling preserves gradient range, why unscaling order matters, and how overflow checks change whether an optimizer step occurs.

    29 min
  6. 06

    A nonzero gradient can still produce no stored update

    Compare update size with the parameter's local ulp, inspect optimizer moments, and separate master-state preservation from visible low-precision copies.

    29 min
  7. 07

    Small positive contributions can disappear systematically in a coarse accumulator

    Distinguish input quantization from reduction error and diagnose order-dependent stagnation in low-precision sums used by learning computations.

    30 min
  8. 08

    Stochastic rounding is conditionally unbiased only under a precise rule

    Derive neighboring-value probabilities and distinguish a locally unbiased rounding operation from independence, reproducibility, and final-model accuracy.

    32 min
  9. 09

    Parallel reduction order can change a valid floating-point answer

    Trace nonassociative sums through parallel and distributed execution while separating determinism, accuracy, conditioning, and actual implementation defects.

    31 min
  10. 10

    Approve a precision change with separate quality and cost evidence

    Build mechanism-level references and controlled end-task experiments before accepting a faster or smaller learning computation.

    34 min
All engineering modules