Robust Quantization: One Model to Rule Them All

Moran Shkolnik, Brian Chmiel, Ron Banner, Gil Shomron, Yury Nahshan, Alex M. Bronstein, Uri C. Weiser

Introduction

Quantization—the process of converting high-precision floating-point weights (FP32) to low-precision integers (like INT4)—is essential for deploying deep learning models on mobile devices and edge hardware. However, current quantization methods are notoriously brittle.

Typically, if you train a model using Quantization-Aware Training (QAT) for 4 bits, it performs poorly if you later run it at 3 bits or 8 bits. Furthermore, small discrepancies between the training simulation and the actual hardware (such as a 2% error in the quantization step size) can cause accuracy to plummet. In one example, a ResNet-18 model's accuracy dropped by 58% due to such a tiny mismatch. This brittleness forces engineers to maintain different model versions for every specific hardware target and power constraint.

To address this, researchers from Habana Labs and Technion have developed KURE (KUrtosis REgularization), a training method that makes neural networks inherently robust to quantization. By forcing weight distributions to be more uniform during training, they create a single "generic" model that can be deployed across various bit-widths and hardware architectures without massive accuracy drops.

The Power of Uniformity: How KURE Works

Standard neural network weights usually follow a Gaussian (Normal) or Laplace distribution. The authors mathematically prove that these bell-curve distributions are highly sensitive to quantization errors. Conversely, they show that uniform distributions are much more robust, offering a higher signal-to-noise ratio (SNR) and lower sensitivity to changes in quantization parameters.

Mean Square Error vs Bit Width for Uniform and Gaussian distributions

To achieve this uniformity, the authors introduce KURE. Kurtosis is a statistical measure of the "tailedness" of a probability distribution (the fourth standardized moment). KURE works by adding a penalty term to the standard loss function during training:

  1. It calculates the kurtosis of the weights in each layer.
  2. It compares this value to a "target kurtosis" ($K_T$).
  3. For a uniform distribution, the target kurtosis is 1.8.
  4. The model is penalized if its weights deviate from this target.

By "uniformizing" the weights during the initial training phase, the model learns features that are naturally resistant to the noise introduced by quantization later on.

Key Insights

  • Uniformity is Key: The most significant insight is the theoretical proof that uniform weight distributions are mathematically superior for quantization robustness compared to the standard bell curves seen in deep learning.
  • No Accuracy Tax: Surprisingly, forcing weights into a uniform distribution via KURE does not hurt the model's baseline accuracy in full precision (FP32). It changes how the model stores knowledge, not how much it knows.
  • Efficiency over Complexity: Previous attempts at robust quantization required computationally expensive "double backpropagation" (calculating gradients of gradients). KURE uses a simple fourth-moment calculation that adds negligible overhead to training.
  • Hardware Agnostic: Because robustness is baked into the weights, the model becomes compatible with a wide range of hardware-specific quantization policies (different rounding rules, truncation policies, etc.) without needing retraining.

Experimental Results

The researchers validated their approach using the ImageNet dataset across several popular architectures, including ResNet-18, ResNet-50, and MobileNet-V2. The results demonstrate a significant "safety net" for low-precision deployment.

ResNet-18 accuracy across different bit-widths for various kurtosis targets
  • Bit-width Flexibility: A ResNet-18 model trained with KURE ($k=1.8$) achieved 66.9% accuracy at 4-bit quantization, compared to 59.8% for a standard model. At 3-bit, the gap was even wider (57.3% vs 44.3%).
  • Step-size Robustness: In tests where the quantization step size was intentionally perturbed, KURE models maintained stable accuracy while baseline models saw dramatic failures.
  • State-of-the-Art Comparison: KURE outperformed previous robustness techniques across all tested bit-widths while being significantly faster to train. For example, on ResNet-18 at 4-bit, KURE achieved ~67% accuracy while the previous best method struggled to reach 56%.

Limitations and Future Work

While the paper provides a robust framework for weights, the current study focuses primarily on weight quantization. Although the authors note KURE can be applied to activations, the primary experimental evidence centers on the model's parameters.

Future directions include applying KURE to other domains beyond computer vision, such as Natural Language Processing (NLP) and recommendation systems. Additionally, exploring how manipulating distributions toward other known targets might benefit specific hardware architectures, and further integrating activation quantization, could help achieve fully robust "all-integer" inference pipelines.

Summary updated

BibTeX
@inproceedings{shkolnik2020robust,
  author = {Moran Shkolnik and Brian Chmiel and Ron Banner and Gil Shomron and Yury Nahshan and Alex M. Bronstein and Uri C. Weiser},
  title = {{Robust Quantization: One Model to Rule Them All}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=8yfdFH5aN5},
}
Figure