Heterogeneous Bitwidth Binarization in Convolutional Neural Networks

Josh Fromm, Shwetak N. Patel, Matthai Philipose

Introduction

In the effort to deploy deep Convolutional Neural Networks (CNNs) on resource-constrained edge devices, quantization has emerged as a critical technique. Specifically, binarization—reducing 32-bit floating-point weights to just 1 or 2 bits—offers massive potential for compression and speed. However, researchers face a stark trade-off: 1-bit networks are highly efficient but suffer significant accuracy loss on complex datasets like ImageNet, while 2-bit networks recover much of that accuracy at the cost of doubling computational operations.

Historically, binarization has been "homogeneous," meaning every parameter in a layer uses the same bitwidth. This paper introduces Heterogeneous Bitwidth Neural Networks (HBNNs), a novel approach that assigns different bitwidths to individual parameters within the same layer. By mixing 1-bit, 2-bit, and 3-bit parameters to achieve a fractional average bitwidth (e.g., 1.4 bits), HBNNs can match the accuracy of 2-bit networks while maintaining hardware efficiency closer to 1-bit models on specialized hardware like FPGAs and ASICs.

Methodology and Heuristic Selection

HBNNs extend "residual error binarization," where additional bits act as refinement steps for the initial approximation. To implement heterogeneity, the authors introduce a mask tensor during training that specifies the bitwidth for each parameter.

A core challenge is determining which parameters should receive more bits. The authors evaluated several sorting heuristics, including Random, Top-Down (prioritizing large values), and Bottom-Up (prioritizing small values). The clear winner was the Middle-Out (MO) selection technique.

Comparison of different bit selection heuristics on AlexNet-BN Top-1 Accuracy.

The intuition behind Middle-Out is rooted in the distribution of weights. Since the first bit approximates the mean of the distribution, values already close to the mean are well-represented with a single bit. Outliers, however, require additional residual steps (more bits) to be captured accurately. MO assigns lower bitwidths to values near the mean and saves higher bitwidths for these outliers.

Key Results and Accuracy Scaling

The primary evaluation was conducted on ImageNet using AlexNet and MobileNet architectures. A significant finding is that accuracy does not scale linearly with the average bitwidth. Instead, HBNNs exhibit super-linear accuracy scaling: adding just a small fraction of a bit beyond 1.0 recovers a disproportionate amount of accuracy.

Top-1 Accuracy vs. Average Bitwidth for AlexNet, demonstrating super-linear scaling compared to a linear baseline.

For AlexNet, an HBNN with an average of 1.4 bits achieved 55.2% Top-1 accuracy, nearly matching the state-of-the-art 2-bit homogeneous network (55.3%) while using 30% fewer bits. On MobileNet, binarizing depth-wise convolution weights to an average of 1.4 bits yielded 65.1% Top-1 accuracy, a massive improvement over the 1-bit equivalent (52.9%) and remarkably close to the full-precision 32-bit model (68.8%).

Hardware Efficiency and Limitations

The benefits of HBNNs are most pronounced on custom hardware. Because FPGAs and ASICs can wire custom logic gates for individual parameters, they are not bound by the uniform bit-packing requirements of standard CPUs and GPUs. Estimates for an ASIC implementation of VGG-8 show that moving from 2 bits to 1.4 bits reduced chip area from 6.06 mm² to 2.96 mm² and cut power consumption by more than half (0.38W to 0.18W), all while maintaining or improving accuracy.

However, this approach is currently incompatible with standard CPUs and GPUs. These processors require uniform bit-packing to achieve speedups through bitwise operations, making the sparse bit assignments of HBNNs inefficient on general-purpose hardware.

Conclusion

HBNNs provide a powerful new tool for edge AI, proving that uniform bitwidths are not necessary for high performance. By using the Middle-Out heuristic to intelligently allocate bits, researchers can achieve the accuracy of multi-bit models with significantly reduced hardware overhead. Future work will focus on physical deployment and validation of these estimated power and area savings on real-world programmable hardware.

Summary updated

BibTeX
@inproceedings{fromm2018heterogeneous,
  author = {Josh Fromm and Shwetak N. Patel and Matthai Philipose},
  title = {{Heterogeneous Bitwidth Binarization in Convolutional Neural Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
  url = {https://openreview.net/forum?id=rJNIcuZ_-S},
}
Figure