Abstract
Deep Neural Networks (DNNs) require significant computational resources, making quantization a critical technique for deployment on edge devices. However, traditional quantization methods often apply a uniform strategy across all network layers, which is suboptimal due to varying layer sensitivities. This paper introduces Differentiable Quantization Strategy Search (DQSS), an automated framework that treats strategy selection as a differentiable search problem. By optimizing importance parameters for candidate strategies via gradient descent and employing a novel efficient convolution trick, DQSS achieves state-of-the-art compression performance across various tasks, including image classification and super-resolution.
Introduction
Quantization—the process of converting 32-bit floating-point numbers (FP32) into low-bit integers—is essential for shrinking models for mobile and edge deployment. Despite its benefits, most existing methods utilize a "one-size-fits-all" approach, applying the same quantization strategy (e.g., clipping threshold methods) to every layer. This is fundamentally limited because different layers exhibit distinct mathematical characteristics and noise sensitivities. Manually selecting the optimal strategy for each layer is computationally infeasible given the exponential search space. DQSS addresses this by automating the search process, allowing the network to learn the best quantization strategy for every individual layer.
Methodology
Differentiable Strategy Search
DQSS frames the choice of quantization strategy as a Differentiable Neural Architecture Search (NAS) problem. Instead of making discrete choices, the framework assigns a continuous "importance parameter" (probability) to several candidate strategies, such as Max_Abs, KL divergence, EasyQuant (EQ), and ADMM. During the training phase, these parameters are optimized alongside network weights using gradient descent, effectively learning the optimal strategy distribution.
Efficient Convolution Trick
A standard differentiable search would require $N \times N$ convolutions per layer (where $N$ is the number of strategies), leading to prohibitive computational costs. To solve this, the authors propose an "Efficient Convolution" method. By summing weighted quantized activations and weights before the convolution operation, the complexity is reduced from $O(N^2)$ to $O(1)$. This makes the search time independent of the number of candidate strategies, enabling efficient end-to-end optimization.
Quantization-Aware Training (QAT)
When integrated with QAT, DQSS updates both network weights and strategy hyperparameters in a single forward-backward pass. Weight-sharing across branches is utilized to mitigate the under-fitting issues typically found in multi-branch search spaces.
Experimental Evaluation
The framework was validated across multiple benchmarks and architectures:
- Image Classification: Evaluated on ImageNet (8-bit PTQ) and CIFAR-10 (4-bit QAT) using VGG-16, ResNet-18/50, ShuffleNet-V2, and MobileNet-v2.
- Image Super-Resolution: Evaluated on DIV2K, Set5, Set14, BSD100, Urban100, and Manga109 using MSRResNet and EDSR.
Results and Discussion
Performance Breakthroughs
DQSS consistently outperformed uniform strategy baselines. In 8-bit PTQ on ImageNet, DQSS achieved 71.628% accuracy on MobileNet-v2, outperforming the standard Max_Abs method by nearly 8% and the next best competitor (ADMM) by 1.2%. Notably, for some architectures like VGG-16, the DQSS-quantized model surpassed the full-precision baseline, suggesting that optimal quantization can serve as a form of beneficial regularization.
Visual Quality in Super-Resolution
In super-resolution tasks, DQSS achieved the highest PSNR and SSIM scores. As shown in the visual comparisons, DQSS-quantized models produce sharper edges and more accurate textures compared to other quantization methods, closely approximating the ground truth (GT) and full-precision (FP32) results.
Strategy Heterogeneity
Analysis of the search results confirms that different layers indeed prefer different algorithms. For instance, in MobileNet-V2, while ADMM is frequently selected, Max_Abs and EasyQuant are preferred for specific early and late layers, validating the necessity of a mixed-strategy approach.
Conclusion and Future Work
DQSS provides a robust and efficient framework for automating quantization strategy selection. While highly effective, future research could expand the candidate pool of quantization algorithms and explore more diverse tasks such as object detection and natural language processing. Additionally, incorporating hardware-specific constraints like latency and energy consumption into the differentiable search would further enhance its utility for real-world edge deployment.
Summary updated