Introduction
Training deep neural networks (DNNs) is a computationally intensive process with significant financial and environmental costs. While post-training pruning effectively compresses models for deployment, it fails to reduce the substantial resources required during the initial training phase. Recently, "Pruning Before Training" (PBT) has emerged as a solution, but existing methods like SNIP and GraSP primarily focus on unstructured pruning. By removing individual weights, these methods create sparse matrices that offer little to no speedup on standard hardware like CPUs and GPUs without specialized software or accelerators.
To achieve real-world training and inference speedups, structured pruning—the removal of entire convolutional channels or linear hidden units—is required. This paper introduces Single Shot Structured Pruning (3SP), a method that physically shrinks the network architecture before training begins, enabling significant reductions in FLOPs and memory footprint.
Methodology: 3SP and Compute-Awareness
The core of 3SP is an adaptation of the SNIP objective to the structured domain. SNIP uses a first-order Taylor expansion to estimate the impact of removing a parameter on the loss function. 3SP extends this by assigning a binary mask to entire output channels rather than individual weights.
- 3SP Algorithm: The process requires only a single forward and backward pass on a small minibatch of data. It calculates the gradient of the loss with respect to channel masks. Channels with the lowest scores—indicating minimal impact on the loss—are pruned.
- Compute-Aware 3SP (3SP + CA): Standard pruning often targets layers with many parameters, which may not correspond to the highest computational cost. For instance, early layers in a CNN often have fewer channels but larger spatial dimensions, accounting for a high percentage of FLOPs. 3SP + CA normalizes the pruning score by the FLOP count of each channel, prioritizing the removal of computationally expensive units that contribute little to model performance.
Experimental Results
The authors evaluated 3SP using a VGG-19 architecture on the CIFAR-10 and CIFAR-100 datasets. The results demonstrate that structured pruning before training can achieve significant efficiency gains with minimal accuracy trade-offs.
On CIFAR-10, reducing FLOPs by 50% resulted in a 2x training speedup on GPUs and a 3x inference speedup on CPUs, with accuracy only dropping from 93.6% to 93.1%. When using the compute-aware variant (3SP + CA), the model could be pruned even more aggressively.
Key Insights
- Noise in Structured Approximations: Applying Taylor approximations to thousands of weights simultaneously (a whole channel) is inherently noisier than applying it to single weights. However, 3SP retains enough signal to rank channel importance effectively.
- Failure of Gradient Flow Preservation: While methods like GraSP (which preserve gradient flow) work for unstructured pruning, they fail in the structured domain, often performing worse than random pruning due to mathematical instabilities at the channel level.
- Active Learning Benefits: In scenarios like active learning, where models are retrained frequently, the speedup from 3SP allows for processing more data within the same time budget, ultimately leading to higher final accuracy than a full-sized model.
Limitations and Future Directions
While 3SP is effective, it relies on the assumption that channel importance is independent, which is a simplification of complex neural interactions. This noise limits the precision of channel ranking at extreme pruning ratios. Furthermore, while demonstrated on VGG-19, future work is needed to validate these structured approximations on larger datasets like ImageNet and architectures with residual connections (e.g., ResNets). The authors also suggest exploring "energy-aware" pruning to target power consumption directly, though this remains highly hardware-dependent.
Summary updated