[Paper Review] Learning Accurate Low-Bit Deep Neural Networks with Stochastic Quantization
This paper proposes Stochastic Quantization (SQ), a training method that stochastically quantizes a subset of network weights to low-bit representations based on quantization error, while keeping the rest full-precision. By gradually increasing the quantization ratio and using error-informed selection, SQ reduces gradient misdirection and achieves state-of-the-art accuracy in low-bit DNNs, even outperforming full-precision models in some cases.
Low-bit deep neural networks (DNNs) become critical for embedded applications due to their low storage requirement and computing efficiency. However, they suffer much from the non-negligible accuracy drop. This paper proposes the stochastic quantization (SQ) algorithm for learning accurate low-bit DNNs. The motivation is due to the following observation. Existing training algorithms approximate the real-valued elements/filters with low-bit representation all together in each iteration. The quantization errors may be small for some elements/filters, while are remarkable for others, which lead to inappropriate gradient direction during training, and thus bring notable accuracy drop. Instead, SQ quantizes a portion of elements/filters to low-bit with a stochastic probability inversely proportional to the quantization error, while keeping the other portion unchanged with full-precision. The quantized and full-precision portions are updated with corresponding gradients separately in each iteration. The SQ ratio is gradually increased until the whole network is quantized. This procedure can greatly compensate the quantization error and thus yield better accuracy for low-bit DNNs. Experiments show that SQ can consistently and significantly improve the accuracy for different low-bit DNNs on various datasets and various network structures.
Motivation & Objective
- To address the significant accuracy drop in low-bit deep neural networks (DNNs) caused by inconsistent quantization errors.
- To improve training stability and convergence by avoiding full quantization of all weights in each iteration.
- To develop a method that maintains full-precision gradients for high-error weights while gradually quantizing low-error ones.
- To achieve state-of-the-art performance in low-bit DNNs across diverse architectures and datasets.
- To demonstrate that stochastic, error-aware quantization leads to better local minima than uniform quantization.
Proposed method
- Stochastic Quantization (SQ) selects a subset of network weights for low-bit quantization in each training iteration based on their quantization error.
- The selection probability is inversely proportional to the quantization error, ensuring higher-error weights are less likely to be quantized early.
- The quantized weights are updated using gradients from the quantized path, while full-precision weights use gradients from the full-precision path.
- The SQ ratio is gradually increased from 0% to 100% over training, enabling a smooth transition to full low-bit inference.
- The method uses channel-wise selection granularity, treating entire filter-channels as units for selection and quantization.
- An exponential scheme is used to schedule the increasing SQ ratio, which empirically outperforms linear or average schemes.
Experimental results
Research questions
- RQ1Can stochastic, error-aware quantization improve training stability and final accuracy in low-bit DNNs?
- RQ2Does selectively quantizing only high-accuracy weights in early training lead to better convergence than full quantization?
- RQ3How does the selection granularity (element-wise vs. channel-wise) affect the performance of low-bit DNNs?
- RQ4Can the proposed method achieve accuracy comparable or superior to full-precision models in low-bit settings?
- RQ5What is the optimal schedule for increasing the quantization ratio during training?
Key findings
- SQ-BWN with 1-bit weights reduced test error by 9.27% compared to standard BWN on ResNet-56 for CIFAR-10.
- SQ-TWN with 2-bit weights achieved 35.25% test error on CIFAR-10 with ResNet-56, outperforming the full-precision model's 35.01%.
- On ImageNet, SQ-TWN achieved top-1 accuracy of 36.18% on ResNet-18, outperforming the full-precision model's 34.80%.
- The test loss curves show that SQ-BWN and SQ-TWN converge more stably and to lower loss than BWN and TWN, respectively.
- SQ-TWN achieved 0.63%, 0.49%, and 0.59% better accuracy than full-precision models on CIFAR-10 with VGG-9, CIFAR-10 with ResNet-56, and CIFAR-100 with ResNet-56.
- The exponential SQ ratio schedule outperformed both linear and average schemes in all evaluated settings.
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.