[Paper Review] Fixed-point Quantization of Convolutional Neural Networks for Quantized Inference on Embedded Platforms
This paper proposes OptSearchCNN, a post-training, layer-wise fixed-point quantization method that jointly optimizes bitwidth and fractional offset for weights, biases, and activations in pre-trained CNNs to minimize accuracy loss. By accounting for cross-parameter quantization errors, it achieves <1% accuracy loss while reducing memory by 53% and multiplication cost by 77.5% compared to 8-bit uniform quantization.
Convolutional Neural Networks (CNNs) have proven to be a powerful state-of-the-art method for image classification tasks. One drawback however is the high computational complexity and high memory consumption of CNNs which makes them unfeasible for execution on embedded platforms which are constrained on physical resources needed to support CNNs. Quantization has often been used to efficiently optimize CNNs for memory and computational complexity at the cost of a loss of prediction accuracy. We therefore propose a method to optimally quantize the weights, biases and activations of each layer of a pre-trained CNN while controlling the loss in inference accuracy to enable quantized inference. We quantize the 32-bit floating-point precision parameters to low bitwidth fixed-point representations thereby finding optimal bitwidths and fractional offsets for parameters of each layer of a given CNN. We quantize parameters of a CNN post-training without re-training it. Our method is designed to quantize parameters of a CNN taking into account how other parameters are quantized because ignoring quantization errors due to other quantized parameters leads to a low precision CNN with accuracy losses of up to 50% which is far beyond what is acceptable. Our final method therefore gives a low precision CNN with accuracy losses of less than 1%. As compared to a method used by commercial tools that quantize all parameters to 8-bits, our approach provides quantized CNN with averages of 53% lower memory consumption and 77.5% lower cost of executing multiplications for the two CNNs trained on the four datasets that we tested our work on. We find that layer-wise quantization of parameters significantly helps in this process.
Motivation & Objective
- To enable efficient quantized inference of CNNs on resource-constrained embedded platforms with minimal accuracy loss.
- To address the limitation of uniform 8-bit quantization, which often leads to high accuracy degradation due to unaccounted quantization errors.
- To develop a post-training quantization method that optimizes bitwidth and fractional offset per layer, considering inter-parameter quantization effects.
- To reduce memory and computational cost—especially multiplication operations—without sacrificing model accuracy.
- To provide a generalizable method applicable to various CNN architectures and tasks beyond image classification.
Proposed method
- The method uses a fixed-point quantization function mapping 32-bit floating-point parameters to low-bitwidth fixed-point representations with configurable fractional offsets.
- It introduces a dependency-aware search strategy (dependent optimized search) that accounts for quantization errors from other parameters during optimization.
- OptSearchCNN performs a sequential, layer-wise search over bitwidths and fractional offsets, minimizing accuracy loss at each stage.
- The algorithm evaluates quantization impact on inference accuracy and selects optimal configurations that meet a user-defined accuracy threshold.
- It compares two strategies: independent (ignoring cross-parameter errors) and dependent (accounting for them), favoring the latter for better accuracy.
- The method is applied post-training without retraining, enabling deployment on any embedded platform with minimal hardware requirements.
Experimental results
Research questions
- RQ1How does accounting for inter-parameter quantization errors affect the final accuracy of a quantized CNN?
- RQ2Can layer-wise, adaptive bitwidth quantization outperform uniform 8-bit quantization in terms of memory and computation cost?
- RQ3What is the optimal balance between bitwidth and fractional offset for each layer’s weights, biases, and activations to minimize accuracy loss?
- RQ4Why does the order of quantization matter in achieving minimal accuracy degradation?
- RQ5To what extent are the optimal bitwidths found by the method generalizable across different datasets and network architectures?
Key findings
- The dependent optimized search strategy, which accounts for quantization errors from other parameters, reduces accuracy loss to less than 1%, compared to over 50% when errors are ignored.
- Compared to uniform 8-bit quantization, the proposed method achieves an average of 53% lower memory consumption and 77.5% lower multiplication cost across two CNNs and four datasets.
- Layer-wise quantization with adaptive bitwidths per layer significantly improves efficiency and accuracy compared to uniform quantization.
- The method successfully enables post-training quantization without retraining, maintaining high inference accuracy on embedded platforms.
- Quantized activations contribute more to accuracy loss than quantized weights, suggesting differential sensitivity to quantization.
- The optimal bitwidths are not uniformly distributed across layers, indicating that different layers require different precision levels for optimal performance.
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.