[Paper Review] Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference
This paper proposes a quantization scheme that enables efficient, integer-only inference in neural networks by quantizing weights and activations to 8-bit integers, while co-designing a training procedure with simulated quantization to preserve model accuracy. The approach achieves up to a 2× latency reduction on mobile CPUs with only ~2% accuracy drop, significantly improving the latency-accuracy tradeoff for MobileNets on real hardware.
The rising popularity of intelligent mobile devices and the daunting computational cost of deep learning-based models call for efficient and accurate on-device inference schemes. We propose a quantization scheme that allows inference to be carried out using integer-only arithmetic, which can be implemented more efficiently than floating point inference on commonly available integer-only hardware. We also co-design a training procedure to preserve end-to-end model accuracy post quantization. As a result, the proposed quantization scheme improves the tradeoff between accuracy and on-device latency. The improvements are significant even on MobileNets, a model family known for run-time efficiency, and are demonstrated in ImageNet classification and COCO detection on popular CPUs.
Motivation & Objective
- To address the growing need for efficient on-device inference in mobile and edge devices with limited computational resources.
- To overcome the limitations of prior quantization methods that either lack real hardware evaluation or fail to optimize for integer-only arithmetic on common CPUs.
- To co-design a quantization scheme and training procedure that maintains high accuracy while enabling fast, integer-only inference on standard mobile hardware.
- To demonstrate significant improvements in the latency-accuracy tradeoff for efficient models like MobileNets on real-world CPUs such as Qualcomm Snapdragon 835.
Proposed method
- Quantizes network weights and activations to 8-bit integers, with biases stored as 32-bit integers, enabling pure integer arithmetic during inference.
- Employs a simulated quantization framework during training, where quantization operations are differentiable and embedded in the computation graph to mimic integer arithmetic effects.
- Uses a symmetric quantization scheme with learned scale and zero-point parameters to map floating-point tensors to integer ranges, minimizing representation error.
- Implements efficient inference kernels using ARM NEON intrinsics to accelerate integer-only convolution and activation operations on common mobile CPUs.
- Applies post-training quantization with fine-tuning using simulated quantization to recover accuracy lost during quantization.
- Evaluates the method on ImageNet classification and COCO object detection using real hardware (Qualcomm Snapdragon 835) to validate latency and accuracy improvements.
Experimental results
Research questions
- RQ1Can 8-bit integer-only inference be efficiently implemented on standard mobile CPUs without sacrificing model accuracy?
- RQ2How does co-designed quantization-aware training affect model accuracy after quantization, especially for efficient architectures like MobileNets?
- RQ3What is the real hardware latency-vs-accuracy tradeoff of integer-only quantized MobileNets compared to floating-point baselines?
- RQ4How sensitive is model performance to variations in weight and activation bit depth in the quantization scheme?
Key findings
- The proposed integer-only quantization achieves up to a 2× reduction in inference latency on Qualcomm Snapdragon 835 LITTLE and big cores, with only a ~2% drop in average precision on COCO detection.
- On the face detection task, the 8-bit quantized model runs at 36 fps on a single big core (25% model), achieving real-time performance, while the floating-point version runs at only 23 fps.
- Multi-threading on 4 cores yields a 1.5× to 2.2× speedup for quantized models, with higher gains observed on larger models due to reduced relative overhead.
- Ablation studies show that 8-bit and 7-bit quantized models perform nearly identically to floating-point baselines, while 4-bit quantization causes significant accuracy degradation (e.g., -14% in average precision for face attributes).
- When total bit-depth is equal, maintaining balanced weight and activation bit depths (e.g., 8-bit/8-bit) yields better performance than imbalanced configurations (e.g., 4-bit/8-bit).
- The method enables real-time inference for lightweight models like MobileNet on low-end mobile devices, demonstrating the feasibility of integer-only inference as a key enabler for edge AI.
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.