# Pruning Convolutional Neural Networks for Resource Efficient Inference

Taylor-based criterion prunes feature maps of fine-tuned CNNs for cheaper inference

Pavlo Molchanov, Stephen Tyree, Tero Karras, Timo Aila, Jan Kautz · arXiv · 2016-11-19

- **Problem** Fine-tuned CNNs stay expensive at prediction time because the full pretrained architecture is kept. Compressing weights does not reliably speed up hardware, and second-order pruning needs the Hessian, which adds memory and computation.
- **Method** The method removes feature maps one at a time and fine-tunes after each removal. It ranks maps with a first-order Taylor score of the cost change, instead of Hessian-based scores like Optimal Brain Damage.
- **Results** On a recurrent 3D-CNN gesture classifier, pruning cut GFLOPs by 12.6× with a 2.5% accuracy loss after extra fine-tuning. The paper reports this against unpruned networks.

## Why prune adapted networks at the feature-map level

Fine-tuning a network pretrained on a large dataset gives strong accuracy on a small specialised task, but the adapted network keeps the time, power and memory cost of its heavyweight architecture at prediction time. Most of that prediction-time cost sits in the convolutional layers, so the approach targets them directly by pruning entire feature maps, which lets the reduced network run efficiently on embedded devices.

Second-order pruning, such as Optimal Brain Damage and Optimal Brain Surgeon, selects parameters with a Taylor expansion of the cost, but it needs the Hessian computed in part or in full, which adds memory and computation on top of standard fine-tuning. Unstructured sparsity from magnitude-based dropping can compress a network well, yet compression alone may not give faster inference, because hardware exploits regular computation and intra-kernel sparsity often needs specialised hardware.

Group-sparsity regularization needs a per-layer sensitivity analysis and waits for weights to shrink under optimization, which the authors contrast with directly removing unimportant parameters.

## Greedy pruning interleaved with fine-tuning

The procedure first fine-tunes the network until it converges on the target task, then alternates one pruning step with further fine-tuning, and stops once the chosen balance between accuracy and a cost target such as FLOPs or memory use is reached. In the experiments one feature map is removed per pruning iteration, so that the fine-tuning and the criterion re-evaluation account for dependencies between maps.

The ideal target keeps the cost of the pruned network close to the original under a bound on the number of non-zero parameters, which is written as a minimization of the absolute cost difference subject to an l0 constraint. Finding that subset exactly is a combinatorial problem, and for VGG-16 with its 4224 convolutional feature maps it is impossible to solve, so the study uses greedy removal of the least important maps instead.

Each feature map is controlled by a binary pruning gate, which switches it off during feed-forward propagation, so that removing a map amounts to gating it to zero.

## The Taylor criterion for feature-map importance

The exact oracle would ablate each remaining parameter and record the change in cost, but that needs one evaluation on the training data per remaining parameter, which is prohibitively expensive. Two oracle variants are distinguished: oracle-loss keeps the signed change in cost, while oracle-abs keeps its absolute value, so that any change in either direction is penalized.

The Taylor criterion starts from the absolute cost change caused by setting a feature map output to zero and expands the cost around that point, keeping only the first-order term and treating the parameters as independent. The remainder of the first-order expansion is dropped, partly for computational reasons and partly because the ReLU activation tends to make the second-order term small.

Under these approximations the score for a feature map is the absolute value of the product of the cost gradient and the activation, which is exactly the quantity that backpropagation already computes.

For a feature map the score is written as \\\\( \\\\Theta\_{TE}(z^{(k)}\_l)=\\\\left\|\\\\frac{1}{M}\\\\sum\_m \\\\frac{\\\\partial C}{\\\\partial z^{(k)}\_{l,m}}\\\\, z^{(k)}\_{l,m}\\\\right\| \\\\), where M is the length of the vectorized map. For a minibatch of T examples the score is computed for each example separately and then averaged over the T examples.

Optimal Brain Damage treats the first-order term as zero because its expectation vanishes after enough training, and it works with the second-order term instead. The authors argue that the variance of that first-order term is informative, and by taking the absolute value they use the half-normal relation \\\\( E(\|y\|)=\\\\sigma\\\\sqrt{2/\\\\pi} \\\\) under an i.i.d.

assumption, so the score tracks the spread of the gradient term rather than its mean.

## Per-layer normalization and FLOPs penalty

Raw criterion values change scale with the depth of the layer, so a layer-wise l2 normalization divides each score by the square root of the sum of the squared scores within its layer. The normalization is what lets the same ranking rule operate across layers, and the authors report that it improves the correlation of the criteria with the oracle.

Because a larger per-map cost lowers the score, maps in computationally heavy layers become candidates for removal earlier, which is how the procedure targets FLOPs rather than parameter count alone.

