BLK-REW: A Unified Block-based DNN Pruning Framework using Reweighted Regularization Method

Xiaolong Ma, Zhengang Li, Yifan Gong, Tianyun Zhang, Wei Niu, Pu Zhao, Jian Tang, Xue Lin, Bin Ren, Yanzhi WangarXiv 2020

Introduction

Deep Neural Networks (DNNs) have revolutionized fields from computer vision to natural language processing, but their deployment on resource-constrained mobile devices remains a challenge due to high computational and storage demands. Pruning—the process of removing redundant weights—is a primary strategy to address this. However, a persistent trade-off exists between non-structured pruning, which maintains high accuracy but results in irregular "sparse" matrices that hardware cannot easily accelerate, and structured pruning, which is hardware-friendly (removing entire filters or channels) but often leads to significant accuracy degradation.

The BLK-REW framework addresses this gap by introducing a novel block-based structured pruning method combined with a fast reweighted regularization algorithm, enabling massive compression and real-time inference without sacrificing accuracy.

The BLK-REW Framework

Block-based Structured Pruning (BLK)

The core innovation of BLK-REW is the "middle ground" approach of block-based pruning. Instead of pruning an entire row or column globally across a weight matrix, the framework divides the matrix into multiple small blocks of size $m \times n$. Structured pruning (removing rows or columns) is then applied independently within each of these blocks.

Illustration of block-based structured pruning applied to a GEMM/FC layer.

This granularity allows the model to preserve critical weights that might be discarded in a global structured pruning scheme, while maintaining enough regularity for compiler-level hardware optimizations.

Reweighted Regularization (REW)

To identify which weights to prune, BLK-REW utilizes an iterative reweighted $l_1$ minimization approach. Unlike standard $l_1$ (Lasso) regularization, which penalizes all weights equally, the REW method applies a penalty inversely proportional to a weight's magnitude. Large, significant weights receive minimal penalties, while smaller, less critical weights are aggressively pushed toward zero. This approach effectively approximates the "ideal" $l_0$ optimization goal and has been shown to converge significantly faster than state-of-the-art methods like ADMM. For instance, in a VGG-16 model, REW reached optimal solutions in roughly 200 epochs, compared to over 1,000 epochs required by ADMM.

The "Sweet Spot" of Sparsity

The flexibility of the BLK-REW framework allows researchers to explore a vast design space by adjusting block sizes. This enables a fine-tuned balance between regularity (which dictates hardware speed) and flexibility (which preserves accuracy).

Trade-off between accuracy, performance, and regularity in different pruning schemes.

As shown in the trade-off analysis, block-based structured pruning occupies a unique position that maximizes performance gains while maintaining high accuracy levels that traditional structured pruning cannot reach.

Experimental Results and Hardware Acceleration

The framework was evaluated across diverse benchmarks, including ImageNet for CNNs and the TIMIT dataset for RNNs (specifically Gated Recurrent Units).

  • Massive Compression: On the TIMIT dataset, BLK-REW achieved a staggering 231.3× compression with a manageable increase in Phone Error Rate. At a 19.1× compression rate, the baseline accuracy was perfectly maintained.
  • CNN Efficiency: For VGG-16 on CIFAR-10, the framework reached 69.7× compression with only a 0.5% drop in accuracy, outperforming existing methods like TinyADMM.
  • Real-time Mobile Inference: To translate these theoretical gains into actual speed, the authors integrated a compiler-aided acceleration technique that reorders matrices to reduce thread divergence on mobile CPUs and GPUs. On a Samsung Galaxy S10, the framework achieved an inference time of 10.1ms for MobileNet-V2 on ImageNet, well within the 33ms threshold required for real-time video applications.

Conclusion

BLK-REW provides a unified solution to the long-standing conflict between pruning flexibility and hardware efficiency. By leveraging block-based structures and an efficient reweighted regularization algorithm, it enables the deployment of high-performance DNNs on mobile devices with unprecedented compression rates and real-time execution speeds. Future work may focus on automating block size selection for specific hardware architectures and extending the objective functions to directly optimize for FLOPs.

Summary updated

BibTeX
@misc{ma2020blk,
  author = {Xiaolong Ma and Zhengang Li and Yifan Gong and Tianyun Zhang and Wei Niu and Zheng Zhan and Pu Zhao and Jian Tang and Xue Lin and Bin Ren and Yanzhi Wang},
  title = {{BLK-REW: A Unified Block-based DNN Pruning Framework using Reweighted Regularization Method}},
  year = {2020},
  eprint = {2001.08357},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2001.08357},
}
Figure