Pruning Blocks for CNN Compression and Acceleration via Online Ensemble Distillation

Zongyue Wang, Shaohui Lin, Jiao Xie, Yangbin Lin · DOI

Introduction

Modern deep learning has seen the rise of increasingly complex Convolutional Neural Networks (CNNs) like ResNet and MobileNet. While these architectures achieve state-of-the-art performance, they impose a significant computational burden. Deploying a model like ResNet-152 on mobile or edge devices is often impractical due to high memory requirements and billions of floating-point operations (FLOPs).

This paper presents Online Ensemble Distillation (OED), a framework designed to compress and accelerate CNNs by pruning entire residual blocks in a single training cycle. By moving away from traditional iterative pruning methods, OED offers a more efficient path to creating compact, high-performance models.

The Challenge of Network Pruning

Network pruning is a primary strategy for model compression, but it typically faces a trade-off between hardware efficiency and accuracy.

  1. Structured vs. Non-structured Pruning: Non-structured pruning removes individual weights, leading to sparse matrices that standard hardware cannot easily accelerate. In contrast, structured pruning removes entire filters or blocks, which is hardware-friendly but often results in a greater loss of accuracy.
  2. The Iterative Bottleneck: Traditional pruning workflows are notoriously slow. They require a "train-prune-fine-tune" cycle that must be repeated multiple times to recover accuracy lost during the pruning stage. This iterative process is computationally expensive and time-consuming.
Comparison of traditional multi-stage pruning versus the proposed one-shot pruning framework.

OED addresses these issues by performing structured block pruning in a "one-shot" manner, integrating the pruning process directly into the training phase.

Methodology: Online Ensemble Distillation

The OED framework is built upon three technical pillars that allow it to bypass iterative fine-tuning while maintaining model robustness.

1. Soft Masks ($\lambda$)

To identify redundant components, the authors introduce a scalar multiplier, or "soft mask" ($\lambda$), after each residual block. During training, the network learns the importance of each block. If a mask's value is driven to zero, the corresponding block is deemed redundant and can be permanently removed from the architecture without affecting the flow of the rest of the network.

2. Online Ensemble Distillation

Knowledge distillation typically involves a large, pre-trained "teacher" model guiding a smaller "student" model. OED innovates by creating a teacher "online." By running multiple branches of the target network simultaneously with different initializations, the framework ensembles their features to create a strong, collective teacher signal. This cooperative learning environment allows the branches to improve together, providing a superior training signal compared to a single network.

The OED framework architecture showing multiple student branches, soft masks, and the ensemble distillation process.

3. FISTA Optimization

Standard Stochastic Gradient Descent (SGD) often fails to push parameters exactly to zero, leading to "noisy" masks. To ensure clean pruning, the authors utilize the Fast Iterative Shrinkage-Thresholding Algorithm (FISTA). This optimization technique mathematically enforces sparsity, forcing unimportant masks to exactly zero and enabling reliable one-shot pruning.

Experimental Results

The authors evaluated OED on standard benchmarks including CIFAR-10, CIFAR-100, and ImageNet (ILSVRC 2012) using architectures like ResNet, ResNeXt, and MobileNet V2.

  • ResNet-56 (CIFAR-10): OED achieved a 56.4% reduction in FLOPs and a 49.4% reduction in parameters. Remarkably, in some tests, the pruned model's error rate was lower than the original dense baseline, demonstrating the regularizing effect of the pruning process.
  • ResNet-50 (ImageNet): The method achieved a 1.9x compression factor while maintaining competitive Top-5 error rates.
  • Real-world Speedup: Beyond theoretical FLOPs, the pruned ResNet-50 showed a 1.6x actual speedup in wall-clock time on both CPU and GPU hardware.

Key Insights and Discussion

One of the most significant findings was that OED-pruned networks exhibited increased adversarial robustness. When tested against attacks like FGSM, the pruned models performed better than their dense counterparts. This suggests that block pruning effectively removes "noisy" or overfitted paths that adversarial examples often exploit.

However, the method does have limitations. The primary trade-off is training overhead; running multiple branches simultaneously increases GPU memory usage and initial training time. Additionally, while the theoretical FLOPs reduction is high, the actual speedup is slightly lower due to hardware I/O delays and library-specific memory handling.

Conclusion

Online Ensemble Distillation represents a significant step forward in CNN acceleration. By combining soft masks, ensemble learning, and FISTA optimization, it provides a robust, one-shot solution for structured pruning. Future work may explore applying these principles to finer-grained pruning (such as individual channels) and further optimizing for specific hardware constraints.

Summary updated

BibTeX
@article{wang2019pruning,
  author = {Zongyue Wang and Shaohui Lin and Jiao Xie and Yangbin Lin},
  title = {{Pruning Blocks for CNN Compression and Acceleration via Online Ensemble Distillation}},
  journal = {IEEE Access},
  year = {2019},
  doi = {10.1109/access.2019.2957203},
}
Figure