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

Channel Pruning for Accelerating Very Deep Neural Networks

LASSO channel pruning speeds up very deep networks

  • Problem Channel pruning shrinks a trained CNN by removing channels, but removing them changes the next layer's input. Earlier inference-time methods gave only limited speed-up on very deep networks.
  • Method The authors prune each layer by alternating LASSO channel selection with least-squares reconstruction of its output. The layers are pruned in turn, and the un-pruned model provides the targets.
  • Results Pruned VGG-16 reaches 5x speed-up with only 0.3% more error. ResNet and Xception lose 1.4% and 1.0% accuracy at 2x speed-up.

Why channel pruning at inference time

Channel pruning belongs to the structured family of CNN accelerators. It lowers the number of channels in each feature map, so the network becomes a thinner network that runs on ordinary hardware and libraries. Tensor factorization splits a convolution into several smaller layers, but it cannot shrink the channel count, and it is awkward for the 1×1 layers that modern networks such as GoogleNet, ResNet and Xception rely on.

Sparse connections remove links between channels, but the resulting irregular layer shapes are not friendly to common implementations.

The difficulty of channel pruning is that removing channels from one layer changes the input seen by the following layer. Training-based pruning can pick channels adaptively, but it requires costly training, and results on very deep CNNs for ImageNet are rarely reported. Inference-time methods that analyse individual weights have reached only very limited speed-up.

Reconstructing outputs from redundant channels

The method starts from redundancy between feature maps rather than from the magnitude of filter weights. Pruning a layer is cast as minimizing the reconstruction error of its output feature map, so the kept channels must still reproduce what the next layer would have produced. Two steps are alternated: a LASSO regression picks the representative channels and drops redundant ones, and linear least squares rebuilds the output from the remaining channels.

Consider a feature map with c channels. The layer's filters are an n×c×kh×kw tensor applied to N×c×kh×kw input volumes sampled from that feature map, producing an N×n output matrix Y. A coefficient βi scales each input channel, with a 0-norm constraint that keeps at most c′ channels, and the reconstruction error is measured by the Frobenius norm.

