Towards Efficient Training for Neural Network Quantization

Qing Jin, Linjie Yang, Zhenyu LiaoarXiv 2019

Quantization—the process of reducing the precision of neural network weights and activations from 32-bit floats to low-bit integers (e.g., 2-bit or 4-bit)—is a cornerstone of efficient AI deployment on edge devices. Traditionally, the resulting drop in accuracy, often called the "quantization tax," was attributed to the reduced representational capacity of the model. However, recent research from ByteDance suggests that this drop is frequently a symptom of inefficient training rather than inherent capacity limits.

The Training Inefficiency Hypothesis

Standard training for deep networks relies on two critical rules: (I) logits must stay out of the loss function's saturation region, and (II) gradients must maintain a consistent scale throughout the network. Standard quantization techniques often inadvertently violate these rules. For instance, weight clamping—intended to minimize quantization error—can inflate weight variance by orders of magnitude, causing gradients to saturate and convergence to stall.

Proposed Solutions: SAT and CG-PACT

To address these training bottlenecks, the researchers introduced two primary techniques:

  1. Scale-Adjusted Training (SAT): By analyzing the mathematical impact of weight clamping, the authors found it drastically alters weight variance relative to the number of neurons in a layer. SAT introduces a rescaling factor that restores this variance to an optimal level, ensuring stable gradient propagation.
  2. Gradient-Calibrated PACT (CG-PACT): Parameterized Clipping Activation (PACT) learns optimal clipping levels for activations. The authors identified a gradient calculation error in the original PACT formulation regarding the clipping parameter. CG-PACT calibrates these gradients to account for quantization noise, significantly improving convergence in ultra-low-bit regimes.
Figure 4: (a) The variance ratio increases linearly with the number of neurons when clamping is applied; (b) SAT (Clamp and Rescale) significantly improves training and validation error compared to simple clamping on MobileNet-V2.

Experimental Results

The effectiveness of SAT and CG-PACT was evaluated on the ImageNet dataset across various architectures. A striking finding was that correctly trained quantized models can act as a form of regularization, sometimes outperforming their full-precision counterparts. For example, a 3-bit ResNet-50 achieved 76.6% accuracy, surpassing the 75.9% accuracy of the full-precision baseline.

Figure 2: Top-1 Validation Accuracy on ImageNet for ResNet-50. SAT consistently outperforms existing methods like PACT, LQNet, and LSQ across different bitwidths for both full and weight-only quantization.

On the challenging MobileNet-V2 architecture, 4-bit quantization using these methods reached 71.1% Top-1 accuracy, outperforming standard PACT (70.4%) and mixed-precision approaches like HAQ. Unlike previous specialized methods, SAT demonstrated consistent performance gains across both heavy residual networks and lightweight mobile architectures.

Conclusion and Future Directions

This work shifts the perspective on quantization from a problem of "capacity loss" to one of "optimization failure." By restoring proper gradient flow and variance scaling, quantized models can achieve state-of-the-art efficiency without sacrificing accuracy. Future work remains to be done in absorbing Batch Normalization layers into the quantization process for skip-connection architectures and further exploring the theoretical underpinnings of quantization as a regularizer.

Summary updated

BibTeX
@misc{jin2019towards,
  author = {Qing Jin and Linjie Yang and Zhenyu Liao},
  title = {{Towards Efficient Training for Neural Network Quantization}},
  year = {2019},
  eprint = {1912.10207},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.10207},
}
Figure