Abstract
Network quantization is a critical technique for deploying deep convolutional neural networks (CNNs) on low-power mobile devices. While traditional methods apply a single quantization bitwidth (QBN) to an entire layer, recent research suggests that quantizing individual weight kernels independently can yield higher inference accuracy due to varying redundancies within a layer. However, the search space for kernel-wise QBN configurations is too vast for manual heuristics or standard reinforcement learning agents. This paper introduces AutoQ, a hierarchical deep reinforcement learning (DRL) framework that automates the search for kernel-wise weight quantization and layer-wise activation quantization. Experimental results demonstrate that AutoQ-quantized models reduce inference latency by 54.06% and energy consumption by 50.69% on average compared to state-of-the-art DRL schemes, while maintaining equivalent accuracy.
Introduction
Deep CNNs are computationally intensive, presenting significant challenges for deployment on battery-constrained mobile hardware. Network quantization addresses this by reducing weight and activation precision from 32-bit floating-point to low-bit fixed-point formats.
Most existing automated quantization frameworks utilize "layer-wise" granularity, assigning a uniform bit-width to all weights in a convolutional layer. This approach is inherently sub-optimal because weight kernels within the same layer exhibit different variances and redundancies. Transitioning to "kernel-wise" quantization—where each kernel receives a unique bit-width—offers a more efficient compression path. However, the resulting design space is astronomical, making it difficult for even advanced agents like Deep Deterministic Policy Gradient (DDPG) to find high-accuracy configurations.
The AutoQ Framework
AutoQ overcomes the complexity of kernel-wise search through a two-level hierarchical DRL architecture:
- High-Level Controller (HLC): The HLC manages inter-layer trade-offs. For each layer, it determines the bit-width for activations and sets a target average bit-width (a "goal") for the weights within that layer.
- Low-Level Controller (LLC): The LLC focuses on intra-layer optimization. It receives the HLC's goal and assigns specific bit-widths to individual weight kernels to satisfy the average target while maximizing performance.
- Shaped Intrinsic Reward: A specialized reward function ensures the LLC aligns with the HLC’s objectives, balancing accuracy with hardware efficiency.
- Fast Hardware Estimator: To enable rapid iteration, AutoQ employs machine-learning-based models to predict latency, energy, and FPGA area in milliseconds, bypassing the need for time-consuming hardware synthesis.
Variance-Driven Redundancy
A key insight driving AutoQ is that kernels with lower weight variance can be quantized more aggressively (using fewer bits) without significantly impacting model accuracy.
By identifying these variances automatically, AutoQ exploits the non-uniform redundancy across the network. The hierarchical approach allows the agent to reach high accuracy significantly faster than flat DRL models, which often struggle to escape low-accuracy local minima during the search process.
Experimental Results
AutoQ was evaluated using the ImageNet dataset across several architectures, including ResNet-18, ResNet-50, SqueezeNetV1, and MobileNetV2. Testing on a Xilinx Zynq-7020 FPGA revealed substantial improvements over existing hardware-aware automated quantization (HAQ) methods.
As shown in the performance analysis, kernel-wise quantization consistently provides a superior accuracy-latency Pareto frontier compared to layer-wise or network-wise approaches. On ResNet-18, AutoQ achieved a top-1 error rate within 0.12% of the original 16-bit model while drastically reducing the hardware footprint. The system is versatile, supporting both resource-constrained searches (maximizing accuracy for a fixed latency) and accuracy-guaranteed searches (minimizing latency for a target accuracy).
Conclusion
AutoQ demonstrates that hierarchical reinforcement learning is a powerful tool for navigating the massive search spaces associated with fine-grained network compression. By enabling kernel-wise quantization, AutoQ provides a significant leap in hardware efficiency for mobile CNN deployment. Future work may extend this framework to support sub-kernel-wise quantization for specialized temporal accelerators or integrate it with other compression techniques like structured pruning.
Summary updated