SPRUNN: Structural Proximity for Pruning in Deep Neural Networks
Authors: Babak Rokha, Ali Azarpeyvanda, Alireza Khanteymoori, Tara Ghasempouri
Organizations: Department of Computer Engineering, University of Zanjan, Zanjan, Iran · Department of Psychology, University of Freiburg, Freiburg, Germany · Department of Computer Systems, Tallinn University of Technology, Tallinn, Estonia
Deep Neural Networks (DNNs) have demonstrated significant accuracy across various machine learning tasks. However, these networks suffer from a huge number of parameters and computations, which leads to time-consuming processes. Consequently, parameter pruning approaches have been proposed to compress DNNs and efficiently implement them. The main challenge in pruning is selecting the appropriate parameters for pruning without significantly damaging the accuracy. In this paper, we propose SPRUNN, an algorithmic pruning approach based on the structural proximity criterion for filter pruning in convolutional layers of deep neural networks. Structural Proximity (SP) calculates filter similarity by considering all filters and comparing each one with the others, effectively identifying less important filters for pruning in the convolutional layers. Furthermore, we integrate this approach with fine-grained pruning in Fully Connected(FC)layerstocompresstheDNNsthatinclude both convolutional and FC layers.Toenhancetheaccuracyoftheprunedmodel,weproposealearning rate refinement strategy during the retraining phase. Experimental results demonstrate that SPRUNN achieves significant compression with high accuracy across diverse architectures and datasets.
Figures & tables
Figure 1: Overview of the steps in SPRUNN (The step of training original networks is omitted when a pretrained model is given to SPRUNN).
Figure 2: The pruning process in SPRUNN ( LR1train : initial learning rate in the training, LRntrain : final learning rate in the training, and LR1retrain : initial learning rate in the retraining).
Figure 3: A filter space and SP for filters with two elements.
Figure 4: Example of computing SP for a set of four filters, demonstrating 50% filter pruning.
Figure 5: Initial and final learning rates during training, along with the initial learning rate for retraining.
Method
Acc. (%)
Params. ↓ * (%)
FLOPs ↓ (%)
Baseline
92.88
0
0
SPRUNN(40 % ) †
91.53
62.23
61.27
FPGM [ 14 ]
91.09
N/A ‡
42.20
SFP-D [ 25 ]
91.06
42.24
50.19
DPU [ 16 ]
91.05
N/A
43
SPRUNN(50 % )
90.95
74.90
74.84
Table 1: Results for ResNet-20 on CIFAR-10.
Dataset
Method
Acc. (%)
Params. ↓ (%)
FLOPs ↓ (%)
CIFAR-10
Baseline
93.77
0
0
SPRUNN(40 % )
92.88
62.30
61.40
LAASP [ 7 ]
92.64
N/A
53.30
Zheng et al. [ 51 ]
92.39
N/A
55.60
FGSEP [ 48 ]
92.31
82.56
70.02
FPGM [ 14 ]
92.31
N/A
41.50
Table 2: Results for ResNet-32 on CIFAR-10 and TinyImageNet.
Dataset
Method
Acc. (%)
Params. ↓ (%)
FLOPs ↓ (%)
CIFAR-10
Baseline
94.44
0
0
SP [ 9 ]
94.08
59.03
47.68
FPC [ 2 ]
94.01
65.88
35.71
SPRUNN(40 % )
93.86
62.35
61.48
PFRCP [ 44 ]
93.85
71
56.20
FGSEP [ 48 ]
93.84
78.06
70.43
Table 3: Results for ResNet-56 on CIFAR-10 and CIFAR-100.
Dataset
Method
Acc. (%)
Params. ↓ (%)
FLOPs ↓ (%)
CIFAR-10
Baseline
94.50
0
0
FPC [ 2 ]
94.54
67.05
48.19
ICP [ 1 ]
94.36
61.85
55.05
SPRUNN(40 % )
94.33
62.38
61.53
FGSEP [ 48 ]
94.32
82.65
70.28
LAASP [ 7 ]
94.17
N/A
52.50
Table 4: Results for ResNet-110 on CIFAR-10 and CIFAR-100.
Method
Acc. (%)
Params. ↓ (%)
FLOPs ↓ (%)
Baseline
77.13
0
0
SPRUNN(50 % )
71.63
74.75
73.37
POEM [ 17 ]
71.40
N/A
73.40
Table 5: Results for ResNet-18 on CUB-200-2011.
Method
Acc. (%)
Params. ↓ (%)
FLOPs ↓ (%)
Baseline
95.07
0
0
StructADMM [ 50 ]
95.30
N/A
69.70
SPRUNN(60 % )
94.76
83.67
83.45
SFP-D [ 25 ]
94.06
43.07
48.66
FCS-MLFT [ 46 ]
93.03
71.75
N/A
Zheng et al. [ 51 ]
92.57
N/A
62.30
Table 6: Results for MobileNetV2 on CIFAR-10.
Figure 6: Changes in test accuracy as the parameter reduction increases in SPRUNN.
Method
Acc. (%)
Params. ↓ (%)
FLOPs ↓ (%)
Baseline
99.47
0
0
SPRUNN(40 % ,95 % ) *
99.24
91.78
56.27
Han et al. [ 11 ]
99.23
91.65
84
Joint pruning [ 24 ]
99.20
98.70
94.10
FGSEP [ 48 ]
99.20
99.90
90.60
SOGP [ 37 ]
99.18
98.96
91.14
Table 7: Results for LeNet-5 on MNIST.
Method
Acc. (%)
Params. ↓ (%)
FLOPs ↓ (%)
Baseline
94.50
0
0
CLCS [ 52 ]
94.33
N/A
52.20
SPRUNN(40 % , 40 % )
94.25
42.59
57.02
FPC [ 2 ]
94.08
95.17
65.62
SpectralNorm [ 40 ]
94.05
83.20
53.60
SDDLA [ 45 ]
93.88
89.12
57.30
Table 8: Results for VGG-16 on CIFAR-10.
Figure 7: Test accuracy comparison of pruned models obtained using the proposed SP criterion, GM, Cosine and L2−norm criteria.
Figure 8: Test accuracy comparison of pruned models retrained using learning rate refinement, learning rate rewinding, and fine-tuning.
Figure 9: Effect of the retraining learning rate on the test accuracy of the pruned ResNet-20 model.
Model
Parameters(%)
FLOPs(%)
Conv
FC
Conv
FC
LeNet-5
4.17
95.83
85.85
14.15
VGG-16
10.96
89.04
72.37
27.63
Table 9: Ratio of parameters and FLOPs in the convolutional and FC Layers in LeNet-5 and VGG-16.
Model
Pruning rate(%)
Acc.(%)
Params. ↓ (%)
FLOPs ↓ (%)
Conv
FC
LeNet-5
40
40
99.34
40.01
48.60
40
95
99.24
91.78
56.27
95
40
97.48
41.73
86.13
VGG-16
50
50
93.95
52.72
67.99
50
90
93.50
88.32
79.03
Table 10: Test accuracy, parameters reduction, and FLOPs reduction at various pruning rates in the convolutional and FC layers for LeNet-5 and VGG-16.
Figure 10: Comparison of accuracy, parameter reduction, and FLOPs reduction under three pruning settings in VGG-16: pruning only FC layers, pruning only convolutional layers, and pruning both convolutional and FC layers. The pruning rate is fixed at 50% for each layer type.