TL;DR
This paper definitively answers whether non-structured weight pruning is beneficial when combined with quantization, a crucial step for efficient deep learning. The authors introduce ADMM-NN-S, a framework for joint pruning and quantization, and a novel comparison methodology. Their findings reveal that non-structured pruning, despite its flexibility, is ultimately detrimental to both storage and computational efficiency when quantization is applied, leading them to conclude it's "harmful" for hardware acceleration.
What Problem Does This Paper Address?
Deep neural networks (DNNs) are incredibly powerful but also computationally expensive and energy-hungry, largely due to frequent data movement between memory and processing units. Model compression techniques like weight pruning and quantization aim to reduce this burden. Weight pruning removes redundant weights, while quantization reduces the number of bits used to represent weights. Quantization is considered a "must-do" for hardware acceleration (FPGA/ASIC) due to its hardware-friendliness. However, a key open question remained: when combined with quantization, is non-structured pruning (where individual weights are removed arbitrarily) truly beneficial compared to structured pruning (which removes entire filters or channels, maintaining matrix regularity)? This question is critical because it dictates where research and development efforts should be focused for optimal hardware efficiency.
Methods
The authors introduce ADMM-NN-S, an enhanced version of a prior joint pruning and quantization framework (ADMM-NN). ADMM-NN-S uniquely supports structured pruning by incorporating specific constraints for filter, channel, or filter shape pruning. It also features dynamic ADMM regulation and masked mapping/retraining to ensure solution feasibility and high accuracy.
Crucially, they develop a hardware implementation-agnostic comparison methodology. This methodology focuses on two key metrics:
- Total Storage: This includes both weight storage (considering quantization) and the overhead of storing indices for non-structured pruning.
- Computation Efficiency: Measured by a "pruning-to-performance ratio" (PPR), where a lower PPR indicates better efficiency. For structured pruning, PPR is close to 1 (as speedup directly correlates with pruning rate), while for non-structured pruning, it's significantly higher due to index overhead.
The comparison is performed under the constraint of equal accuracy to ensure a fair evaluation.
Datasets
The paper evaluates their methods on several standard datasets:
- MNIST: Used for LeNet-5 experiments.
- CIFAR-10: Used for VGG-16 and ResNet-18 experiments.
- ImageNet: Used for AlexNet, ResNet-18/50, and MobileNet V2 experiments.
No new benchmarks were introduced; instead, the focus was on applying their framework to existing, well-established datasets and models.
Key Insights and Ideas
- Quantization is the game-changer: The core insight is that the benefits of non-structured pruning, particularly its high pruning rates, are significantly eroded when quantization is applied. The overhead of storing indices for sparse weights becomes a major bottleneck.
- Index overhead is the killer: For non-structured pruning, the indices required to locate the remaining weights can consume more storage than the actual weight reduction achieved, especially when weights are quantized.
- Structured pruning offers a clear advantage: Structured pruning, by maintaining matrix regularity, avoids index overhead and is thus more compatible with hardware and efficient computation, even with quantization.
- "Harmful" is a strong word, but justified: The authors' strong conclusion that non-structured pruning is "harmful" stems from the observation that it not only fails to provide storage benefits over structured pruning (when quantized) but also leads to less efficient computation.
- Fully binarized DNNs are achievable: The work demonstrates the possibility of achieving fully binarized DNNs (all layers) with minimal or no accuracy loss, a significant step towards extreme model compression.
Key Results
- Unprecedented Pruning Rates: ADMM-NN-S achieved remarkable pruning rates with (almost) zero accuracy loss:
- LeNet-5 (MNIST): 348× overall weight pruning.
- AlexNet (ImageNet): 36× overall weight pruning.
- ResNet-50 (ImageNet): 8× overall weight pruning.
- Lossless Fully Binarized Networks: The paper reports the first lossless, fully binarized LeNet-5 (MNIST) and VGG-16 (CIFAR-10), and a ResNet (ImageNet) with reasonable accuracy loss.
- Non-structured vs. Structured Comparison: Across various models and datasets, when quantization was applied and accuracy was matched, non-structured pruning consistently showed:
- Larger total storage: Due to index overhead.
- Lower computational efficiency: Higher PPR values.
- Structured pruning is preferred: The study concludes that structured pruning is generally superior for hardware acceleration when combined with quantization, offering better storage and computational efficiency.
Limitations and Future Work
- Hardware Implementation-Agnostic: While this methodology ensures generality, it doesn't provide exact hardware performance figures. The authors suggest that even with moderate fixed quantization (e.g., 8-bit), the conclusion would likely hold.
- Focus on CONV layers: The detailed comparisons primarily focus on convolutional layers, which are computationally intensive. While similar effects were observed in fully-connected (FC) and recurrent neural networks (RNNs), detailed results were omitted for brevity.
- Algorithm Improvement: The authors acknowledge that future algorithmic improvements could potentially alter the landscape, but they believe their conclusion is robust.
- Transfer Learning and Adversarial Robustness: The paper briefly touches upon how structured pruning might be more beneficial for maintaining generality in transfer learning and adversarial robustness due to a larger number of remaining parameters, suggesting this as a future research direction.
- FC Layers and RNNs: The paper notes that structured pruning's benefits might be even higher in FC layers and RNNs, indicating a need for further investigation in these areas.
Summary updated