Backward state choice affects learning outcomes in low precision training
Backward-State Policy Is Part of the Learning Algorithm
Machine Learning
Summary
Training AI models often uses shortcuts when copying numbers during calculations, especially in lower-precision formats to save space and time. The authors found that how these copied numbers are reused in backpropagation, specifically whether the backward step uses the same rounded number or a fresh one, actually changes the learning result. This means the choice of which value to use in each step is not just a technical detail but part of how the model learns. They proposed a way to decide which value to use for each calculation, making these choices explicit and testable without full retraining.
What this means in practice
- •For deep learning engineers: Improve model training reliability by specifying and testing how backward computations reuse rounded values in low precision.
- •For machine learning hardware developers: Design hardware and software that correctly handle backward-state policies to ensure consistent learning outcomes with mixed precision.
Authors
Shuxiao Xie, Shuyang Xie, Dezhi Ran, Wei Yang, Tao Xie
Abstract
Low-precision training rounds tensors that the backward pass reads again, often for several gradients; each use can read the forward's rounded value, the original, or a new random rounding. This backward-state policy looks like a memory and precision detail, settled by copy accuracy and final loss. We argue that it is part of the learning algorithm, and that neither check shows whether it is right. Copy accuracy does not decide the outcome: in three pairs of 390M runs with an emulated FP8 backward, training fails when attention's backward reuses the forward's rounded output and succeeds with a new rounding from the same distribution. Even the most accurate copy, the original itself, can be wrong by our reference: the gradient of the forward pass as it actually ran, with gradients passed through rounding unchanged. For example, a normalization output stored in low precision feeds two gradients: the gain's gradient needs the original, but the next layer's weight gradient needs the rounded value that layer multiplied. Final loss, the other check, does not rule out the error of reading the original for both: it persists in models trained with such a store, while planned loss comparisons stay within a margin fixed in advance. We therefore derive from this reference which value each use must read, or which substitute gives the same gradient on average with the forward held fixed, and check these per-use requirements on single operators, without training. In three tests using PyTorch and Transformer Engine, the requirements predicted beforehand whether reuse changes what the backward computes on average relative to an independent copy, and every prediction held. Backward-state policy is thus part of the learning algorithm: it should be specified and checked use by use, not settled by copy accuracy and final loss.