Power-of-Two Quantization for Low Bitwidth and Hardware Compliant Neural Networks

Dominika Przewlocka-Rus, Syed Shakib Sarwar, Huseyin Ekin Sumbul, Yuecheng Li, Barbara De SalvoarXiv 2022

Abstract

Deploying Deep Neural Networks (DNNs) in low-power embedded devices for real-time applications requires optimization of memory and computational complexity, usually by quantizing weights. Most existing works employ linear quantization, which causes considerable degradation for bit widths lower than 8. Since weight distributions are usually non-uniform, logarithmic quantization is more suitable. This paper explores non-linear quantization techniques for low bit precision and identifies favorable hardware implementation options. We developed a Quantization Aware Training (QAT) algorithm for Power-of-Two (PoT) networks, achieving accuracies on par with floating-point models. Experiments show that for low bit width precision, non-uniform quantization performs better than uniform, while PoT quantization vastly reduces computational complexity.

Introduction: The Challenge of Edge AI

As Deep Neural Networks move toward edge devices like AR/VR glasses and embedded sensors, power and memory constraints become critical bottlenecks. Standard DNNs utilize 32-bit floating-point representations, which are computationally prohibitive for low-power hardware. While 8-bit uniform quantization is a common standard, pushing to 4-bit or lower often results in significant accuracy loss.

Weight distribution histograms showing the transition from continuous values (left) to discrete power-of-two levels (right).

This degradation occurs because neural weights are typically non-uniformly distributed, clustering heavily around zero. Uniform quantization wastes resolution on outliers and lacks the precision needed for the majority of weights. Furthermore, standard Multiply-Accumulate (MAC) operations are hardware-intensive, consuming significant silicon area and power.

Methodology: Power-of-Two (PoT) Quantization

The proposed approach utilizes a non-linear quantization scheme where weights are restricted to powers of two (e.g., $2^{-1}, 2^{-2}$). This logarithmic representation acts as a "zoom lens," providing high resolution near zero where weight density is highest.

Quantization-Aware Training (QAT)

To enable models to adapt to these discrete levels, the researchers employed QAT with two primary strategies:

  • Adaptive Learning Rate (ALR): This method adjusts learning rates based on weight magnitude to compensate for the non-uniform spacing between PoT levels.
  • Straight-Through Estimator (STE): A standard technique where gradients are computed on latent floating-point weights, while the forward pass uses quantized values.

Hardware-Friendly Implementation

A key advantage of PoT quantization is the replacement of complex multipliers with simple bit-shifters. In digital logic, shifting a binary number is significantly more efficient in terms of area and power than full multiplication. The authors also integrated scaling factors into Batch Normalization layers to eliminate extra inference-time overhead.

Key Results and Hardware Efficiency

The researchers evaluated the method on CIFAR and ImageNet benchmarks across various architectures, including ResNet and MobileNet V2.

Post-synthesis normalized area and power for different MAC units, highlighting the efficiency of PoT 4x8.
  • Accuracy Parity: On ImageNet with ResNet18, 4-bit PoT weights achieved 69.98% accuracy, slightly exceeding the floating-point baseline of 69.76%.
  • PoT vs. Uniform: At 4-bit precision, PoT outperformed uniform quantization by a 12% margin (69.8% vs 57.8%).
  • Hardware Efficiency: 5nm ASIC simulations revealed that a PoT 4-bit MAC unit consumes 6x less power than an 8-bit uniform MAC and 2x less than a 4-bit uniform MAC. Additionally, the PoT design required approximately 50% less silicon area than standard 8-bit units.

Conclusion

Power-of-Two quantization offers a robust path for deploying high-performance DNNs on power-constrained hardware. While ResNet architectures adapt well to 4-bit PoT, compact models like MobileNet V2 show a slight accuracy gap, suggesting a need for further optimization. Future research will focus on aggressive activation quantization and the synergy between PoT and network pruning.

Summary updated

BibTeX
@misc{przewlockarus2022power,
  author = {Dominika Przewlocka-Rus and Syed Shakib Sarwar and Huseyin Ekin Sumbul and Yuecheng Li and Barbara De Salvo},
  title = {{Power-of-Two Quantization for Low Bitwidth and Hardware Compliant Neural Networks}},
  year = {2022},
  eprint = {2203.05025},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.05025},
}
Figure