TL;DR
This paper introduces a novel "dataflow-based joint quantization" method to significantly reduce the energy consumption of deep neural networks (DNNs) without sacrificing accuracy. By restructuring network architectures into unified modules and using efficient bit-shifting operations, they achieve substantial hardware cost reductions (up to 15x area, 9x energy) compared to existing methods.
What Problem Does This Paper Address?
Deploying DNNs on edge devices like smartphones and sensors is crucial for their widespread adoption, but it's severely limited by energy consumption and computational resources. Existing methods to reduce these burdens, primarily through quantization (representing numbers with fewer bits), often lead to a noticeable drop in model performance. Furthermore, some quantization techniques introduce complex hardware operations, negating some of the efficiency gains. This paper tackles the challenge of achieving significant energy and computational savings while maintaining or even improving model accuracy.
Methods
The core of this work is a "dataflow-based joint quantization" approach. Instead of quantizing each layer independently, they consider the network's dataflow and restructure it into unified modules. This allows for optimizing the quantization process across multiple layers simultaneously.
Key techniques include:
- Efficient Quantization Scheme: They propose a hardware-friendly quantization scheme that uses efficient bit-shifting and rounding operations. This is a departure from methods that rely on more complex operations like multiplication-based scaling factors or codebooks.
- Unified Modules: Network architectures are re-structured into unified modules. This is hypothesized to reduce the number of quantization operations, thereby minimizing information loss and improving final performance.
- Joint Optimization: An optimization strategy is employed to learn the optimal "fractional bits" (a parameter controlling the precision) for weights, biases, and activations. This is done by minimizing the reconstruction error between the original and quantized outputs.
- Integer-Arithmetic-Only Inference: The paper details how this quantization scheme can be implemented using purely integer arithmetic, which is highly desirable for efficient hardware.
- Hardware Cost Measurement: They designed and synthesized an RTL model to accurately measure the hardware costs (area and power) of their proposed method against baselines.
Datasets
- ImageNet: Used for evaluating the performance of their quantized ResNet models.
- KITTI: Used for evaluating object detection performance with Faster R-CNN on autonomous driving tasks.
Key Insights and Ideas
- Dataflow Matters: The paper emphasizes that considering the network's dataflow, not just individual layers, is crucial for effective quantization. Restructuring into unified modules is key.
- Fewer Operations, Less Loss: The hypothesis that fewer quantization operations lead to less information loss and better accuracy is central. This is achieved by creating unified modules.
- Bit-Shifting is King: Their bit-shifting approach for quantization is shown to be significantly more efficient in terms of hardware cost (area and energy) compared to scaling factors or codebooks.
- No Fine-Tuning Needed: A significant advantage is that their method does not require a time-consuming fine-tuning stage after quantization, making the deployment process much faster.
Key Results
- Accuracy: Their quantized ResNet models on ImageNet show a drop of only about 1.8% compared to full-precision models, outperforming several existing methods. On KITTI, their 8-bit quantized model achieved almost identical or even better object detection performance than full-precision models.
- Hardware Efficiency: The proposed bit-shifting quantization method reduces area cost by approximately 15x and energy consumption by about 9x compared to a strong baseline.
- Training Time: The joint quantization process is remarkably fast, taking only several minutes for ResNet models, compared to days for fine-tuning.
Limitations and Future Work
- Search Space for Optimization: While they narrow down the search space for optimal fractional bits, the search itself can still be computationally intensive (O(τ³Γ)). They suggest that the optimal fractional bit is likely in the upper bits.
- Residual Connections: The paper discusses handling residual connections, noting that alignment of shortcut outputs and convolution outputs is necessary, especially when a shortcut is a convolution layer. Figure 1(d) shows a case without a ReLU layer after addition, implying that different architectural patterns might require specific handling.
- Future Work: The authors suggest that their quantized model with optimal fractional bits could serve as a good starting point for further fine-tuning, potentially improving performance and speeding up training.
Summary updated