[Paper Review] Knapsack Pruning with Inner Distillation
This paper proposes Knapsack Pruning with Inner Distillation (KPID), a one-shot neural network pruning method that formulates channel pruning as a Knapsack Problem to optimize accuracy versus FLOPs or inference time, while using inner knowledge distillation to transfer feature representations from the parent network. The method achieves state-of-the-art accuracy on ImageNet, CIFAR-10, and CIFAR-100 with ResNet and EfficientNet backbones, producing models faster than MobileNetV3 and EfficientNet-B0 at the same FLOPs.
Neural network pruning reduces the computational cost of an over-parameterized network to improve its efficiency. Popular methods vary from $\ell_1$-norm sparsification to Neural Architecture Search (NAS). In this work, we propose a novel pruning method that optimizes the final accuracy of the pruned network and distills knowledge from the over-parameterized parent network's inner layers. To enable this approach, we formulate the network pruning as a Knapsack Problem which optimizes the trade-off between the importance of neurons and their associated computational cost. Then we prune the network channels while maintaining the high-level structure of the network. The pruned network is fine-tuned under the supervision of the parent network using its inner network knowledge, a technique we refer to as the Inner Knowledge Distillation. Our method leads to state-of-the-art pruning results on ImageNet, CIFAR-10 and CIFAR-100 using ResNet backbones. To prune complex network structures such as convolutions with skip-links and depth-wise convolutions, we propose a block grouping approach to cope with these structures. Through this we produce compact architectures with the same FLOPs as EfficientNet-B0 and MobileNetV3 but with higher accuracy, by $1\%$ and $0.3\%$ respectively on ImageNet, and faster runtime on GPU.
Motivation & Objective
- To address the limitations of existing pruning methods that rely on heuristic importance scores and fail to leverage the full expressive capacity of the parent network.
- To optimize the trade-off between model accuracy and computational cost (FLOPs or inference time) during pruning.
- To enable effective pruning of complex architectures like ResNets and EfficientNets with skip-connections, depthwise convolutions, and squeeze-and-excitation modules.
- To improve pruned model performance by transferring intermediate feature representations from the parent network via inner knowledge distillation.
- To produce compact, fast models that match or exceed the accuracy of SOTA models like EfficientNet-B0 and MobileNetV3 at the same FLOPs.
Proposed method
- Formulates network pruning as a Knapsack Problem, where each channel has an importance score and a computational cost (FLOPs), and the goal is to maximize accuracy under a budget constraint.
- Applies a GCD normalization to the FLOP values to enable efficient dynamic programming-based solution of the Knapsack Problem.
- Uses a block grouping strategy to handle complex architectural components like skip-connections and depthwise separable convolutions by treating them as atomic units during pruning.
- Introduces Inner Knowledge Distillation (IKD), where the pruned network is fine-tuned to mimic the internal activation patterns of the parent network’s layers.
- Employs a knowledge distillation loss based on feature-level similarity between the parent and pruned network’s intermediate features, not just final logits.
- Supports both FLOPs-based and inference-time-based pruning, with the latter using measured GPU inference times to better reflect real-world performance.
Experimental results
Research questions
- RQ1Can formulating network pruning as a Knapsack Problem lead to better trade-offs between accuracy and computational cost compared to heuristic pruning methods?
- RQ2Does transferring intermediate feature representations (inner knowledge) from the parent network improve the accuracy of pruned models?
- RQ3Can the proposed method effectively prune complex architectures such as ResNets and EfficientNets that include skip-connections and depthwise convolutions?
- RQ4Does time-based pruning—optimizing for actual inference speed on GPU—yield faster models than FLOPs-based pruning, even at the same FLOP budget?
- RQ5Can the proposed method achieve state-of-the-art accuracy on ImageNet and CIFAR benchmarks while matching or beating the inference speed of SOTA models like MobileNetV3 and EfficientNet-B0?
Key findings
- The method achieves 80.69% top-1 accuracy on ImageNet with a pruned ECA-ResNet-101D model at 2.58 G FLOPs, outperforming EfficientNet-B0 at the same FLOP level.
- Time-based pruning of ECA-ResNet-101D with 57% pruning ratio achieves 80.86% accuracy and 1010 images/sec on a P100 GPU, the fastest known model above 80% accuracy on ImageNet at that FLOP level.
- The pruned ECA-ResNet-50D model with 43% pruning achieves 79.71% accuracy at 3587 images/sec on V100, outperforming MobileNetV3 in speed-accuracy trade-off.
- Inner Knowledge Distillation significantly improves fine-tuning performance, enabling the pruned network to better retain the feature representation capacity of the parent network.
- The block grouping approach successfully enables pruning of non-sequential and complex layers such as skip-connections and squeeze-and-excitation modules.
- The method is one-shot and does not require iterative retraining, making it efficient and applicable to pre-trained models.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.