The problem is written as \[\arg\min_{\beta,W}\frac{1}{2N}\Big\|Y-\sum_{i=1}^{c}\beta_i X_i W_i^\top\Big\|_F^2 \quad \text{subject to}\quad \|\beta\|_0\le c'\] where Xi is the N×khkw slice for channel i and Wi is the matching filter slice.

Relaxing the 0-norm and alternating the two subproblems

Because the 0-norm constraint is NP-hard to solve directly, the method replaces it with an 1-norm penalty weighted by λ, and adds a constraint that each filter slice has unit Frobenius norm, which rules out a trivial solution. Raising λ drives more entries of β to zero, which yields a higher speed-up.

With W fixed, β is found by LASSO regression on the stacked responses Zi = XiWi⊤, while ignoring any channel whose βi reaches zero. With β fixed, the retained filters W′ are obtained by least squares on X′, which concatenates the scaled inputs βiXi, and W′ is reshaped back into W. The scales are then moved into β and each Wi is normalized.

The procedure starts from the trained weights with λ = 0, so no channel is dropped, and increases λ step by step while the two subproblems are iterated until the number of nonzero βi stabilizes. Repeating the two steps is slow, so the authors run the LASSO step repeatedly until the channel budget is met and then run the least-squares step once.

They report that this gives results comparable to the full alternation, and it is the variant used in the remaining experiments.

Other training-based pruning work also uses an 1-norm or LASSO, but it usually places a sparsity term in the training loss rather than solving LASSO explicitly, and the work that does solve LASSO does not use feature maps or data during optimization. Because the selection uses sampled feature maps and runs on a trained model, the method can be applied at inference time.

Sequential pruning across layers

The single-layer procedure is applied to each layer in turn, so that the whole model is pruned sequentially. For each layer, the inputs come from the current, already pruned feature map, while the targets Y′ come from the output of the un-pruned model. Using the un-pruned outputs as targets means that the error introduced by earlier layers is counted when a later layer is pruned, which is the accumulated error the method is designed to control.

For whole-model speed-up, the overall target is first split into a speed-up ratio for each layer, and each layer's retained channel count c′ is then computed from that ratio.

Adapting the method to residual blocks

Single-branch networks such as LeNet, AlexNet and VGG are covered by whole-model pruning, but multi-branch networks such as GoogLeNet and ResNet need additional handling. In a residual block the input splits into a shortcut and a residual branch. The first convolution's input is shared with the shortcut, so its channels cannot be removed directly, and the last layer must reproduce an output that includes a parameter-free shortcut.

For the last layer of the residual branch, the reconstruction target changes from Y2 to Y1 − Y′1 + Y2, where Y1 is the original shortcut feature map and Y′1 is the current shortcut feature map after earlier layers were pruned. Since the shortcut has no parameters that could absorb this error, the target carries the difference. For the first layer, the selected channels are sampled from the shared feature map before the first convolution, which builds a narrower input for that convolution while the shortcut keeps its full width.

Each sampled volume is taken from the two branches consistently, and the sampling cost is treated as negligible. Because the selected channels are gathered into a dense tensor, the first convolution remains a regular convolution.

A filter-wise alternative applies the selection separately to each filter, so every filter picks its own input channels. Under single-layer acceleration it gave a 0.5% top-5 improvement for 2× ResNet-50 without fine-tuning, and after fine-tuning the authors saw no noticeable gain. Because filter-wise selection produces irregular convolutions that need special library support, the authors did not use it in the later experiments.

Experimental setup

The method is evaluated on VGG Nets, ResNet and Xception using ImageNet, CIFAR-10 and PASCAL VOC 2007. Batch Normalization is merged into the convolution weights before pruning, so every convolution is followed by ReLU. Caffe runs the networks and scikit-learn provides the solvers. Channel selection uses 5000 extracted images with 10 samples per image, which takes several minutes for VGG-16 on an Intel Xeon E5-2670 CPU.

On ImageNet, top-5 accuracy is measured with a single view: images are resized to a shorter side of 256 and center-cropped to 224×224. Fine-tuning runs for 10 epochs with random 224×224 crops and mirroring, and the setup gives a batch size of 128 and a learning rate of 1e−5. VGG-16 has 13 convolutional layers in a single-branch 16-layer network, and its single-view top-5 accuracy is 89.9%.

Single-layer selection against naive baselines

The comparison fixes the reconstruction step and varies only the channel choice. The two baselines are first k, which keeps the first k channels, and max response, which keeps channels whose corresponding filters have the largest absolute weight sum. Each selected set is passed to the same least-squares reconstruction, and the measure is the increase of error after a single layer is pruned without fine-tuning, across several speed-up ratios.

Across the tested layers and speed-up ratios, the method's error increase is lower than that of the two baselines. Max response is sometimes worse than first k. The authors attribute this to max response ignoring correlations between filters, since filters with large weights can be strongly correlated, so selection by filter weight carries little information.

They argue that correlation between feature maps is what should be exploited. Pruning also becomes harder from shallower to deeper layers. The authors read this as shallower layers having more redundancy, which motivates pruning them more aggressively in whole-model acceleration.

VGG-16 whole-model and combined results

For whole-model pruning, the remaining channel ratio is 1 : 1.5 between the shallow layers, conv1_x to conv3_x, and the deep layer conv4_x. The conv5_x layers are not pruned because they account for only 9% of the computation and are not redundant. Without fine-tuning, the 2x model has a 2.7 increase in top-5 error, and the 4x and 5x models have 7.9 and 22.0.

After fine-tuning, the increase is 0 at 2x, 1.0 at 4x and 1.7 at 5x. The fine-tuned filter pruning baseline in the paper's implementation gives 0.8, 8.6 and 14.6 at the same ratios.

The tensor-factorization row in the same table, Jaderberg et al., gives 9.7 at 4x and 29.7 at 5x. The authors read the gap to filter pruning as coming from the method using the channel redundancy inside feature maps, while the comparison with tensor factorization is made without fine-tuning.

Combined with spatial factorization and channel factorization, the 3C configuration gives 0.7 at 4x and 1.3 at 5x without fine-tuning, and 0.0 at 4x and 0.3 at 5x after fine-tuning. Asym. 3D gives 0.9 and 2.0 without fine-tuning, and 0.3 and 1.0 after fine-tuning. The accelerated models are fine-tuned for 20 epochs because they are three times deeper than the original networks.

After fine-tuning, the 4x model shows no degradation. Asym. 3D is better than the 3C configuration at 4x without fine-tuning only in the sense that the authors present their own 3C as outperforming it after fine-tuning; the authors note that channel pruning is more challenging than tensor factorization, since channel removal changes the next layer's input.

GPU speed and training from scratch

GPU forward-pass time is measured per image with Caffe, CUDA8 and cuDNN5 on a GeForce GTX TITAN X with mini-batch 32, averaged over 50 runs. The unpruned VGG-16 takes 8.144 ms per image. The fine-tuned 4x channel-pruned model takes 3.264 ms, a 2.50× ratio, with a 1.0 increase in error. Asym. 3D takes 8.503 ms, and the Jaderberg et al. model takes 8.051 ms.

The authors explain that tensor factorization splits weights into too many pieces, which adds overhead on current libraries and hardware, while channel pruning keeps the original architecture.

Under 4x acceleration, a model trained from scratch has a 1.8 increase in top-5 error, and a uniformly thinned model with half the filters per layer has 2.4. The pruned model reaches 1.0 after fine-tuning, and 7.9 before fine-tuning, which the authors compare with the scratch models at the same complexity. Training from scratch is described as taking about 120 epochs, so the authors view the pruned model as cheaper to obtain than a compact model trained from scratch.

Transfer to Faster R-CNN

The 2x and 4x pruned VGG-16 models, pruned on ImageNet, serve as the pre-trained backbone for Faster R-CNN, and detection is evaluated on PASCAL VOC 2007 with mAP and mmAP. Convolutional layers make up about 64% of the 220 ms per image running time of Faster R-CNN, and the 4x acceleration brings the convolutional time to 94 ms.

The 2x model has 68.3 mAP against a baseline of 68.7, a 0.4 drop, and keeps 36.7 mmAP. The 4x model has 66.9 mAP and 35.1 mmAP. The authors judge the 0.4 drop acceptable for practical use and note that mmAP, which weights higher localization requirements, shows no drop at 2x.

ResNet-50 and Xception-50 results

The baseline ResNet-50 has 92.2% top-5 accuracy with one view. At 2x, the plain method gives an 8.0 increase in error, the enhanced method 4.0, and the enhanced method after fine-tuning 1.4. Filter-wise keep ratios follow the filter pruning setup: 70% for sensitive blocks such as res5 and blocks near spatial size changes, and 30% for the others.

Within each block, branch2a, branch2b and branch2c keep 2 : 4 : 3, so with 30% kept, 40%, 80% and 60% remain. The authors credit the 4.0 improvement to accounting for the accumulated shortcut error, which reaches every later layer, and to feature map sampling, which reduces the wide input at the entry of each block.

Xception-50 is built from ResNet-50 by replacing its convolutions with spatial convolution blocks, and the branch2b input channels are doubled so the computational complexity matches. Its baseline reaches 92.8% top-5 accuracy at 4450 MFLOPs. At 2x, the method gives a 2.9 increase in error without fine-tuning and 1.0 after fine-tuning. Fine-tuned filter pruning reaches 4.3, and without fine-tuning the filter pruning top-5 error is 100%.

Batch Normalization layers must be kept during pruning, because otherwise fine-tuning the pruned Xception model becomes nontrivial.

ResNet-56 on CIFAR-10

The reproduced ResNet-56 reaches 92.8% accuracy with one view, against 93.0% for the official model. The final stage is kept unchanged, where the spatial size is 8×8. CIFAR-10 contains 50k training images and 10k test images in 10 classes.

At 2x, the method without fine-tuning has a 2.0 increase in error, against 1.9 for the model trained from scratch. After fine-tuning, the increase is 1.0, against 1.3 for fine-tuned filter pruning.

Limitations

The authors state that Xception-50 results are less graceful than the VGG-16 results, and attribute this to modern networks having less redundancy by design. Batch Normalization must be kept for Xception-50, and the filter-wise variant produces irregular convolutions, which the paper did not use.

Several of the lowest error figures for ResNet-50, Xception-50 and ResNet-56 come from fine-tuned models, and the pre-fine-tuning values are reported separately. ResNet-50 and Xception-50 are reported only at 2x speed-up on ImageNet, and the GPU timing covers only VGG-16 at 4x.

Paper info

Authors
Yihui He, Xiangyu Zhang, Jian Sun
Venue
arXiv · Preprint
First published
2017-7-19
Added
2026-11-12
Updated
2017-8-21
Version
v2
arXiv
1707.06168
Category
cs.CV
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

Yihui He, Xiangyu Zhang, Jian Sun (2017). Channel Pruning for Accelerating Very Deep Neural Networks. arXiv:1707.06168v2. https://arxiv.org/abs/1707.06168v2

BibTeX
@misc{he2017channel,
  title = {{Channel Pruning for Accelerating Very Deep Neural Networks}},
  author = {Yihui He and Xiangyu Zhang and Jian Sun},
  year = {2017},
  eprint = {1707.06168},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1707.06168v2}
}

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