[Paper Review] Post-Training Piecewise Linear Quantization for Deep Neural Networks
This paper proposes Post-Training Piecewise Linear Quantization (PWLQ), a method that improves low-bit post-training quantization of deep neural networks by dividing tensor value ranges into non-overlapping regions with equal quantization levels per region, optimizing breakpoints to minimize quantization error. PWLQ achieves state-of-the-art performance on image classification, semantic segmentation, and object detection at 4-bit and below, significantly outperforming uniform quantization with minimal hardware overhead.
Quantization plays an important role in the energy-efficient deployment of deep neural networks on resource-limited devices. Post-training quantization is highly desirable since it does not require retraining or access to the full training dataset. The well-established uniform scheme for post-training quantization achieves satisfactory results by converting neural networks from full-precision to 8-bit fixed-point integers. However, it suffers from significant performance degradation when quantizing to lower bit-widths. In this paper, we propose a piecewise linear quantization (PWLQ) scheme to enable accurate approximation for tensor values that have bell-shaped distributions with long tails. Our approach breaks the entire quantization range into non-overlapping regions for each tensor, with each region being assigned an equal number of quantization levels. Optimal breakpoints that divide the entire range are found by minimizing the quantization error. Compared to state-of-the-art post-training quantization methods, experimental results show that our proposed method achieves superior performance on image classification, semantic segmentation, and object detection with minor overhead.
Motivation & Objective
- To address the performance degradation of post-training quantization at low bit-widths (e.g., 4-bit), especially for models with bell-shaped weight and activation distributions.
- To develop a quantization scheme that maintains high accuracy without retraining or access to full training data.
- To design a hardware-friendly method that avoids complex transforms or lookup tables while enabling richer representation than uniform quantization.
- To evaluate the proposed method across diverse computer vision tasks, including classification, segmentation, and object detection.
Proposed method
- The method partitions the full range of each tensor (weights or activations) into non-overlapping regions, each assigned an equal number of quantization levels.
- It uses piecewise linear approximation to model the distribution of tensor values, particularly effective for bell-shaped distributions with long tails.
- Optimal breakpoints between regions are determined by minimizing the quantization error, computed via numerical optimization.
- The approach supports per-layer or per-channel quantization and integrates bias correction to further improve accuracy.
- It maintains hardware efficiency by avoiding logarithmic transforms or clustering-based lookups, enabling fast inference on integer-only hardware.
- The method is applied post-training, requiring no fine-tuning or access to the original training dataset.
Experimental results
Research questions
- RQ1Can a piecewise linear quantization scheme reduce quantization error more effectively than uniform quantization for low-bit post-training quantization?
- RQ2How does PWLQ perform on models with long-tailed, bell-shaped weight and activation distributions at 4-bit and below?
- RQ3What is the impact of optimal breakpoint selection on quantization accuracy and model performance across different vision tasks?
- RQ4How does PWLQ compare to state-of-the-art post-training quantization methods like DFQ in terms of accuracy and hardware efficiency?
- RQ5Can PWLQ be effectively applied to diverse computer vision tasks such as semantic segmentation and object detection without retraining?
Key findings
- On ImageNet classification, 4-bit PWLQ achieves 74.98% top-1 accuracy on ResNet-50, outperforming 4-bit uniform quantization by 2.56% accuracy.
- For semantic segmentation on DeepLab-v3+, 4-bit PWLQ achieves 67.66% mIoU, a 17.61% improvement over 4-bit uniform quantization.
- In object detection using SSD-Lite, 4-bit PWLQ reduces accuracy drop to only 0.38% compared to full-precision, while uniform quantization incurs a 3.91% drop.
- PWLQ with 6-bit weights outperforms 8-bit DFQ on DeepLab-v3+, achieving 70.39% mIoU versus DFQ’s 72.33%.
- The method achieves state-of-the-art results across all evaluated tasks with minimal computational overhead, demonstrating strong generalization and hardware compatibility.
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.