Adaptive Loss-Aware Quantization for Multi-Bit Networks

Zhongnan Qu, Zimu Zhou, Yun Cheng, Lothar Thiele

Abstract: Deep neural network deployment on resource-constrained devices necessitates efficient compression techniques. This paper presents Adaptive Loss-aware Quantization (ALQ), a multi-bit quantization framework that optimizes network parameters directly against the loss function. Unlike traditional methods that rely on fixed bitwidths or minimize weight reconstruction error, ALQ employs an iterative pruning and optimization strategy to achieve adaptive bitwidths across layers. Experimental results on ImageNet and CIFAR-10 demonstrate that ALQ can achieve average bitwidths below 1-bit while maintaining or even exceeding full-precision accuracy.

Introduction

The computational and storage demands of modern deep neural networks (DNNs) pose significant challenges for edge deployment. Quantization, the process of mapping high-precision weights to low-bit representations, is a primary strategy for mitigation. However, conventional quantization schemes often suffer from three main drawbacks: the use of sub-optimal global bitwidths, a focus on minimizing weight reconstruction error rather than task-specific loss, and reliance on the Straight-Through Estimator (STE) for gradient approximation.

Methods

ALQ addresses these limitations through a two-step iterative optimization pipeline that treats quantization as an optimization problem tied directly to the network's loss function.

  1. Pruning in the $\alpha$ Domain: Instead of assigning a fixed bitwidth upfront, ALQ begins with a higher bitwidth and identifies redundant binary bases. By utilizing a quadratic approximation of the loss function, the algorithm estimates the sensitivity of the final prediction to each bit. This allows for "pruning" bits that have minimal impact on accuracy, resulting in an adaptive bitwidth distribution where sensitive layers retain more precision.
  2. Optimization of Bases and Coordinates: Following pruning, the remaining binary bases (directions) and coordinates (magnitudes) are refined. This optimization is performed directly on the loss function, eliminating the need for full-precision weight maintenance or STE-based heuristics.
Figure 6: Layer-wise average bitwidth and weight distribution for ALQ-compressed VGG and ResNet18 models.

Results

The researchers evaluated ALQ on standard computer vision benchmarks, including MNIST, CIFAR-10, and ImageNet (ILSVRC12), using architectures such as LeNet5, VGG, and ResNet-18/34.

Performance and Convergence

ALQ consistently outperforms state-of-the-art methods using the Straight-Through Estimator. As shown in Figure 3, ALQ achieves faster convergence and higher final accuracy across various architectures and bitwidths. Notably, on ImageNet with ResNet-18, ALQ achieved a 70.0% Top-1 accuracy at a 2-bit average bitwidth, surpassing the full-precision baseline of 69.8%.

Figure 3: Training curves comparing ALQ with STE-based methods across different models and bitwidths.

Extreme Compression

The adaptive nature of ALQ is particularly evident in extreme compression scenarios. For VGG on CIFAR-10, the method achieved an average of 0.4 bits per weight while maintaining 90.9% accuracy. This exceeds the performance of many dedicated binary (1-bit) networks. Furthermore, ALQ successfully quantizes the typically sensitive first and last layers, significantly reducing the storage "floor" of the model compared to methods that keep these layers in high precision.

Conclusion

Adaptive Loss-aware Quantization represents a significant advancement in Multi-Bit Network compression. By shifting the optimization target from weight reconstruction to loss minimization and enabling layer-wise bitwidth adaptation, ALQ provides a flexible and high-performance solution for deploying DNNs on constrained hardware. Future research will focus on optimizing software kernels for the irregular bitwidths produced by ALQ to realize theoretical speedups on commodity processors.

Summary updated

BibTeX
@inproceedings{qu2020adaptive,
  author = {Zhongnan Qu and Zimu Zhou and Yun Cheng and Lothar Thiele},
  title = {{Adaptive Loss-Aware Quantization for Multi-Bit Networks}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  doi = {10.1109/cvpr42600.2020.00801},
}
Figure