[Paper Review] Differentiable Dynamic Quantization with Mixed Precision and Adaptive Resolution
This paper proposes Differentiable Dynamic Quantization (DDQ), a fully differentiable framework that jointly learns optimal quantization parameters—bitwidth, dynamic range, and stepsize—per layer in a neural network. By enabling end-to-end training with gradient-based optimization, DDQ achieves state-of-the-art accuracy in low-bit quantization, including lossless 4-bit quantization of MobileNetV2 on ImageNet.
Model quantization is challenging due to many tedious hyper-parameters such as precision (bitwidth), dynamic range (minimum and maximum discrete values) and stepsize (interval between discrete values). Unlike prior arts that carefully tune these values, we present a fully differentiable approach to learn all of them, named Differentiable Dynamic Quantization (DDQ), which has several benefits. (1) DDQ is able to quantize challenging lightweight architectures like MobileNets, where different layers prefer different quantization parameters. (2) DDQ is hardware-friendly and can be easily implemented using low-precision matrix-vector multiplication, making it capable in many hardware such as ARM. (3) Extensive experiments show that DDQ outperforms prior arts on many networks and benchmarks, especially when models are already efficient and compact. e.g., DDQ is the first approach that achieves lossless 4-bit quantization for MobileNetV2 on ImageNet.
Motivation & Objective
- Address the challenge of high hyperparameter sensitivity in model quantization, particularly for efficient architectures like MobileNets.
- Overcome the limitations of fixed quantization schemes (e.g., uniform or power-of-two) that fail to capture irregular weight distributions in lightweight models.
- Enable end-to-end, gradient-based optimization of quantization parameters to minimize quantization error and preserve model accuracy.
- Achieve hardware-friendly quantization using low-precision matrix-vector operations, suitable for deployment on ARM and other edge devices.
- Reduce training time and improve accuracy in low-bit quantization, especially for compact models where accuracy margins are tight.
Proposed method
- Formalize quantization as a differentiable function by replacing the non-differentiable round operation with a differentiable approximation using the straight-through estimator.
- Learn per-layer quantization parameters—including bitwidth, stepsize, and dynamic range—via backpropagation during training.
- Introduce a gradient correction mechanism to stabilize training and reduce quantization error, especially in low-bit regimes.
- Support mixed-precision quantization by allowing different bitwidths per layer, optimized under memory constraints.
- Use adaptive resolution by learning non-uniform quantization levels that better fit irregular weight distributions (e.g., Gaussian, heavy-tailed, bimodal).
- Implement hardware-friendly quantization using low-precision matrix-vector multiplication, enabling efficient deployment on mobile DSPs and ARM devices.
Experimental results
Research questions
- RQ1Can a fully differentiable quantization framework jointly optimize bitwidth, stepsize, and dynamic range per layer to minimize quantization error?
- RQ2Does adaptive resolution with non-uniform quantization levels improve accuracy over uniform or power-of-two quantizers on irregular weight distributions?
- RQ3Can gradient correction stabilize training and reduce quantization error in low-bit regimes, especially for 2-bit and 4-bit quantization?
- RQ4Can DDQ achieve lossless 4-bit quantization of MobileNetV2 on ImageNet, outperforming prior state-of-the-art methods?
- RQ5Does mixed-precision quantization with per-layer bitwidth selection improve accuracy and efficiency compared to fixed-precision baselines?
Key findings
- DDQ achieves lossless 4-bit quantization of MobileNetV2 on ImageNet, reducing accuracy drop to just 0.4% compared to full-precision models.
- DDQ reduces training runtime by 25% compared to state-of-the-art quantization methods, while maintaining or improving accuracy.
- With gradient correction, DDQ achieves lower quantization error (average error of 0.35) and better fits the original weight distributions than PACT+UQ or PACT+PoT.
- DDQ successfully quantizes 2-bit MobileNetV2 without requiring full-precision activations, a capability not achieved by prior methods.
- On mobile DSPs, DDQ achieves 71.9% top-1 accuracy with 40% lower latency than the full-precision model, and 3% higher accuracy than the UQ baseline.
- Mixed-precision DDQ with learned bitwidth per layer achieves 71.9% top-1 accuracy on ImageNet, outperforming fixed-precision baselines and enabling better memory-accuracy trade-offs.
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.