## How closely the criteria track the oracle

The oracle was first computed for a single pruning step of VGG-16 fine-tuned on Birds-200, which reached 72.2% test accuracy with uncropped images. Ranking the 4224 feature maps by their contribution to the loss shows that median importance tends to fall with depth and that layers followed by max-pooling are more important, yet every layer contains both globally important and globally unimportant maps.

When the network and oracle ranking are fixed and maps are removed iteratively without any updating, pruning by oracle-abs keeps higher training accuracy than pruning by oracle-loss. The authors explain this by the instability that accumulates from large absolute changes, even when some individual removals reduce the loss.

Spearman's rank correlation measures how well a criterion's ranking matches the oracle-abs ranking, and a random ranking gives a correlation of zero across all layers. The Taylor criterion has the highest correlation among the compared criteria, both within each layer and across layers once layer-wise l2 normalization is applied, while OBD has the best across-layer correlation when no normalization is used.

These correlations were measured on AlexNet and VGG-16 for Birds-200, Flowers-102 and ImageNet, with data-dependent criteria computed on training data during fine-tuning.

## Birds-200 and Flowers-102 pruning results

The Taylor criterion gives the highest accuracy over nearly the whole range of pruning ratios, and with FLOPs regularization it is best relative to the number of operations, whereas OBD is slightly worse in parameters and clearly worse in FLOPs. Branson et al. report that training a CNN from scratch on Birds-200 reaches only 10.9% test accuracy, and the authors compare against a randomly initialised CNN with half the parameters per layer.

On this task the Taylor and OBD criteria are the best in both parameter count and GFLOPs, with Taylor ahead, and the authors note that OBD costs roughly 50% to 300% more time than Taylor because it needs the Hessian diagonal.

Pruning with the Taylor criterion was also run with different numbers of fine-tuning updates between iterations, and more updates gave higher accuracy at the cost of a longer pruning run. The authors note that longer fine-tuning of the unpruned networks reaches higher accuracy, for example 75% for VGG-16 on Birds-200 after an extra 128k updates and 82.9% for AlexNet on Flowers-102 after 130k updates, so accuracies of pruned and unpruned networks are only roughly comparable.

## ImageNet pruning of AlexNet

The oracle and criterion correlations on ImageNet are computed on a subset of 5000 training images.

With 100 updates between pruning iterations, the Taylor criterion performs better than random or minimum weight pruning, and measured against FLOPs its gap to random pruning is only 0%-4%, while measured against the number of feature maps pruned it is 1%-10%. Raising the number of updates from 100 to 1000 improves pruning noticeably for both the Taylor criterion and random pruning.

## Pruning the recurrent 3D-CNN for gesture recognition

The recurrent 3D-CNN recognises 25 dynamic hand gestures in streaming video, and it is built by adding recurrent connections to a 3D-CNN pretrained on Sports-1M and fine-tuned on a gesture dataset. The full network reaches 80.7% accuracy on the depth modality and needs an estimated 37.8 GFLOPs per inference, which is too much for an embedded GPU.

Pruning first raised classification error by nearly 6%, and additional fine-tuning restored much of the lost accuracy, giving a final network with a 12.6× reduction in GFLOPs and a 2.5% accuracy loss.

## From estimated FLOPs to measured inference time

The authors argue that FLOPs fall monotonically with the number of removed maps, but measured inference time also depends on the convolution implementation, parallelization, hardware, scheduling and memory transfer, so they measured time for selected networks. On an Intel Core i7-5930K CPU with batch size 16, AlexNet on Flowers-102 takes 226.4 ms unpruned at 80.1%, and the version pruned to 0.2 GFLOPs takes 87.0 ms, a 2.6× speed-up, at 74.1% accuracy, shown in the table as -6.0%.

The speed-ups are therefore reported per hardware setup and batch size, and they do not carry over to other platforms without measuring them there.

## Limitations

OBD doubles backward propagation time and memory when used with standard fine-tuning, and the authors' own implementation is about 30 times slower than the Taylor technique for saliency estimation and about 3 times slower for iterative pruning. A different implementation was said to reduce that overhead to 50%, as in the original paper, but the authors' measurements are the ones reported here.

The Taylor score rests on treating the parameters as independent and on dropping the first-order remainder, although parameters are interdependent in practice. Data-dependent criteria require forward and backward passes on training data during fine-tuning.

Pruning the gesture network increased classification error by nearly 6% before fine-tuning, and the Taylor results on the other tasks show a small drop during pruning as well. The gesture experiments use only the depth modality, and the ImageNet experiments use AlexNet and VGG-16 with the specific update budgets reported above, so other modalities and budgets were not tested.

## Paper info

