When Does Compensating Inherited Quantization Error Help? Mean-Square Guarantees for Layer-Wise Quantization and Their Limits
Organizations: College of Physics and Electronic Engineering, Shanxi University, Taiyuan 030006, China
Abstract
Layer-wise post-training quantization methods let each layer compensate for the quantization error inherited from earlier layers. We ask under what assumptions such compensation guarantees a network output error no larger than without it. For linear networks of any depth, with the required calibration Gram matrices invertible, if the rounding error of each layer has zero conditional mean and a deterministic second-moment map common to both schemes, as under subtractive dither on an unbounded grid, then compensation with strengths in fixed in advance gives a mean-square output error no larger than no compensation, each scheme being followed along its own trajectory. The exact gain separates error removed directly from reduced excitation of later rounding noise. Outside this setting the comparison can fail. With rectified linear activations it fails for two independent reasons: noise changes activation states, and, even when no state changes, the correction moves error from samples on which a unit is inactive to samples on which it is active. With stable activations, commutators between the calibration projection and the activation patterns bound the excess. With a bounded codebook, even unique exact layer-wise minimizers with no overload can give a larger output error. For fixed rounding errors it already fails for two scalar linear layers, refuting a published universal guarantee. An exact residual identity gives the necessary and sufficient condition on a common layer input. All these comparisons hold the calibration input fixed. On two 8B models at 4 bits, fixed half-strength compensation beat uncompensated rounding in every model, text and draw tested, yet no rule for choosing the strength beat a layer-wise rule consistently, and lowering the full-network loss on the data used to choose did not reliably lower it on new text.
Figures & tables
| Statement | Exact, shared | First order, shared | Mean square, zero conditional mean |
|---|---|---|---|
| fails (Thm. 17 ) | fails (Thm. 17 ) | fails for some error laws allowed by Thm. 8 (Sec. 4 ); open for uniform dither | |
| Output error of QEP that of BASE | fails (Thm. 17 ); for deterministic codebooks see Thm. 22 | fails (Thm. 17 ) | linear networks: holds (Thm. 8 ). ReLU: fails in general (Ex. 12 , 14 ); holds in the commuting case of Thm. 15 , otherwise up to the excess bounded there |
| fails (Ex. 27 ) | holds, in the repaired form of App. B | holds for linear networks (Thm. 8 ) and in the commuting case of Thm. 15 ; otherwise open | |
| Output error non-increasing in | fails (Thm. 19 ) | fails (Thm. 19 ) | holds for two linear scalar layers (Prop. 7 ); fails between non-zero schedules for sign-valued errors (Sec. 4 ) |
| Layer residual on a common input, QEP BASE | for , iff (Cor. 2 ) | same condition | holds for fixed-step dither on an unbounded grid (Thm. 4 ); can fail under overload (Sec. 3.3 ) |
| removed directly | through later noise | predicted gain | measured gain | error of QEP | |
|---|---|---|---|---|---|
| SmolLM2-135M | Pythia-160M | |||
|---|---|---|---|---|
| WikiText-2 | novel | WikiText-2 | novel | |
| Linear maps with | ||||
| Range of | ||||
| Worse, same rounding error | ||||
| Worse, re-rounded, calibration | ||||
| Worse, re-rounded, held-out | ||||
| Model | Text | RTN | local | block | network | gradient | |
|---|---|---|---|---|---|---|---|
| Qwen3-8B | WikiText-2 | ||||||
| novel | |||||||
| Llama-3-8B | WikiText-2 | ||||||
| novel |