Distribution-Aware Adaptive Multi-Bit Quantization

Sijie Zhao, Tao Yue, Xuemei Hu

Abstract

In this paper, we explore the compression of deep neural networks by quantizing the weights and activations into multi-bit binary networks (MBNs). A distribution-aware multi-bit quantization (DMBQ) method that incorporates the distribution prior into the optimization of quantization is proposed. Instead of solving the optimization in each iteration, DMBQ search the optimal quantization scheme over the distribution space beforehand, and select the quantization scheme during training using a fast lookup table based strategy. Based upon DMBQ, we further propose loss-guided bit-width allocation (LBA) to adaptively quantize and even prune the neural network. The first-order Taylor expansion is applied to build a metric for evaluating the loss sensitivity of the quantization of each channel, and automatically adjust the bit-width of weights and activations channel-wisely. We extend our method to image classification tasks and experimental results show that our method not only outperforms state-of-the-art quantized networks in terms of accuracy but also is more efficient in terms of training time compared with state-of-the-art MBNs, even for the extremely low bit width (below 1-bit) quantization cases.

Introduction

Deep Neural Networks (DNNs) are notoriously power-hungry and memory-intensive, making them difficult to deploy on "edge" devices like smartphones or autonomous drones. Quantization—reducing the precision of weights and activations from 32-bit floating point to just a few bits—is a primary solution. However, two major hurdles remain: finding the perfect multi-bit representation is an NP-hard problem, and determining the optimal bit-width for each layer (mixed-precision) often requires expensive search techniques like Reinforcement Learning or complex Hessian matrix calculations.

Methodology

The researchers proposed a two-pronged approach to solve these issues: Distribution-aware Multi-bit Quantization (DMBQ) and Loss-guided Bit-width Allocation (LBA).

Overview of the DMBQ and LBA framework, illustrating the flow from full-precision to quantized weights and activations.

Distribution-aware Multi-bit Quantization (DMBQ)

Instead of treating weight optimization as a fresh math problem in every iteration, the authors observed that neural network weights almost always follow a Laplace distribution. By pre-calculating optimal quantization parameters for various bit-widths based on this distribution, they developed a fast lookup table strategy. During training, the system simply selects the best quantization scheme from the table, moving the heavy lifting to a one-time offline calculation.

Weight distributions of various layers in ResNet-18 and VGG-Small compared to Laplace distributions, providing empirical support for the DMBQ prior.

Loss-guided Bit-width Allocation (LBA)

To solve the allocation puzzle, the authors developed a metric based on a first-order Taylor expansion to measure "loss sensitivity." This metric identifies which channels are most critical to network performance. Channels with high sensitivity are assigned more bits, while less sensitive ones are compressed further. Remarkably, LBA can even "prune" channels entirely by assigning them 0 bits, allowing the network to reach an average bit-width of less than 1.0.

Key Results and Insights

The authors validated their approach on standard computer vision benchmarks like CIFAR-10 and ImageNet (ILSVRC2012).

  • Superior Accuracy: On ImageNet with ResNet-18, their 2-bit weight model achieved 70.1% Top-1 accuracy, outperforming popular methods like LQ-Net (68.0%) and ALQ (68.9%).
  • Extreme Compression: For VGG-small on CIFAR-10, they achieved an average weight precision of just 0.7 bits with only a 0.1% drop in accuracy compared to the full 32-bit model.
  • Training Efficiency: By replacing complex optimization with a lookup table, training time was significantly reduced. Their method is only ~1.2x slower than standard floating-point training, whereas other multi-bit methods are often 2x to 3x slower.

Analysis of LBA revealed that in ResNet architectures, the "shortcut" layers are highly sensitive and require higher precision to maintain data flow and accuracy.

Conclusion

This work demonstrates that incorporating statistical priors can turn complex optimization problems into efficient lookup operations. While weights follow a predictable Laplace distribution, activations remain harder to model due to non-linearities like ReLU, representing an area for future research. The proposed framework proves that sub-1-bit average precision is achievable without significant loss in intelligence, paving the way for more efficient edge deployment of deep neural networks.

Summary updated

BibTeX
@inproceedings{zhao2021distribution,
  author = {Sijie Zhao and Tao Yue and Xuemei Hu},
  title = {{Distribution-Aware Adaptive Multi-Bit Quantization}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  url = {https://openreview.net/forum?id=ZXJVa5TYJTs},
}
Figure