Quantizing Convolutional Neural Networks for Low-Power High-Throughput Inference Engines

Sean O. Settle, Manasa Bollavaram, Paolo D'Alberto, Elliott Delaye, Oscar Fernandez, Nicholas Fraser, Aaron Ng, Ashish Sirasao, Michael WuarXiv 2018

Introduction

Modern Convolutional Neural Networks (CNNs) like ResNet and GoogLeNet provide state-of-the-art accuracy but demand significant memory and computational resources. While training typically utilizes 32-bit floating-point (FP32) arithmetic on GPUs, deploying these models to edge devices—such as drones or embedded sensors—requires extreme efficiency. The standard solution is quantization: converting FP32 values into low-precision formats. However, traditional quantization often necessitates expensive retraining or results in substantial accuracy loss. This paper proposes a "plug-and-play" Dynamic Floating-Point (DFP) quantization scheme that maintains accuracy without retraining, requiring as few as eight unlabeled images for calibration.

Dynamic Floating-Point Representation

The core of the proposed method is the Dynamic Floating-Point (DFP) data type. In this format, a real value is represented as $\alpha \times \beta$, where $\alpha$ is a high-precision scaling factor (per layer or channel) and $\beta$ is a reduced-precision value (e.g., 6-bit or 8-bit).

A critical finding of this research is the importance of "subnormal" numbers—values extremely close to zero—at very low bitwidths. As shown in Figure 1, different configurations of 4-bit floating-point formats vary significantly in their ability to represent values near zero. Without subnormals, accuracy drops sharply because the network cannot represent the fine-grained gradients necessary for deep inference.

Comparison of different 4-bit formats and the impact of subnormals on value distribution.

Post-Training Calibration and Lazy Thresholding

To convert pre-trained FP32 models to DFP without retraining, the authors employ two primary techniques:

  1. Statistical Calibration: A small set of unlabeled images is passed through the network to analyze activation distributions. A specialized algorithm determines the optimal clipping threshold ($\gamma$) to minimize information loss.
  2. Lazy Thresholding: In architectures with branched paths (like ResNet's skip connections), determining quantization parameters is delayed until after layers like Concat or Eltwise. This ensures compatible scaling factors across branches, mitigating rounding noise.

Experimental Results

The researchers evaluated the DFP method using the ImageNet (ILSVRC) dataset on GoogLeNet v1, ResNet-50, and MobileNet v1. The results indicate that 8-bit DFP is a robust replacement for FP32 across most architectures.

Normalized Top-1 accuracy across different models (GoogLeNet, ResNet, MobileNet) as a function of exponent bits and total bitwidth.

As illustrated in Figure 5, GoogLeNet and ResNet-50 maintain near-perfect normalized Top-1 accuracy even down to 6-bit formats. However, MobileNet—an already highly compressed architecture—proved more fragile, showing significant performance degradation below 8 bits. The study also identified a "sweet spot" for 8-bit formats: allocating 3 bits to the exponent provides sufficient range while preserving precision in the significand.

Conclusion

The DFP quantization scheme offers a highly efficient path for deploying CNNs on FPGA hardware. By reducing bitwidth from 32 to 8 bits, integer additions and multiplications become approximately 4x and 16x cheaper, respectively, in terms of energy and silicon area. While ultra-compact models like MobileNet may still require quantization-aware training to push below 8 bits, DFP provides a practical, data-efficient solution for most state-of-the-art models, achieving full reference accuracy with minimal calibration data.

Summary updated

BibTeX
@misc{settle2018quantizing,
  author = {Sean O. Settle and Manasa Bollavaram and Paolo D'Alberto and Elliott Delaye and Oscar Fernandez and Nicholas Fraser and Aaron Ng and Ashish Sirasao and Michael Wu},
  title = {{Quantizing Convolutional Neural Networks for Low-Power High-Throughput Inference Engines}},
  year = {2018},
  eprint = {1805.07941},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1805.07941},
}
Figure