[Paper Review] Efficient non-uniform quantizer for quantized neural network targeting reconfigurable hardware
This paper proposes a hardware-efficient, non-uniform quantizer for quantized neural networks targeting reconfigurable FPGAs, using a single-scale integer representation for both weights and activations. By employing a normal cumulative distribution function (CDF) for non-uniform quantization and modifying residual blocks to preserve dynamic range, the method achieves near-ideal accuracy with 3-4 bit quantization on CIFAR-10 and CIFAR-100 datasets, enabling efficient integer-only inference on FPGAs.
Convolutional Neural Networks (CNN) has become more popular choice for various tasks such as computer vision, speech recognition and natural language processing. Thanks to their large computational capability and throughput, GPUs ,which are not power efficient and therefore does not suit low power systems such as mobile devices, are the most common platform for both training and inferencing tasks. Recent studies has shown that FPGAs can provide a good alternative to GPUs as a CNN accelerator, due to their re-configurable nature, low power and small latency. In order for FPGA-based accelerators outperform GPUs in inference task, both the parameters of the network and the activations must be quantized. While most works use uniform quantizers for both parameters and activations, it is not always the optimal one, and a non-uniform quantizer need to be considered. In this work we introduce a custom hardware-friendly approach to implement non-uniform quantizers. In addition, we use a single scale integer representation of both parameters and activations, for both training and inference. The combined method yields a hardware efficient non-uniform quantizer, fit for real-time applications. We have tested our method on CIFAR-10 and CIFAR-100 image classification datasets with ResNet-18 and VGG-like architectures, and saw little degradation in accuracy.
Motivation & Objective
- To design a non-uniform quantizer that is both hardware-efficient and suitable for reconfigurable FPGA accelerators.
- To address the limitations of uniform quantization in low-precision neural networks, especially in preserving model accuracy under extreme bit-width constraints.
- To enable integer-only inference by representing both weights and activations as fixed-point integers with a single scale factor.
- To modify residual block architecture to maintain dynamic range and prevent accuracy degradation during quantization.
- To evaluate the method on CIFAR-10 and CIFAR-100 using ResNet-18 and VGG-like architectures under low-bit quantization (3–4 bits) with minimal accuracy drop.
Proposed method
- The method uses a normal CDF-based non-uniform quantizer for both network parameters and activations, replacing uniform quantization to better match the actual distribution of activations and weights.
- A single-scale integer representation is applied to both weights and activations, enabling efficient hardware mapping using only integer arithmetic.
- The residual block is restructured so that the activation function is applied before the residual connection, preserving dynamic range and avoiding saturation of the residual path.
- A gradual quantization training scheme is used, where layers are progressively quantized from the first to the last, ensuring stable convergence and preventing model divergence.
- The quantization process is integrated into the training pipeline using backpropagation with full-precision weight copies, while forward passes use quantized values.
- The method avoids floating-point operations entirely, relying on bit-shifts and integer arithmetic for efficient FPGA implementation.
Experimental results
Research questions
- RQ1Can a non-uniform quantizer based on the normal CDF improve accuracy over uniform quantization in low-bit DNNs for FPGA deployment?
- RQ2How can integer-only arithmetic be effectively applied to both weights and activations while maintaining model accuracy?
- RQ3What architectural modifications are required to preserve dynamic range in residual networks under integer-only quantization?
- RQ4To what extent does the proposed method reduce hardware resource usage on FPGAs compared to uniform quantization?
- RQ5Can the method achieve near-ideal accuracy with 3–4 bit precision on standard image classification benchmarks like CIFAR-10 and CIFAR-100?
Key findings
- On CIFAR-10, ResNet-18 with 4-bit weights and activations achieved 93.45% top-1 accuracy, only 0.31% lower than the full-precision baseline of 93.76%.
- On CIFAR-100, ResNet-18 with 4-bit quantization achieved 71.71% top-1 accuracy, a drop of only 2.24 percentage points from the 32-bit baseline of 73.95%.
- The VGG-like architecture showed slightly higher accuracy degradation under quantization, with 3-bit weights and activations yielding 63.1% accuracy on CIFAR-100, a 4.0% drop from the 32-bit baseline.
- The modified residual block design successfully preserved the dynamic range of the residual path, preventing accuracy degradation due to saturation in low-precision settings.
- The method enables full integer-only inference with no floating-point operations, significantly reducing hardware resource usage and improving energy efficiency on FPGAs.
- The results demonstrate that non-uniform quantization using the normal CDF function is effective in maintaining model accuracy even at 3–4 bit precision, especially in residual networks with skip connections.
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.