[Paper Review] Gradient 𝓁 1 Regularization for Quantization Robustness.
This paper proposes a gradient-based ℓ₁ regularization scheme to improve neural network robustness to post-training quantization across multiple bit-widths. By modeling quantization as an ℓ∞-bounded perturbation, the method regularizes the ℓ₁-norm of gradients during training, enabling a single model to be quantized on-demand to various precision levels without retraining or access to training data.
We analyze the effect of quantizing weights and activations of neural networks their loss and derive a simple regularization scheme that improves robustness against post-training quantization. By training quantization-ready networks, our approach enables storing a single set of weights that can be quantized on-demand to different bit-widths as energy and memory requirements of the application change. Unlike quantization-aware training using the straight-through estimator that only targets a specific bit-width and requires access to training data and pipeline, our regularization-based method paves the way for on the fly'' post-training quantization to various bit-widths. We show that by modeling quantization as a $\ell_\infty$-bounded perturbation, the first-order term in the loss expansion can be regularized using the $\ell_1$-norm of gradients. We experimentally validate the effectiveness of our regularization scheme different architectures CIFAR-10 and ImageNet datasets.
Motivation & Objective
- Address the challenge of maintaining model accuracy after post-training quantization to different bit-widths.
- Overcome limitations of quantization-aware training, which requires retraining for each target bit-width and access to training data.
- Develop a training-time regularization method that enables on-the-fly quantization to various precision levels.
- Improve model robustness to quantization without modifying the inference pipeline or requiring per-bit-width retraining.
Proposed method
- Model post-training quantization as an ℓ∞-bounded perturbation to network weights and activations.
- Derive the first-order Taylor expansion of the loss under quantization perturbations.
- Identify the gradient term in the loss expansion as the dominant source of quantization error.
- Regularize the ℓ₁-norm of the gradient with respect to inputs and weights to reduce sensitivity to quantization.
- Apply the regularization during standard training using standard backpropagation.
- Train a single model that supports on-demand quantization to multiple bit-widths without further tuning.
Experimental results
Research questions
- RQ1Can a single neural network be trained to remain robust across multiple post-training quantization bit-widths?
- RQ2How does modeling quantization as an ℓ∞-bounded perturbation inform the design of regularization for quantization robustness?
- RQ3Does ℓ₁ regularization of gradients improve generalization to different quantization levels compared to standard training?
- RQ4Can the proposed method achieve competitive accuracy across bit-widths without requiring access to training data or retraining?
Key findings
- The proposed ℓ₁ gradient regularization significantly improves test accuracy after post-training quantization across multiple bit-widths.
- Models trained with the proposed method maintain high accuracy when quantized to 4-bit, 6-bit, and 8-bit precision without retraining.
- The method outperforms standard training and quantization-aware training in scenarios requiring on-the-fly quantization to varying bit-widths.
- The regularization effectively reduces the sensitivity of the loss to ℓ∞-bounded quantization perturbations, as shown in theoretical and empirical analysis.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.