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.
On this page
The question for today
What you’ll understand
- Explain how repeated positive additions can stagnate below local spacing.
- Separate a deterministic directional error from a claim about statistical expectation.
- Compare accumulator precision and summation structure while preserving the same input values.
A reduction can underestimate a sum of nonnegative contributions even when every input is represented exactly. Once an accumulator becomes large enough, each remaining small contribution can round away individually. This matters for positive normalization terms, squared quantities, and selected partial sums in learning kernels. Calling rounding noise zero mean does not repair a deterministic sequence with errors all pointing the same way. The arithmetic path, signs, magnitudes, and ordering determine which mechanism is actually present.
Follow the accumulator's local grid
Consider adding a fixed positive value a to an already represented accumulator s. In a region with uniform spacing h and nearest rounding, an addition smaller than h/2 returns to s, provided there is no closer boundary on that side. Repeating that operation does not accumulate the discarded remainder. Each next operation begins from the same represented s. A real-valued recurrence grows with every addition, but the stored recurrence can remain fixed indefinitely until some other operation changes its scale or preserves a remainder elsewhere.
This stagnation is different from converting the small input itself to zero. The input can be a perfectly valid normal number, and the exact sum of many such inputs can be large enough to affect s. A wider multiplication followed by a narrow sum can therefore lose contributions after forming correct products. Conversely, a wide accumulator cannot reconstruct products already rounded inaccurately or flushed to zero before they reach it. Record product precision, partial-accumulator precision, and the final conversion as separate stages of the reduction.
Changing the tree can preserve contributions
Grouping small terms together first can create a subtotal large enough to survive addition to a larger term. That is a concrete benefit of a different summation structure, not a proof that every balanced tree produces the exact real sum. Some inputs contain severe cancellation; others lose products before summation; still others overflow intermediate partial sums. Pairwise summation improves a general depth-based error bound under its assumptions, while compensation or a wider accumulator offers a different way of preserving information. Compare methods on the actual distribution of terms.
If a positive denominator is underestimated while its numerators are otherwise accurate, normalized values can be inflated. For an exact denominator S and stored denominator S_hat, each such quotient has multiplicative factor S/S_hat relative to the desired value. The sum of these computed quotients can exceed one. This observation does not attribute every probability-normalization error to accumulation: exponential approximations, input rounding, division, masks, and later casts have their own effects. Isolate one stage in a controlled fixture before interpreting a complete model output.
Measure a numerical pattern and its cost separately
For deterministic rounding, the errors of a chosen sequence are fixed values, not independent random draws. A sequence with every small addition discarded has a directional error by construction. To discuss statistical bias, first specify randomness over inputs, operation choices, or a rounding rule and define the estimator whose expectation is being compared. Signed reductions can move either way; the positive example establishes a possible systematic mechanism rather than a universal claim that lower precision always underestimates every learning computation.
Construct fixtures that keep inputs unchanged while varying only accumulation type or reduction order. Include a positive tail below local spacing, a cancellation case, a wide dynamic range, and ordinary representative batches. Measure end-task behavior after these mechanism tests rather than replacing it with one scalar sum. In the roofline lab, Reset, set both intensity I=4 FLOP/byte and bandwidth B=50 decimal GB/s, predict 200 GFLOP/s, then Play. Reset and set both I=8 and B=50 to predict 400. Its fixed compute ceiling is 1000 GFLOP/s. These synthetic bandwidth ceilings do not emulate rounding, a wider accumulator, or the changed hardware throughput such a choice may incur.
Work it through
A positive tail disappears after a large partial sum
A hypothetical normalization reduction receives the exactly represented binary16 terms 128 followed by 64 copies of 2⁻⁵. Use nearest rounding into binary16 after every addition, with no overflow or flushed subnormals. Compare the sequential result with grouping the small terms first.
Near 128 on its upper side, binary16 spacing is 2⁻³=0.125. Each added term is 2⁻⁵=0.03125, below half that spacing, so each sequential addition returns the accumulator to 128.
The exact small-term subtotal is 64×0.03125=2. Summing these equal powers of two together gives exactly represented intermediate values and then adding 2 to 128 yields 130, which is representable.
The sequential total is 128 instead of 130, an error of −2. If exact numerators totaling 130 are divided exactly by this incorrect denominator, their computed normalized sum is 130/128=1.015625.
All inputs were representable. The error arose in the chosen accumulation path, and grouping preserved the tail in this specific fixture. Real kernels require separate checks of products, exponentials, division, and casts.
The living notebook
Explore the model
Interactive lab · roofline
A cost ceiling cannot stand in for an accuracy experiment
Reset, set both I=4 FLOP/byte and B=50 decimal GB/s, predict min(1000,50×4)=200 GFLOP/s, then Play. Reset and re-enter both I=8 and B=50 before comparing with 400. Playback traces the fixed synthetic roof; it does not change the controls, measure throughput, or implement low-precision accumulation. The 1000 GFLOP/s compute ceiling remains fixed.
- Attainable ceiling
- 640 GFLOP/s
- Ridge intensity
- 12.5 FLOP/byte
- Ceiling regime
- Memory-bound ceiling
Synthetic roofline ceiling min(1000, B·I), in GFLOP/s, with B in decimal GB/s and I in FLOP/byte. Playback traces the roof without changing the selected kernel. This upper-bound model is not a measured throughput prediction, hardware comparison or price model. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forTest accumulation error directly, and measure the cost of its remedy on the actual kernel.
Pause & reason
Check your understanding
Your turn
Try it yourself
An accumulator is binary16 value 64 and receives 32 positive additions of 2⁻⁶, each rounded immediately to binary16. Spacing above 64 is 2⁻⁴. Find the sequential result, exact result, and a grouping that preserves this particular tail.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Compare one addition with half the local spacing, then combine all small terms before adding them to 64.
Compare with the solution
Each addition is 0.015625, below half of 0.0625, so the sequential accumulator remains 64. The exact tail is 32/64=0.5 and the exact total is 64.5. Grouping these powers of two first produces the representable subtotal 0.5, and 64+0.5 is also representable. This fixture supports a mechanism-level comparison, not an all-input exactness claim for grouping.
Keep the idea
Take it with you
- Representable positive terms can be lost at the addition stage when the accumulator grid is too coarse.
- Reduction order, compensation, and accumulator type address different error paths and have different costs.
- A deterministic directional error needs no zero-mean noise explanation; statistical bias requires a stated random model.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.