Abstract
Training state-of-the-art Convolutional Neural Networks (CNNs) requires significant computational resources. While weight pruning is common for accelerating inference, its application to the dynamic gradients during training is challenging. This paper proposes a method to accelerate CNN training by stochastically pruning activation gradients. By leveraging the normal distribution of gradients to determine thresholds efficiently and employing stochastic rounding to maintain mathematical expectation, the authors achieve up to 5.92× speedups in back-propagation with minimal impact on accuracy.
Introduction
The computational cost of training deep CNNs often necessitates massive GPU clusters. Sparsification techniques have successfully reduced inference latency, but applying them to training is difficult because gradients change every iteration. Existing gradient pruning methods often rely on expensive sorting (top-k) or lead to model divergence. This work introduces a computationally efficient, mathematically sound approach to prune activation gradients during the back-propagation stage.
Methodology
Architectural Integration
The authors identify Activation Gradients Back-propagation (AGBP) and Weight Gradients Computation (WGC) as the primary bottlenecks. To address this, pruning layers are inserted into standard blocks.
In a standard Conv-ReLU block, pruning is applied after the ReLU activation. In Conv-BN-ReLU blocks, it is placed before the Batch Normalization (BN) layer to maximize the sparsity passed through subsequent operations.
Distribution Based Threshold Determination (DBTD)
Instead of sorting gradients—a $O(n \log n)$ operation—the authors observe that activation gradients typically follow a normal distribution. By estimating the standard deviation ($\sigma$) of the gradients, a pruning threshold ($\tau$) can be calculated for a target pruning rate ($p$) in $O(n)$ time. This makes the overhead of determining what to prune negligible compared to the savings gained.
Stochastic Pruning
To ensure convergence, the pruning process must not bias the gradient updates. Simple hard-thresholding (zeroing small values) can cause divergence. The authors utilize stochastic pruning: gradients with absolute values below $\tau$ are either zeroed or scaled to $\pm\tau$ such that the mathematical expectation of the distribution remains unchanged.
Experimental Results
The method was evaluated using AlexNet and ResNet architectures on CIFAR-10, CIFAR-100, and ImageNet datasets.
Performance Speedups
By modifying the Caffe framework to utilize Sparse-Dense Matrix Multiplication (SDMM), the authors achieved significant acceleration in the back-propagation stage:
- Intel Xeon CPU: 1.71× to 3.99× speedup.
- ARM Raspberry Pi 4B: 1.79× to 5.92× speedup.
Accuracy and Sparsity
Despite pruning up to 99% of gradients in certain layers, accuracy loss remained negligible. For instance, ResNet-50 on CIFAR-100 showed a 1% accuracy improvement, suggesting that stochastic pruning may provide a regularizing effect similar to Dropout. The overall gradient density was reduced to 10-30% for deep networks.
Conclusion
Stochastic pruning of activation gradients offers a viable path toward faster CNN training. By combining distribution-based thresholding with expectation-preserving stochastic rounding, the proposed method achieves substantial speedups on CPU-based hardware without sacrificing model performance. Future work includes extending these optimizations to GPU kernels and integrating with gradient quantization.
Summary updated