Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic Programming

Jinuk Kim, Yeonwoo Jeong, Deokjae Lee, Hyun Oh Song
1/28/2023
cs.LG

No official code found. Best implementation: snu-mllab/Efficient-CNN-Depth-Compression (13 stars, MIT, last commit 2026-04-13).

Abstract

Recent works on neural network pruning advocate that reducing the depth of the network is more effective in reducing run-time memory usage and accelerating inference latency than reducing the width of the network through channel pruning. In this regard, some recent works propose depth compression algorithms that merge convolution layers. However, the existing algorithms have a constricted search space and rely on human-engineered heuristics. In this paper, we propose a novel depth compression algorithm which targets general convolution operations. We propose a subset selection problem that replaces inefficient activation layers with identity functions and optimally merges consecutive convolution operations into shallow equivalent convolution operations for efficient end-to-end inference latency. Since the proposed subset selection problem is NP-hard, we formulate a surrogate optimization problem that can be solved exactly via two-stage dynamic programming within a few seconds. We evaluate our methods and baselines by TensorRT for a fair inference latency comparison. Our method outperforms the baseline method with higher accuracy and faster inference speed in MobileNetV2 on the ImageNet dataset. Specifically, we achieve $1.41\times$ speed-up with $0.11$\%p accuracy gain in MobileNetV2-1.0 on the ImageNet.

View on arXivView PDF

Code Implementations(1)

MIT

Official PyTorch implementation of "Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic Programming" (ICML'23)

130PythonMay 29, 20236 months agoMIT
cnncompressionmodel-compressionneural-network-compressionneural-network-pruning+1 more

Similar Papers

Cite this paper

@article{kim2023efficient,
  title  = {Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic Programming},
  author = {Jinuk Kim and Yeonwoo Jeong and Deokjae Lee and Hyun Oh Song},
  year   = {2023},
  eprint = {2301.12187},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2301.12187v2},
  journal = {ICML 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2301.12187.svg)](https://codeofpaper.com/paper/2301.12187)

Discussion