Introduction
Deploying state-of-the-art deep neural networks (DNNs) on edge devices remains a significant challenge due to the high computational and memory requirements of these models. Quantization—the process of reducing the bit-width of weights and activations—is the primary technique used to compress models for hardware deployment. However, most quantization methods are hardware-agnostic, failing to account for the specific architectural nuances of the target platform. This paper introduces MSP, a novel quantization framework designed specifically to maximize the efficiency of Field-Programmable Gate Arrays (FPGAs).
The Hardware-Algorithm Gap
FPGAs are heterogeneous devices that primarily rely on two types of compute resources: Digital Signal Processors (DSPs) and Look-Up Tables (LUTs). Standard fixed-point quantization maps well to DSPs, which are optimized for multiplication. However, relying solely on fixed-point math often leaves LUTs underutilized, creating a compute bottleneck.
Conversely, Power-of-Two (PoT) quantization replaces expensive multiplications with simple bit-shifts, which are ideal for LUTs. While hardware-efficient, PoT quantization often leads to significant accuracy degradation because it cannot accurately represent the "tails" of weight distributions. Furthermore, traditional multi-precision approaches—which assign different bit-widths to different layers—introduce hardware stalls and reconfiguration overhead that negate the benefits of compression.
The MSP Framework
The MSP framework addresses these issues through three core innovations that align the quantization scheme with the physical constraints of FPGA hardware.
1. Sum-of-Power-of-Two (SPoT) Quantization
To mitigate the accuracy loss associated with standard PoT, the authors propose Sum-of-Power-of-Two (SPoT) quantization. Instead of rounding a weight to a single power of two, SPoT represents each weight as the sum of two lower bit-width powers of two. This significantly increases the resolution of the quantization grid, particularly for values at the edges of the distribution, while maintaining the hardware benefit of using bit-shift operations instead of multipliers.
2. Mixed-Scheme (MS) Quantization
Rather than applying a single quantization rule to an entire network, MSP employs a Mixed-Scheme approach within each layer. Weights are partitioned based on their distribution: rows with uniform distributions are quantized using standard fixed-point math and routed to DSPs, while rows with Gaussian-like distributions are quantized using SPoT and routed to LUTs. This strategy ensures that both DSP and LUT resource pools on the FPGA operate at near 100% utilization simultaneously.
3. Intra-Layer Multi-Precision (MP)
To avoid the reconfiguration overhead of inter-layer multi-precision, MSP implements intra-layer multi-precision. In every layer, exactly 5% of the weights (those with the highest quantization error) are kept at 8-bit precision, while the remaining 95% are quantized to 4-bit. Because this ratio is consistent across all layers, the hardware configuration remains static, eliminating stalls and maximizing throughput.
Results and Discussion
The MSP framework was evaluated using ResNet-18 on the ImageNet (ILSVRC-2012) dataset, as well as CIFAR-10/100 benchmarks. The results demonstrate that hardware-aware co-design can yield superior performance in both accuracy and speed.
- Accuracy: On ImageNet, the 4-bit MSP model achieved a 70.47% Top-1 accuracy, surpassing the 32-bit floating-point baseline of 69.76%. The authors suggest that the quantization noise may act as a form of regularization, improving the model's generalization capabilities.
- Throughput and Speed: When deployed on a Xilinx Zynq XC7Z045 FPGA, MSP achieved a throughput of 325.0 GOPS, a significant jump from the 120.5 GOPS achieved by pure fixed-point quantization. This translated to a 3.53x end-to-end inference speedup.
- Optimal Resource Balance: Empirical testing identified the optimal resource ratio for Xilinx FPGAs to be 65% SPoT (4-bit), 30% Fixed-point (4-bit), and 5% Fixed-point (8-bit).
Conclusion
MSP demonstrates that deep neural network quantization should not be treated as a hardware-independent optimization problem. By explicitly designing the quantization scheme to match the DSP-to-LUT ratio of the target FPGA and utilizing intra-layer multi-precision to maintain a static hardware pipeline, MSP achieves significant performance gains without sacrificing accuracy. Future work may explore extending this mixed-scheme approach to more diverse architectures such as Vision Transformers.
Summary updated