Introduction
Deep Neural Networks (DNNs) have revolutionized computer vision and natural language processing but remain computationally expensive and memory-intensive. Deploying these models on resource-constrained edge devices like mobile phones or drones requires significant compression. Network quantization—reducing weight precision from 32-bit floating point to low-bit representations—is a primary strategy. However, aggressive quantization often leads to substantial accuracy degradation. This paper introduces two frameworks, Single-Level Quantization (SLQ) and Multi-Level Quantization (MLQ), designed to achieve high compression ratios while maintaining or even improving model performance.
The Quantization Challenge
Existing quantization methods often suffer from two main drawbacks. First, they frequently rely on handcrafted rules for weight grouping, ignoring the underlying data distribution. Second, they typically focus on partitioning parameters within individual layers ("width") while neglecting the interactions between layers ("depth"). In extremely low-bit scenarios, such as ternary (2-bit) quantization, the quantization error in a single layer can be too severe for that layer to compensate for internally.
Proposed Methodology
The authors propose a unified iterative pipeline for model compression, as illustrated below.
The process consists of four main stages:
- Clustering: Using k-means to group weights based on their actual values, ensuring a data-driven approach.
- Loss-based Partition: Calculating quantization loss for each cluster and prioritizing those with the highest loss.
- Weight Sharing: Assigning quantized values to the selected clusters.
- Re-training: Fine-tuning the remaining full-precision weights to compensate for the introduced quantization error.
Single-Level vs. Multi-Level Quantization
The framework distinguishes between high-bit and extremely low-bit requirements through two distinct strategies.
Single-Level Quantization (SLQ) is tailored for high-bit (e.g., 5-bit) compression. It focuses on "width-level" compensation, where unquantized weights within the same layer are re-trained to absorb the error of their quantized neighbors. An extension, ESLQ, incorporates L1-norm constraints to nudge weights toward hardware-friendly values like powers of two.
Multi-Level Quantization (MLQ) addresses the challenges of ternary (2-bit) quantization. It introduces "depth-level" compensation through Incremental Layer Compensation (ILC). By quantizing layers iteratively and allowing both intra-layer "hearts" (less critical values) and subsequent unquantized layers to adapt, MLQ enables the network to recover accuracy that would otherwise be lost in a single-level approach.
Experimental Results
The frameworks were evaluated on CIFAR-10 and ImageNet using architectures including AlexNet, VGG-16, and ResNet.
- Accuracy Improvement: Surprisingly, 5-bit SLQ often outperformed the full-precision baseline. For VGG-16 on ImageNet, Top-1 accuracy increased by 3.69%, suggesting that quantization can serve as a potent regularizer.
- Ternary Efficiency: MLQ achieved near-lossless performance for ternary networks. A ternary AlexNet reached 54.24% Top-1 accuracy, significantly outperforming previous state-of-the-art methods like TWN.
- Compression Ratios: The method achieved a 6x reduction in model size for a 5-bit AlexNet. When combined with weight pruning, the compression ratio reached 53x without sacrificing accuracy.
Conclusion
By strategically partitioning weights across both width and depth dimensions and utilizing a data-driven iterative pipeline, SLQ and MLQ provide a robust solution for DNN compression. While the training process requires significant computational time (e.g., 28 hours for AlexNet), the resulting models are highly efficient for deployment. Future work may involve integrating these techniques with knowledge distillation to further push the boundaries of model efficiency.
Summary updated