Product-Aware Deterministic Rounding for Quantized Matrix Multiplication
Organizations: Oak Ridge National Laboratory, Oak Ridge, Tennessee 37831, USA
Abstract
Scalar rounding decisions interact through matrix multiplication. We study deterministic product-aware rounding after scales, clipping bounds, and grids are fixed, with each active scalar choosing between adjacent levels. For dynamic activation rounding, null-space reduction preserves the relaxed product while leaving at most fractional decisions, where is the rank of the active gap-weighted weight block. Conditional-expectation completion gives a deterministic polynomial-time algorithm with squared product error at most , where is the best admissible error and is the largest row norm of that block. For reusable static weights, the exact expected product-loss metric is the uncentered input second moment with fixed output bias; free bias recalibration yields the centered covariance. Exact optimization is NP-hard even at rank one. In balanced blocks with and , conditional- expectation completion attains a dither-normalized median error of , compared with for round-to-nearest. Clipping-aware initialization reduces median normalized error by a factor of at ten-percent clipping. Held-out Digits experiments show that retaining the input mean or correcting the output bias improves median product error over round-to-nearest in all four tested bit-width and calibration-size settings.
Figures & tables
| Symbol | Meaning |
| Shared inner dimension, dynamic block width, and number of columns in the reusable static factor. | |
| Adjacent lower and upper levels, their coordinate-dependent step size, and a common step when one is assumed. | |
| Observed offset fractions and binary lower/upper choices. | |
| Active and fixed coordinate sets, and the embedding of active step sizes into the full inner dimension. | |
| Errors forced by saturation or exact representation, and their image through the weight block. | |
| Weight block, its step-weighted version with rows , where . |
| Exact | RTN | Bern. | Nearest | CE | Cert. | Diag. oracle | Face gap | |
| RTN | Bern. | Nearest | CE [IQR] | Diag. oracle | ||
| Method | Error/dither | Median time (ms) |
| RTN | ||
| Analytic Bernoulli evaluation | ||
| Nearest completion | ||
| CE completion | ||
| Reached-face diagnostic oracle |
| RTN/dither | CE/dither | Cert./dither | CE (raw) | |||
| Cert. | RTN | Bern. | Nearest | CE | Diag. oracle | ||
| (%) | /dither | QP/dither | (raw) | QP (raw) | Ratio | QP time (ms) |
| Bits | Cal. | Method | Held-out/RTN [95% RI] |
| 128 | RTN | ||
| 128 | RTN + bias | ||
| 128 | Centered, fixed bias | ||
| 128 | Centered + bias | ||
| 128 | Uncentered | ||
| full | RTN |
| Method / role | Target | Loss or norm | Rounding choices | Reuse constraint |
| Dynamic construction | One observed row–block product | Squared Euclidean | Fixed adjacent levels; forced clipping retained | One activation copy per output block |
| Static identity | Expected linear-layer output | Second-moment quadratic | Fixed columnwise sets | One weight matrix for future inputs |
| AdaRound Nagel et al.,2020 | Calibration layer outputs | Reconstruction loss | Learned adjacent-level decisions | Weights reused across inputs |
| GPTQ Frantar et al.,2023 | Calibration linear outputs | Gram-weighted quadratic | Grid rounding with sequential compensation | Weights reused across inputs |
| Linear discrepancy Lovász et al.,1986 | Worst fractional target | Commonly | Binary vector | Guarantee over targets |
| Babai Babai,1986 | Nearest lattice point | Euclidean distance | Unrestricted integer basis coefficients | Fixed lattice basis; new target per query |
| Bits | Cal. | Paired comparison | Ratio [95% RI] | Mean | Wins |
| 128 | Centered / RTN | ||||
| 128 | Centered+bias / RTN+bias | ||||
| full | Centered / RTN | ||||
| full | Centered+bias / RTN+bias | ||||
| 128 | Centered / RTN | ||||
| 128 | Centered+bias / RTN+bias |
Neural Network Quantization
Neural network quantization represents weights, activations, and states with fewer bits to reduce memory use, computation, and deployment costs.
See all 404 papers