Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Learning Efficient Convolutional Networks through Network Slimming

Network slimming prunes unimportant channels from CNNs during training

  • Problem Large CNNs are too costly in model size, run-time memory and computing operations. Most existing compression methods address only one or two of these costs.
  • Method Network slimming adds an L1 penalty to batch normalization scale factors during training, then prunes channels with the smallest factors under one global threshold, then fine-tunes the narrower network.
  • Results Multi-pass VGGNet on CIFAR-10 reaches a 20× model-size reduction and a 5× computing-operation reduction with comparable accuracy to the baseline.

Why large CNNs are hard to deploy

Such a model is unlikely to fit mobile devices, wearables or Internet of Things devices.

Three costs matter in practice. The model size determines how much must be stored and loaded at inference time, and a typical CNN trained on ImageNet takes more than 300MB. Run-time memory is a second cost: the intermediate activations can take more memory than the parameters, even at batch size 1. The third is the number of computing operations, since convolutions on high-resolution images are expensive and a large CNN can need minutes per image on a mobile device.

Low-rank approximation, quantization, binarization, weight pruning and dynamic inference each target one or two of these costs. Several of these techniques also need specially designed software or hardware to turn the reduction into speed.

Why prune whole channels

Pruning individual weights gives the most flexibility, but the gain is only realized with sparse storage formats or sparse computation support. Removing a whole channel leaves an ordinary dense network that conventional platforms can run, which is the trade-off the method aims for.

A channel is tied to the incoming weights of its layer and to the weights that read it in the next layer. Removing it therefore requires all of those weights to be near zero at the same time. That rarely happens by chance in a trained model, and pruning channels of pre-trained ResNets reduced parameters by only about 10% without accuracy loss.

Group LASSO pushes all filter weights of a channel toward zero together during training, which makes the regularization gradient with respect to every filter weight difficult to handle. The method instead asks the channel itself to carry one number that can be penalized directly.

Scaling factors shared with batch normalization

Each channel's output is multiplied by a scaling factor γ, and the network weights and these factors are trained jointly, with a penalty applied only to the factors. The training objective is \( L = \sum_{(x,y)} l(f(x,W),y) + \lambda \sum_{\gamma \in \Gamma} g(\gamma) \), where the first sum is the usual loss of the CNN on the training pairs and g is a sparsity-induced penalty on the factors.

λ sets the balance between the usual loss and the penalty.

The penalty chosen is \( g(s)=|s| \), the L1 norm, which is widely used to produce sparsity. Because this penalty is not smooth at zero, the optimization uses subgradient descent, and a smooth-L1 penalty is named as an alternative that avoids the subgradient.

Instead of adding new multipliers, the method takes the γ parameters that batch normalization layers already contain. Batch normalization standardizes the input using the mean and standard deviation of the mini-batch and then applies γ and β: \( \hat z = \dfrac{z_{in}-\mu_B}{\sqrt{\sigma_B^2+\epsilon}}, \quad z_{out}=\gamma \hat z+\beta \).

The γ values are channel-wise and cost no extra parameters, which is why the authors regard this as the natural place to read off channel importance.

This reuse depends on a BN layer following each convolution. Without BN, a scaling layer and the convolution weights are both linear, so one can trade the scale against the weights and the factor no longer measures importance. A scaling layer placed before BN is cancelled by the normalization, and one placed after BN gives two consecutive scales for each channel.

From trained factors to a narrower network

After sparsity training many factors sit near zero, and channels are pruned with one global threshold set at a percentile of all factors across all layers. Prior work [23] chose different ratios for different layers, whereas this method uses a single cut-off so that the percentile alone decides how many channels go. For example, a 70% percentile removes the 70% of channels with the smallest factors.

Removing a channel removes its incoming and outgoing connections, so the result is a smaller dense network. The authors build a new narrower model and copy the surviving weights from the model trained with sparsity, so no sparse format or sparse computation library is required.

Pruning at high ratios can cost accuracy, and fine-tuning the narrow network recovers much of it under the same optimization setting as normal training. The authors report that the fine-tuned narrow network can reach higher accuracy than the unpruned network in many cases.

