[Paper Review] Gradient $\ell_1$ Regularization for Quantization Robustness
This paper proposes gradient ℓ₁ regularization to improve post-training quantization robustness in neural networks, modeling quantization as ℓ∞-bounded noise and using ℓ₁-norm of gradients to control first-order loss perturbations. The method enables on-the-fly quantization to multiple bit-widths without retraining, outperforming baseline and quantization-aware training in low-bit regimes while maintaining full-precision accuracy.
We analyze the effect of quantizing weights and activations of neural networks on 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 on different architectures on CIFAR-10 and ImageNet datasets.
Motivation & Objective
- To address the challenge of deploying neural networks on resource-constrained devices like mobile and IoT systems.
- To improve robustness of pre-trained models against post-training quantization to various bit-widths without requiring retraining or access to training data.
- To develop a regularization scheme that ensures first-order robustness to ℓ∞-bounded quantization noise across multiple bit-widths simultaneously.
- To enable 'on the fly' quantization based on runtime resource constraints, such as battery level or memory availability.
Proposed method
- Model quantization noise as an ℓ∞-bounded perturbation, where each weight and activation value is perturbed within a fixed bin width δ.
- Derive the first-order Taylor expansion of the loss function under this perturbation, identifying the gradient term as the primary source of sensitivity to quantization.
- Propose a regularization term that penalizes the ℓ₁-norm of the gradient with respect to network parameters, minimizing the maximum influence of quantization on the loss.
- Apply the regularization during final training or as a fine-tuning step, without modifying the training pipeline or requiring the straight-through estimator.
- Use a hyperparameter λ to balance full-precision accuracy and quantization robustness, tuned via grid search to preserve FP performance.
- Demonstrate that the method generalizes across architectures (VGG, ResNet) and datasets (CIFAR-10, ImageNet), enabling consistent performance across bit-widths.
Experimental results
Research questions
- RQ1Can we regularize neural networks to be robust to post-training quantization across multiple bit-widths without retraining?
- RQ2How does modeling quantization as ℓ∞-bounded noise inform a principled regularization strategy for gradient sensitivity?
- RQ3Can ℓ₁ regularization of gradients outperform existing methods like quantization-aware training or defensive quantization in low-bit regimes?
- RQ4Does the proposed method enable on-the-fly quantization to different bit-widths based on runtime resource constraints?
- RQ5What is the trade-off between full-precision accuracy and quantization robustness when applying gradient ℓ₁ regularization?
Key findings
- On CIFAR-10 with VGG-like architecture, the proposed ℓ₁ regularization achieved 70.07% top-1 accuracy at 8-bit and 66.39% at 4-bit, outperforming baseline and L2 regularization.
- On ImageNet with ResNet-18, the method achieved 69.92% at 8-bit and 66.39% at 4-bit, matching or exceeding quantization-aware training at lower bit-widths.
- With λ=0.05, the method achieved 64.02% at 4-bit on CIFAR-10, showing that stronger regularization can recover performance at the cost of full-precision accuracy.
- The method outperformed defensive quantization (Lin et al., 2019), which failed to improve performance on ResNet-18 due to overly stringent regularization of singular values.
- Compared to ℓ₂ gradient regularization, ℓ₁ regularization provided better performance, confirming the theoretical advantage in controlling worst-case gradient influence.
- The method enables consistent post-training quantization across bit-widths without requiring retraining or access to data, supporting dynamic deployment under varying resource constraints.
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.