Abstract
Deep Convolutional Neural Networks (CNNs) are often too computationally intensive for edge deployment on FPGAs due to their reliance on floating-point multiplications. This paper introduces a learning framework for $n$-bit Quantized Neural Networks (QNNs) that constrains weights to powers of two, allowing FPGAs to utilize simple bit-shift operations instead of power-hungry multipliers. By employing a "reconstructed gradient function" to overcome the gradient vanishing problem, the proposed method achieves near full-precision accuracy. Hardware implementations show a 2.9x speedup and significant energy reduction compared to standard 16-bit baselines.
Introduction
Deploying state-of-the-art CNNs on FPGAs is challenging because these devices are often bottlenecked by a limited number of Digital Signal Processing (DSP) slices. Standard quantization techniques help reduce memory footprint but often suffer from the gradient vanishing problem during training, where the derivative of the quantization "staircase" function is zero almost everywhere. Furthermore, many quantization schemes do not map efficiently to the underlying FPGA logic, which is better suited for Look-Up Table (LUT) based operations than complex multiplications.
The n-BQ-NN Framework
The authors propose a holistic approach combining a novel training algorithm with a hardware-friendly network structure.
Reconstructed Gradient Function
To enable effective backpropagation through quantized weights, the framework defines a differentiable weight function: $$\tilde{W} = (1 - \alpha)\hat{W} + \alpha W$$ where $\hat{W}$ represents the quantized weight and $W$ is the full-precision weight. The parameter $\alpha$ acts as an adjustable slope, ensuring a non-zero gradient flows back during training. This allows the network to update weights effectively before they eventually converge to their quantized states.
Power-of-Two Quantization
The $n$-BQ-NN structure constrains weights to be strictly powers of two (e.g., $\pm 2^0, \pm 2^{-1}, \dots, 0$). This specific mathematical constraint is the key to hardware acceleration: multiplying by $2^{-i}$ is equivalent to a simple right-shift by $i$ bits. On the hardware side, the authors developed a Shift Vector Processing Element (SVPE) array. By replacing multipliers with bit-shifters implemented in LUTs, the architecture bypasses the DSP bottleneck, enabling higher parallelization and better utilization of the FPGA's silicon area.
Experimental Results
The framework was evaluated on standard benchmarks including MNIST, CIFAR-10/100, SVHN, and ImageNet.
Accuracy and Bit-width Trade-offs
The $n$-BQ-NN models demonstrate remarkable resilience to low-bit quantization. As shown in the table below, a 3-bit ResNet-110 achieves a test error of 7.15%, which is very close to the 6.61% error of the 16-bit reference model.
Hardware Performance
When deployed on a Xilinx ZCU102 platform, the SVPE array delivered:
- 2.9x Speedup: Inference was significantly faster than a standard 16-bit Vector Processing Element (VPE).
- Energy Efficiency: Energy consumption was reduced to 68.7% of the 16-bit baseline.
- High Throughput: An AlexNet implementation reached a peak performance of 957.4 GOP/s.
Conclusion
By aligning the mathematical constraints of neural network weights with the architectural strengths of FPGAs, this framework provides a viable path for high-performance, energy-efficient AI at the edge. Future work will focus on reducing accumulated quantization errors in even deeper architectures and extending the framework to non-convolutional models.
Summary updated