- **Authors**: Pavlo Molchanov, Stephen Tyree, Tero Karras, Timo Aila, Jan Kautz
- **Venue**: arXiv · Preprint
- **First published**: 2016-11-19
- **Added**: 2026-11-12
- **Updated**: 2017-6-8
- **Version**: v2
- **arXiv**: 1611.06440
- **Category**: cs.LG · stat.ML
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1611.06440v2) · [PDF ↗](https://arxiv.org/pdf/1611.06440v2)

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

Pavlo Molchanov, Stephen Tyree, Tero Karras, Timo Aila, Jan Kautz (2016). Pruning Convolutional Neural Networks for Resource Efficient Inference. arXiv:1611.06440v2. https://arxiv.org/abs/1611.06440v2

**BibTeX**

```
@misc{molchanov2016pruning,
  title = {{Pruning Convolutional Neural Networks for Resource Efficient Inference}},
  author = {Pavlo Molchanov and Stephen Tyree and Tero Karras and Timo Aila and Jan Kautz},
  year = {2016},
  eprint = {1611.06440},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1611.06440v2}
}
```

## Other paper commentary

- [M3-Embedding: Multi-Linguality, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation](https://refivu.com/en/papers/c3b40084-e91f-4769-ab5c-b3256a5b92f7-m3-embedding-multi-linguality-multi-functionality-multi.md)
- [Online Learning for Matrix Factorization and Sparse Coding](https://refivu.com/en/papers/1ce2d052-c0f8-40f5-8ef8-2c82aed1ea18-online-learning-for-matrix-factorization-and-sparse-coding.md)
- [Adaptive Federated Learning in Resource Constrained Edge Computing Systems](https://refivu.com/en/papers/75d8bb03-c432-4128-871e-23133be3cbc7-adaptive-federated-learning-in-resource-constrained-edge.md)
- [Federated Optimization: Distributed Machine Learning for On-Device Intelligence](https://refivu.com/en/papers/5f4eb215-ecfd-414d-aaa9-bd382c3c7b54-federated-optimization-distributed-machine-learning-for-on.md)
- [Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs](https://refivu.com/en/papers/2f0fda58-62a6-4d7b-8db1-4bdf80289483-efficient-and-robust-approximate-nearest-neighbor-search.md)
- [Channel Pruning for Accelerating Very Deep Neural Networks](https://refivu.com/en/papers/e9bb1323-d15c-464e-b220-b00a94be3b6d-channel-pruning-for-accelerating-very-deep-neural-networks.md)
- [Free-Form Image Inpainting with Gated Convolution](https://refivu.com/en/papers/c438682f-8d73-4981-a1ac-035e6f376b93-free-form-image-inpainting-with-gated-convolution.md)
- [Person Transfer GAN to Bridge Domain Gap for Person Re-Identification](https://refivu.com/en/papers/68ab1f6a-e5fc-4ab0-aa97-7c531e651f1d-person-transfer-gan-to-bridge-domain-gap-for.md)
- [Focal and Efficient IOU Loss for Accurate Bounding Box Regression](https://refivu.com/en/papers/cc28bb37-8cb7-49b2-84aa-5bd885a3d4e6-focal-and-efficient-iou-loss-for-accurate-bounding.md)
- [Generalized Random Forests](https://refivu.com/en/papers/0e375cb5-e9bd-4631-b3f2-4cdd0973c2a8-generalized-random-forests.md)
- [NAS-FPN: Learning Scalable Feature Pyramid Architecture for Object Detection](https://refivu.com/en/papers/52a19738-611e-4c4e-b54f-2e9b88114304-nas-fpn-learning-scalable-feature-pyramid-architecture-for.md)
- [Learning Bayesian Networks with the bnlearn R Package](https://refivu.com/en/papers/bdeeb8df-cd3a-419f-af61-f58819af852d-learning-bayesian-networks-with-the-bnlearn-r-package.md)

## Terms in this paper

- [ImageNet](https://refivu.com/en/terms/5eadad128667-imagenet)
- [Convolutional Neural Networks](https://refivu.com/en/terms/936419759d72-convolutional-neural-networks)
- [AlexNet](https://refivu.com/en/terms/e5142ede4de4-alexnet)
- [transfer learning](https://refivu.com/en/terms/9c71d6928a00-transfer-learning)
- [top-5 accuracy](https://refivu.com/en/terms/6de0752ac469-top-5-accuracy)
- [mutual information](https://refivu.com/en/terms/31de24f17a5e-mutual-information)
- [APoZ](https://refivu.com/en/terms/eb32a2b4e2b5-apoz)
- [feature map](https://refivu.com/en/terms/a6d4922e0e4b-feature-map)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/f9a56d26-44b5-4ea9-af4f-8f00b03fe628-pruning-convolutional-neural-networks-for-resource-efficient)
