TL;DR
This paper introduces Single-Path Bit Sharing (SBS), a novel method for automatically compressing deep neural networks by jointly optimizing pruning and quantization. SBS unifies these two compression techniques into a single-path search framework, significantly reducing computational cost and enabling efficient, layer-wise configuration learning.
What Problem Does This Paper Address?
Deep neural networks (DNNs) are powerful but computationally expensive, limiting their deployment on resource-constrained devices. Network pruning (removing redundant parts) and quantization (reducing the precision of weights and activations) are common compression techniques. However, most existing methods tackle these separately, leading to suboptimal performance because pruning and quantization influence each other. Furthermore, finding the best compression configurations (like pruning rates and bitwidths) for each layer is a complex search problem that can be computationally prohibitive. This paper aims to address these challenges by proposing a unified, efficient, and automatic approach to joint pruning and quantization.
Methods
The core innovation of SBS is its single-path bit sharing decomposition. Instead of treating pruning and quantization as separate steps or using complex multi-path search strategies, SBS unifies them.
- Unified View: Network pruning is reframed as a special case of quantization.
- Single-Path Model: A novel single-path model is introduced to represent all candidate compression configurations. High bitwidth values are decomposed into a base lowest bitwidth value plus a series of "re-assignment offsets." This allows for sharing of quantized values across different bitwidths.
- Learnable Binary Gates: Binary gates are introduced to learn the choice of compression configurations (bitwidths and pruning decisions) for each layer. These gates, along with the network parameters, are trained jointly.
- Subset Selection Problem: The configuration search is transformed into a subset selection problem, which significantly reduces computational cost and optimization difficulty compared to traditional multi-path search methods.
- Loss-Aware Optimization: An objective function is formulated to balance accuracy (cross-entropy loss) and computational cost (log of computation cost), allowing for automatic trade-offs.
- Alternating Training: To mitigate noisy gradients from the step function used for binary gates, an alternating training scheme for weights and activations is proposed.
Datasets
The proposed method was evaluated on the following datasets:
- CIFAR-100: A standard dataset for image classification.
- ImageNet: A large-scale dataset for image classification.
Key Insights and Ideas
- Pruning as Quantization: Reframing pruning as a form of quantization simplifies the problem and allows for a unified approach.
- Bit Sharing for Efficiency: Decomposing high bitwidths into a base value and offsets allows for efficient sharing of quantized representations, reducing the number of parameters and computation.
- Single-Path Simplicity: A single-path model is significantly more efficient than multi-path approaches, leading to faster training and lower memory overhead.
- Subset Selection for Search: Transforming the search into a subset selection problem makes the optimization tractable, even for large search spaces.
- Joint Optimization is Crucial: The paper emphasizes that jointly optimizing pruning and quantization yields better results than sequential approaches.
Key Results
- Significant Compression: SBS achieved substantial compression ratios. For example, on ImageNet, a compressed MobileNetV2 achieved a 22.6× Bit-Operation (BOP) reduction with only a 0.1% drop in Top-1 accuracy.
- State-of-the-Art Performance: SBS consistently outperformed or matched existing state-of-the-art methods (like DNAS, HAQ, DQ) on CIFAR-100 and ImageNet in terms of accuracy-compression trade-offs.
- Reduced Search Cost: SBS demonstrated significantly lower search costs compared to multi-path methods like DNAS (e.g., 5.1× lower for ResNet-56 on CIFAR-100).
- Hardware Efficiency: Experiments on the BitFusion architecture showed that SBS compressed MobileNetV2 achieved lower latency and energy consumption compared to fixed-precision quantization.
Limitations and Future Work
- Hardware-Friendly Decomposition: While the paper uses power-of-two bitwidths (2, 4, 8) for hardware friendliness, it notes that non-power-of-two bitwidths are possible but can lead to wasted bits and reduced hardware utilization.
- Alternating Training Noise: The paper acknowledges that gradient approximation for binary gates can introduce noisy signals, especially when quantizing both weights and activations.
- Future Work: The authors suggest combining SBS with other methods like neural architecture search to find even more compact models with better performance. They also plan to explore training from scratch versus fine-tuning strategies further.
Summary updated