The procedure can be applied again to the narrowed network, which gives a multi-pass scheme that keeps producing more compact models. Each further round is a full training run followed by pruning and fine-tuning.

Adapting the method to skip connections and pre-activation blocks

Plain networks such as AlexNet and VGGNet take the procedure unchanged. Networks with cross-layer connections and pre-activation blocks, such as ResNet and DenseNet, need an adjustment.

In those networks a BN layer sits before each convolution, so the sparsity shows up at the input end of a layer, which then uses only a subset of the channels it receives. To save parameters and computation at test time, a channel selection layer is placed to mask out the channels found to be insignificant.

Datasets, models and training settings

Experiments cover VGGNet, ResNet-164 and DenseNet-40 on CIFAR-10, CIFAR-100 and SVHN, VGG-A on ImageNet, and a three-layer fully connected network on MNIST. DenseNet-40 uses growth rate 12, and ResNet-164 is a pre-activation network with bottleneck structure.

SVHN uses 604,388 training images, with 6,000 held out for validation and 26,032 test images. ImageNet has 1.2 million training images and 50,000 validation images, and MNIST has 60,000 training and 10,000 test images.

Normal training uses SGD with mini-batch size 64 for 160 epochs on CIFAR and 20 epochs on SVHN, starting at a learning rate of 0.1. The weight decay is 10−4 and the Nesterov momentum is 0.9.

The λ values come from a grid search over 10−3, 10−4 and 10−5 on the CIFAR-10 validation set. VGGNet uses 10−4, while ResNet and DenseNet use 10−5, and VG-A on ImageNet uses 10−5. All scaling factors start at 0.5 rather than 1, which the authors chose because it gave higher accuracy for their baseline models.

Single-pass results on CIFAR and SVHN

On CIFAR-10, VGGNet with 70% of channels pruned reached a test error of 6.20 against 6.34 for the baseline, with 88.5% of parameters and 51.0% of FLOPs pruned. On CIFAR-100, VGGNet with 50% of channels pruned reached 26.52 against 26.74, with 75.1% of parameters and 37.1% of FLOPs pruned. On SVHN, VGGNet with 60% pruned reached 2.06 against 2.17, with 84.8% of parameters and 50.1% of FLOPs pruned.

DenseNet-40 with 40% of channels pruned on CIFAR-10 reached 5.19 against 6.11, with 35.7% of parameters and 28.4% of FLOPs pruned. At 70% pruned, the CIFAR-10 error is 5.65, with 65.2% of parameters and 55.0% of FLOPs pruned. On CIFAR-100 at 40% pruned, DenseNet-40 reached 25.28 against 25.36, with 37.5% of parameters and 30.3% of FLOPs pruned.

ResNet-164 saves less: at 40% pruned on CIFAR-10 it reaches 5.08 against 5.42, with 14.9% of parameters and 23.7% of FLOPs pruned. On CIFAR-100 at 40% pruned it reaches 22.87 against 23.37, with 15.5% of parameters and 33.3% of FLOPs pruned. The authors attribute the smaller savings to the bottleneck structure of ResNet-164, which they suggest already selects channels.

The authors describe the last row of each model, which has at least 60% of channels pruned, as keeping similar accuracy to the baseline, with parameter savings of up to 10× and FLOP reductions typically around 50%. On CIFAR-100 the reduction is typically somewhat smaller than on CIFAR-10 and SVHN, which the authors link to CIFAR-100 having more classes.

Sparsity as a regularizer

On ResNet and DenseNet, pruning about 40% of channels often gave a lower test error than the original model. DenseNet-40 at 40% pruned reached 5.19 against 6.11 on CIFAR-10, which is almost one point lower.

The authors offer as a hypothesis that the L1 sparsity works as a regularizer, providing feature selection in intermediate layers. They link this to the feature-selection view developed in the analysis section.

In the DenseNet-40 sweep, a model trained with sparsity performed better than the original even before fine-tuning. The authors again attribute this to the regularization effect of L1 sparsity on the channel scaling factors.

