[Paper Review] SDQ: Stochastic Differentiable Quantization with Mixed Precision
SDQ proposes a stochastic differentiable quantization method that automatically learns optimal mixed-precision bitwidth assignments across network layers using differentiable bitwidth parameters (DBPs) and Gumbel-softmax reparameterization, enabling smooth, globally optimized training. It achieves state-of-the-art accuracy—surpassing full-precision models—on ResNet and MobileNet with average bitwidths below 4 bits, while demonstrating strong hardware efficiency on GPUs and FPGAs.
In order to deploy deep models in a computationally efficient manner, model quantization approaches have been frequently used. In addition, as new hardware that supports mixed bitwidth arithmetic operations, recent research on mixed precision quantization (MPQ) begins to fully leverage the capacity of representation by searching optimized bitwidths for different layers and modules in a network. However, previous studies mainly search the MPQ strategy in a costly scheme using reinforcement learning, neural architecture search, etc., or simply utilize partial prior knowledge for bitwidth assignment, which might be biased and sub-optimal. In this work, we present a novel Stochastic Differentiable Quantization (SDQ) method that can automatically learn the MPQ strategy in a more flexible and globally-optimized space with smoother gradient approximation. Particularly, Differentiable Bitwidth Parameters (DBPs) are employed as the probability factors in stochastic quantization between adjacent bitwidth choices. After the optimal MPQ strategy is acquired, we further train our network with entropy-aware bin regularization and knowledge distillation. We extensively evaluate our method for several networks on different hardware (GPUs and FPGA) and datasets. SDQ outperforms all state-of-the-art mixed or single precision quantization with a lower bitwidth and is even better than the full-precision counterparts across various ResNet and MobileNet families, demonstrating the effectiveness and superiority of our method.
Motivation & Objective
- To address the limitations of existing mixed-precision quantization (MPQ) methods that rely on costly search or suboptimal heuristics for bitwidth assignment.
- To develop a differentiable, globally optimized framework that enables end-to-end learning of optimal bitwidths across network layers.
- To improve training stability and convergence by replacing linear interpolation with stochastic quantization in the gradient backpropagation process.
- To minimize quantization error and preserve information-carrying components through entropy-aware regularization and knowledge distillation.
- To achieve high-accuracy, low-bitwidth models that outperform both full-precision and prior quantized models on diverse hardware platforms.
Proposed method
- Introduces Differentiable Bitwidth Parameters (DBPs) as learnable probability factors that represent the stochastic choice of bitwidths between adjacent candidates.
- Employs stochastic quantization in the forward pass, where each weight or activation is quantized to a bitwidth sampled from a categorical distribution parameterized by DBPs.
- Uses Gumbel-softmax reparameterization to enable differentiable backpropagation through the discrete bitwidth choices, enabling smooth gradient updates.
- Applies Entropy-aware Bin Regularization (EBR) to preserve information-rich weight components and reduce quantization error by considering layer-specific precision needs.
- Integrates knowledge distillation from a full-precision teacher model to enhance the representation capacity of the quantized student network.
- Optimizes the entire MPQ strategy end-to-end using standard backpropagation, enabling one-shot learning of optimal bitwidth assignments across all layers.
Experimental results
Research questions
- RQ1Can a differentiable, stochastic approach to mixed-precision quantization outperform reinforcement learning and heuristic-based bitwidth search in terms of accuracy and optimization stability?
- RQ2How does stochastic quantization with Gumbel-softmax reparameterization improve training stability and loss landscape smoothness compared to linear interpolation in MPQ?
- RQ3To what extent can entropy-aware regularization and knowledge distillation reduce quantization error and preserve model accuracy in low-bitwidth settings?
- RQ4Can the proposed SDQ framework achieve state-of-the-art accuracy with average bitwidths below 4 bits across diverse architectures like ResNet and MobileNet?
- RQ5How does SDQ perform in terms of latency and energy efficiency when deployed on real hardware accelerators such as FPGAs?
Key findings
- On ImageNet-1K with ResNet18, SDQ achieves 71.7% top-1 accuracy with an average bitwidth of 3.85/2 bits for weights/activations, surpassing the full-precision model’s 70.5% accuracy.
- For MobileNetV2 on ImageNet-1K, SDQ achieves 71.8% top-1 accuracy with 4.02/3.85 average bitwidths, outperforming all prior single- and mixed-precision quantization methods.
- On COCO detection with YOLOv4-tiny, SDQ with 3.88/4.00 average bitwidths achieves 15.9% mAP, outperforming 4-bit uniform quantization and approaching 8-bit baselines while reducing energy consumption by 41.5%.
- The SDQ model on FPGA achieves 21.28ms latency and 167.1mJ energy consumption, demonstrating hardware efficiency comparable to 4-bit uniform quantization models.
- The loss landscape of SDQ is significantly smoother than linear interpolation-based methods, enabling more stable and effective optimization.
- The combination of Entropy-aware Bin Regularization and knowledge distillation leads to better preservation of information-carrying components and reduced quantization error, especially in low-precision regimes.
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.