ImageNet and MNIST results

The authors note that other efficient CNN methods on ImageNet mostly report accuracy loss, while this one did not.

The parameter saving is large while the FLOP saving is modest because only 378 of the 2752 channels in the convolutional layers were pruned, whereas 5094 of the 8192 neurons in the fully connected layers were pruned.

On MNIST, the baseline has a test error of 1.43 on a 784-500-300-10 network. The pruned network of the method has 784-100-60-10 neurons, 84.4% of parameters pruned and a test error of 1.49, against 1.53 with 83.5% pruned for the SSL result reported by [35]. A global threshold sometimes removed a whole layer, so the authors pruned 80% of neurons in each of the two intermediate layers instead.

Repeated slimming on VGGNet

VGGNet has no skip connections, so pruning a whole layer would destroy the model. The multi-pass runs therefore combine the 50% percentile threshold with a cap of 50% of channels pruned at each layer.

On CIFAR-10 the trained model's error is lowest at iteration 5, at 5.96 against a 6.34 baseline. The table caption assigns each row's pruned ratios to the fine-tuned model in that row and to the trained model in the next row, so the iteration-5 trained model corresponds to 95.6% of parameters and 77.2% of FLOPs pruned. The authors report 20× parameter and 5× FLOP reductions for this model, while its fine-tuned error at iteration 5 is 7.73.

On CIFAR-100 the trained error is 26.49 at iteration 3 and rises to 28.17 at iteration 4 and 30.04 at iteration 5. The fine-tuned error at iteration 3 is 29.08 against a 26.74 baseline. The authors explain the rise by CIFAR-100 having more classes, so pruning channels too aggressively hurts accuracy, and they state that near 90% of parameters and near 70% of FLOPs can still be pruned without notable loss.

Sensitivity to pruned percentage and λ

A DenseNet-40 trained with λ = 10−5 on CIFAR-10 was pruned at a range of percentages. Pruned and fine-tuned errors degrade only when the pruning ratio passes a threshold, and fine-tuning compensates for most of the loss before that point. The fine-tuned error falls behind the baseline only once more than 80% of channels are pruned.

For VGGNet on CIFAR-10, the distribution of scaling factors becomes more concentrated near zero as λ grows. At λ = 0 the distribution is relatively flat, while at λ = 10−4 almost all scaling factors lie in a small region near zero.

The authors read this concentration as feature selection in intermediate layers, where only channels with non-negligible factors are kept. A heatmap of the 11th convolutional layer of VGGNet on CIFAR-10 over training shows some channels' factors growing while others shrink toward the pruned set.

Limitations

ResNet-164 savings are small in the reported rows, and CIFAR-100 reductions are lower than on the other datasets. The multi-pass runs cover only VGGNet on CIFAR-10 and CIFAR-100, and ResNet and DenseNet are not repeated through several passes.

The ImageNet result rests on fine-tuning the pruned VGG-A for only 5 epochs at a learning rate of 10−3, because of time constraints. The λ grid search was run only on the CIFAR-10 validation set, and the chosen values are then stated for the other datasets.

Run-time memory and wall-clock measurements are listed as supplementary material, so the main text supports parameter and FLOP ratios but not measured speed or memory.

Paper info

Authors
Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, Changshui Zhang
Venue
arXiv · Preprint
First published
2017-8-22
Added
2026-11-12
Updated
2017-8-22
Version
v1
arXiv
1708.06519
Category
cs.CV · cs.AI · cs.LG
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, Changshui Zhang (2017). Learning Efficient Convolutional Networks through Network Slimming. arXiv:1708.06519v1. https://arxiv.org/abs/1708.06519v1

BibTeX
@misc{liu2017learning,
  title = {{Learning Efficient Convolutional Networks through Network Slimming}},
  author = {Zhuang Liu and Jianguo Li and Zhiqiang Shen and Gao Huang and Shoumeng Yan and Changshui Zhang},
  year = {2017},
  eprint = {1708.06519},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1708.06519v1}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up